* Re: [PATCH] runtime constants: move list of constants to vmlinux.lds.h
2024-07-30 20:15 [PATCH] runtime constants: move list of constants to vmlinux.lds.h Jann Horn
@ 2024-07-30 21:29 ` Arnd Bergmann
2024-07-30 22:00 ` Jann Horn
2024-07-31 6:14 ` Alexander Gordeev
` (3 subsequent siblings)
4 siblings, 1 reply; 9+ messages in thread
From: Arnd Bergmann @ 2024-07-30 21:29 UTC (permalink / raw)
To: Jann Horn, Linus Torvalds
Cc: Catalin Marinas, Will Deacon, Heiko Carstens, Vasily Gorbik,
Alexander Gordeev, Christian Borntraeger, Sven Schnelle,
Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
H. Peter Anvin, linux-arm-kernel, linux-kernel, linux-s390,
Linux-Arch
On Tue, Jul 30, 2024, at 22:15, Jann Horn wrote:
> Refactor the list of constant variables into a macro.
> This should make it easier to add more constants in the future.
>
> Signed-off-by: Jann Horn <jannh@google.com>
> ---
> I'm not sure whose tree this has to go through - I guess Arnd's?
This is for 6.12, right? I can take it through the asm-generic
tree if that helps, but someone else should review it first.
If you have any other patches that would depend on this patch,
you can also take it through the other tree and add
Acked-by: Arnd Bergmann <arnd@arndb.de>
for cross-architecture bits.
Arnd
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] runtime constants: move list of constants to vmlinux.lds.h
2024-07-30 21:29 ` Arnd Bergmann
@ 2024-07-30 22:00 ` Jann Horn
2024-08-09 14:17 ` Jann Horn
0 siblings, 1 reply; 9+ messages in thread
From: Jann Horn @ 2024-07-30 22:00 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Linus Torvalds, Catalin Marinas, Will Deacon, Heiko Carstens,
Vasily Gorbik, Alexander Gordeev, Christian Borntraeger,
Sven Schnelle, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
Dave Hansen, x86, H. Peter Anvin, linux-arm-kernel, linux-kernel,
linux-s390, Linux-Arch
On Tue, Jul 30, 2024 at 11:29 PM Arnd Bergmann <arnd@arndb.de> wrote:
> On Tue, Jul 30, 2024, at 22:15, Jann Horn wrote:
> > Refactor the list of constant variables into a macro.
> > This should make it easier to add more constants in the future.
> >
> > Signed-off-by: Jann Horn <jannh@google.com>
> > ---
> > I'm not sure whose tree this has to go through - I guess Arnd's?
>
> This is for 6.12, right?
Yeah.
> I can take it through the asm-generic
> tree if that helps, but someone else should review it first.
>
> If you have any other patches that would depend on this patch,
> you can also take it through the other tree and add
>
> Acked-by: Arnd Bergmann <arnd@arndb.de>
>
> for cross-architecture bits.
Thanks!
I was thinking of maybe trying to write a patch based on it that'd
have to go through the MM tree (for using this in kfence), though I'm
not sure whether I'll actually do that yet. So your suggestion makes
sense, maybe hold off on putting this in a tree for now...
>
> Arnd
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] runtime constants: move list of constants to vmlinux.lds.h
2024-07-30 22:00 ` Jann Horn
@ 2024-08-09 14:17 ` Jann Horn
0 siblings, 0 replies; 9+ messages in thread
From: Jann Horn @ 2024-08-09 14:17 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Linus Torvalds, Catalin Marinas, Will Deacon, Heiko Carstens,
Vasily Gorbik, Alexander Gordeev, Christian Borntraeger,
Sven Schnelle, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
Dave Hansen, x86, H. Peter Anvin, linux-arm-kernel, linux-kernel,
linux-s390, Linux-Arch
On Wed, Jul 31, 2024 at 12:00 AM Jann Horn <jannh@google.com> wrote:
> On Tue, Jul 30, 2024 at 11:29 PM Arnd Bergmann <arnd@arndb.de> wrote:
> > On Tue, Jul 30, 2024, at 22:15, Jann Horn wrote:
> > > Refactor the list of constant variables into a macro.
> > > This should make it easier to add more constants in the future.
> > >
> > > Signed-off-by: Jann Horn <jannh@google.com>
> > > ---
> > > I'm not sure whose tree this has to go through - I guess Arnd's?
> >
> > This is for 6.12, right?
>
> Yeah.
>
> > I can take it through the asm-generic
> > tree if that helps, but someone else should review it first.
> >
> > If you have any other patches that would depend on this patch,
> > you can also take it through the other tree and add
> >
> > Acked-by: Arnd Bergmann <arnd@arndb.de>
> >
> > for cross-architecture bits.
>
> Thanks!
>
> I was thinking of maybe trying to write a patch based on it that'd
> have to go through the MM tree (for using this in kfence), though I'm
> not sure whether I'll actually do that yet. So your suggestion makes
> sense, maybe hold off on putting this in a tree for now...
I don't think I'll get around to doing anything on top of this patch
for the next few months at least, please take it through your tree.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] runtime constants: move list of constants to vmlinux.lds.h
2024-07-30 20:15 [PATCH] runtime constants: move list of constants to vmlinux.lds.h Jann Horn
2024-07-30 21:29 ` Arnd Bergmann
@ 2024-07-31 6:14 ` Alexander Gordeev
2024-07-31 19:36 ` Thomas Gleixner
` (2 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Alexander Gordeev @ 2024-07-31 6:14 UTC (permalink / raw)
To: Jann Horn
Cc: Arnd Bergmann, Linus Torvalds, Catalin Marinas, Will Deacon,
Heiko Carstens, Vasily Gorbik, Christian Borntraeger,
Sven Schnelle, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
Dave Hansen, x86, H. Peter Anvin, linux-arm-kernel, linux-kernel,
linux-s390, linux-arch
On Tue, Jul 30, 2024 at 10:15:16PM +0200, Jann Horn wrote:
> Refactor the list of constant variables into a macro.
> This should make it easier to add more constants in the future.
>
> Signed-off-by: Jann Horn <jannh@google.com>
> ---
> I'm not sure whose tree this has to go through - I guess Arnd's?
> ---
> arch/arm64/kernel/vmlinux.lds.S | 3 +--
> arch/s390/kernel/vmlinux.lds.S | 3 +--
> arch/x86/kernel/vmlinux.lds.S | 3 +--
> include/asm-generic/vmlinux.lds.h | 4 ++++
> 4 files changed, 7 insertions(+), 6 deletions(-)
...
> diff --git a/arch/s390/kernel/vmlinux.lds.S b/arch/s390/kernel/vmlinux.lds.S
> index 975c654cf5a5..3e8ebf1d64c5 100644
> --- a/arch/s390/kernel/vmlinux.lds.S
> +++ b/arch/s390/kernel/vmlinux.lds.S
> @@ -187,14 +187,13 @@ SECTIONS
> _eamode31 = .;
>
> /* early.c uses stsi, which requires page aligned data. */
> . = ALIGN(PAGE_SIZE);
> INIT_DATA_SECTION(0x100)
>
> - RUNTIME_CONST(shift, d_hash_shift)
> - RUNTIME_CONST(ptr, dentry_hashtable)
> + RUNTIME_CONST_VARIABLES
>
> PERCPU_SECTION(0x100)
>
> . = ALIGN(PAGE_SIZE);
> __init_end = .; /* freed after init ends here */
>
...
For s390:
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] runtime constants: move list of constants to vmlinux.lds.h
2024-07-30 20:15 [PATCH] runtime constants: move list of constants to vmlinux.lds.h Jann Horn
2024-07-30 21:29 ` Arnd Bergmann
2024-07-31 6:14 ` Alexander Gordeev
@ 2024-07-31 19:36 ` Thomas Gleixner
2024-07-31 21:25 ` Linus Torvalds
2024-08-16 10:41 ` Will Deacon
4 siblings, 0 replies; 9+ messages in thread
From: Thomas Gleixner @ 2024-07-31 19:36 UTC (permalink / raw)
To: Jann Horn, Arnd Bergmann, Linus Torvalds
Cc: Catalin Marinas, Will Deacon, Heiko Carstens, Vasily Gorbik,
Alexander Gordeev, Christian Borntraeger, Sven Schnelle,
Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin,
linux-arm-kernel, linux-kernel, linux-s390, linux-arch, Jann Horn
On Tue, Jul 30 2024 at 22:15, Jann Horn wrote:
> Refactor the list of constant variables into a macro.
> This should make it easier to add more constants in the future.
>
> Signed-off-by: Jann Horn <jannh@google.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] runtime constants: move list of constants to vmlinux.lds.h
2024-07-30 20:15 [PATCH] runtime constants: move list of constants to vmlinux.lds.h Jann Horn
` (2 preceding siblings ...)
2024-07-31 19:36 ` Thomas Gleixner
@ 2024-07-31 21:25 ` Linus Torvalds
2024-08-16 10:41 ` Will Deacon
4 siblings, 0 replies; 9+ messages in thread
From: Linus Torvalds @ 2024-07-31 21:25 UTC (permalink / raw)
To: Jann Horn
Cc: Arnd Bergmann, Catalin Marinas, Will Deacon, Heiko Carstens,
Vasily Gorbik, Alexander Gordeev, Christian Borntraeger,
Sven Schnelle, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
Dave Hansen, x86, H. Peter Anvin, linux-arm-kernel, linux-kernel,
linux-s390, linux-arch
On Tue, 30 Jul 2024 at 13:15, Jann Horn <jannh@google.com> wrote:
>
> Refactor the list of constant variables into a macro.
> This should make it easier to add more constants in the future.
LGTM too.
Linus
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] runtime constants: move list of constants to vmlinux.lds.h
2024-07-30 20:15 [PATCH] runtime constants: move list of constants to vmlinux.lds.h Jann Horn
` (3 preceding siblings ...)
2024-07-31 21:25 ` Linus Torvalds
@ 2024-08-16 10:41 ` Will Deacon
2024-08-19 7:49 ` Arnd Bergmann
4 siblings, 1 reply; 9+ messages in thread
From: Will Deacon @ 2024-08-16 10:41 UTC (permalink / raw)
To: Jann Horn
Cc: Arnd Bergmann, Linus Torvalds, Catalin Marinas, Heiko Carstens,
Vasily Gorbik, Alexander Gordeev, Christian Borntraeger,
Sven Schnelle, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
Dave Hansen, x86, H. Peter Anvin, linux-arm-kernel, linux-kernel,
linux-s390, linux-arch
On Tue, Jul 30, 2024 at 10:15:16PM +0200, Jann Horn wrote:
> Refactor the list of constant variables into a macro.
> This should make it easier to add more constants in the future.
>
> Signed-off-by: Jann Horn <jannh@google.com>
> ---
> I'm not sure whose tree this has to go through - I guess Arnd's?
> ---
> arch/arm64/kernel/vmlinux.lds.S | 3 +--
> arch/s390/kernel/vmlinux.lds.S | 3 +--
> arch/x86/kernel/vmlinux.lds.S | 3 +--
> include/asm-generic/vmlinux.lds.h | 4 ++++
> 4 files changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S
> index 55a8e310ea12..58d89d997d05 100644
> --- a/arch/arm64/kernel/vmlinux.lds.S
> +++ b/arch/arm64/kernel/vmlinux.lds.S
> @@ -261,14 +261,13 @@ SECTIONS
> *(.init.altinstructions .init.bss) /* from the EFI stub */
> }
> .exit.data : {
> EXIT_DATA
> }
>
> - RUNTIME_CONST(shift, d_hash_shift)
> - RUNTIME_CONST(ptr, dentry_hashtable)
> + RUNTIME_CONST_VARIABLES
>
> PERCPU_SECTION(L1_CACHE_BYTES)
> HYPERVISOR_PERCPU_SECTION
>
> HYPERVISOR_RELOC_SECTION
Acked-by: Will Deacon <will@kernel.org>
I'm assuming Arnd will pick this up.
Will
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] runtime constants: move list of constants to vmlinux.lds.h
2024-08-16 10:41 ` Will Deacon
@ 2024-08-19 7:49 ` Arnd Bergmann
0 siblings, 0 replies; 9+ messages in thread
From: Arnd Bergmann @ 2024-08-19 7:49 UTC (permalink / raw)
To: Will Deacon, Jann Horn
Cc: Linus Torvalds, Catalin Marinas, Heiko Carstens, Vasily Gorbik,
Alexander Gordeev, Christian Borntraeger, Sven Schnelle,
Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
H. Peter Anvin, linux-arm-kernel, linux-kernel, linux-s390,
Linux-Arch
On Fri, Aug 16, 2024, at 12:41, Will Deacon wrote:
> On Tue, Jul 30, 2024 at 10:15:16PM +0200, Jann Horn wrote:
>> Refactor the list of constant variables into a macro.
>> This should make it easier to add more constants in the future.
>>
>> Signed-off-by: Jann Horn <jannh@google.com>
>> ---
>> I'm not sure whose tree this has to go through - I guess Arnd's?
>
> Acked-by: Will Deacon <will@kernel.org>
>
> I'm assuming Arnd will pick this up.
I'm back from vacation now and applied it to the asm-generic
tree for 6.12.
Arnd
^ permalink raw reply [flat|nested] 9+ messages in thread