RE: [RFC] raw_copy_from_user() semantics

2020-07-23 Thread David Laight
From: Catalin Marinas > Sent: 23 July 2020 11:19 > On Thu, Jul 23, 2020 at 08:37:27AM +, David Laight wrote: > > From: Catalin Marinas > > > Sent: 22 July 2020 17:54 > > > On Wed, Jul 22, 2020 at 01:14:21PM +, David Laight wrote: > > > > From: Catalin Marinas > > > > > Sent: 22 July 2020 1

Re: [RFC] raw_copy_from_user() semantics

2020-07-23 Thread Catalin Marinas
On Thu, Jul 23, 2020 at 08:37:27AM +, David Laight wrote: > From: Catalin Marinas > > Sent: 22 July 2020 17:54 > > On Wed, Jul 22, 2020 at 01:14:21PM +, David Laight wrote: > > > From: Catalin Marinas > > > > Sent: 22 July 2020 12:37 > > > > On Sun, Jul 19, 2020 at 12:34:11PM -0700, Linus T

RE: [RFC] raw_copy_from_user() semantics

2020-07-23 Thread David Laight
From: Catalin Marinas > Sent: 22 July 2020 17:54 > > On Wed, Jul 22, 2020 at 01:14:21PM +, David Laight wrote: > > From: Catalin Marinas > > > Sent: 22 July 2020 12:37 > > > On Sun, Jul 19, 2020 at 12:34:11PM -0700, Linus Torvalds wrote: > > > > On Sun, Jul 19, 2020 at 12:28 PM Linus Torvalds

Re: [RFC] raw_copy_from_user() semantics

2020-07-22 Thread Catalin Marinas
On Wed, Jul 22, 2020 at 01:14:21PM +, David Laight wrote: > From: Catalin Marinas > > Sent: 22 July 2020 12:37 > > On Sun, Jul 19, 2020 at 12:34:11PM -0700, Linus Torvalds wrote: > > > On Sun, Jul 19, 2020 at 12:28 PM Linus Torvalds > > > wrote: > > > > I think we should try to get rid of the

RE: [RFC] raw_copy_from_user() semantics

2020-07-22 Thread David Laight
From: Catalin Marinas > Sent: 22 July 2020 12:37 > > On Sun, Jul 19, 2020 at 12:34:11PM -0700, Linus Torvalds wrote: > > On Sun, Jul 19, 2020 at 12:28 PM Linus Torvalds > > wrote: > > > I think we should try to get rid of the exact semantics. > > > > Side note: I think one of the historical reaso

Re: [RFC] raw_copy_from_user() semantics

2020-07-22 Thread Catalin Marinas
On Sun, Jul 19, 2020 at 12:34:11PM -0700, Linus Torvalds wrote: > On Sun, Jul 19, 2020 at 12:28 PM Linus Torvalds > wrote: > > I think we should try to get rid of the exact semantics. > > Side note: I think one of the historical reasons for the exact > semantics was that we used to do things like

Re: [RFC] raw_copy_from_user() semantics

2020-07-19 Thread Linus Torvalds
On Sun, Jul 19, 2020 at 12:28 PM Linus Torvalds wrote: > > I think we should try to get rid of the exact semantics. Side note: I think one of the historical reasons for the exact semantics was that we used to do things like the mount option copying with a "copy_from_user()" iirc. And that could

Re: [RFC] raw_copy_from_user() semantics

2020-07-19 Thread Linus Torvalds
On Sat, Jul 18, 2020 at 8:17 PM Al Viro wrote: > > So any byte-squeezing loop of that sort would break on a bunch > of architectures. I think we should try to get rid of the exact semantics. If "copy_from/to_user()" takes a fault because it does a larger-than-byte access (and with unroll