Commit 2b23576
scm: use masked_user_access_begin() in put_cmsg()
Use the greatest and latest uaccess construct to get an optimal code.
Before :
lea (%r9,%rcx,1),%r10
movabs $<USER_PTR_MAX>,%r11
mov $0xfffffff2,%eax
cmp %rcx,%r10
jb ffffffff81cdc312 <put_cmsg+0x152>
cmp %r11,%r10
ja ffffffff81cdc312 <put_cmsg+0x152>
stac
lfence
mov %r9,(%rcx)
After:
movabs $<USER_PTR_MAX>,%r9
cmp %r9,%rax
cmova %r9,%rax
stac
mov %rcx,(%rax)
Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20250925224914.3590290-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 3806446 commit 2b23576
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
276 | | - | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
277 | 279 | | |
278 | 280 | | |
279 | 281 | | |
| |||
0 commit comments