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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BYAPR21MB1688FEE6BA7464980CCF7A21D7A89@BYAPR21MB1688.namprd21.prod.outlook.com>
Date:   Fri, 24 Feb 2023 18:24:32 +0000
From:   "Michael Kelley (LINUX)" <mikelley@...rosoft.com>
To:     Usama Arif <usama.arif@...edance.com>,
        "dwmw2@...radead.org" <dwmw2@...radead.org>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "kim.phillips@....com" <kim.phillips@....com>,
        "brgerst@...il.com" <brgerst@...il.com>
CC:     "piotrgorski@...hyos.org" <piotrgorski@...hyos.org>,
        "oleksandr@...alenko.name" <oleksandr@...alenko.name>,
        "arjan@...ux.intel.com" <arjan@...ux.intel.com>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "bp@...en8.de" <bp@...en8.de>,
        "dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
        "hpa@...or.com" <hpa@...or.com>, "x86@...nel.org" <x86@...nel.org>,
        "pbonzini@...hat.com" <pbonzini@...hat.com>,
        "paulmck@...nel.org" <paulmck@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "rcu@...r.kernel.org" <rcu@...r.kernel.org>,
        "mimoja@...oja.de" <mimoja@...oja.de>,
        "hewenliang4@...wei.com" <hewenliang4@...wei.com>,
        "thomas.lendacky@....com" <thomas.lendacky@....com>,
        "seanjc@...gle.com" <seanjc@...gle.com>,
        "pmenzel@...gen.mpg.de" <pmenzel@...gen.mpg.de>,
        "fam.zheng@...edance.com" <fam.zheng@...edance.com>,
        "punit.agrawal@...edance.com" <punit.agrawal@...edance.com>,
        "simon.evans@...edance.com" <simon.evans@...edance.com>,
        "liangma@...ngbit.com" <liangma@...ngbit.com>,
        David Woodhouse <dwmw@...zon.co.uk>
Subject: RE: [PATCH v11 09/12] x86/smpboot: Remove initial_stack on 64-bit

From: Usama Arif <usama.arif@...edance.com> Sent: Thursday, February 23, 2023 11:12 AM
> 
> From: Brian Gerst <brgerst@...il.com>
> 
> Load RSP from current_task->thread.sp instead.
> 
> Signed-off-by: Brian Gerst <brgerst@...il.com>
> Reviewed-by: David Woodhouse <dwmw@...zon.co.uk>
> Signed-off-by: David Woodhouse <dwmw@...zon.co.uk>
> Tested-by: Usama Arif <usama.arif@...edance.com>
> Signed-off-by: Usama Arif <usama.arif@...edance.com>
> ---
>  arch/x86/include/asm/processor.h |  6 +++++-
>  arch/x86/kernel/acpi/sleep.c     |  2 +-
>  arch/x86/kernel/head_64.S        | 35 ++++++++++++++++++--------------
>  arch/x86/xen/xen-head.S          |  2 +-
>  4 files changed, 27 insertions(+), 18 deletions(-)
> 
> diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
> index 4e35c66edeb7..9c4a5c4d46c1 100644
> --- a/arch/x86/include/asm/processor.h
> +++ b/arch/x86/include/asm/processor.h
> @@ -648,7 +648,11 @@ static inline void spin_lock_prefetch(const void *x)
>  #define KSTK_ESP(task)		(task_pt_regs(task)->sp)
> 
>  #else
> -#define INIT_THREAD { }
> +extern unsigned long __end_init_task[];
> +
> +#define INIT_THREAD {							\
> +	.sp	= (unsigned long)&__end_init_task - PTREGS_SIZE,	\
> +}

I'm getting a compile error on the new reference to PTREGS_SIZE:

In file included from ./arch/x86/include/asm/cpufeature.h:5:0,
                 from ./arch/x86/include/asm/thread_info.h:53,
                 from ./include/linux/thread_info.h:60,
                 from ./arch/x86/include/asm/preempt.h:9,
                 from ./include/linux/preempt.h:78,
                 from ./include/linux/rcupdate.h:27,
                 from ./include/linux/init_task.h:5,
                 from init/init_task.c:2:
./arch/x86/include/asm/processor.h:654:42: error: 'PTREGS_SIZE' undeclared here (not in a function); did you mean 'TLS_SIZE'?
  .sp = (unsigned long)&__end_init_task - PTREGS_SIZE, \
                                          ^
init/init_task.c:115:13: note: in expansion of macro 'INIT_THREAD'
  .thread  = INIT_THREAD,
             ^~~~~~~~~~~
scripts/Makefile.build:252: recipe for target 'init/init_task.o' failed

Michael

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ