Skip to contentSkip to conversation

READ_ONCE() + STACKPROTECTOR_STRONG == :/

DISCUSSION Alexey Dobriyan 2 participants 2 messages Dec 12, 2019

lore
Share & tools
lore
#0 lore raw
Quoted 5 lines

We could move the kernel to C++ and write:

	std::remove_volatile<typeof(p)>::type __p = (p);

/me runs like hell...

Did you just said I can send "struct sched_domain::private" and "struct wait_queue_entry::private" rename?
:^)

Doable but not until C++20. constinit and designated initializers are pretty mandatory.

Debian GNU/Linux 8 debian88 ttyS0

debian88 login: root
Password:
Last login: Thu Sep 19 01:04:29 +03 2019 on tty1
Linux debian88 5.3.0+ #1 SMP PREEMPT Thu Sep 19 01:02:26 +03 2019 x86_64

root@debian88:~# cat /proc/$(pgrep sshd)/stack
[<0>] _ZL9do_selectiP11fd_set_bitsP10timespec64+0x5ac/0x750
[<0>] _Z15core_sys_selectiP15__kernel_fd_setS0_S0_P10timespec64+0x143/0x260
[<0>] __x64_sys_select+0xa7/0xf0
[<0>] do_syscall_64+0x3b/0xe7
[<0>] entry_SYSCALL_64_after_hwframe+0x44/0xa9
#1 lore raw
Quoted 9 lines · Alexey Dobriyan
Quoted 5 lines

We could move the kernel to C++ and write:

	std::remove_volatile<typeof(p)>::type __p = (p);

/me runs like hell...

Did you just said I can send "struct sched_domain::private" and "struct wait_queue_entry::private" rename?
:^)

I don't believe those are the only usage of C++ keywords. IIRC I'm using 'class' somewhere as well.

Quoted 5 lines

Doable but not until C++20. constinit and designated initializers are pretty mandatory.

Debian GNU/Linux 8 debian88 ttyS0

Quoted 7 lines

debian88 login: root
Password:
Last login: Thu Sep 19 01:04:29 +03 2019 on tty1
Linux debian88 5.3.0+ #1 SMP PREEMPT Thu Sep 19 01:02:26 +03 2019 x86_64

root@debian88:~# cat /proc/$(pgrep sshd)/stack
[<0>] _ZL9do_selectiP11fd_set_bitsP10timespec64+0x5ac/0x750
[<0>] _Z15core_sys_selectiP15__kernel_fd_setS0_S0_P10timespec64+0x143/0x260

Argh.. I forgot how I hated mangled names.

Quoted 3 lines
[<0>] __x64_sys_select+0xa7/0xf0
[<0>] do_syscall_64+0x3b/0xe7
[<0>] entry_SYSCALL_64_after_hwframe+0x44/0xa9