Re: [PATCH v3 02/13] security: Introduce the digest_cache LSM

2024-02-12 Thread Roberto Sassu
On Fri, 2024-02-09 at 15:00 -0800, Randy Dunlap wrote: > Hi-- > > On 2/9/24 06:09, Roberto Sassu wrote: > > diff --git a/security/digest_cache/Kconfig b/security/digest_cache/Kconfig > > new file mode 100644 > > index ..0c47d5151f07 > > --- /dev/null > > +++ b/security/digest_cache/Kco

Re: [PATCH] selftests/mm: Don't needlessly use sudo to obtain root in run_vmtests.sh

2024-02-12 Thread Ryan Roberts
On 10/02/2024 12:35, Mark Brown wrote: > On Sat, Feb 10, 2024 at 07:40:16AM +, Ryan Roberts wrote: >> On 09/02/2024 20:21, Mark Brown wrote: > >>> When opening yama/ptrace_scope we unconditionally use sudo to ensure we >>> are running as root, resulting in failures if running in a minimal root

Re: [PATCH net v2] selftests: net: cope with slow env in gro.sh test

2024-02-12 Thread Paolo Abeni
On Fri, 2024-02-09 at 11:15 -0800, Jakub Kicinski wrote: > On Wed, 7 Feb 2024 19:36:46 +0100 Paolo Abeni wrote: > > +if [[ ${test} == "large" && -n "${KSFT_MACHINE_SLOW}" ]]; then > > +echo "Ignoring errors due to slow environment" 1>&2 > > +exit_code=0 > > +fi > > Would i

[PATCH v3 net] selftests: net: cope with slow env in gro.sh test

2024-02-12 Thread Paolo Abeni
The gro self-tests sends the packets to be aggregated with multiple write operations. When running is slow environment, it's hard to guarantee that the GRO engine will wait for the last packet in an intended train. The above causes almost deterministic failures in our CI for the 'large' test-case

[PATCH net] selftests: net: cope with slow env in so_txtime.sh test

2024-02-12 Thread Paolo Abeni
The mentioned test is failing in slow environments: # SO_TXTIME ipv4 clock monotonic # ./so_txtime: recv: timeout: Resource temporarily unavailable not ok 1 selftests: net: so_txtime.sh # exit=1 Tuning the tolerance in the test binary is error-prone and doomed to failures is slow-enough env

[PATCH net 0/2] selftests: net: more pmtu.sh fixes

2024-02-12 Thread Paolo Abeni
The mentioned test is still flaky, unusally enough in 'fast' environments. Patch 2/2 [try to] address the existing issues, while patch 1/2 introduces more strict tests for the existing net helpers, to hopefully prevent future pain. Paolo Abeni (2): selftests: net: more strict check in net_helpe

[PATCH net 1/2] selftests: net: more strict check in net_helper

2024-02-12 Thread Paolo Abeni
The helper waiting for a listener port can match any socket whose hexadecimal representation of source or destination addresses matches that of the given port. Additionally, any socket state is accepted. All the above can let the helper return successfully before the relevant listener is actually

[PATCH net 2/2] selftests: net: more pmtu.sh fixes

2024-02-12 Thread Paolo Abeni
The netdev CI is reporting failures for the pmtu test: [ 115.929264] br0: port 2(vxlan_a) entered forwarding state # 2024/02/08 17:33:22 socat[7871] E bind(7, {AF=10 [:::::::]:5}, 28): Address already in use # 2024/02/08 17:33:22 socat[7877] E write(7, 0

Re: [RFC PATCH v1 01/28] riscv: abstract envcfg CSR

2024-02-12 Thread Andrew Jones
On Wed, Jan 24, 2024 at 10:21:26PM -0800, de...@rivosinc.com wrote: > From: Deepak Gupta > > This patch abstracts envcfg CSR in kernel (as is done for other homonyn > CSRs). CSR_ENVCFG is used as alias for CSR_SENVCFG or CSR_MENVCFG depending > on how kernel is compiled. > > Additionally it chan

Re: [PATCH v1 1/2] KVM: s390: load guest access registers in MEM_OP ioctl

2024-02-12 Thread Heiko Carstens
On Fri, Feb 09, 2024 at 09:45:38PM +0100, Eric Farman wrote: > The routine ar_translation() is called by get_vcpu_asce(), which is > called by both the instruction intercept path (where the access > registers had been loaded with the guest's values), and the MEM_OP > ioctl (which hadn't). This mean

Re: [PATCH net-next] selftests: net: ignore timing errors in txtimestamp if KSFT_MACHINE_SLOW

2024-02-12 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (main) by David S. Miller : On Thu, 8 Feb 2024 18:57:49 +0100 you wrote: > This test is time sensitive. It may fail on virtual machines and for > debug builds. > > Similar to commit c41dfb0dfbec ("selftests/net: ignore timing errors in > so_t

Re: [PATCH v1 1/2] KVM: s390: load guest access registers in MEM_OP ioctl

2024-02-12 Thread Heiko Carstens
On Mon, Feb 12, 2024 at 11:21:30AM +0100, Heiko Carstens wrote: > Or maybe a TIF flag with different semantics: "guest save area does not > reflect current state - which is within registers". Something like the below; untested of course. But I guess there must be some arch specific vcpu flags, whi

Re: [PATCH v5 00/12] RISCV: Add kvm Sstc timer selftests

2024-02-12 Thread Anup Patel
On Mon, Jan 22, 2024 at 3:15 PM Haibo Xu wrote: > > The RISC-V arch_timer selftests is used to validate Sstc timer > functionality in a guest, which sets up periodic timer interrupts > and check the basic interrupt status upon its receipt. > > This KVM selftests was ported from aarch64 arch_timer

Re: [PATCH] selftests: Move KTAP bash helpers to selftests common folder

2024-02-12 Thread Nícolas F . R . A . Prado
On Tue, Jan 02, 2024 at 03:15:28PM +0100, Laura Nao wrote: > Move bash helpers for outputting in KTAP format to the common selftests > folder. This allows kselftests other than the dt one to source the file > and make use of the helper functions. > Define pass, fail and skip codes in the same file

Re: [PATCH RFT v5 4/7] fork: Add shadow stack support to clone3()

2024-02-12 Thread Mark Brown
On Fri, Feb 09, 2024 at 08:18:11PM +, Edgecombe, Rick P wrote: > On Sat, 2024-02-03 at 00:05 +, Mark Brown wrote: > > +   if (write_user_shstk_64((u64 __user *)addr, 0)) > > +   return false; > > + > > +   return true; > > +} > So, don't we want to consume the token on

Re: [PATCH] Fix the warning of amd-pstate.rst.

2024-02-12 Thread Rafael J. Wysocki
On Mon, Feb 5, 2024 at 7:04 AM Meng Li wrote: > > Title under line too short > > Signed-off-by: Meng Li > --- > Documentation/admin-guide/pm/amd-pstate.rst | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Documentation/admin-guide/pm/amd-pstate.rst > b/Documentation/admi

Re: [PATCH v5 5/5] selftests/resctrl: Add non-contiguous CBMs CAT test

2024-02-12 Thread Reinette Chatre
Hi Maciej, On 2/11/2024 11:38 PM, Maciej Wieczor-Retman wrote: > Sure, I guess I could make the check 'if (bit_center < 3)' to also check if > the > full_cache_mask isn't too short for some reason (since later 2 is substracted > from bit_center for the 'hole' bit shift). Thank you. > Or would

Re: [PATCH RFC bpf-next 0/9] allow HID-BPF to do device IOs

2024-02-12 Thread Benjamin Tissoires
On Fri, Feb 9, 2024 at 6:05 PM Toke Høiland-Jørgensen wrote: > > Benjamin Tissoires writes: > > > On Fri, Feb 9, 2024 at 4:42 PM Toke Høiland-Jørgensen > > wrote: > >> > >> Benjamin Tissoires writes: > >> > >> > [Putting this as a RFC because I'm pretty sure I'm not doing the things > >> > cor

Re: [PATCH v9 13/25] security: Introduce file_release hook

2024-02-12 Thread Stefan Berger
On 1/15/24 13:17, Roberto Sassu wrote: From: Roberto Sassu In preparation for moving IMA and EVM to the LSM infrastructure, introduce the file_release hook. IMA calculates at file close the new digest of the file content and writes it to security.ima, so that appraisal at next file access s

Re: [PATCH v9 15/25] security: Introduce inode_post_create_tmpfile hook

2024-02-12 Thread Stefan Berger
On 1/15/24 13:17, Roberto Sassu wrote: From: Roberto Sassu In preparation for moving IMA and EVM to the LSM infrastructure, introduce the inode_post_create_tmpfile hook. As temp files can be made persistent, treat new temp files like other new files, so that the file hash is calculated and

Re: [PATCH v9 14/25] security: Introduce path_post_mknod hook

2024-02-12 Thread Stefan Berger
On 1/15/24 13:17, Roberto Sassu wrote: From: Roberto Sassu In preparation for moving IMA and EVM to the LSM infrastructure, introduce the path_post_mknod hook. IMA-appraisal requires all existing files in policy to have a file hash/signature stored in security.ima. An exception is made for

Re: [PATCH v9 20/25] ima: Move to LSM infrastructure

2024-02-12 Thread Stefan Berger
On 1/15/24 13:18, Roberto Sassu wrote: From: Roberto Sassu Move hardcoded IMA function calls (not appraisal-specific functions) from various places in the kernel to the LSM infrastructure, by introducing a new LSM named 'ima' (at the end of the LSM list and always enabled like 'integrity').

Re: [PATCH RFC bpf-next 0/9] allow HID-BPF to do device IOs

2024-02-12 Thread Toke Høiland-Jørgensen
Benjamin Tissoires writes: [...] >> IIUC, the bpf_timer callback is just a function (subprog) from the >> verifier PoV, so it is verified as whatever program type is creating the >> timer. So in other words, as long as you setup the timer from inside a >> tracing prog type, you should have access

Re: [PATCH v9 19/25] integrity: Move integrity_kernel_module_request() to IMA

2024-02-12 Thread Stefan Berger
On 1/15/24 13:18, Roberto Sassu wrote: From: Roberto Sassu In preparation for removing the 'integrity' LSM, move integrity_kernel_module_request() to IMA, and rename it to ima_kernel_module_request(). Compile it conditionally if CONFIG_INTEGRITY_ASYMMETRIC_KEYS is enabled, and call it from

Re: [PATCH v9 19/25] integrity: Move integrity_kernel_module_request() to IMA

2024-02-12 Thread Paul Moore
On Mon, Feb 12, 2024 at 12:48 PM Stefan Berger wrote: > On 1/15/24 13:18, Roberto Sassu wrote: ... > > +/** > > + * ima_kernel_module_request - Prevent crypto-pkcs1pad(rsa,*) requests > > + * @kmod_name: kernel module name > > + * > > + * We have situation, when public_key_verify_signature() in

Re: [PATCH RFC bpf-next 0/9] allow HID-BPF to do device IOs

2024-02-12 Thread Benjamin Tissoires
On Mon, Feb 12, 2024 at 6:46 PM Toke Høiland-Jørgensen wrote: > > Benjamin Tissoires writes: > > [...] > >> IIUC, the bpf_timer callback is just a function (subprog) from the > >> verifier PoV, so it is verified as whatever program type is creating the > >> timer. So in other words, as long as yo

Re: [PATCH v9 22/25] evm: Move to LSM infrastructure

2024-02-12 Thread Stefan Berger
On 1/15/24 13:18, Roberto Sassu wrote: From: Roberto Sassu As for IMA, move hardcoded EVM function calls from various places in the kernel to the LSM infrastructure, by introducing a new LSM named 'evm' (last and always enabled like 'ima'). The order in the Makefile ensures that 'evm' hooks

Re: [PATCH net] selftests: net: ip_local_port_range: define IPPROTO_MPTCP

2024-02-12 Thread Naresh Kamboju
On Fri, 9 Feb 2024 at 19:27, Matthieu Baerts wrote: > > Hi Maxim, Naresh, > > On 09/02/2024 14:25, Maxim Galaganov wrote: > > Older glibc's netinet/in.h may leave IPPROTO_MPTCP undefined when > > building ip_local_port_range.c, that leads to "error: use of undeclared > > identifier 'IPPROTO_MPTCP'

Re: [PATCH] selftests/mm: Don't needlessly use sudo to obtain root in run_vmtests.sh

2024-02-12 Thread Mark Brown
On Mon, Feb 12, 2024 at 08:32:58AM +, Ryan Roberts wrote: > On 10/02/2024 12:35, Mark Brown wrote: > > Ah, I was assuming that some of the suite ran usefully as non-root given > > that the only point of that sudo was to acquire root. If the whole > > thing needs to be root then we should inst

Re: [PATCH v9 23/25] evm: Make it independent from 'integrity' LSM

2024-02-12 Thread Stefan Berger
On 1/15/24 13:18, Roberto Sassu wrote: From: Roberto Sassu Define a new structure for EVM-specific metadata, called evm_iint_cache, and embed it in the inode security blob. Introduce evm_iint_inode() to retrieve metadata, and register evm_inode_alloc_security() for the inode_alloc_security L

[PATCH v2 0/4] selftests: add missing gitignore files and include generated objects

2024-02-12 Thread Javier Carrasco
This series aims to keep the git status clean after building the selftests by adding some missing .gitignore files and object inclusion in existing .gitignore files. This is one of the requirements listed in the selftests documentation for new tests, but it is not always followed as desired. After

[PATCH v2 1/4] selftests: uevent: add missing gitignore

2024-02-12 Thread Javier Carrasco
The 'uevent_filtering' test generates an object with the same name, but there is no .gitignore file in the directory to add the object as stated in the selftest documentation. Add the missing .gitignore file and include 'uevent_filtering'. Signed-off-by: Javier Carrasco --- tools/testing/selfte

[PATCH v2 2/4] selftests: thermal: intel: power_floor: add missing gitignore

2024-02-12 Thread Javier Carrasco
The 'power_floor' test generates an object with the same name, but there is no .gitignore file in the directory to add the object as stated in the selftest documentation. Add the missing .gitignore file and include 'power_floor'. Signed-off-by: Javier Carrasco --- tools/testing/selftests/therma

[PATCH v2 3/4] selftests: thermal: intel: workload_hint: add missing gitignore

2024-02-12 Thread Javier Carrasco
The 'workload_hint_test' test generates an object with the same name, but there is no .gitignore file in the directory to add the object as stated in the selftest documentation. Add the missing .gitignore file and include 'workload_hint_test'. Signed-off-by: Javier Carrasco --- tools/testing/se

[PATCH v2 4/4] selftests: damon: add access_memory to .gitignore

2024-02-12 Thread Javier Carrasco
This binary is missing in the .gitignore and stays as an untracked file. Reported-by: Bernd Edlinger Signed-off-by: Javier Carrasco --- tools/testing/selftests/damon/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/damon/.gitignore b/tools/testing/selftest

Re: [PATCH v9 24/25] ima: Make it independent from 'integrity' LSM

2024-02-12 Thread Stefan Berger
On 1/15/24 13:18, Roberto Sassu wrote: From: Roberto Sassu Make the 'ima' LSM independent from the 'integrity' LSM by introducing IMA own integrity metadata (ima_iint_cache structure, with IMA-specific fields from the integrity_iint_cache structure), and by managing it directly from the 'ima

Re: [PATCH v9 25/25] integrity: Remove LSM

2024-02-12 Thread Stefan Berger
On 1/15/24 13:18, Roberto Sassu wrote: From: Roberto Sassu Since now IMA and EVM use their own integrity metadata, it is safe to remove the 'integrity' LSM, with its management of integrity metadata. Keep the iint.c file only for loading IMA and EVM keys at boot, and for creating the integr

Re: [PATCH v2 4/4] selftests: damon: add access_memory to .gitignore

2024-02-12 Thread SeongJae Park
Hello, On Mon, 12 Feb 2024 20:43:39 +0100 Javier Carrasco wrote: > This binary is missing in the .gitignore and stays as an untracked file. > > Reported-by: Bernd Edlinger > Signed-off-by: Javier Carrasco 'checkpatch.pl' complains as below: WARNING: Reported-by: should be immediately f

Re: [PATCH v2 4/4] selftests: damon: add access_memory to .gitignore

2024-02-12 Thread Javier Carrasco
On 12.02.24 20:53, SeongJae Park wrote: > Hello, > > On Mon, 12 Feb 2024 20:43:39 +0100 Javier Carrasco > wrote: > >> This binary is missing in the .gitignore and stays as an untracked file. >> >> Reported-by: Bernd Edlinger >> Signed-off-by: Javier Carrasco > > 'checkpatch.pl' complains

Re: [PATCH v2 4/4] selftests: damon: add access_memory to .gitignore

2024-02-12 Thread SeongJae Park
On Mon, 12 Feb 2024 21:07:34 +0100 Javier Carrasco wrote: > > > On 12.02.24 20:53, SeongJae Park wrote: > > Hello, > > > > On Mon, 12 Feb 2024 20:43:39 +0100 Javier Carrasco > > wrote: > > > >> This binary is missing in the .gitignore and stays as an untracked file. > >> > >> Reported-by:

Re: [PATCH v9 19/25] integrity: Move integrity_kernel_module_request() to IMA

2024-02-12 Thread Stefan Berger
On 2/12/24 12:56, Paul Moore wrote: On Mon, Feb 12, 2024 at 12:48 PM Stefan Berger wrote: On 1/15/24 13:18, Roberto Sassu wrote: ... +/** + * ima_kernel_module_request - Prevent crypto-pkcs1pad(rsa,*) requests + * @kmod_name: kernel module name + * + * We have situation, when public_key_

Re: [PATCH v9 12/25] security: Introduce file_post_open hook

2024-02-12 Thread Mimi Zohar
Hi Roberto, > diff --git a/security/security.c b/security/security.c > index d9d2636104db..f3d92bffd02f 100644 > --- a/security/security.c > +++ b/security/security.c > @@ -2972,6 +2972,23 @@ int security_file_open(struct file *file) > return fsnotify_perm(file, MAY_OPEN); <=== Conflict

Re: [PATCH v9 12/25] security: Introduce file_post_open hook

2024-02-12 Thread Paul Moore
On Mon, Feb 12, 2024 at 4:06 PM Mimi Zohar wrote: > > Hi Roberto, > > > > diff --git a/security/security.c b/security/security.c > > index d9d2636104db..f3d92bffd02f 100644 > > --- a/security/security.c > > +++ b/security/security.c > > @@ -2972,6 +2972,23 @@ int security_file_open(struct file *fi

Re: [PATCH RFC bpf-next 0/9] allow HID-BPF to do device IOs

2024-02-12 Thread Alexei Starovoitov
On Mon, Feb 12, 2024 at 10:21 AM Benjamin Tissoires wrote: > > On Mon, Feb 12, 2024 at 6:46 PM Toke Høiland-Jørgensen > wrote: > > > > Benjamin Tissoires writes: > > > > [...] > > >> IIUC, the bpf_timer callback is just a function (subprog) from the > > >> verifier PoV, so it is verified as wha

Re: [PATCH v2 4/4] selftests: damon: add access_memory to .gitignore

2024-02-12 Thread Andrew Morton
On Mon, 12 Feb 2024 12:23:56 -0800 SeongJae Park wrote: > > > > > Also, note that this conflicts on mm-unstable. > > > > Should I use mm-unstable as basis to make sure no conflicts are introduced? > > DAMON selftest patches could be merged in mm-unstable or linux-kselftest > depending on cases

Re: [PATCH net] selftests: net: ip_local_port_range: define IPPROTO_MPTCP

2024-02-12 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (main) by Jakub Kicinski : On Fri, 9 Feb 2024 16:25:11 +0300 you wrote: > Older glibc's netinet/in.h may leave IPPROTO_MPTCP undefined when > building ip_local_port_range.c, that leads to "error: use of undeclared > identifier 'IPPROTO_MPTCP'". >

Re: [RFC PATCH v2 0/3] KVM: allow mapping of compound tail pages for IO or PFNMAP mapping

2024-02-12 Thread Sean Christopherson
On Wed, Jan 03, 2024, Yan Zhao wrote: > This is a v2 for previous series [1] to allow mapping for compound tail > pages for IO or PFNMAP mapping. > > Compared to v1, this version provides selftest to check functionality in > KVM to map memslots for MMIO BARs (VMAs with flag VM_IO | VM_PFNMAP), as

Re: [RFC PATCH v2 1/3] KVM: allow mapping of compound tail pages for IO or PFNMAP mapping

2024-02-12 Thread Sean Christopherson
On Wed, Jan 03, 2024, Yan Zhao wrote: > Allow mapping of tail pages of compound pages for IO or PFNMAP mapping > by trying and getting ref count of its head page. > > For IO or PFNMAP mapping, sometimes it's backed by compound pages. > KVM will just return error on mapping of tail pages of the com

[linux-next:master] BUILD REGRESSION ae00c445390b349e070a64dc62f08aa878db7248

2024-02-12 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: ae00c445390b349e070a64dc62f08aa878db7248 Add linux-next specific files for 20240212 Error/Warning reports: https://lore.kernel.org/oe-kbuild-all/202402122047.ydhrzmm4-...@intel.com https