[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+icZUVTvB2A-6ZKcrW2crn8SMRqYPzYALf=3eWiRcBpb=k7Cg@mail.gmail.com>
Date: Thu, 13 Aug 2020 18:02:34 +0200
From: Sedat Dilek <sedat.dilek@...il.com>
To: Eric Dumazet <edumazet@...gle.com>
Cc: George Spelvin <lkml@....org>, Amit Klein <aksecurity@...il.com>,
"Jason A. Donenfeld" <Jason@...c4.com>,
Andy Lutomirski <luto@...nel.org>,
Kees Cook <keescook@...omium.org>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
netdev <netdev@...r.kernel.org>, Willy Tarreau <w@....eu>
Subject: Re: [DRAFT PATCH] random32: make prandom_u32() output unpredictable
On Thu, Aug 13, 2020 at 4:00 PM Eric Dumazet <edumazet@...gle.com> wrote:
>
> On Thu, Aug 13, 2020 at 1:27 AM Sedat Dilek <sedat.dilek@...il.com> wrote:
> >
> > I run a perf session looks like this in my KDE/Plasma desktop-environment:
> >
> > [ PERF SESSION ]
> >
> > 1016 2020-08-13 09:57:24 echo 1 > /proc/sys/kernel/sched_schedstats
> > 1017 2020-08-13 09:57:24 echo prandom_u32 >>
> > /sys/kernel/debug/tracing/set_event
> > 1018 2020-08-13 09:57:24 echo traceon >
> > /sys/kernel/debug/tracing/events/random/prandom_u32/trigger
> > 1019 2020-08-13 09:57:25 echo 1 > /sys/kernel/debug/tracing/events/enable
> >
> > 1020 2020-08-13 09:57:32 sysctl -n kernel.sched_schedstats
> > 1021 2020-08-13 09:57:32 cat /sys/kernel/debug/tracing/events/enable
> > 1022 2020-08-13 09:57:32 grep prandom_u32 /sys/kernel/debug/tracing/set_event
> > 1023 2020-08-13 09:57:33 cat
> > /sys/kernel/debug/tracing/events/random/prandom_u32/trigger
> >
> > root# /home/dileks/bin/perf record -a -g -e random:prandom_u32 sleep 5
> >
>
> To be clear : This "perf record -a -g -e random:prandom_u32 sleep 5"
> is self sufficient.
>
> You have nothing to do before (as reported in your email), this is
> simply not needed.
>
> I am not sure why you added all this irrelevant stuff, this is distracting.
Initially I followed these Links:
Link: https://www.kernel.org/doc/html/v5.8/trace/events.html
Link: https://www.kernel.org/doc/html/v5.8/trace/events.html#boot-option
Link: http://www.brendangregg.com/perf.html
Link: http://www.brendangregg.com/perf.html#DynamicTracing
You are right, it's not needed to set and check all these variables as
perf says:
root# /home/dileks/bin/perf list | grep prandom_u32
random:prandom_u32 [Tracepoint event]
So these two steps are indeed enough:
root# /home/dileks/bin/perf record -a -g -e random:prandom_u32 sleep 5
root# /home/dileks/bin/perf report --no-children --stdio
Lessons learned.
- Sedat -
Powered by blists - more mailing lists