From: Sedat Dilek <sedat.dilek@gmail.com>
To: George Spelvin <lkml@sdf.org>
Cc: Amit Klein <aksecurity@gmail.com>,
Eric Dumazet <edumazet@google.com>,
"Jason A. Donenfeld" <Jason@zx2c4.com>,
Andy Lutomirski <luto@kernel.org>,
Kees Cook <keescook@chromium.org>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
netdev@vger.kernel.org, Willy Tarreau <w@1wt.eu>
Subject: Re: [DRAFT PATCH] random32: make prandom_u32() output unpredictable
Date: Thu, 13 Aug 2020 10:27:04 +0200 [thread overview]
Message-ID: <CA+icZUUdtRm7uHPT=TtT1BEE0dQU3pFP-nvqwBE7ES1F_kvXSA@mail.gmail.com> (raw)
In-Reply-To: <CA+icZUWiXyP-s+=V9xy00ZwjaSQKZ9GOG_cvkCetNTVYHNipGg@mail.gmail.com>
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
Simple-Test: Press F5 in Firefox in each opened tab (5 tabs in total)
root# /home/dileks/bin/perf report --no-children --stdio > /tmp/perf-report.txt
- Sedat -
[ perf-report.txt ]
# To display the perf.data header info, please use
--header/--header-only options.
#
#
# Total Lost Samples: 0
#
# Samples: 273 of event 'random:prandom_u32'
# Event count (approx.): 273
#
# Overhead Command Shared Object Symbol
# ........ ............... ................. ...............
#
27.47% firefox-esr [kernel.kallsyms] [k] prandom_u32
|
---prandom_u32
prandom_u32
shmem_get_inode
shmem_mknod
path_openat
do_filp_open
do_sys_openat2
__x64_sys_openat
do_syscall_64
entry_SYSCALL_64_after_hwframe
__open64
0x7a6f6d2e67726f2f
13.19% DNS Resolver #9 [kernel.kallsyms] [k] prandom_u32
|
---prandom_u32
prandom_u32
|
|--5.86%--__ip4_datagram_connect
| ip4_datagram_connect
| __sys_connect
| __x64_sys_connect
| do_syscall_64
| entry_SYSCALL_64_after_hwframe
| |
| |--4.40%--__libc_connect
| | 0x2c1
| |
| --1.47%--connect
| PR_GetAddrInfoByName
|
|--2.93%--udp_lib_get_port
| inet_dgram_connect
| __sys_connect
| __x64_sys_connect
| do_syscall_64
| entry_SYSCALL_64_after_hwframe
| |
| |--2.20%--__libc_connect
| | 0x2c1
| |
| --0.73%--connect
| PR_GetAddrInfoByName
|
|--2.20%--__ip_select_ident
| __ip_make_skb
| ip_make_skb
| udp_sendmsg
| __sys_sendto
| __x64_sys_sendto
| do_syscall_64
| entry_SYSCALL_64_after_hwframe
| __libc_send
|
--2.20%--netlink_autobind
netlink_bind
__sys_bind
__x64_sys_bind
do_syscall_64
entry_SYSCALL_64_after_hwframe
bind
getaddrinfo
PR_GetAddrInfoByName
12.45% FS Broker 7060 [kernel.kallsyms] [k] prandom_u32
|
---prandom_u32
prandom_u32
shmem_get_inode
shmem_mknod
path_openat
do_filp_open
do_sys_openat2
__x64_sys_openat
do_syscall_64
entry_SYSCALL_64_after_hwframe
__open64
0x7a6f6d2e67726f2f
8.79% FS Broker 6334 [kernel.kallsyms] [k] prandom_u32
|
---prandom_u32
prandom_u32
shmem_get_inode
shmem_mknod
path_openat
do_filp_open
do_sys_openat2
__x64_sys_openat
do_syscall_64
entry_SYSCALL_64_after_hwframe
__open64
0x7a6f6d2e67726f2f
8.06% FS Broker 7161 [kernel.kallsyms] [k] prandom_u32
|
---prandom_u32
prandom_u32
shmem_get_inode
shmem_mknod
path_openat
do_filp_open
do_sys_openat2
__x64_sys_openat
do_syscall_64
entry_SYSCALL_64_after_hwframe
__open64
0x7a6f6d2e67726f2f
8.06% FS Broker 7195 [kernel.kallsyms] [k] prandom_u32
|
---prandom_u32
prandom_u32
shmem_get_inode
shmem_mknod
path_openat
do_filp_open
do_sys_openat2
__x64_sys_openat
do_syscall_64
entry_SYSCALL_64_after_hwframe
__open64
0x7a6f6d2e67726f2f
7.33% FS Broker 7126 [kernel.kallsyms] [k] prandom_u32
|
---prandom_u32
prandom_u32
shmem_get_inode
shmem_mknod
path_openat
do_filp_open
do_sys_openat2
__x64_sys_openat
do_syscall_64
entry_SYSCALL_64_after_hwframe
__open64
0x7a6f6d2e67726f2f
7.33% Socket Thread [kernel.kallsyms] [k] prandom_u32
|
---prandom_u32
prandom_u32
tcp_v4_connect
__inet_stream_connect
inet_stream_connect
__sys_connect
__x64_sys_connect
do_syscall_64
entry_SYSCALL_64_after_hwframe
__libc_connect
4.40% Cache2 I/O [kernel.kallsyms] [k] prandom_u32
|
---prandom_u32
prandom_u32
__ext4_new_inode
ext4_create
path_openat
do_filp_open
do_sys_openat2
__x64_sys_openat
do_syscall_64
entry_SYSCALL_64_after_hwframe
__open64
0x61632e2f736b656c
1.10% Xorg [kernel.kallsyms] [k] prandom_u32
|
---prandom_u32
prandom_u32
shmem_get_inode
__shmem_file_setup
create_shmem
i915_gem_object_create_region
i915_gem_create_ioctl
drm_ioctl_kernel
drm_ioctl
__se_sys_ioctl
do_syscall_64
entry_SYSCALL_64_after_hwframe
ioctl
0.73% QSGRenderThread [kernel.kallsyms] [k] prandom_u32
|
---prandom_u32
prandom_u32
shmem_get_inode
__shmem_file_setup
create_shmem
i915_gem_object_create_region
i915_gem_create_ioctl
drm_ioctl_kernel
drm_ioctl
__se_sys_ioctl
do_syscall_64
entry_SYSCALL_64_after_hwframe
ioctl
0.37% DOM Worker [kernel.kallsyms] [k] prandom_u32
|
---prandom_u32
prandom_u32
__ext4_new_inode
ext4_create
path_openat
do_filp_open
do_sys_openat2
__x64_sys_openat
do_syscall_64
entry_SYSCALL_64_after_hwframe
__open64
0x6f6d2e2f736b656c
0.37% cupsd [kernel.kallsyms] [k] prandom_u32
|
---prandom_u32
prandom_u32
__ext4_new_inode
ext4_create
path_openat
do_filp_open
do_sys_openat2
__x64_sys_openat
do_syscall_64
entry_SYSCALL_64_after_hwframe
__open64
0x7263736275732f73
0.37% mozStorage #8 [kernel.kallsyms] [k] prandom_u32
|
---prandom_u32
prandom_u32
__ext4_new_inode
ext4_create
path_openat
do_filp_open
do_sys_openat2
__x64_sys_openat
do_syscall_64
entry_SYSCALL_64_after_hwframe
__open64
0x6f6d2e2f736b656c
# Samples: 0 of event 'dummy:HG'
# Event count (approx.): 0
#
# Overhead Command Shared Object Symbol
# ........ ....... ............. ......
#
#
# (Tip: Print event counts in CSV format with: perf stat -x,)
#
- EOF -
next prev parent reply other threads:[~2020-08-13 8:27 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CA+icZUVnsmf1kXPYFYufStQ_MxnLuxL+EWfDS2wQy1VbAEMwkA@mail.gmail.com>
2020-08-09 21:10 ` [DRAFT PATCH] random32: make prandom_u32() output unpredictable Sedat Dilek
[not found] ` <20200809235412.GD25124@SDF.ORG>
[not found] ` <20200810034948.GB8262@1wt.eu>
[not found] ` <20200811053455.GH25124@SDF.ORG>
[not found] ` <20200811054328.GD9456@1wt.eu>
[not found] ` <20200811062814.GI25124@SDF.ORG>
[not found] ` <20200811074538.GA9523@1wt.eu>
2020-08-11 10:51 ` Sedat Dilek
2020-08-11 11:01 ` Sedat Dilek
2020-08-12 3:21 ` Willy Tarreau
2020-08-13 7:53 ` Sedat Dilek
2020-08-13 8:06 ` Willy Tarreau
2020-08-13 8:13 ` Sedat Dilek
2020-08-13 8:27 ` Sedat Dilek [this message]
2020-08-13 14:00 ` Eric Dumazet
2020-08-13 16:02 ` Sedat Dilek
2020-08-14 15:32 ` Sedat Dilek
2020-08-14 16:05 ` Willy Tarreau
2020-08-14 16:17 ` Sedat Dilek
2020-08-16 15:01 ` Willy Tarreau
2020-08-16 16:48 ` Sedat Dilek
2020-08-20 3:05 ` Sedat Dilek
2020-08-20 4:33 ` Willy Tarreau
2020-08-20 4:42 ` Sedat Dilek
2020-08-20 6:08 ` Willy Tarreau
2020-08-20 6:58 ` Willy Tarreau
2020-08-20 8:05 ` Willy Tarreau
2020-08-20 12:08 ` Sedat Dilek
[not found] ` <CANEQ_+L+22Hkdqf38Zr0bfq16fcL1Ax2X9fToXV_niHKXCB8aA@mail.gmail.com>
2020-08-27 1:09 ` Willy Tarreau
2020-08-27 7:08 ` Sedat Dilek
2020-08-08 15:26 Flaw in "random32: update the net random state on interrupt and activity" George Spelvin
2020-08-09 6:57 ` [DRAFT PATCH] random32: make prandom_u32() output unpredictable George Spelvin
2020-08-09 9:38 ` Willy Tarreau
2020-08-09 17:06 ` George Spelvin
2020-08-09 17:33 ` Willy Tarreau
2020-08-09 18:30 ` George Spelvin
2020-08-09 19:16 ` Willy Tarreau
2020-08-10 11:47 ` Willy Tarreau
2020-08-10 12:01 ` David Laight
2020-08-10 14:48 ` Willy Tarreau
2020-08-10 12:03 ` Florian Westphal
2020-08-10 14:53 ` Willy Tarreau
2020-08-10 16:31 ` Linus Torvalds
2020-08-10 16:58 ` Willy Tarreau
2020-08-10 17:45 ` Linus Torvalds
2020-08-10 18:01 ` Willy Tarreau
2020-08-10 21:04 ` Willy Tarreau
2020-08-11 5:26 ` George Spelvin
2020-08-11 5:37 ` Willy Tarreau
2020-08-11 3:47 ` George Spelvin
2020-08-11 3:58 ` Willy Tarreau
[not found] ` <fdbc7d7d-cba2-ef94-9bde-b3ccae0cfaac@gmail.com>
2020-08-09 21:10 ` Marc Plumb
2020-08-09 21:48 ` Linus Torvalds
2020-08-09 13:50 ` Randy Dunlap
[not found] ` <CANEQ_++a4YcwQQ2XhuguTono9=RxbSRVsMw08zLWBWJ_wxG2AQ@mail.gmail.com>
2020-08-09 16:08 ` George Spelvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CA+icZUUdtRm7uHPT=TtT1BEE0dQU3pFP-nvqwBE7ES1F_kvXSA@mail.gmail.com' \
--to=sedat.dilek@gmail.com \
--cc=Jason@zx2c4.com \
--cc=aksecurity@gmail.com \
--cc=edumazet@google.com \
--cc=keescook@chromium.org \
--cc=lkml@sdf.org \
--cc=luto@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=w@1wt.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).