Re: [PATCH v1 1/6] fs/readdir: Fix filldir() and filldir64() use of user_access_begin()

2020-01-22 Thread Christophe Leroy
Le 22/01/2020 à 18:41, Al Viro a écrit : On Wed, Jan 22, 2020 at 08:13:12AM -0800, Linus Torvalds wrote: On Wed, Jan 22, 2020 at 5:00 AM Christophe Leroy wrote: Modify filldir() and filldir64() to request the real area they need to get access to. Not like this. This makes the situation

Re: [PATCH v1 1/6] fs/readdir: Fix filldir() and filldir64() use of user_access_begin()

2020-01-22 Thread Al Viro
On Wed, Jan 22, 2020 at 08:13:12AM -0800, Linus Torvalds wrote: > On Wed, Jan 22, 2020 at 5:00 AM Christophe Leroy > wrote: > > > > Modify filldir() and filldir64() to request the real area they need > > to get access to. > > Not like this. > > This makes the situation for architectures like x86

Re: [PATCH v1 1/6] fs/readdir: Fix filldir() and filldir64() use of user_access_begin()

2020-01-22 Thread Linus Torvalds
On Wed, Jan 22, 2020 at 5:00 AM Christophe Leroy wrote: > > Modify filldir() and filldir64() to request the real area they need > to get access to. Not like this. This makes the situation for architectures like x86 much worse, since you now use "put_user()" for the previous dirent filling. Which

[PATCH v1 1/6] fs/readdir: Fix filldir() and filldir64() use of user_access_begin()

2020-01-22 Thread Christophe Leroy
Some architectures grand full access to userspace regardless of the address/len passed to user_access_begin(), but other architectures only grand access to the requested area. For exemple, on 32 bits powerpc (book3s/32), access is granted by segments of 256 Mbytes. Modify filldir() and filldir64(