Skip to contentSkip to conversation

add-self-test-for-verifying-load-alignment.patch removed from -mm tree

merged [email protected] 1 participant 1 message Oct 16, 2020

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: tools/testing/selftests: add self-test for verifying load alignment
has been removed from the -mm tree. Its filename was
add-self-test-for-verifying-load-alignment.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Chris Kennelly <[email protected]>
Subject: tools/testing/selftests: add self-test for verifying load alignment

This produces a PIE binary with a variety of p_align requirements, suitable for verifying that the load address meets that alignment requirement.

Cc Shuah Khan <[email protected]>
Cc Alexander Viro <[email protected]>
Cc Alexey Dobriyan <[email protected]>
Cc David Rientjes <[email protected]>
Cc Fangrui Song <[email protected]>
Cc Hugh Dickens <[email protected]>
Cc Ian Rogers <[email protected]>
Cc "Kirill A. Shutemov" <[email protected]>
Cc Mike Kravetz <[email protected]>
Cc Nick Desaulniers <[email protected]>
Cc Sandeep Patil <[email protected]>
Cc Song Liu <[email protected]>
Cc Suren Baghdasaryan <[email protected]>

---

 tools/testing/selftests/exec/.gitignore     |    1 
 tools/testing/selftests/exec/Makefile       |    9 +-
 tools/testing/selftests/exec/load_address.c |   68 ++++++++++++++++++
 3 files changed, 76 insertions(+), 2 deletions(-)
tools/testing/selftests/exec/.gitignore renamed from tools/testing/selftests/exec/.gitignore~add-self-test-for-verifying-load-alignment +1 -0
@@ -7,6 +7,7 @@ execveat.moved
 execveat.path.ephemeral
 execveat.ephemeral
 execveat.denatured
+/load_address_*
 /recursion-depth
 xxxxxxxx*
 pipe
tools/testing/selftests/exec/load_address.c new file +68 -0

68 lines not on this page · raw message

tools/testing/selftests/exec/Makefile renamed from tools/testing/selftests/exec/Makefile~add-self-test-for-verifying-load-alignment +7 -2
@@ -4,7 +4,7 @@ CFLAGS += -Wno-nonnull
 CFLAGS += -D_GNU_SOURCE
 
 TEST_PROGS := binfmt_script non-regular
-TEST_GEN_PROGS := execveat
+TEST_GEN_PROGS := execveat load_address_4096 load_address_2097152 load_address_16777216
 TEST_GEN_FILES := execveat.symlink execveat.denatured script subdir pipe
 # Makefile is a run-time dependency, since it's accessed by the execveat test
 TEST_FILES := Makefile
@@ -27,4 +27,9 @@ $(OUTPUT)/execveat.symlink: $(OUTPUT)/ex
 $(OUTPUT)/execveat.denatured: $(OUTPUT)/execveat
 	cp $< $@
 	chmod -x $@
-
+$(OUTPUT)/load_address_4096: load_address.c
+	$(CC) $(CFLAGS) $(LDFLAGS) -Wl,-z,max-page-size=0x1000 -pie $< -o $@
+$(OUTPUT)/load_address_2097152: load_address.c
+	$(CC) $(CFLAGS) $(LDFLAGS) -Wl,-z,max-page-size=0x200000 -pie $< -o $@
+$(OUTPUT)/load_address_16777216: load_address.c
+	$(CC) $(CFLAGS) $(LDFLAGS) -Wl,-z,max-page-size=0x1000000 -pie $< -o $@

_

Patches currently in -mm which might be from [email protected] are