Re: [PATCH -next] powerpc: add support for syscall stack randomization

2022-05-12 Thread Michael Ellerman
xiujianfeng writes: > 在 2022/5/10 17:23, Nicholas Piggin 写道: >> Excerpts from Xiu Jianfeng's message of May 5, 2022 9:19 pm: >>> Add support for adding a random offset to the stack while handling >>> syscalls. This patch uses mftb() instead of get_random_int() for better >>> performance. >> ...

Re: [PATCH -next] powerpc: add support for syscall stack randomization

2022-05-12 Thread Michael Ellerman
Kees Cook writes: > On Tue, May 10, 2022 at 07:23:46PM +1000, Nicholas Piggin wrote: ... >> >> I wonder why the choose is separated from the add? I guess it's to >> avoid a data dependency for stack access on an expensive random >> function, so that makes sense (a comment would be nice in the >>

Re: [PATCH -next] powerpc: add support for syscall stack randomization

2022-05-10 Thread Kees Cook
On Tue, May 10, 2022 at 07:23:46PM +1000, Nicholas Piggin wrote: > Excerpts from Xiu Jianfeng's message of May 5, 2022 9:19 pm: > > Add support for adding a random offset to the stack while handling > > syscalls. This patch uses mftb() instead of get_random_int() for better > > performance. > >

Re: [PATCH -next] powerpc: add support for syscall stack randomization

2022-05-10 Thread Nicholas Piggin
Excerpts from Xiu Jianfeng's message of May 5, 2022 9:19 pm: > Add support for adding a random offset to the stack while handling > syscalls. This patch uses mftb() instead of get_random_int() for better > performance. Hey, very nice. > > Signed-off-by: Xiu Jianfeng > --- >