Thread (108 messages) 108 messages, 11 authors, 2021-03-19

Re: [PATCH v11 3/8] powerpc/perf: consolidate read_user_stack_32

From: Nicholas Piggin <npiggin@gmail.com>
Date: 2020-04-03 11:26:45
Also in: linux-fsdevel, lkml

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:
[...]
quoted
 #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.

Thanks,
Nick
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help