<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-rng/tools/testing/selftests/exec, branch master</title>
<subtitle>Development tree for the kernel CSPRNG</subtitle>
<id>https://git.zx2c4.com/linux-rng/atom/tools/testing/selftests/exec?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-rng/atom/tools/testing/selftests/exec?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/'/>
<updated>2026-10-30T19:25:01Z</updated>
<entry>
<title>Merge tag 'vfs-7.4-rc1.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs</title>
<updated>2026-10-30T19:25:01Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-10-30T19:25:01Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=0c8bf38058e5ac0e42246acb13f623b7962a3922'/>
<id>urn:sha1:0c8bf38058e5ac0e42246acb13f623b7962a3922</id>
<content type='text'>
Pull vfs fixes from Christian Brauner:

 - writeback:

    - Update dirtied_when instead of dirtied_time_when when a wb switch
      puts an inode at the newest end of the target b_dirty list. The
      list was left out of order so move_expired_inodes() could stop
      before older inodes, and the lazytime expiration timestamp was
      reset

    - Clear the old wb's dirty-I/O state and bandwidth contribution when
      a batch of inode switches leaves its dirty lists empty. An empty
      wb stayed scheduled for periodic writeback and inflated
      bdi-&gt;tot_write_bandwidth

    - Take wb_switch_rwsem across the inode scan of
      cleanup_offline_cgwb(). The v7.3-rc5 fix that rotates scanned
      inodes let a scan racing a sync()'s queue_io() move lazytime
      inodes past the sync's cutoff, so sync() returned without
      persisting their timestamps

    - Don't kick writeback for an IOCB_DONTCACHE write on an inode that
      has no wb yet. With cgroup writeback an O_DIRECT RWF_DONTCACHE
      write to a block device dereferenced NULL

 - statmount/listmount/listns:

    - Refuse statmount() string requests with a buffer that isn't larger
      than struct statmount

    - Don't wrap around with a U64_MAX cursor in listmount() and
      listns()

    - Don't end listns() at an inactive namespace

    - Only add init_ipc_ns and init_net to the namespace trees if
      CONFIG_IPC_NS and CONFIG_NET_NS are enabled

 - iomap:

    - Only mark blocks uptodate in __iomap_write_begin() after reading
      them and let __iomap_write_end() mark the zeroed blocks uptodate
      once the copy from userspace succeeded

    - Check a chunk against max_integrity_io_size() on its own before
      the bio size check

    - Only enforce block alignment for direct I/O into holes and
      unwritten extents if IOMAP_DIO_FSBLOCK_ALIGNED is set

 - backing-file:

    - Check S_APPEND and S_IMMUTABLE on the backing inode. FUSE
      passthrough opens the backing file with vfs_open() which skips
      may_open(), so anyone who may open the FUSE file for writing could
      overwrite an append-only backing file anywhere or write to an
      immutable one. Open, mmap and writes now check the backing inode
      the way may_open() and do_mmap() do

    - Always call kiocb_end_write() for a queued write

    - Let backing files inherit FMODE_NONOTIFY from the user file. The
      event fds fanotify creates for permission events on a stacked
      filesystem raised FS_OPEN_PERM on the real path from inside the
      listener's read() and deadlocked listeners with marks on both
      layers

 - pidfs:

    - Look the task up before checking for exit information in
      PIDFD_GET_INFO and start over if the task no longer owns the pid
      once all fields have been read. A caller racing release_task() got
      neither PIDFD_INFO_PID nor PIDFD_INFO_EXIT or ESRCH although the
      exit information was available, and a caller racing a sub-thread's
      exec reported that thread's tid as the pid

    - Clear the mask bits of fields that lie beyond the struct size the
      caller passed. The uapi header promises that the mask names no
      such field but a caller passing PIDFD_INFO_SIZE_VER0 got the
      coredump and supported mask bits set for fields that were never
      written

 - aio:

    - Give the aio ring a -&gt;read_folio that fails with EIO so a fault on
      a ring whose file was truncated gets SIGBUS instead of jumping to
      NULL

    - Check nr_events against the ring size before doubling it in
      ioctx_alloc()

 - splice:

    - Only write back an implicit file position in do_splice() when the
      splice helper succeeded. splice doesn't take f_pos_lock so a
      failed splice restored a stale snapshot over a position that a
      concurrent getdents() had moved. On ext2 the next readdir then
      trusted an offset inside a directory entry

    - Retry tee() when the input pipe was emptied or the output pipe
      filled between the prep steps and link_pipe() instead of returning
      0 while the input pipe still has writers, as splice_pipe_to_pipe()
      does

 - ucount:

    - Take the reference that pins a ucounts level on the 0 -&gt; 1
      transition before checking the rlimit

    - Read the parent ucounts before dropping the rlimit count in
      do_dec_rlimit_put_ucounts()

 - inode:

    - Rotate inodes whose page cache couldn't be dropped to the tail of
      the LRU

    - Skip inodes that another LRU walker is isolating

 - setns:

    - Set nsset-&gt;flags before anything in prepare_nsset() can fail so
      the error path drops the cred prepared for CLONE_NEWUSER. A
      failing setns() with CLONE_NEWUSER and CLONE_NEWNS leaked it
      together with its user namespace

    - Refuse setns(CLONE_NEWNS) for a task that shares its fs_struct
      again when more namespaces are requested

 - minix:

    - Restore uptodate on the pinned bitmap buffers before redirtying
      them after a failed writeback instead of tripping the warning in
      mark_buffer_dirty(), as ext2 and ext4 do for their superblock
      buffers

    - Reject rmdir() of a directory with a corrupted link count with
      EFSCORRUPTED instead of hitting the drop_nlink() warning

 - userns: Keep the exec securebits and their locks when creating or
   joining a user namespace. set_cred_user_ns() reset all securebits to
   SECUREBITS_DEFAULT so anyone who may create a user namespace could
   shed SECBIT_EXEC_RESTRICT_FILE and SECBIT_EXEC_DENY_INTERACTIVE with
   a single unshare(CLONE_NEWUSER)

 - fs: Honor FOP_UNSIGNED_OFFSET in sys_llseek() and in the pread64(),
   pwrite64(), preadv() and pwritev() wrappers

 - proc/kcore: Advance the vmalloc retry in read_kcore_iter() by the
   last vread_iter() copy instead of the running total

 - eventpoll: Return the error when the wakeup source for EPOLLWAKEUP
   can't be created in EPOLL_CTL_MOD instead of reporting success
   without suspend protection

 - coredump: Mark do_coredump() noinline_for_stack

 - nsfs: Check the trailing bytes of a namespace file handle in bytes
   instead of words

 - netfs: Restore the per-level and per-point decoding of the debug mask

 - exportfs: Release the directory file get_name() opened with
   __fput_sync(). From nfsd's kernel threads the deferred fputs arrived
   faster than delayed_fput retired them and each pinned the directory's
   readdir state, growing unreclaimable slab by about 90 MB per second
   under a parallel tree walk

 - fs: Call ramfs_kill_sb() for a ramfs rootfs. Since rootfs can be
   unmounted as of v7.0 its struct ramfs_fs_info was leaked

 - signal: Check the blocked mask for every entry
   dequeue_synchronous_signal() looks at. The scan could select a
   blocked synchronous signal and deliver it while blocked

 - super: Convert the superblock device table from an rhltable to a
   plain hashtable under a spinlock. This fixes a bug from v7.3 where
   fs_bdev_freeze() froze a btrfs filesystem through a stale member that
   open_ctree() had already released while the freeze was waiting for
   SB_BORN

 - fork: Leave rcu_users at zero until copy_process() can't fail
   anymore. bpf_task_acquire() handed out trusted references to the new
   task from the task_alloc LSM hook and sched_ext's ops.init_task() and
   a failing fork freed the task behind them

 - xattr: Always run cap_convert_nscap() for a security.capability
   write. A zero-length setxattr() skipped it and let an unprivileged
   caller without CAP_SETFCAP or write permission on the file plant an
   empty security.capability xattr that made every execve() of the
   binary fail with EINVAL

 - namei: Skip the S_ISDIR assertion in

 - proc: Refuse to mount on entries below /proc/&lt;pid&gt;/net like fd/,
   fdinfo/ and map_files/. proc_net_d_revalidate() always fails so the
   first lookup by anyone with search permission ran d_invalidate() on
   the dentry and detached every mount on it, locked mounts included

 - libfs: Hold one mount reference for all pins instead of one per pin.
   The pin count is what keeps the mount alive, so the per-pin reference
   only cost a mntget() and a mntput() through
   mntput_no_expire_slowpath() for every debugfs, tracefs, securityfs or
   configfs file that comes and goes

 - iov_iter: Return 0 from iov_iter_alignment() for an empty iterator of
   any type

 - watch_queue: Give info_id its own storage instead of overlaying it
   with rcu_head

 - filelock: Take an active superblock reference while waiting for a
   delegation break. After a lazy umount closing the delegation holder
   could shut down the superblock under the waiter whose final iput()
   then ran shmem_evict_inode() on freed state

 - fs: Skip the copy_file_range() write limit checks when there is no
   data to copy

 - bpf: Allow bpf_d_path() from fentry on filp_close_sync(). Since
   close_range() became synchronous this cycle close(), close_range()
   and the closes on exec and exit no longer go through filp_close().
   fexit stays rejected since the file may be gone by then

 - fs_pin: Dequeue the wait entry unconditionally in pin_kill(). A
   spuriously woken waiter kept its on-stack entry queued, took that as
   proof that the pin was alive and used the freed acct structure when
   umount() of the accounting file raced acct(2)

 - dcache: Don't fail __d_obtain_alias() for an inode without links and
   aliases. The ESTALE check added this cycle broke open_by_handle_at()
   and nfsd file handle decoding on NFS and FUSE where i_nlink is just
   what the server last reported and the handle may well still be valid

 - selftests/ovl: Fix the mountinfo expectations of the detached layer
   test which has failed since it was added

* tag 'vfs-7.4-rc1.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: (60 commits)
  fs: don't fail __d_obtain_alias() for unlinked inodes
  ns: don't add init_ipc_ns and init_net without namespace support
  aio: avoid request count overflow in ioctx_alloc()
  selftests/ovl: fix detached layer mountinfo expectations
  bpf: Allow bpf_d_path() from filp_close_sync()
  fs: skip copy_file_range write limits when there is no data
  minix: reject rmdir of a directory with a corrupted link count
  fs_pin: do not trust the pin after a spurious wakeup in pin_kill()
  ucount: read the parent ucounts before dropping the rlimit count
  splice: retry tee() instead of returning 0 when it races
  selftests/pidfd: test that fields beyond the struct size are not reported
  pidfs: do not report fields that do not fit into the caller's struct
  fs: let backing files inherit FMODE_NONOTIFY from the user file
  splice: avoid stale f_pos writeback on error
  backing-file: always end a queued write
  filelock: keep superblock active through delegation wait
  watch_queue: keep info_id separate from rcu_head
  iomap: only follow dio alignment requirement if specified
  iov_iter: fix NULL deref in iov_iter_alignment()
  backing-file: enforce append-only and immutable backing inodes
  ...
</content>
</entry>
<entry>
<title>selftests/exec: check that user namespaces keep the exec securebits</title>
<updated>2026-10-29T13:35:13Z</updated>
<author>
<name>Christian Brauner</name>
<email>brauner@kernel.org</email>
</author>
<published>2026-10-26T20:53:30Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=9084efd0a2b49c61d588b14a9b49ac8ee5d92080'/>
<id>urn:sha1:9084efd0a2b49c61d588b14a9b49ac8ee5d92080</id>
<content type='text'>
Check that the exec securebits survive creating a user namespace with
unshare(CLONE_NEWUSER) and joining one with setns():

- both bits with their locks, which can't be changed in there
- both bits without their locks, which can still be cleared in there
- only the locks, which keep the bits from being set in there

The other securebits are reset as before.

Link: https://patch.msgid.link/20261026-work-securebits-userns-v1-2-b35473fa1a34@kernel.org
Signed-off-by: Christian Brauner (Amutable) &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'execve-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux</title>
<updated>2026-10-23T00:57:31Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-10-23T00:57:31Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=5b193d6a8973655f19de87a7873ce31dee2d5fe6'/>
<id>urn:sha1:5b193d6a8973655f19de87a7873ce31dee2d5fe6</id>
<content type='text'>
Pull execve update Kees Cook:
 "Make CIs happier about the execve tests: report the skipped
  binfmt_misc_bpf test on stderr (Sasha Levin)"

* tag 'execve-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
  selftests/exec: report the skipped binfmt_misc_bpf test on stderr
</content>
</entry>
<entry>
<title>selftests/exec: report the skipped binfmt_misc_bpf test on stderr</title>
<updated>2026-10-15T04:34:01Z</updated>
<author>
<name>Sasha Levin</name>
<email>sashal@kernel.org</email>
</author>
<published>2026-10-14T20:01:35Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=b36b990c50b1f581b9a7f35ae256f5542415fa69'/>
<id>urn:sha1:b36b990c50b1f581b9a7f35ae256f5542415fa69</id>
<content type='text'>
The exec Makefile announces that binfmt_misc_bpf is skipped with
$(info), which writes to standard output whenever the Makefile is
parsed. The selftests install target appends the standard output of
"make -s emit_tests" to kselftest-list.txt, so on systems without the
BPF toolchain the runlist gains a line that is not a test entry:

  exec selftests: skipping binfmt_misc_bpf, needs clang, bpftool, ...

run_kselftest.sh and CI systems that parse the runlist then treat it as
a malformed test entry.

Use $(warning) so that the notice still appears in build logs but goes
to standard error.

Fixes: 277d787feb2e ("selftests/exec: add binfmt_misc bpf-backed handler test")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
Link: https://patch.msgid.link/20261014200135.1364053-1-sashal@kernel.org
Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/exec: test delimiter restrictions</title>
<updated>2026-08-31T08:06:35Z</updated>
<author>
<name>Christian Brauner</name>
<email>brauner@kernel.org</email>
</author>
<published>2026-08-26T15:55:47Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=6b7262392ad6b4d61d7dbf3b8dc8fbe946ac51ba'/>
<id>urn:sha1:6b7262392ad6b4d61d7dbf3b8dc8fbe946ac51ba</id>
<content type='text'>
Test that the new delimiter restrictions work.

Link: https://patch.msgid.link/20260826-work-binfmt_misc-delim-v1-2-43618adf8599@kernel.org
Signed-off-by: Christian Brauner (Amutable) &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/exec: test the pre-opened interpreter limit</title>
<updated>2026-08-03T21:36:18Z</updated>
<author>
<name>Christian Brauner</name>
<email>brauner@kernel.org</email>
</author>
<published>2026-08-03T12:15:01Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=f2b69ea2d1a017f0c8e848ff875f4cf2492d2bd0'/>
<id>urn:sha1:f2b69ea2d1a017f0c8e848ff875f4cf2492d2bd0</id>
<content type='text'>
- an interpreter opened at registration is charged
- an interpreter a 'B' entry binds is charged too
- an entry that opens none is not
- removing an entry gives the charge back
- a nested user namespace cannot buy itself budget by raising its own limit

Skips where the sysctl or binfmt_misc is missing. The 'B' case lives in
binfmt_misc_bpf.c because binding needs a handler. It binds from a child
in a user namespace of its own, through the fd the child inherited, so
the charge lands on the child while the interpreter is still opened with
the entry file's credentials, and nothing outside the child sees a
changed limit.

Link: https://patch.msgid.link/20260803-work-binfmt_misc-interplimit-v1-2-4a2435500bd9@kernel.org
Signed-off-by: Christian Brauner (Amutable) &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/exec: test interpreters bound to a 'B' entry</title>
<updated>2026-08-03T17:15:44Z</updated>
<author>
<name>Christian Brauner</name>
<email>brauner@kernel.org</email>
</author>
<published>2026-07-30T13:34:10Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=7404b1472b111b62f061fc5e9244aacaa862a1e4'/>
<id>urn:sha1:7404b1472b111b62f061fc5e9244aacaa862a1e4</id>
<content type='text'>
One handler, one entry registered disabled, an interpreter per guest
architecture bound to a file one write at a time. The load program picks
one by name per exec:

- an aarch64 binary runs the interpreter bound as "first" and a riscv one
  the interpreter bound as "second", from a single entry and a single
  handler

- unlinking a bound interpreter and putting a different binary in its
  place changes nothing, which is what the binding exists for

- the entry reports what it bound, under the names it bound them as

- a name the entry did not bind fails the exec with -ENOENT rather than
  falling back to anything

- activating the entry refuses further binding with -EBUSY, a later
  disable does not undo that, and an entry registered without 'D' never
  accepted a '+' write to begin with

- a name binds one interpreter, and control characters are refused

- the command has to end at the write, bytes past an embedded nul are
  refused

- an entry binds at most 100 interpreters, the next one is refused with
  -ENOSPC

The test interpreter prints its argv[0], which is the path the kernel ran
that copy under, so one binary installed at two paths tells the harness
which of them the program picked.

Link: https://patch.msgid.link/20260730-work-binfmt_misc-preopen-v1-8-4a0b0da71f16@kernel.org
Signed-off-by: Christian Brauner (Amutable) &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/exec: share the bpf handler preconditions</title>
<updated>2026-08-03T17:15:44Z</updated>
<author>
<name>Christian Brauner</name>
<email>brauner@kernel.org</email>
</author>
<published>2026-07-30T13:34:07Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=145e675de6ca0b3865000876414b8a5f93246c6b'/>
<id>urn:sha1:145e675de6ca0b3865000876414b8a5f93246c6b</id>
<content type='text'>
The bpf handler fixture opens with three probes, each with its own SKIP.
More fixtures with the same needs are about to be added, so hoist the
probes into a helper that reports the first missing precondition.

Link: https://patch.msgid.link/20260730-work-binfmt_misc-preopen-v1-5-4a0b0da71f16@kernel.org
Signed-off-by: Christian Brauner (Amutable) &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/exec: test registering an entry disabled</title>
<updated>2026-08-03T17:15:44Z</updated>
<author>
<name>Christian Brauner</name>
<email>brauner@kernel.org</email>
</author>
<published>2026-07-30T13:34:05Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=6bd0c7aba69873e9944ac8853d167d32c294468c'/>
<id>urn:sha1:6bd0c7aba69873e9944ac8853d167d32c294468c</id>
<content type='text'>
A magic entry registered with 'D' and the same entry without it, to pin
down what the flag decides and what it leaves alone:

- the entry reports itself disabled and nothing dispatches until '1' is
  written to it

- without 'D' it dispatches straight away

- 'D' is not read back among the entry's flags

- enabling and disabling afterwards works as it does for any entry

- 'D' composes with the flags that shape the invocation

- '-1' to the status file removes a staged entry like any other

- a file handle held across a removal cannot resurrect the entry

Put the entry write and read-back helpers into binfmt_misc_common.h.
The bpf suite will need them as well.

Link: https://patch.msgid.link/20260730-work-binfmt_misc-preopen-v1-3-4a0b0da71f16@kernel.org
Signed-off-by: Christian Brauner (Amutable) &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/exec: let binfmt_flag_supported() return a bool</title>
<updated>2026-08-03T17:15:44Z</updated>
<author>
<name>Christian Brauner</name>
<email>brauner@kernel.org</email>
</author>
<published>2026-07-30T13:34:04Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=686585ec270198690856077e55b7d579f84a765a'/>
<id>urn:sha1:686585ec270198690856077e55b7d579f84a765a</id>
<content type='text'>
binfmt_flag_supported() returns 0 when the flag is supported and -1
when it is not, so every caller reads backwards:

	if (binfmt_flag_supported('T'))
		SKIP(return, "kernel without the 'T' flag");

Make it return a bool and flip the callers. errno from a failed probe
is still set for callers that check it.

Link: https://patch.msgid.link/20260730-work-binfmt_misc-preopen-v1-2-4a0b0da71f16@kernel.org
Signed-off-by: Christian Brauner (Amutable) &lt;brauner@kernel.org&gt;
Reviewed-by: Farid Zakaria &lt;farid.m.zakaria@gmail.com&gt;
</content>
</entry>
</feed>
