2022-10-31 15:56:39

by Alexander Lobakin

[permalink] [raw]
Subject: [PATCH 0/2] x86/boot: fix relying on link order

The series contains stuff I caught last week while working on some
x86 code. It can be considered a material for fixes or for next,
I'm okay with either, although leaning more towards fixes :P

Notes on patches:
* 0001: I didn't put any "Fixes:" tag since it's not linear. The
lines changed with this patch came from the initial x86
KASLR series, but that unconditional jump to the kernel
beginning already was there. It goes at least from the set
that brought relocatable kernel support to x86, but this
is quite prehistoric already and might not look really
relatable. So up to you whether it needs any.
* 0002: doesn't fix anything, except that having any files listed
in that whitelist already is an architecture bug :D And
it wouldn't be convenient to decouple it from #0001, but
up to you as well.

Alexander Lobakin (2):
x86/boot: robustify calling startup_{32,64}() from the decompressor
code
scripts/head-object-list: remove x86 from the list

arch/x86/boot/compressed/head_32.S | 2 +-
arch/x86/boot/compressed/head_64.S | 2 +-
arch/x86/boot/compressed/misc.c | 16 +++++++++++-----
scripts/head-object-list.txt | 6 ------
4 files changed, 13 insertions(+), 13 deletions(-)

--
2.38.1



2022-10-31 15:59:01

by Borislav Petkov

[permalink] [raw]
Subject: Re: [PATCH 0/2] x86/boot: fix relying on link order

+ jslaby.

On Mon, Oct 31, 2022 at 04:10:45PM +0100, Alexander Lobakin wrote:
> The series contains stuff I caught last week while working on some
> x86 code. It can be considered a material for fixes or for next,
> I'm okay with either, although leaning more towards fixes :P
>
> Notes on patches:
> * 0001: I didn't put any "Fixes:" tag since it's not linear. The
> lines changed with this patch came from the initial x86
> KASLR series, but that unconditional jump to the kernel
> beginning already was there. It goes at least from the set
> that brought relocatable kernel support to x86, but this
> is quite prehistoric already and might not look really
> relatable. So up to you whether it needs any.
> * 0002: doesn't fix anything, except that having any files listed
> in that whitelist already is an architecture bug :D And
> it wouldn't be convenient to decouple it from #0001, but
> up to you as well.
>
> Alexander Lobakin (2):
> x86/boot: robustify calling startup_{32,64}() from the decompressor
> code
> scripts/head-object-list: remove x86 from the list
>
> arch/x86/boot/compressed/head_32.S | 2 +-
> arch/x86/boot/compressed/head_64.S | 2 +-
> arch/x86/boot/compressed/misc.c | 16 +++++++++++-----
> scripts/head-object-list.txt | 6 ------
> 4 files changed, 13 insertions(+), 13 deletions(-)
>
> --
> 2.38.1
>

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette

2022-10-31 15:59:08

by Alexander Lobakin

[permalink] [raw]
Subject: [PATCH 2/2] scripts/head-object-list: remove x86 from the list

Now that x86 boot code is not hardcoded to the particular linking
order, remove x86 files from the list and let them be placed inside
the vmlinux according only to the linker script and linker
preferences.

Signed-off-by: Alexander Lobakin <[email protected]>
---
scripts/head-object-list.txt | 6 ------
1 file changed, 6 deletions(-)

diff --git a/scripts/head-object-list.txt b/scripts/head-object-list.txt
index b16326a92c45..405d2942898a 100644
--- a/scripts/head-object-list.txt
+++ b/scripts/head-object-list.txt
@@ -44,10 +44,4 @@ arch/s390/kernel/head64.o
arch/sh/kernel/head_32.o
arch/sparc/kernel/head_32.o
arch/sparc/kernel/head_64.o
-arch/x86/kernel/head_32.o
-arch/x86/kernel/head_64.o
-arch/x86/kernel/head32.o
-arch/x86/kernel/head64.o
-arch/x86/kernel/ebda.o
-arch/x86/kernel/platform-quirks.o
arch/xtensa/kernel/head.o
--
2.38.1


2022-11-01 06:49:45

by Jiri Slaby

[permalink] [raw]
Subject: Re: [PATCH 2/2] scripts/head-object-list: remove x86 from the list

On 31. 10. 22, 16:10, Alexander Lobakin wrote:
> Now that x86 boot code is not hardcoded to the particular linking
> order, remove x86 files from the list and let them be placed inside
> the vmlinux according only to the linker script and linker
> preferences.
>
> Signed-off-by: Alexander Lobakin <[email protected]>

Tested-by: Jiri Slaby <[email protected]>

> ---
> scripts/head-object-list.txt | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/scripts/head-object-list.txt b/scripts/head-object-list.txt
> index b16326a92c45..405d2942898a 100644
> --- a/scripts/head-object-list.txt
> +++ b/scripts/head-object-list.txt
> @@ -44,10 +44,4 @@ arch/s390/kernel/head64.o
> arch/sh/kernel/head_32.o
> arch/sparc/kernel/head_32.o
> arch/sparc/kernel/head_64.o
> -arch/x86/kernel/head_32.o
> -arch/x86/kernel/head_64.o
> -arch/x86/kernel/head32.o
> -arch/x86/kernel/head64.o
> -arch/x86/kernel/ebda.o
> -arch/x86/kernel/platform-quirks.o
> arch/xtensa/kernel/head.o

--
js
suse labs