Re: [PATCH v11 35/37] x86/syscall: Split IDT syscall setup code into idt_syscall_init()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx> 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



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux