linux-next: manual merge of the powerpc tree with the kbuild tree

From: Stephen Rothwell
Date: Tue Nov 12 2024 - 17:52:45 EST


Hi all,

Today's linux-next merge of the powerpc tree got a conflict in:

arch/powerpc/Makefile

between commit:

de51342c5157 ("kbuild: add $(objtree)/ prefix to some in-kernel build artifacts")

from the kbuild tree and commit:

bee08a9e6ab0 ("powerpc: Adjust adding stack protector flags to KBUILD_CLAGS for clang")

from the powerpc tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

--
Cheers,
Stephen Rothwell

diff --cc arch/powerpc/Makefile
index 321b596d2550,99af7953e844..000000000000
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@@ -402,9 -403,11 +403,11 @@@ prepare: stack_protector_prepar
PHONY += stack_protector_prepare
stack_protector_prepare: prepare0
ifdef CONFIG_PPC64
- $(eval KBUILD_CFLAGS += -mstack-protector-guard-offset=$(shell awk '{if ($$2 == "PACA_CANARY") print $$3;}' $(objtree)/include/generated/asm-offsets.h))
+ $(eval KBUILD_CFLAGS += -mstack-protector-guard=tls -mstack-protector-guard-reg=r13 \
- -mstack-protector-guard-offset=$(shell awk '{if ($$2 == "PACA_CANARY") print $$3;}' include/generated/asm-offsets.h))
++ -mstack-protector-guard-offset=$(shell awk '{if ($$2 == "PACA_CANARY") print $$3;}' $(objtree)/include/generated/asm-offsets.h))
else
- $(eval KBUILD_CFLAGS += -mstack-protector-guard-offset=$(shell awk '{if ($$2 == "TASK_CANARY") print $$3;}' $(objtree)/include/generated/asm-offsets.h))
+ $(eval KBUILD_CFLAGS += -mstack-protector-guard=tls -mstack-protector-guard-reg=r2 \
- -mstack-protector-guard-offset=$(shell awk '{if ($$2 == "TASK_CANARY") print $$3;}' include/generated/asm-offsets.h))
++ -mstack-protector-guard-offset=$(shell awk '{if ($$2 == "TASK_CANARY") print $$3;}' $(objtree)/include/generated/asm-offsets.h))
endif
endif

Attachment: pgph2yuoVEDEc.pgp
Description: OpenPGP digital signature