lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e73850ef-f1f6-41a8-b64d-187325b868df@zytor.com>
Date: Thu, 21 Mar 2024 21:59:08 -0700
From: Xin Li <xin@...or.com>
To: Ingo Molnar <mingo@...nel.org>
Cc: linux-kernel@...r.kernel.org, xen-devel@...ts.xenproject.org,
        linux-arch@...r.kernel.org, tglx@...utronix.de, mingo@...hat.com,
        bp@...en8.de, dave.hansen@...ux.intel.com, x86@...nel.org,
        hpa@...or.com, jgross@...e.com, boris.ostrovsky@...cle.com,
        arnd@...db.de, Brian Gerst <brgerst@...il.com>
Subject: Re: [PATCH v2 1/1] x86: Rename __{start,end}_init_task to
 __{start,end}_init_stack

On 3/21/2024 12:54 PM, Ingo Molnar wrote:
> 
> * Xin Li (Intel) <xin@...or.com> wrote:
> 
>> The stack of a task has been separated from the memory of a task_struct
>> struture for a long time on x86, as a result __{start,end}_init_task no
>> longer mark the start and end of the init_task structure, but its stack
>> only.
>>
>> Rename __{start,end}_init_task to __{start,end}_init_stack.
>>
>> Note other architectures are not affected because __{start,end}_init_task
>> are used on x86 only.
>>
>> Signed-off-by: Xin Li (Intel) <xin@...or.com>
>> ---
>>
>> Change since v1:
>> * Revert an accident insane change, init_task to init_stack (Jürgen Groß).
>> ---
>>   arch/x86/include/asm/processor.h  | 4 ++--
>>   arch/x86/kernel/head_64.S         | 2 +-
>>   arch/x86/xen/xen-head.S           | 2 +-
>>   include/asm-generic/vmlinux.lds.h | 6 +++---
>>   4 files changed, 7 insertions(+), 7 deletions(-)
> 
> Note that this is now in conflict with this cleanup by Brian Gerst:
> 
>     2cb16181a1d1 x86/boot: Simplify boot stack setup

I like this patch, which does something that I'm also doing, further 
x86_64 doesn't have the concept of TOP_OF_KERNEL_STACK_PADDING, and
I guess it was extended from x86_32 but defined to 0 just for code 
consistency.

Yes, FRED code uses TOP_OF_KERNEL_STACK_PADDING, but a FRED event frame 
could contain different amount of information for different event types,
e.g., #MCE could push extra bytes of information, or perhaps even for 
different instances of the same event type. Thus the size of an event 
frame pushed by a FRED CPU is not fixed and the address of the pt_regs 
structure that is used to save the user level context of current task is 
not at a fixed offset from the top of current task kernel stack.

> 
> .. which removed __end_init_task[] entirely.


Not really, but __end_init_task[] is only used to initialize 
__top_init_kernel_stack.

I will rebase and send v3.

Thanks!
     Xin







Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ