linux-stable/tools/testing/selftests
Linus Torvalds 26b84401da lsm/stable-6.1 PR 20221003
-----BEGIN PGP SIGNATURE-----
 
 iQJIBAABCAAyFiEES0KozwfymdVUl37v6iDy2pc3iXMFAmM68YIUHHBhdWxAcGF1
 bC1tb29yZS5jb20ACgkQ6iDy2pc3iXOTbA//TR8i+Wy8iswUCmtfmYg91h1uebpl
 /kjNsSmfgivAUTGamr3eN2WRlGhZfkFDPIHa25uybSA6Q+75p4lst83Rt3HDbjkv
 Ga7grCXnHwSDwJoHOSeFh0pojV2u7Zvfmiib2U5hPZEmd3kBw3NCgAJVcSGN80B2
 dct36fzZNXjvpWDbygmFtRRkmEseslSkft8bUVvNZBP+B0zvv3vcNY1QFuKuK+W2
 8wWpvO/cCSmke5i2c2ktHSk2f8/Y6n26Ik/OTHcTVfoKZLRaFbXEzLyxzLrNWd6m
 hujXgcxszTtHdmoXx+J6uBauju7TR8pi1x8mO2LSGrlpRc1cX0A5ED8WcH71+HVE
 8L1fIOmZShccPZn8xRok7oYycAUm/gIfpmSLzmZA76JsZYAe+mp9Ze9FA6fZtSwp
 7Q/rfw/Rlz25WcFBe4xypP078HkOmqutkCk2zy5liR+cWGrgy/WKX15vyC0TaPrX
 tbsRKuCLkipgfXrTk0dX3kmhz+3bJYjqeZEt7sfPSZYpaOGkNXVmAW0wnCOTuLMU
 +8pIVktvQxMmACEj2gBMz11iooR4DpWLxOcQQR/impgCpNdZ60nA0a6KPJoIXC+5
 NfTa422FZkc99QRVblUZyWSgJBW78Z3ZAQcQlo1AGLlFydbfrSFTRLbmNJZo/Nkl
 KwpGvWs5nB0rVw0=
 =VZl5
 -----END PGP SIGNATURE-----

Merge tag 'lsm-pr-20221003' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm

Pull LSM updates from Paul Moore:
 "Seven patches for the LSM layer and we've got a mix of trivial and
  significant patches. Highlights below, starting with the smaller bits
  first so they don't get lost in the discussion of the larger items:

   - Remove some redundant NULL pointer checks in the common LSM audit
     code.

   - Ratelimit the lockdown LSM's access denial messages.

     With this change there is a chance that the last visible lockdown
     message on the console is outdated/old, but it does help preserve
     the initial series of lockdown denials that started the denial
     message flood and my gut feeling is that these might be the more
     valuable messages.

   - Open userfaultfds as readonly instead of read/write.

     While this code obviously lives outside the LSM, it does have a
     noticeable impact on the LSMs with Ondrej explaining the situation
     in the commit description. It is worth noting that this patch
     languished on the VFS list for over a year without any comments
     (objections or otherwise) so I took the liberty of pulling it into
     the LSM tree after giving fair notice. It has been in linux-next
     since the end of August without any noticeable problems.

   - Add a LSM hook for user namespace creation, with implementations
     for both the BPF LSM and SELinux.

     Even though the changes are fairly small, this is the bulk of the
     diffstat as we are also including BPF LSM selftests for the new
     hook.

     It's also the most contentious of the changes in this pull request
     with Eric Biederman NACK'ing the LSM hook multiple times during its
     development and discussion upstream. While I've never taken NACK's
     lightly, I'm sending these patches to you because it is my belief
     that they are of good quality, satisfy a long-standing need of
     users and distros, and are in keeping with the existing nature of
     the LSM layer and the Linux Kernel as a whole.

     The patches in implement a LSM hook for user namespace creation
     that allows for a granular approach, configurable at runtime, which
     enables both monitoring and control of user namespaces. The general
     consensus has been that this is far preferable to the other
     solutions that have been adopted downstream including outright
     removal from the kernel, disabling via system wide sysctls, or
     various other out-of-tree mechanisms that users have been forced to
     adopt since we haven't been able to provide them an upstream
     solution for their requests. Eric has been steadfast in his
     objections to this LSM hook, explaining that any restrictions on
     the user namespace could have significant impact on userspace.
     While there is the possibility of impacting userspace, it is
     important to note that this solution only impacts userspace when it
     is requested based on the runtime configuration supplied by the
     distro/admin/user. Frederick (the pathset author), the LSM/security
     community, and myself have tried to work with Eric during
     development of this patchset to find a mutually acceptable
     solution, but Eric's approach and unwillingness to engage in a
     meaningful way have made this impossible. I have CC'd Eric directly
     on this pull request so he has a chance to provide his side of the
     story; there have been no objections outside of Eric's"

* tag 'lsm-pr-20221003' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm:
  lockdown: ratelimit denial messages
  userfaultfd: open userfaultfds with O_RDONLY
  selinux: Implement userns_create hook
  selftests/bpf: Add tests verifying bpf lsm userns_create hook
  bpf-lsm: Make bpf_lsm_userns_create() sleepable
  security, lsm: Introduce security_create_user_ns()
  lsm: clean up redundant NULL pointer check
2022-10-03 17:51:52 -07:00
..
alsa selftests: alsa: Handle pkg-config failure more gracefully 2022-05-31 18:02:18 +02:00
arm64 selftests: stop using KSFT_KHDR_INSTALL 2022-07-11 17:23:30 -06:00
bpf lsm/stable-6.1 PR 20221003 2022-10-03 17:51:52 -07:00
breakpoints
capabilities
cgroup Two followon fixes for the post-5.19 series "Use pageblock_order for cma 2022-05-27 11:40:49 -07:00
clone3 selftests: fixup build warnings in pidfd / clone3 tests 2022-02-04 13:07:07 -07:00
core
cpu-hotplug
cpufreq
damon kselftests/damon: add support for cases where debugfs cannot be read 2022-06-27 14:14:41 -06:00
dma selftests dma: fix compile error for dma_map_benchmark 2022-06-16 14:03:21 -06:00
dmabuf-heaps
drivers selftests: bonding: cause oops in bond_rr_gen_slave_id 2022-09-22 06:39:40 -07:00
efivarfs
exec linux-kselftest-next-5.18-rc1 2022-03-23 12:53:00 -07:00
filesystems Updates to various subsystems which I help look after. lib, ocfs2, 2022-08-07 10:03:24 -07:00
firmware selftests: firmware: Add firmware upload selftests 2022-04-29 16:49:36 +02:00
fpu
ftrace selftests/kprobe: Update test for no event name syntax error 2022-07-24 19:11:17 -04:00
futex selftests: stop using KSFT_KHDR_INSTALL 2022-07-11 17:23:30 -06:00
gpio selftests: gpio: fix include path to kernel headers for out of tree builds 2022-07-20 14:35:18 +02:00
ia64
intel_pstate
ipc
ir kselftests/ir : Improve readability of modprobe error message 2022-05-16 13:34:19 -06:00
kcmp selftests/kcmp: Make the test output consistent and clear 2022-07-08 10:55:43 -06:00
kexec selftests/kexec: remove broken EFI_VARS secure boot fallback check 2022-06-24 10:19:22 +02:00
kmod
kselftest selftests/kselftest/runner.sh: Pass optional command parameters in environment 2022-02-23 17:14:36 -07:00
kvm KVM: selftests: Compare insn opcodes directly in fix_hypercall_test 2022-09-30 06:38:02 -04:00
landlock selftests/landlock: Fix out-of-tree builds 2022-09-14 16:37:38 +02:00
lib
livepatch livepatch: Skip livepatch tests if ftrace cannot be configured 2022-02-23 16:42:00 +01:00
lkdtm lkdtm: Update tests for memcpy() run-time warnings 2022-09-07 16:37:27 -07:00
locking
media_tests
membarrier
memfd selftests/memfd: clean up mapping in mfd_fail_write 2022-02-26 09:51:17 -08:00
memory-hotplug
mincore selftests: skip mincore.check_file_mmap when fs lacks needed support 2022-01-27 16:40:45 -07:00
mount
mount_setattr tests: fix idmapped mount_setattr test 2022-02-11 09:08:20 +01:00
move_mount_set_group
mqueue selftests: mqueue: drop duplicate min definition 2022-04-19 19:28:47 -06:00
nci
net selftests: Fix the if conditions of in test_extra_filter() 2022-09-27 11:00:02 +02:00
netfilter selftests: nft_concat_range: add socat support 2022-09-07 15:06:26 +02:00
nolibc selftests/nolibc: Avoid generated files being committed 2022-08-31 05:17:45 -07:00
nsfs
ntb
openat2 selftests: openat2: Skip testcases that fail with EOPNOTSUPP 2022-01-27 16:31:07 -07:00
perf_events selftests/perf_events: Test modification of perf_event_attr::sig_data 2022-02-02 13:11:40 +01:00
pid_namespace selftests: fix header dependency for pid_namespace selftests 2022-04-04 13:32:31 -06:00
pidfd selftests: fix an unused variable warning in pidfd selftest 2022-04-04 13:32:53 -06:00
powerpc selftests/powerpc: Add missing PMU selftests to .gitignores 2022-08-15 20:59:17 +10:00
prctl
proc proc: fix test for "vsyscall=xonly" boot option 2022-07-17 17:31:43 -07:00
pstore
ptp testptp: add option to shift clock by nanoseconds 2022-02-22 17:03:40 -08:00
ptrace
rcutorture torture: Create kvm-check-branches.sh output in proper location 2022-06-21 15:57:04 -07:00
resctrl selftests/resctrl: Fix null pointer dereference on open failed 2022-04-26 09:20:00 -06:00
rlimits
rseq selftests/rseq: check if libc rseq support is registered 2022-06-28 09:08:28 +02:00
rtc selftests/rtc: continuously read RTC in a loop for 30s 2022-02-25 17:00:51 -07:00
safesetid LSM: SafeSetID: add setgroups() testing to selftest 2022-07-15 18:24:42 +00:00
sched
seccomp selftests/seccomp: Fix compile warning when CC=clang 2022-07-27 12:12:16 -07:00
sgx selftests/sgx: Ignore OpenSSL 3.0 deprecated functions warning 2022-08-15 16:50:07 -06:00
sigaltstack
size
sparc64
splice
static_keys
sync remove CONFIG_ANDROID 2022-07-01 10:41:09 +02:00
syscall_user_dispatch
sysctl selftests/sysctl: add sysctl macro test 2022-05-03 10:15:07 +02:00
tc-testing Networking changes for 6.0. 2022-08-03 16:29:08 -07:00
timens Revert "selftests/timens: add a test for vfork+exit" 2022-09-13 10:38:43 -07:00
timers selftests: timers: clocksource-switch: adapt to kselftest framework 2022-07-14 14:36:52 -06:00
tmpfs
tpm2 selftests/tpm2: increase timeout for kselftests 2022-06-28 13:31:10 -06:00
uevent
user
user_events user_events: Add self-test for validator boundaries 2022-02-10 22:38:08 -05:00
vDSO selftests/vDSO: fix array_size.cocci warning 2022-04-04 13:27:11 -06:00
vm - The usual batches of cleanups from Baoquan He, Muchun Song, Miaohe 2022-08-05 16:32:45 -07:00
watchdog
wireguard wireguard: selftests: do not install headers on UML 2022-09-20 11:26:14 -07:00
x86 selftests/x86/corrupt_xstate_header: Use provided __cpuid_count() macro 2022-04-25 15:13:03 -06:00
zram selftests/zram: Adapt the situation that /dev/zram0 is being used 2022-01-27 10:59:02 -07:00
.gitignore selftests: add kselftest_install to .gitignore 2022-03-03 15:16:57 -07:00
gen_kselftest_tar.sh
kselftest.h selftests: Provide local define of __cpuid_count() 2022-04-25 15:12:36 -06:00
kselftest_deps.sh selftests: Make the usage formatting consistent in kselftest_deps.sh 2022-06-27 14:14:27 -06:00
kselftest_harness.h selftests/harness: Pass variant to teardown 2022-04-04 13:37:48 -06:00
kselftest_install.sh
kselftest_module.h selftest: Taint kernel when test module loaded 2022-07-11 16:58:11 -06:00
lib.mk selftests/landlock: Fix out-of-tree builds 2022-09-14 16:37:38 +02:00
Makefile net: Add tests for bonding and team address list management 2022-09-16 14:34:01 +01:00
run_kselftest.sh