Skip to content

Commit ec86369

Browse files
committed
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Pull arm64 fixes from Will Deacon: "Two small fixes. The first one is an alternative fix for the SCS patching problem we thought we'd fixed in -rc1; it turned out not to be robust with all toolchains/configs, so this is a revert+retry which has seen some more testing. The other one simply removes an unused header file, but I couldn't resist the negative diffstat. - Really fix shadow call stack patching with LTO=full - Remove unused (empty) header file generated from the compat vDSO" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: vdso32: Remove unused vdso32-offsets.h arm64: scs: Disable LTO for SCS patching code arm64: Revert "scs: Work around full LTO issue with dynamic SCS"
2 parents 0215331 + c7767f5 commit ec86369

File tree

4 files changed

+4
-16
lines changed

4 files changed

+4
-16
lines changed

arch/arm64/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ vdso_prepare: prepare0
195195
include/generated/vdso-offsets.h arch/arm64/kernel/vdso/vdso.so
196196
ifdef CONFIG_COMPAT_VDSO
197197
$(Q)$(MAKE) $(build)=arch/arm64/kernel/vdso32 \
198-
include/generated/vdso32-offsets.h arch/arm64/kernel/vdso32/vdso.so
198+
arch/arm64/kernel/vdso32/vdso.so
199199
endif
200200
endif
201201

arch/arm64/include/asm/vdso.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
#ifndef __ASSEMBLY__
1818

1919
#include <generated/vdso-offsets.h>
20-
#ifdef CONFIG_COMPAT_VDSO
21-
#include <generated/vdso32-offsets.h>
22-
#endif
2320

2421
#define VDSO_SYMBOL(base, name) \
2522
({ \

arch/arm64/kernel/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ obj-$(CONFIG_UNWIND_PATCH_PAC_INTO_SCS) += patch-scs.o
7777
# We need to prevent the SCS patching code from patching itself. Using
7878
# -mbranch-protection=none here to avoid the patchable PAC opcodes from being
7979
# generated triggers an issue with full LTO on Clang, which stops emitting PAC
80-
# instructions altogether. So instead, omit the unwind tables used by the
81-
# patching code, so it will not be able to locate its own PAC instructions.
82-
CFLAGS_patch-scs.o += -fno-asynchronous-unwind-tables -fno-unwind-tables
80+
# instructions altogether. So disable LTO as well for the compilation unit.
81+
CFLAGS_patch-scs.o += -mbranch-protection=none
82+
CFLAGS_REMOVE_patch-scs.o += $(CC_FLAGS_LTO)
8383

8484
# Force dependency (vdso*-wrap.S includes vdso.so through incbin)
8585
$(obj)/vdso-wrap.o: $(obj)/vdso/vdso.so

arch/arm64/kernel/vdso32/Makefile

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,6 @@ obj-vdso := $(c-obj-vdso) $(c-obj-vdso-gettimeofday) $(asm-obj-vdso)
127127
targets += vdso.lds
128128
CPPFLAGS_vdso.lds += -P -C -U$(ARCH)
129129

130-
include/generated/vdso32-offsets.h: $(obj)/vdso32.so.dbg FORCE
131-
$(call if_changed,vdsosym)
132-
133130
# Strip rule for vdso.so
134131
$(obj)/vdso.so: OBJCOPYFLAGS := -S
135132
$(obj)/vdso.so: $(obj)/vdso32.so.dbg FORCE
@@ -166,9 +163,3 @@ quiet_cmd_vdsoas = AS32 $@
166163

167164
quiet_cmd_vdsomunge = MUNGE $@
168165
cmd_vdsomunge = $(obj)/$(munge) $< $@
169-
170-
# Generate vDSO offsets using helper script (borrowed from the 64-bit vDSO)
171-
gen-vdsosym := $(srctree)/$(src)/../vdso/gen_vdso_offsets.sh
172-
quiet_cmd_vdsosym = VDSOSYM $@
173-
# The AArch64 nm should be able to read an AArch32 binary
174-
cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@

0 commit comments

Comments
 (0)