lkml.org 
[lkml]   [2023]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v11 35/37] x86/syscall: Split IDT syscall setup code into idt_syscall_init()
Date
On Mon, Sep 25 2023 at 09:07, H. Peter Anvin wrote:
> On September 23, 2023 2:42:10 AM PDT, Xin Li <xin3.li@intel.com> wrote:
>>+/* May not be marked __init: used by software suspend */
>>+void syscall_init(void)
>>+{
>>+ /* The default user and kernel segments */
>>+ wrmsr(MSR_STAR, 0, (__USER32_CS << 16) | __KERNEL_CS);
>>+
>>+ idt_syscall_init();
>>+}
>>+
>> #else /* CONFIG_X86_64 */
>>
>> #ifdef CONFIG_STACKPROTECTOR
>
> Am I missing something, or is this patch a noop?

Yes. It's a noop at this point. Later on it gains a

if (!fred)
idt_syscall_init();

Sure we could do

if (!fred) {
write_msr(foo...);
...
}

too, but I prefer the separation. No strong opinion though.

Thanks,

tglx

\
 
 \ /
  Last update: 2023-09-28 20:02    [W:0.146 / U:0.888 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site