Re: [git pull] vfs.git pile 11 - iov_iter/hardening

2017-07-07 Thread Linus Torvalds
On Fri, Jul 7, 2017 at 5:29 PM, Al Viro wrote: > > Trivial conflicts with libnvdimm; this stuff will get some > followups, but again, that's for another series. Gaah. Yeah, I guess I could have done the trivial ugly merge that just took the new copy_from_iter_flushcache() as-is, and didn'

[git pull] vfs.git pile 11 - iov_iter/hardening

2017-07-07 Thread Al Viro
iov_iter/uaccess/hardening pile. For one thing, it trims the inline part of copy_to_user/copy_from_user to the minimum that *does* need to be inlined - object size checks, basically. For another, it sanitizes the checks for iov_iter primitives. There are 4 groups of checks: access_ok(),

Re: [git pull] vfs.git pile 11

2017-07-06 Thread Linus Torvalds
On Thu, Jul 6, 2017 at 2:20 PM, Al Viro wrote: > > Linus, could you hold that one back until tomorrow? I want to tweak the > last commit in there a bit, but I want to give it a local beating first... Ok, dropping this one. All your other branches are merged now. Linus

Re: [git pull] vfs.git pile 11

2017-07-06 Thread Al Viro
On Thu, Jul 06, 2017 at 09:29:27PM +0100, Al Viro wrote: > On Thu, Jul 06, 2017 at 09:18:26PM +0100, Al Viro wrote: > > On Thu, Jul 06, 2017 at 12:45:36PM -0700, Kees Cook wrote: > > > > > > + if (unlikely(!check_copy_size(addr, bytes, false))) > > > + return false; > > > + else > > > +

Re: [git pull] vfs.git pile 11

2017-07-06 Thread Al Viro
On Thu, Jul 06, 2017 at 09:18:26PM +0100, Al Viro wrote: > On Thu, Jul 06, 2017 at 12:45:36PM -0700, Kees Cook wrote: > > > > + if (unlikely(!check_copy_size(addr, bytes, false))) > > + return false; > > + else > > + return _copy_from_iter_full(addr, bytes, i); > > > > Can these b

Re: [git pull] vfs.git pile 11

2017-07-06 Thread Al Viro
On Thu, Jul 06, 2017 at 12:45:36PM -0700, Kees Cook wrote: > > + if (unlikely(!check_copy_size(addr, bytes, false))) > + return false; > + else > + return _copy_from_iter_full(addr, bytes, i); > > Can these be rewritten to avoid the double-negative? Matter of taste - I've no stro

Re: [git pull] vfs.git pile 11

2017-07-06 Thread Kees Cook
On Thu, Jul 6, 2017 at 2:12 AM, Al Viro wrote: > iov_iter/uaccess/hardening pile. For one thing, it trims the > inline part of copy_to_user/copy_from_user to the minimum that *does* > need to be inlined - object size checks, basically. For another, > it sanitizes the checks for iov_iter

[git pull] vfs.git pile 11

2017-07-06 Thread Al Viro
iov_iter/uaccess/hardening pile. For one thing, it trims the inline part of copy_to_user/copy_from_user to the minimum that *does* need to be inlined - object size checks, basically. For another, it sanitizes the checks for iov_iter primitives. There are 4 groups of checks: access_ok(),