[lkml]   [2023]   [Jan]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRE: the x86 sysret_rip test fails on the Intel FRED architecture
> On January 21, 2023 8:34:09 PM PST, Dave Hansen <>
> wrote:
> >On 1/21/23 19:38, Li, Xin3 wrote:
> >>> However, it doesn't seem to make sense to do so to me. The current
> >>> behavior is much more of an artifact than desired behavior.
> >> We kind of have an agreement that %r11 = %flags after returning from the
> kernel.
> >>
> >> And the question is, is it what we want?
> >
> >Can the selftest just set r11=rflags before the syscall? The old
> >syscall entry path will set r11=rflags. The FRED path won't touch it.
> >Either case will pass an r11==rflags check.
> That's a good idea.

The problem is where/how to set %r11 = %rflags in the test code.

The check happens in the USER1 signal handler, and we could set %r11
just before calling raise(SIGUSR1). However, the C library implementation
of raise() modifies %r11, thus we can't preserve %r11 until the SYSCALL
instruction. And the test still fails.

 \ /
  Last update: 2023-03-26 23:51    [W:0.319 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site