lkml.org 
[lkml]   [2023]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3] x86: Use `get_random_u8' for kernel stack offset randomization
On Tue, 14 Feb 2023, Jason A. Donenfeld wrote:

> > > Please provide numbers on contemporary hardware.
> >
> > Jason, is this something you could help me with to back up your claim?
> >
> > My access to modern x86 gear is limited and I just don't have anything I
> > can randomly fiddle with (I guess an Intel Core 2 Duo T5600 processor back
> > from 2008 doesn't count as "contemporary", does it?).
>
> I imagine tglx wants real life performance numbers rather than a
> microbench of the rng. So the thing to do would be to exercise
> arch_exit_to_user_mode() a bunch. Does this trigger on every syscall,
> even invalid ones? If so, you could make a test like:
>
> #include <sys/syscall.h>
> #include <unistd.h>
>
> int main(int argc, char *argv[])
> {
> for (int i = 0; i < (1 << 26); ++i)
> syscall(0xffffffff);
> return 0;
> }
>
> And then see if the timing changes across your patch.

Thanks. Though that does not solve my lack of suitable hardware, sigh.
It's not like I have x86 systems scattered all over the place. I guess I
could try to benchmark with said T5600 piece, but it won't be until April
the earliest as I'm away most of the time.

Maciej

\
 
 \ /
  Last update: 2023-03-27 00:32    [W:2.126 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site