Re: [PATCH v7 3/9] net/scm: Regularize compat handling of scm_detach_fds()

2020-08-08 Thread Kees Cook
On Fri, Aug 07, 2020 at 05:02:15PM -0700, John Stultz wrote: > On Fri, Aug 7, 2020 at 3:18 PM Kees Cook wrote: > > > > On Fri, Aug 07, 2020 at 01:29:24PM -0700, John Stultz wrote: > > > On Thu, Jul 9, 2020 at 11:28 AM Kees Cook wrote: > > > > > > > > Duplicate the cleanups from commit 2618d530dd8

Re: [PATCH v7 3/9] net/scm: Regularize compat handling of scm_detach_fds()

2020-08-07 Thread John Stultz
On Fri, Aug 7, 2020 at 3:18 PM Kees Cook wrote: > > On Fri, Aug 07, 2020 at 01:29:24PM -0700, John Stultz wrote: > > On Thu, Jul 9, 2020 at 11:28 AM Kees Cook wrote: > > > > > > Duplicate the cleanups from commit 2618d530dd8b ("net/scm: cleanup > > > scm_detach_fds") into the compat code. > > > >

Re: [PATCH v7 3/9] net/scm: Regularize compat handling of scm_detach_fds()

2020-08-07 Thread Kees Cook
On Fri, Aug 07, 2020 at 01:29:24PM -0700, John Stultz wrote: > On Thu, Jul 9, 2020 at 11:28 AM Kees Cook wrote: > > > > Duplicate the cleanups from commit 2618d530dd8b ("net/scm: cleanup > > scm_detach_fds") into the compat code. > > > > Replace open-coded __receive_sock() with a call to the helpe

Re: [PATCH v7 3/9] net/scm: Regularize compat handling of scm_detach_fds()

2020-08-07 Thread John Stultz
On Thu, Jul 9, 2020 at 11:28 AM Kees Cook wrote: > > Duplicate the cleanups from commit 2618d530dd8b ("net/scm: cleanup > scm_detach_fds") into the compat code. > > Replace open-coded __receive_sock() with a call to the helper. > > Move the check added in commit 1f466e1f15cf ("net: cleanly handle

[PATCH v7 3/9] net/scm: Regularize compat handling of scm_detach_fds()

2020-07-09 Thread Kees Cook
Duplicate the cleanups from commit 2618d530dd8b ("net/scm: cleanup scm_detach_fds") into the compat code. Replace open-coded __receive_sock() with a call to the helper. Move the check added in commit 1f466e1f15cf ("net: cleanly handle kernel vs user buffers for ->msg_control") to before the compa