Hi Linus,
Please pull the following Kselftest fixes update for Linux 5.17-rc5.
This Kselftest fixes update for Linux 5.17-rc5 consists of fixes
to ftrace, exec, and seccomp tests build, run-time and install
bugs. These bugs are in the way of running the tests.
diff is attached.
thanks,
-- Shuah
----------------------------------------------------------------
The following changes since commit 183f80fd72db42c9cc483aa7a5e8e881355d0b03:
selftests/ir: fix build with ancient kernel headers (2022-02-04 13:14:41 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest tags/linux-kselftest-fixes-5.17-rc5
for you to fetch changes up to 6fec1ab67f8d60704cc7de64abcfd389ab131542:
selftests/ftrace: Do not trace do_softirq because of PREEMPT_RT (2022-02-14 13:28:17 -0700)
----------------------------------------------------------------
linux-kselftest-fixes-5.17-rc5
This Kselftest fixes update for Linux 5.17-rc5 consists of fixes
to ftrace, exec, and seccomp tests build, run-time and install
bugs. These bugs are in the way of running the tests.
----------------------------------------------------------------
Krzysztof Kozlowski (1):
selftests/ftrace: Do not trace do_softirq because of PREEMPT_RT
Muhammad Usama Anjum (1):
selftests/exec: Add non-regular to TEST_GEN_PROGS
Sherry Yang (1):
selftests/seccomp: Fix seccomp failure by adding missing headers
tools/testing/selftests/exec/Makefile | 4 ++--
tools/testing/selftests/ftrace/test.d/ftrace/func_set_ftrace_file.tc | 2 +-
tools/testing/selftests/seccomp/Makefile | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------
Support for IPV6_HOPLIMIT, IPV6_TCLASS, IPV6_DONTFRAG on ICMPv6
sockets and associated tests. I have no immediate plans to
implement IPV6_FLOWINFO and all the extension header stuff.
Jakub Kicinski (5):
net: ping6: support setting basic SOL_IPV6 options via cmsg
selftests: net: test IPV6_DONTFRAG
selftests: net: test IPV6_TCLASS
selftests: net: test IPV6_HOPLIMIT
selftests: net: basic test for IPV6_2292*
net/ipv6/ip6_output.c | 1 +
net/ipv6/ping.c | 21 ++-
tools/testing/selftests/net/cmsg_ipv6.sh | 156 ++++++++++++++++++++
tools/testing/selftests/net/cmsg_sender.c | 170 +++++++++++++++++++---
4 files changed, 320 insertions(+), 28 deletions(-)
create mode 100755 tools/testing/selftests/net/cmsg_ipv6.sh
--
2.34.1
This is a series which refactors and then adds some extra tests for MTE
in the kselftest framework.
The issue that these tests are for was was fixed by Robin in
295cf156231c ("arm64: Avoid premature usercopy failure") and based on a
simplified example by Catalin [1].
They test some combinations of pointer offsets, sizes and syscalls to
exercise different paths in the kernel.
Changes since v2 [3]:
- simplified error handling further
- added more detailed commit messages
- add reviewed-by and tested-by
Changes since v1 [2]:
- add a page_sz to the tests, for non-4K kernels
- use loops to generate more tests and avoid long lines
Thanks,
Joey
[1] https://lore.kernel.org/all/20210624150911.GA25097@arm.com/
[2] https://lore.kernel.org/linux-arm-kernel/20220125150920.23955-1-joey.gouly@…
[3] https://lore.kernel.org/linux-arm-kernel/45ab2d96-c8e0-7b72-a384-c4160b9312…
Joey Gouly (6):
kselftest/arm64: mte: user_mem: introduce tag_offset and tag_len
kselftest/arm64: mte: user_mem: rework error handling
kselftest/arm64: mte: user_mem: check different offsets and sizes
kselftest/arm64: mte: user_mem: add test type enum
kselftest/arm64: mte: user_mem: add more test types
kselftest/arm64: mte: user_mem: test a wider range of values
.../selftests/arm64/mte/check_user_mem.c | 193 +++++++++++++++---
1 file changed, 160 insertions(+), 33 deletions(-)
--
2.17.1
Hello,
aarch64_insn_gen_logical_immediate() is generating the wrong code if
it is handed a 64bit immediate which has a single span of 1s (i.e. a
mask), with bit 63 set, and 0s in the remaining upper 32 bits.
Clear as mud. An example always helps: 0x800000003fffffff would be wrongly
encoded, but 0x000000003fffffff is unaffected.
It would appear eBPF is unable to hit these cases, as build_insn()'s
imm value is a s32, so when used with BPF_ALU64, the sign-extended
u64 immediate would always have all-1s or all-0s in the upper 32 bits.
KVM does not generate a va_mask with any of the top bits set as these
VA wouldn't be usable with TTBR0_EL2.
Patch 3 fixes it, and doesn't depend on the rest of the series.
As the instruction encoder is a source of headaches, the first two patches
add tests to help illustrate there is a problem, and that patch 3 fixes it.
The tests generate a header file of the expected values so it can be compared
against other sources of the same information. Objdump can be used to check
the header file is generated correctly. Embedding the code in gen_logic_imm in
test_insn.c would give less confidence that the encoder is doing the right thing.
This series is based on v5.17-rc1, and can be retrieved from:
https://git.gitlab.arm.com/linux-arm/linux-jm.git insn_encoder/fls_bug/v1
Thanks,
James Morse (3):
arm64: selftests: Generate all the possible logical immediates as a
header
arm64: insn: Add tests for aarch64_insn_gen_logical_immediate()
arm64: insn: Generate 64 bit mask immediates correctly
arch/arm64/Kconfig.debug | 3 +
arch/arm64/Makefile | 3 +
arch/arm64/lib/Makefile | 2 +
arch/arm64/lib/insn.c | 5 +-
arch/arm64/lib/test_insn.c | 90 ++++++++++
arch/arm64/tools/.gitignore | 2 +
arch/arm64/tools/Makefile | 12 +-
arch/arm64/tools/gen_logic_imm.c | 190 +++++++++++++++++++++
tools/testing/selftests/arm64/Makefile | 2 +-
tools/testing/selftests/arm64/lib/Makefile | 6 +
tools/testing/selftests/arm64/lib/config | 1 +
tools/testing/selftests/arm64/lib/insn.sh | 5 +
12 files changed, 318 insertions(+), 3 deletions(-)
create mode 100644 arch/arm64/lib/test_insn.c
create mode 100644 arch/arm64/tools/.gitignore
create mode 100644 arch/arm64/tools/gen_logic_imm.c
create mode 100644 tools/testing/selftests/arm64/lib/Makefile
create mode 100644 tools/testing/selftests/arm64/lib/config
create mode 100755 tools/testing/selftests/arm64/lib/insn.sh
--
2.30.2
The GCR EL1 test unconditionally includes local definitions of the prctls
it tests. Since not only will the kselftest build infrastructure ensure
that the in tree uapi headers are available but the toolchain being used to
build kselftest may ensure that system uapi headers with MTE support are
available this causes the compiler to warn about duplicate definitions.
Remove these duplicate definitions.
Signed-off-by: Mark Brown <broonie(a)kernel.org>
---
.../selftests/arm64/mte/check_gcr_el1_cswitch.c | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/tools/testing/selftests/arm64/mte/check_gcr_el1_cswitch.c b/tools/testing/selftests/arm64/mte/check_gcr_el1_cswitch.c
index a876db1f096a..325bca0de0f6 100644
--- a/tools/testing/selftests/arm64/mte/check_gcr_el1_cswitch.c
+++ b/tools/testing/selftests/arm64/mte/check_gcr_el1_cswitch.c
@@ -19,17 +19,6 @@
#include "kselftest.h"
#include "mte_common_util.h"
-#define PR_SET_TAGGED_ADDR_CTRL 55
-#define PR_GET_TAGGED_ADDR_CTRL 56
-# define PR_TAGGED_ADDR_ENABLE (1UL << 0)
-# define PR_MTE_TCF_SHIFT 1
-# define PR_MTE_TCF_NONE (0UL << PR_MTE_TCF_SHIFT)
-# define PR_MTE_TCF_SYNC (1UL << PR_MTE_TCF_SHIFT)
-# define PR_MTE_TCF_ASYNC (2UL << PR_MTE_TCF_SHIFT)
-# define PR_MTE_TCF_MASK (3UL << PR_MTE_TCF_SHIFT)
-# define PR_MTE_TAG_SHIFT 3
-# define PR_MTE_TAG_MASK (0xffffUL << PR_MTE_TAG_SHIFT)
-
#include "mte_def.h"
#define NUM_ITERATIONS 1024
--
2.30.2