On Fri, Apr 03, 2020 at 09:26:27PM +1000, Nicholas Piggin wrote: > Michal Suchánek's on April 3, 2020 8:52 pm: > > Hello, > > > > there are 3 variants of the function > > > > read_user_stack_64 > > > > 32bit read_user_stack_32 > > 64bit read_user_Stack_32 > > Right. > > > On Fri, Apr 03, 2020 at 05:13:25PM +1000, Nicholas Piggin wrote: > [...] > >> #endif /* CONFIG_PPC64 */ > >> > >> +static int read_user_stack_32(unsigned int __user *ptr, unsigned int *ret) > >> +{ > >> + return __read_user_stack(ptr, ret, sizeof(*ret)); > > Does not work for 64bit read_user_stack_32 ^ this should be 4. > > > > Other than that it should preserve the existing logic just fine. > > sizeof(int) == 4 on 64bit so it should work. > Right, the type is different for the 32bit and 64bit version. Thanks Michal