linux/scripts
Linus Torvalds a430d95c5e lsm/stable-6.12 PR 20240911
-----BEGIN PGP SIGNATURE-----
 
 iQJIBAABCAAyFiEES0KozwfymdVUl37v6iDy2pc3iXMFAmbiGGAUHHBhdWxAcGF1
 bC1tb29yZS5jb20ACgkQ6iDy2pc3iXPU8BAA1+A15pmS34I9pq7c8TmRz3rNEs/a
 zrW1aWJ0X/+axNS7sW3Pwtt1EKuaOhskKU8gNSieRhljC8rgXIVjZzLw6Atgcr5k
 upulGbU9TXyVisYN+PWv9/84ito6/nYsKb7Mg3nUVsdodtIFVnsk1fxYLPHQEBig
 Pl3i26U3VqH93Kz0W5vs/QR2uduPB8ZyscdTgcbrY9Vv1Y7IDZ2g9QsJVKLvbQKL
 qcPK1JkHa+sBPJxDqS9A40zgbLbdPQgWQzsXX3dz822w1Ga7FIHSqxMBA6HwHZ+L
 kV4P58wVfavhwt/cQSKMWI/yiGPMMd0B6yD+m8ojOvGfOfRCWxGMmEMqHNuZ3m7k
 Bfll5ZgZTY8phUUhiNf3nxO3F3MM/5bHdhPOj3RReqbAbS6uWr4/fThPDYY/zIo6
 NCY3HGxx3Ae64uQ01gC2p/czC50jDsMwlbXiZbrgdBhjBm/CVk5ozb80mLVcGrLB
 +6XMzzSbC8IaNAH2fDmUJ2ABdwyNPgsSOTGZVzIanpxu1SU2/yk3SMxkp8fv5s36
 wLeODUVcLgsjVV538Mkm6PGTE4TlXaH9yi6apMyJAGp0vPYx5c3Xxk2y5A5cur5p
 hcrbDiX2QgeqFbwsz36incmPmbef2NU2c8feR8XLtPJuwNIeRcMSje0pnkaFlRmb
 TAUJ1sDQAzZ8Fy0=
 =HIAO
 -----END PGP SIGNATURE-----

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

Pull lsm updates from Paul Moore:

 - Move the LSM framework to static calls

   This transitions the vast majority of the LSM callbacks into static
   calls. Those callbacks which haven't been converted were left as-is
   due to the general ugliness of the changes required to support the
   static call conversion; we can revisit those callbacks at a future
   date.

 - Add the Integrity Policy Enforcement (IPE) LSM

   This adds a new LSM, Integrity Policy Enforcement (IPE). There is
   plenty of documentation about IPE in this patches, so I'll refrain
   from going into too much detail here, but the basic motivation behind
   IPE is to provide a mechanism such that administrators can restrict
   execution to only those binaries which come from integrity protected
   storage, e.g. a dm-verity protected filesystem. You will notice that
   IPE requires additional LSM hooks in the initramfs, dm-verity, and
   fs-verity code, with the associated patches carrying ACK/review tags
   from the associated maintainers. We couldn't find an obvious
   maintainer for the initramfs code, but the IPE patchset has been
   widely posted over several years.

   Both Deven Bowers and Fan Wu have contributed to IPE's development
   over the past several years, with Fan Wu agreeing to serve as the IPE
   maintainer moving forward. Once IPE is accepted into your tree, I'll
   start working with Fan to ensure he has the necessary accounts, keys,
   etc. so that he can start submitting IPE pull requests to you
   directly during the next merge window.

 - Move the lifecycle management of the LSM blobs to the LSM framework

   Management of the LSM blobs (the LSM state buffers attached to
   various kernel structs, typically via a void pointer named "security"
   or similar) has been mixed, some blobs were allocated/managed by
   individual LSMs, others were managed by the LSM framework itself.

   Starting with this pull we move management of all the LSM blobs,
   minus the XFRM blob, into the framework itself, improving consistency
   across LSMs, and reducing the amount of duplicated code across LSMs.
   Due to some additional work required to migrate the XFRM blob, it has
   been left as a todo item for a later date; from a practical
   standpoint this omission should have little impact as only SELinux
   provides a XFRM LSM implementation.

 - Fix problems with the LSM's handling of F_SETOWN

   The LSM hook for the fcntl(F_SETOWN) operation had a couple of
   problems: it was racy with itself, and it was disconnected from the
   associated DAC related logic in such a way that the LSM state could
   be updated in cases where the DAC state would not. We fix both of
   these problems by moving the security_file_set_fowner() hook into the
   same section of code where the DAC attributes are updated. Not only
   does this resolve the DAC/LSM synchronization issue, but as that code
   block is protected by a lock, it also resolve the race condition.

 - Fix potential problems with the security_inode_free() LSM hook

   Due to use of RCU to protect inodes and the placement of the LSM hook
   associated with freeing the inode, there is a bit of a challenge when
   it comes to managing any LSM state associated with an inode. The VFS
   folks are not open to relocating the LSM hook so we have to get
   creative when it comes to releasing an inode's LSM state.
   Traditionally we have used a single LSM callback within the hook that
   is triggered when the inode is "marked for death", but not actually
   released due to RCU.

   Unfortunately, this causes problems for LSMs which want to take an
   action when the inode's associated LSM state is actually released; so
   we add an additional LSM callback, inode_free_security_rcu(), that is
   called when the inode's LSM state is released in the RCU free
   callback.

 - Refactor two LSM hooks to better fit the LSM return value patterns

   The vast majority of the LSM hooks follow the "return 0 on success,
   negative values on failure" pattern, however, there are a small
   handful that have unique return value behaviors which has caused
   confusion in the past and makes it difficult for the BPF verifier to
   properly vet BPF LSM programs. This includes patches to
   convert two of these"special" LSM hooks to the common 0/-ERRNO pattern.

 - Various cleanups and improvements

   A handful of patches to remove redundant code, better leverage the
   IS_ERR_OR_NULL() helper, add missing "static" markings, and do some
   minor style fixups.

* tag 'lsm-pr-20240911' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm: (40 commits)
  security: Update file_set_fowner documentation
  fs: Fix file_set_fowner LSM hook inconsistencies
  lsm: Use IS_ERR_OR_NULL() helper function
  lsm: remove LSM_COUNT and LSM_CONFIG_COUNT
  ipe: Remove duplicated include in ipe.c
  lsm: replace indirect LSM hook calls with static calls
  lsm: count the LSMs enabled at compile time
  kernel: Add helper macros for loop unrolling
  init/main.c: Initialize early LSMs after arch code, static keys and calls.
  MAINTAINERS: add IPE entry with Fan Wu as maintainer
  documentation: add IPE documentation
  ipe: kunit test for parser
  scripts: add boot policy generation program
  ipe: enable support for fs-verity as a trust provider
  fsverity: expose verified fsverity built-in signatures to LSMs
  lsm: add security_inode_setintegrity() hook
  ipe: add support for dm-verity as a trust provider
  dm-verity: expose root hash digest and signature data to LSMs
  block,lsm: add LSM blob and new LSM hooks for block devices
  ipe: add permissive toggle
  ...
2024-09-16 18:19:47 +02:00
..
atomic locking/atomic: scripts: fix ${atomic}_sub_and_test() kerneldoc 2024-06-05 15:52:34 +02:00
basic
clang-tools gen_compile_commands: fix invalid escape sequence warning 2024-02-15 06:57:19 +09:00
coccinelle Coccinelle: pm_runtime: Fix grammar in comment 2024-05-20 21:31:33 +02:00
dtc Devicetree updates for v6.11: 2024-07-17 18:07:31 -07:00
dummy-tools
gcc-plugins gcc-plugins: randstruct: Remove GCC 4.7 or newer requirement 2024-08-05 14:34:23 -07:00
gdb - In the series "treewide: Refactor heap related implementation", 2024-07-21 17:56:22 -07:00
genksyms kbuild: use $(src) instead of $(srctree)/$(src) for source directory 2024-05-10 04:34:52 +09:00
include kbuild: move some helper headers from scripts/kconfig/ to scripts/include/ 2024-07-21 23:10:43 +09:00
ipe scripts: add boot policy generation program 2024-08-20 14:03:39 -04:00
kconfig scripts: kconfig: merge_config: config files: add a trailing newline 2024-08-06 14:02:12 +09:00
ksymoops
mod Kbuild updates for v6.11 2024-07-23 14:32:21 -07:00
package kbuild: rpm-pkg: ghost modules.weakdep file 2024-07-28 17:07:03 +09:00
selinux
tracing
.gitignore
as-version.sh
asn1_compiler.c
bloat-o-meter
bootgraph.pl
bpf_doc.py scripts/bpf_doc: Use silent mode when exec make cmd 2024-03-15 14:46:31 +01:00
build-version kbuild: move init/build-version to scripts/ 2024-07-16 01:08:37 +09:00
cc-can-link.sh
cc-version.sh
check_extable.sh
check-git
check-sysctl-docs scripts: check-sysctl-docs: handle per-namespace sysctls 2024-02-23 12:13:09 +01:00
check-uapi.sh
check-variable-fonts.sh docs: scripts/check-variable-fonts.sh: Improve commands for detection 2024-05-02 10:14:52 -06:00
checkdeclares.pl
checkincludes.pl
checkkconfigsymbols.py
checkpatch.pl net: drop special comment style 2024-08-23 10:21:02 +01:00
checkstack.pl
checksyscalls.sh
checktransupdate.py scripts: add scripts/checktransupdate.py 2024-06-12 15:24:11 -06:00
checkversion.pl
cleanfile
cleanpatch
coccicheck
config
const_structs.checkpatch sound updates for 6.11-rc1 2024-07-19 12:39:34 -07:00
decode_stacktrace.sh scripts/decode_stacktrace.sh: better support to ARM32 module stack trace 2024-06-24 22:25:00 -07:00
decodecode
depmod.sh
dev-needs.sh
diffconfig
documentation-file-ref-check
export_report.pl
extract_xc3028.pl
extract-ikconfig
extract-module-sig.pl
extract-sys-certs.pl
extract-vmlinux
faddr2line scripts/faddr2line: Check only two symbols when calculating symbol size 2024-07-02 23:38:37 -07:00
file-size.sh
find-unused-docs.sh
gcc-x86_32-has-stack-protector.sh kbuild: Fix '-S -c' in x86 stack protector scripts 2024-07-29 03:47:00 +09:00
gcc-x86_64-has-stack-protector.sh kbuild: Fix '-S -c' in x86 stack protector scripts 2024-07-29 03:47:00 +09:00
gen-randstruct-seed.sh
generate_initcall_order.pl
generate_rust_analyzer.py rust: Support latest version of rust-analyzer 2024-08-07 01:16:52 +02:00
generate_rust_target.rs rust: x86: remove -3dnow{,a} from target features 2024-08-10 00:05:10 +02:00
get_abi.pl
get_dvb_firmware
get_feat.pl
get_maintainer.pl
gfp-translate scripts: fix gfp-translate after ___GFP_*_BITS conversion to an enum 2024-09-01 17:59:01 -07:00
git.orderFile
head-object-list.txt powerpc: Remove core support for 40x 2024-06-28 22:28:47 +10:00
headerdep.pl
headers_install.sh m68k: Avoid CONFIG_COLDFIRE switch in uapi header 2024-05-07 08:55:23 +10:00
insert-sys-cert.c
install.sh kbuild: Create INSTALL_PATH directory if it does not exist 2024-07-20 13:34:54 +09:00
jobserver-exec
kallsyms.c kallsyms: Do not cleanup .llvm.<hash> suffix before sorting symbols 2024-08-15 09:33:34 -07:00
Kbuild.include kbuild: raise the minimum GNU Make requirement to 4.0 2024-07-16 16:07:14 +09:00
Kconfig.include x86/kconfig: Add as-instr64 macro to properly evaluate AS_WRUSS 2024-06-20 19:48:18 +02:00
kernel-doc mm/slab: Plumb kmem_buckets into __do_kmalloc_node() 2024-07-03 12:24:19 +02:00
ld-version.sh kbuild: Make ld-version.sh more robust against version string changes 2024-07-15 03:13:32 +09:00
leaking_addresses.pl leaking_addresses: Provide mechanism to scan binary files 2024-02-29 13:38:03 -08:00
Lindent
link-vmlinux.sh Kbuild fixes for v6.11 (2nd) 2024-08-23 07:43:15 +08:00
make_fit.py scripts/make_fit: Support decomposing DTBs 2024-07-16 01:08:37 +09:00
Makefile scripts: add boot policy generation program 2024-08-20 14:03:39 -04:00
Makefile.asm-headers kbuild: fix rebuild of generic syscall headers 2024-07-18 10:01:55 -07:00
Makefile.btf kbuild,bpf: Add module-specific pahole flags for distilled base BTF 2024-06-21 14:45:07 -07:00
Makefile.build kbuild: fix typos "prequisites" to "prerequisites" 2024-08-23 02:41:02 +09:00
Makefile.clang
Makefile.clean kbuild: use $(src) instead of $(srctree)/$(src) for source directory 2024-05-10 04:34:52 +09:00
Makefile.compiler kbuild: Add -Wa,--fatal-warnings to as-instr invocation 2024-02-16 16:07:07 -08:00
Makefile.debug kbuild: rust: use -Zdebuginfo-compression 2024-04-02 17:41:22 +02:00
Makefile.defconf kbuild: defconf: use SRCARCH to find merged configs 2024-01-28 01:13:37 +09:00
Makefile.dtbinst kbuild: Install dtb files as 0644 in Makefile.dtbinst 2024-06-26 00:18:57 +09:00
Makefile.extrawarn kbuild: enable -Wcast-function-type-strict unconditionally 2024-05-19 14:36:16 -07:00
Makefile.gcc-plugins
Makefile.headersinst
Makefile.host kbuild: Use $(obj)/%.cc to fix host C++ module builds 2024-06-26 00:18:57 +09:00
Makefile.kasan
Makefile.kcov
Makefile.kcsan
Makefile.kmsan
Makefile.lib kbuild: clean up code duplication in cmd_fdtoverlay 2024-08-06 13:58:28 +09:00
Makefile.modfinal kbuild: fix typos "prequisites" to "prerequisites" 2024-08-23 02:41:02 +09:00
Makefile.modinst
Makefile.modpost Kbuild updates for v6.10 2024-05-18 12:39:20 -07:00
Makefile.package kbuild: add script and target to generate pacman package 2024-07-22 01:24:22 +09:00
Makefile.randstruct
Makefile.ubsan ubsan: Reintroduce signed overflow sanitizer 2024-02-20 20:44:49 -08:00
Makefile.userprogs
Makefile.vdsoinst more s390 updates for 6.10 merge window 2024-05-21 12:09:36 -07:00
Makefile.vmlinux kbuild: fix typos "prequisites" to "prerequisites" 2024-08-23 02:41:02 +09:00
Makefile.vmlinux_o kbuild: fix typos "prequisites" to "prerequisites" 2024-08-23 02:41:02 +09:00
makelst
markup_oops.pl
min-tool-version.sh rust: upgrade to Rust 1.78.0 2024-05-05 20:17:25 +02:00
misc-check
mkcompile_h
mksysmap kbuild: change scripts/mksysmap into sed script 2024-05-29 16:40:03 +09:00
mkuboot.sh
module.lds.S The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
modules-check.sh
nsdeps
objdiff
objdump-func
orc_hash.sh
pahole-version.sh
parse-maintainers.pl
patch-kernel
profile2linkerlist.pl
prune-kernel
recordmcount.c
recordmcount.h
recordmcount.pl riscv: remove MCOUNT_NAME workaround 2024-02-22 15:38:54 -08:00
relocs_check.sh
remove-stale-files kbuild: clean up scripts/remove-stale-files 2024-07-20 16:33:45 +09:00
rust_is_available_bindgen_0_66.h rust: warn about bindgen versions 0.66.0 and 0.66.1 2024-07-10 10:28:52 +02:00
rust_is_available_bindgen_libclang.h
rust_is_available_test.py rust: warn about bindgen versions 0.66.0 and 0.66.1 2024-07-10 10:28:52 +02:00
rust_is_available.sh rust: warn about bindgen versions 0.66.0 and 0.66.1 2024-07-10 10:28:52 +02:00
rustdoc_test_builder.rs
rustdoc_test_gen.rs
setlocalversion
show_delta
sign-file.c
sorttable.c
sorttable.h
spdxcheck-test.sh
spdxcheck.py scripts/spdxcheck: Add count of missing files to stats output 2024-05-04 19:00:54 +02:00
spdxexclude
spelling.txt kernel-wide: fix spelling mistakes like "assocative" -> "associative" 2024-06-28 19:36:28 -07:00
sphinx-pre-install scripts: sphinx-pre-install: Add pyyaml hint to other distros 2024-04-02 10:07:51 -06:00
split-man.pl
stackdelta
stackusage
subarch.include
syscall.tbl syscalls: add back legacy __NR_nfsservctl macro 2024-08-06 08:57:02 +02:00
syscallhdr.sh
syscallnr.sh
syscalltbl.sh x86/syscall: Mark exit[_group] syscall handlers __noreturn 2024-06-28 15:23:38 +02:00
tags.sh
test_fortify.sh
tools-support-relr.sh
unifdef.c scripts/unifdef: avoid constexpr keyword 2024-04-23 00:09:41 +09:00
ver_linux
xen-hypercalls.sh
xz_wrap.sh