Util-Linux package development
 help / color / mirror / Atom feed
* [ANNOUNCE] util-linux v2.42.2 and v2.41.5
From: Karel Zak @ 2026-06-16 12:34 UTC (permalink / raw)
  To: linux-kernel, linux-fsdevel, util-linux

  The util-linux releases v2.42.2 and v2.41.5 are now available at

    https://www.kernel.org/pub/linux/utils/util-linux/v2.42/
    https://www.kernel.org/pub/linux/utils/util-linux/v2.41/

  Both releases contain security fixes for libmount and libblkid:

   CVE-2026-53613 - mount(8) TOCTOU race on target path
   CVE-2026-53612 - mount(8) TOCTOU race on post-mount owner/mode change
   CVE-2026-53614 - mount(8) SUID bypass via LIBMOUNT_FORCE_MOUNT2
   libblkid use-after-free in nested partition probing

  v2.42.2 additionally includes a follow-up fix for CVE-2026-27456
  (loop device symlink attack) -- the v2.42.1 fix used O_NOFOLLOW
  which only rejects symlinks at the last path component; this update
  uses openat2(RESOLVE_NO_SYMLINKS) to reject symlinks at any component.

  Note for v2.41 downstream maintainers: the same loopdev follow-up
  fix for CVE-2026-27456 is available on the stable/v2.41 branch
  (commit 2dacaf3ee) but did not make it into the v2.41.5 tarball.
  Please cherry-pick it into your builds.

  Release notes:
    https://www.kernel.org/pub/linux/utils/util-linux/v2.42/v2.42.2-ReleaseNotes
    https://www.kernel.org/pub/linux/utils/util-linux/v2.41/v2.41.5-ReleaseNotes

  Feedback and bug reports, as always, are welcomed.

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com


^ permalink raw reply

* Re: [man page] undefined string 'Aq'
From: Karel Zak @ 2026-06-09 11:07 UTC (permalink / raw)
  To: Bjarni Ingi Gislason; +Cc: util-linux
In-Reply-To: <aiWf2S5xi0RgPW1U@kassi.invalid.is>

On Sun, Jun 07, 2026 at 04:44:09PM +0000, Bjarni Ingi Gislason wrote:
>   The string 'Aq' is used (in .TH) before it is defined.

Thanks! Fixed by commit a4c22d0417e67a587d7f2c78e0fb0311ce5ddd6a

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com


^ permalink raw reply

* Re: Bug#1138789: [PATCH] mkswap: use 64k pages in file-existing test
From: Chris Hofstaedtler @ 2026-06-08 18:44 UTC (permalink / raw)
  To: Karel Zak, 1138789; +Cc: util-linux, Johannes Wüller, debian-loongarch
In-Reply-To: <vwrh76odob5kr7mdtatgsuqrftfybisieyhb3dmgch5y4rdukq@6zmqirjnhewi>

On Mon, Jun 08, 2026 at 01:00:58PM +0200, Karel Zak wrote:
> On Thu, Jun 04, 2026 at 02:20:56PM +0200, Chris Hofstaedtler wrote:
> > Some systems run with kernels using page sizes other than 4K. The
> > file-existing test used a file of 10 pages at 4K. This would fail on
> > kernels with higher page sizes (here 16K) like this:
> > 
> >   mkswap: error: swap area needs to be at least 160 KiB
> > 
> > Use 10 * 64K pages, hopefully allowing all kernels with 4K, 16K, 64K
> > pages to pass the tests.
> > 
> > Noticed on Debian loong64 kernel 7.0.9+deb14-loong64, and on sparc64 and
> > alpha.
> > 
> > Bug: https://bugs.debian.org/1138789
> 
> It was already fixed by commit c5da6dcfe, which explicitly forces the
> page size to 4096 rather than extending the file size.

Ah, thank you! I've pulled this commit into our build.

Best,
Chris

^ permalink raw reply

* Re: [PATCH 1/3] lsmem: (usage) list possible values for <when> like for the other <when>
From: Karel Zak @ 2026-06-08 11:12 UTC (permalink / raw)
  To: Benno Schulenberg; +Cc: util-linux
In-Reply-To: <20260604095252.162210-1-bensberg@telfort.nl>

On Thu, Jun 04, 2026 at 11:52:50AM +0200, Benno Schulenberg wrote:
>  sys-utils/lsmem.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

All three patches have been applied. Thank you!

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com


^ permalink raw reply

* Re: [PATCH] mkswap: use 64k pages in file-existing test
From: Karel Zak @ 2026-06-08 11:00 UTC (permalink / raw)
  To: Chris Hofstaedtler
  Cc: util-linux, Johannes Wüller, 1138789, debian-loongarch
In-Reply-To: <aiFqhPSChxTxAuZv@zeha.at>

On Thu, Jun 04, 2026 at 02:20:56PM +0200, Chris Hofstaedtler wrote:
> Some systems run with kernels using page sizes other than 4K. The
> file-existing test used a file of 10 pages at 4K. This would fail on
> kernels with higher page sizes (here 16K) like this:
> 
>   mkswap: error: swap area needs to be at least 160 KiB
> 
> Use 10 * 64K pages, hopefully allowing all kernels with 4K, 16K, 64K
> pages to pass the tests.
> 
> Noticed on Debian loong64 kernel 7.0.9+deb14-loong64, and on sparc64 and
> alpha.
> 
> Bug: https://bugs.debian.org/1138789

It was already fixed by commit c5da6dcfe, which explicitly forces the
page size to 4096 rather than extending the file size.

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com


^ permalink raw reply

* Re: Bug#1134639: nsenter -t 1 -m escapes mount and pid namespaces
From: Karel Zak @ 2026-06-08 10:32 UTC (permalink / raw)
  To: Ralph Ronnquist
  Cc: Christian Albrecht Goeschel Ndjomouo, Chris Hofstaedtler,
	util-linux@vger.kernel.org, 1134639@bugs.debian.org
In-Reply-To: <aiFQRzblklN7Iv2I@smulan>

On Thu, Jun 04, 2026 at 08:15:35PM +1000, Ralph Ronnquist wrote:
> On Thu, Jun 04, 2026 at 04:03:44AM +0000, Christian Albrecht Goeschel Ndjomouo wrote:
> > $ unshare --mount --pid --fork
> > $ mount --bind FS FS/
> > $ cd FS/
> > $ mkdir -p old_root/
> > $ /sbin/pivot_root . old_root/
> > $ cd /
> > $ mount -t proc proc /proc
> > $ umount -l old_root/
> > $ rmdir old_root
> > 
> > You should then be able to see the exact same mnt namespace ID.
> > 
> > $ ls -l /proc/1/ns/mnt
> > [...] /proc/1/ns/mnt -> 'mnt:[4026533461]'
> > $ nsenter --mount --target 1 -- ls -l /proc/1/ns/mnt
> > [...] /proc/1/ns/mnt -> 'mnt:[4026533461]'
> > 
> > 
> > Maybe Karel has more to say about this.
> > 
> > Anyways I hope this cleared up at least some of the confusion.
> 
> Quite subtile, but I can confirm also in my actual setting (which is a
> simple and plain "overlay-boot" example).
> 
> I will need a couple of sleeps before I fully grasp that "absolute
> root" notion. However the recepie you outline does bring the desired
> effect of eliminating that namespace eascape for me.

I'd suggest using `unshare` to mount the proc:

    unshare --mount --pid --mount-proc

You might also want to add `--root dir`, otherwise `/proc` is mounted
privately in the current root.

Also, note that `nsenter --target 1 -m` enters only the mount
namespace, while `nsenter --target 1 --all` enters all namespaces.

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com


^ permalink raw reply

* [man page] undefined string 'Aq'
From: Bjarni Ingi Gislason @ 2026-06-07 16:44 UTC (permalink / raw)
  To: util-linux

  The string 'Aq' is used (in .TH) before it is defined.

troff:/tmp/gz.roff.nYWBZY:10: warning: name 'Aq' not defined [-w mac]
/usr/share/man/man3/uuid.3.gz

troff:/tmp/gz.roff.PqGqW4:10: warning: name 'Aq' not defined [-w mac]
/usr/share/man/man3/uuid_clear.3.gz

troff:/tmp/gz.roff.eqNIm0:10: warning: name 'Aq' not defined [-w mac]
/usr/share/man/man3/uuid_compare.3.gz

troff:/tmp/gz.roff.6CFl2a:10: warning: name 'Aq' not defined [-w mac]
/usr/share/man/man3/uuid_copy.3.gz

troff:/tmp/gz.roff.RqKhwy:10: warning: name 'Aq' not defined [-w mac]
/usr/share/man/man3/uuid_generate.3.gz

troff:/tmp/gz.roff.ihqSVv:10: warning: name 'Aq' not defined [-w mac]
/usr/share/man/man3/uuid_is_null.3.gz

troff:/tmp/gz.roff.bcxMBY:10: warning: name 'Aq' not defined [-w mac]
/usr/share/man/man3/uuid_parse.3.gz

troff:/tmp/gz.roff.ZzxtTw:10: warning: name 'Aq' not defined [-w mac]
/usr/share/man/man3/uuid_time.3.gz

troff:/tmp/gz.roff.uf4Wul:10: warning: name 'Aq' not defined [-w mac]
/usr/share/man/man3/uuid_unparse.3.gz

troff:/tmp/gz.roff.jUYDWe:10: warning: name 'Aq' not defined [-w mac]
/usr/share/man/man3/libblkid.3.gz

  See also the lintian output in the Debian distribution for the
"uuid-dev" package.

  The same defects can be in other man pages.

^ permalink raw reply

* [PATCH] mkswap: use 64k pages in file-existing test
From: Chris Hofstaedtler @ 2026-06-04 12:20 UTC (permalink / raw)
  To: util-linux, Johannes Wüller; +Cc: 1138789, debian-loongarch
In-Reply-To: <aiCI1IeBms90Uzy0@per.namespace.at>

Some systems run with kernels using page sizes other than 4K. The
file-existing test used a file of 10 pages at 4K. This would fail on
kernels with higher page sizes (here 16K) like this:

   mkswap: error: swap area needs to be at least 160 KiB

Use 10 * 64K pages, hopefully allowing all kernels with 4K, 16K, 64K
pages to pass the tests.

Noticed on Debian loong64 kernel 7.0.9+deb14-loong64, and on 
sparc64 and alpha. 

Bug: https://bugs.debian.org/1138789
Fixes: 775729884a3945a53df33e0d3ff2ba263b96b59e
Signed-off-by: Chris Hofstaedtler <zeha@debian.org>
---
  tests/ts/mkswap/mkswap | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/ts/mkswap/mkswap b/tests/ts/mkswap/mkswap
index 19111971c..fa7e6b462 100755
--- a/tests/ts/mkswap/mkswap
+++ b/tests/ts/mkswap/mkswap
@@ -105,11 +105,11 @@ ts_init_subtest file-existing
  outimg="$TS_OUTDIR/existing.img"
  rm -f "$outimg"
  
-"$TS_CMD_MKSWAP" -q -U "$UUID" -F -s $((4096 * 10)) "$outimg" \
+"$TS_CMD_MKSWAP" -q -U "$UUID" -F -s $((65536 * 10)) "$outimg" \
      >> "$TS_OUTPUT" 2>/dev/null \
      || ts_log "mkswap failed"
  
-"$TS_CMD_MKSWAP" -q -U "$UUID" -F -s $((4096 * 10)) "$outimg" \
+"$TS_CMD_MKSWAP" -q -U "$UUID" -F -s $((65536 * 10)) "$outimg" \
      >> "$TS_OUTPUT" 2>&1 \
      || ts_log "mkswap -F failed on existing file"
  
-- 
2.53.0



^ permalink raw reply related

* Re: Bug#1134639: nsenter -t 1 -m escapes mount and pid namespaces
From: Ralph Ronnquist @ 2026-06-04 10:15 UTC (permalink / raw)
  To: Christian Albrecht Goeschel Ndjomouo
  Cc: Chris Hofstaedtler, util-linux@vger.kernel.org,
	1134639@bugs.debian.org
In-Reply-To: <SJ0P220MB0541F8F40FD5C0E972BBD715E9102@SJ0P220MB0541.NAMP220.PROD.OUTLOOK.COM>

On Thu, Jun 04, 2026 at 04:03:44AM +0000, Christian Albrecht Goeschel Ndjomouo wrote:
> > First: {unshare -m -p -f chroot FS} will change root into that
> > filesystem with unshared mount and pid namespaces.
> >
> 
> This will successfully changes the root directory path of the child process,
> however, the newly created mount namespace's root mount will still
> point to the host's root filesystem, which is the actual root cause of the
> escape (it'll become clearer below).
> 
> > Next: {mount -t proc proc /proc} will mount the procfs for that pid
> > namespace. We see with {ls -l /proc/1/ns/mnt} the identity of the
> > unshared mount namespace, which is different from the identity before
> > chroot.
> >
> 
> As the mount(8) command has copied the execution context of the container
> process, it will see it's root filesystem as `FS`, so the 'procfs' will be mounted
> on FS/proc, rightfully so. The ls command is also running with that context,
> and will show the container's mount namespace ID.
> 
> > But: {nsenter -t 1 -m -- ls -l /proc/1/ns/mnt} shows the identity of
> > the host mount namespace -- the outer namespace.
> >
> > Thus {nsenter -t 1 -m} "escapes" from the unshared namespace to the
> > containing namespace. And for example: {nsenter -t 1 -m /bin/sh}
> > starts a shell in the outer mount and pid namespace(s)!
> >
> 
> The reason why you escaped is that when nsenter(1) calls setns(fd, CLONE_NEWNS)
> , the kernel will set the root filesystem for the calling process to the absolute root of
> the target mount namespace. And, whatever binary it forks will now be decoupled
> from the container's chroot and point back to the host's root filesystem. This is why
> you are also able to view the host's mount table or resolve paths relative to the host
> fs while inside the container, for example, when you executed a shell with nsenter(8).
> 
> If you wish to completely cut ties with the VFS structure of the host, you can make use
> of pivot_root(8). It let's you set the global root mount of the mount namespace and truly
> isolates the mount namespace.
> 
> You can do something like this:
> 
> $ unshare --mount --pid --fork
> $ mount --bind FS FS/
> $ cd FS/
> $ mkdir -p old_root/
> $ /sbin/pivot_root . old_root/
> $ cd /
> $ mount -t proc proc /proc
> $ umount -l old_root/
> $ rmdir old_root
> 
> You should then be able to see the exact same mnt namespace ID.
> 
> $ ls -l /proc/1/ns/mnt
> [...] /proc/1/ns/mnt -> 'mnt:[4026533461]'
> $ nsenter --mount --target 1 -- ls -l /proc/1/ns/mnt
> [...] /proc/1/ns/mnt -> 'mnt:[4026533461]'
> 
> 
> Maybe Karel has more to say about this.
> 
> Anyways I hope this cleared up at least some of the confusion.

Quite subtile, but I can confirm also in my actual setting (which is a
simple and plain "overlay-boot" example).

I will need a couple of sleeps before I fully grasp that "absolute
root" notion. However the recepie you outline does bring the desired
effect of eliminating that namespace eascape for me.

Thanks.

Ralph


> 
> 
> Christian Goeschel Ndjomouo
> 
> 
> 

^ permalink raw reply

* [PATCH 3/3] lastlog2: correct the grammar of an error message, and drop two periods
From: Benno Schulenberg @ 2026-06-04  9:52 UTC (permalink / raw)
  To: util-linux
In-Reply-To: <20260604095252.162210-1-bensberg@telfort.nl>

The grammar of a similar message forty lines down is correct.

And a period at the end of an error message is inconsistent.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
 misc-utils/lastlog2.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/misc-utils/lastlog2.c b/misc-utils/lastlog2.c
index c5e518c3b..838f27db8 100644
--- a/misc-utils/lastlog2.c
+++ b/misc-utils/lastlog2.c
@@ -236,7 +236,7 @@ int main(int argc, char **argv)
 	}
 
 	if ((Cflg + Sflg + iflg + jflg) > 1)
-		errx(EXIT_FAILURE, _("Option -C, -i, -j and -S cannot be used together"));
+		errx(EXIT_FAILURE, _("Options -C, -i, -j and -S cannot be used together"));
 
 	db_context = ll2_new_context(lastlog2_path);
 	if (!db_context)
@@ -281,7 +281,7 @@ int main(int argc, char **argv)
 		}
 
 		if ((Cflg || Sflg) && !has_user(user)) {
-			warnx(_("User '%s' does not exist."), user);
+			warnx(_("User '%s' does not exist"), user);
 			goto err;
 		}
 
@@ -324,7 +324,7 @@ int main(int argc, char **argv)
 		char *service = NULL;
 
 		if (!has_user(user)) {
-			warnx(_("User '%s' does not exist."), user);
+			warnx(_("User '%s' does not exist"), user);
 			goto err;
 		}
 
-- 
2.54.0


^ permalink raw reply related

* [PATCH 2/3] lsmem: (usage) make an option description fit within 80 columns again
From: Benno Schulenberg @ 2026-06-04  9:52 UTC (permalink / raw)
  To: util-linux; +Cc: Christian Goeschel Ndjomouo
In-Reply-To: <20260604095252.162210-1-bensberg@telfort.nl>

Needed after recent commit 951862cc4a widened all option descriptions
by five columns.

CC: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
 sys-utils/lsmem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-utils/lsmem.c b/sys-utils/lsmem.c
index c3c39e8cb..773570b5a 100644
--- a/sys-utils/lsmem.c
+++ b/sys-utils/lsmem.c
@@ -669,7 +669,7 @@ static void __attribute__((__noreturn__)) usage(void)
 	fputs(USAGE_OPTIONS, out);
 	fputs(_(" -a, --all                 list each individual memory block\n"), out);
 	fputs(_("     --annotate[=<when>]   annotate columns with a tooltip (always|never|auto)\n"), out);
-	fputs(_(" -b, --bytes               print SIZE in bytes rather than in human readable format\n"), out);
+	fputs(_(" -b, --bytes               print SIZE in bytes, not in human readable format\n"), out);
 	fputs(_(" -J, --json                use JSON output format\n"), out);
 	fputs(_(" -n, --noheadings          don't print headings\n"), out);
 	fputs(_(" -o, --output <list>       output columns\n"), out);
-- 
2.54.0


^ permalink raw reply related

* [PATCH 1/3] lsmem: (usage) list possible values for <when> like for the other <when>
From: Benno Schulenberg @ 2026-06-04  9:52 UTC (permalink / raw)
  To: util-linux

That is: use vertical bars between the values instead of commas and "or".

(Noticed because of the missing space before "always".)

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
 sys-utils/lsmem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-utils/lsmem.c b/sys-utils/lsmem.c
index d8196215c..c3c39e8cb 100644
--- a/sys-utils/lsmem.c
+++ b/sys-utils/lsmem.c
@@ -678,7 +678,7 @@ static void __attribute__((__noreturn__)) usage(void)
 	fputs(_(" -r, --raw                 use raw output format\n"), out);
 	fputs(_(" -S, --split <list>        split ranges by specified columns\n"), out);
 	fputs(_(" -s, --sysroot <dir>       use the specified directory as system root\n"), out);
-	fputs(_("     --summary[=<when>]    print summary information (never,always or only)\n"), out);
+	fputs(_("     --summary[=<when>]    print summary information (always|never|only)\n"), out);
 
 	fputs(USAGE_SEPARATOR, out);
 	fprintf(out, USAGE_HELP_OPTIONS(27));
-- 
2.54.0


^ permalink raw reply related

* Re: Bug#1134639: nsenter -t 1 -m escapes mount and pid namespaces
From: Christian Albrecht Goeschel Ndjomouo @ 2026-06-04  4:03 UTC (permalink / raw)
  To: Chris Hofstaedtler, util-linux@vger.kernel.org
  Cc: Ralph Ronnquist, 1134639@bugs.debian.org
In-Reply-To: <aiBvnWAjX7uu8ydx@per.namespace.at>

> First: {unshare -m -p -f chroot FS} will change root into that
> filesystem with unshared mount and pid namespaces.
>

This will successfully changes the root directory path of the child process,
however, the newly created mount namespace's root mount will still
point to the host's root filesystem, which is the actual root cause of the
escape (it'll become clearer below).

> Next: {mount -t proc proc /proc} will mount the procfs for that pid
> namespace. We see with {ls -l /proc/1/ns/mnt} the identity of the
> unshared mount namespace, which is different from the identity before
> chroot.
>

As the mount(8) command has copied the execution context of the container
process, it will see it's root filesystem as `FS`, so the 'procfs' will be mounted
on FS/proc, rightfully so. The ls command is also running with that context,
and will show the container's mount namespace ID.

> But: {nsenter -t 1 -m -- ls -l /proc/1/ns/mnt} shows the identity of
> the host mount namespace -- the outer namespace.
>
> Thus {nsenter -t 1 -m} "escapes" from the unshared namespace to the
> containing namespace. And for example: {nsenter -t 1 -m /bin/sh}
> starts a shell in the outer mount and pid namespace(s)!
>

The reason why you escaped is that when nsenter(1) calls setns(fd, CLONE_NEWNS)
, the kernel will set the root filesystem for the calling process to the absolute root of
the target mount namespace. And, whatever binary it forks will now be decoupled
from the container's chroot and point back to the host's root filesystem. This is why
you are also able to view the host's mount table or resolve paths relative to the host
fs while inside the container, for example, when you executed a shell with nsenter(8).

If you wish to completely cut ties with the VFS structure of the host, you can make use
of pivot_root(8). It let's you set the global root mount of the mount namespace and truly
isolates the mount namespace.

You can do something like this:

$ unshare --mount --pid --fork
$ mount --bind FS FS/
$ cd FS/
$ mkdir -p old_root/
$ /sbin/pivot_root . old_root/
$ cd /
$ mount -t proc proc /proc
$ umount -l old_root/
$ rmdir old_root

You should then be able to see the exact same mnt namespace ID.

$ ls -l /proc/1/ns/mnt
[...] /proc/1/ns/mnt -> 'mnt:[4026533461]'
$ nsenter --mount --target 1 -- ls -l /proc/1/ns/mnt
[...] /proc/1/ns/mnt -> 'mnt:[4026533461]'


Maybe Karel has more to say about this.

Anyways I hope this cleared up at least some of the confusion.


Christian Goeschel Ndjomouo




^ permalink raw reply

* Re: Bug#1138789: FTBFS on loong64: mkswap: error: swap area needs to be at least 160 KiB
From: Chris Hofstaedtler @ 2026-06-03 20:04 UTC (permalink / raw)
  To: util-linux; +Cc: 1138789, Johannes Wüller, debian-loongarch
In-Reply-To: <aiCHUJ8pmy_Atx2S@per.namespace.at>

Hi Johannes, Karel,

util-linux 2.42.1 apparently fails its mkswap tests on loong64. Given 
it fails in mkswap/mkswap-file-existing, I suspect this is "caused" 
by commit 775729884a3945a53df33e0d3ff2ba263b96b59e / 
6d87ff51568c017a6d08043d554bf0ea8dee5457.

Could you take a look please?

> diff-{{{
> --- /dev/null	2026-05-29 12:41:25.961759630 +0000
> +++ /build/reproducible-path/util-linux-2.42.1/tests/output/mkswap/mkswap-file-existing	2026-06-03 19:26:30.186627085 +0000
> @@ -0,0 +1,3 @@
> +mkswap failed
> +mkswap: error: swap area needs to be at least 160 KiB
> +mkswap -F failed on existing file
> }}}-diff
> 
>  FAILED (mkswap/mkswap-file-existing)
> ========= script: /build/reproducible-path/util-linux-2.42.1/tests/ts/mkswap/mkswap =================
> ================= OUTPUT =====================
>      1	mkswap failed
>      2	mkswap: error: swap area needs to be at least 160 KiB
>      3	mkswap -F failed on existing file
> 


Full build log at:

https://buildd.debian.org/status/fetch.php?pkg=util-linux&arch=loong64&ver=2.42.1-1&stamp=1780514831&file=log

Many thanks!
Chris


^ permalink raw reply

* Re: Bug#1134639: nsenter -t 1 -m escapes mount and pid namespaces
From: Chris Hofstaedtler @ 2026-06-03 18:17 UTC (permalink / raw)
  To: util-linux; +Cc: Ralph Ronnquist, 1134639
In-Reply-To: <aejkWHDXmpCX7Gh7@smyga.hemma>

Hi Ralph,

sorry for the late reply. I am not an expert on namespaces, and have 
thus forwarded your bug to the upstream mailing list.

On Thu, Apr 23, 2026 at 01:08:08AM +1000, Ralph Ronnquist wrote:
> I observed this ina simple test setup, with on ordinary filesystem
> built with {debootstrap --variant=minbase sid FS ...}
> 
> First: {unshare -m -p -f chroot FS} will change root into that
> filesystem with unshared mount and pid namespaces.
> 
> Next: {mount -t proc proc /proc} will mount the procfs for that pid
> namespace. We see with {ls -l /proc/1/ns/mnt} the identity of the
> unshared mount namespace, which is different from the identity before
> chroot.
> 
> But: {nsenter -t 1 -m -- ls -l /proc/1/ns/mnt} shows the identity of
> the host mount namespace -- the outer namespace.
> 
> Thus {nsenter -t 1 -m} "escapes" from the unshared namespace to the
> containing namespace. And for example: {nsenter -t 1 -m /bin/sh}
> starts a shell in the outer mount and pid namespace(s)!
> 
> This seems to be a severe bug.
> 
> Apparently {nsenter -t 1 -m} finds pid 1 in the outer namespace rather
> than in the call pid namespace.

Hopefully someone from upstream can shed a light :-)

Chris

^ permalink raw reply

* Re: Question: GPT GUID for dm-integrity separate metadata partition
From: Karel Zak @ 2026-06-01 12:26 UTC (permalink / raw)
  To: Max Gautier; +Cc: util-linux
In-Reply-To: <ahyQJUrpRIJY7JfR@framework>

On Sun, May 31, 2026 at 09:46:45PM +0200, Max Gautier wrote:
> While setting up my system (new RAID array on top of dm-integrity on
> each RAID member), I asked myself what GPT type those separate integrity
> partition should have, to avoid being confused as something else by
> other tooling.
> (for example systemd auto-mount some partition type, so I suppose some
> other tooling could have similar behavior)

For decades, partition type GUIDs have been mostly cosmetic on Linux.
The kernel doesn't use them to decide anything - it probes
filesystem/device content directly. The partition type is just
metadata, "nice to have" for documentation purposes.

The one notable exception is systemd's Discoverable Partitions
Specification, which defines specific GUIDs for root, /usr, /home,
swap, etc. Tools like systemd-gpt-auto-generator use these to
auto-discover and auto-mount partitions.

For your case, "Linux reserved" (8DA63339-0007-60C0-C436-083AC8230908)
seems like a reasonable choice. It's recognized by partitioning tools
(fdisk, gdisk) but is not part of the Discoverable Partitions
Specification, so systemd won't try to auto-discover or auto-mount it.

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com


^ permalink raw reply

* Re: [PATCH] include/mountutils.h: fix LSMT_ROOT definition
From: Karel Zak @ 2026-06-01 12:10 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: util-linux, Shubham Chakraborty
In-Reply-To: <20260530094932.2351791-1-thomas.petazzoni@bootlin.com>

On Sat, May 30, 2026 at 11:49:32AM +0200, Thomas Petazzoni wrote:
>  #ifdef LSMT_ROOT
>  # define LSMT_ROOT ...
>  #endif
> 
> Should obviously have been:
> 
>  #ifndef LSMT_ROOT
>  # define LSMT_ROOT ...
>  #endif

Ah, nice. Applied (and also backported to stable/v2.42), thanks!

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com


^ permalink raw reply

* Question: GPT GUID for dm-integrity separate metadata partition
From: Max Gautier @ 2026-05-31 19:46 UTC (permalink / raw)
  To: util-linux

Hello,

Some context:
When using dm-integrity in Linux (device mapper target to provides
transparent data integrity protection), one has a the option to use a
separate device to store the integrity protection, (which can supposedly
help offset the performance penalty on dm-integry by using a nvme for
HDDs).

While setting up my system (new RAID array on top of dm-integrity on
each RAID member), I asked myself what GPT type those separate integrity
partition should have, to avoid being confused as something else by
other tooling.
(for example systemd auto-mount some partition type, so I suppose some
other tooling could have similar behavior)

I considered 'Linux filesystem' and 'Linux reserved', but the first is
not accurate and I could not find info on the second, so I do not know
if it's reserved for future use (would seem odd seems GUID are
plentiful) or for setup where we just don't want tooling to touch it ?

I don't think Linux RAID is accurate either, (that would be the
partition on the data disks instead).

What's the recommendation when creating a partition not fitting any of
the existing documented GUID ?


Thanks.


(In case this makes matter clearer, here is my intended setup):

# lsblk
NAME        MAJ:MIN RM  SIZE RO TYPE  MOUNTPOINTS
NAME        MAJ:MIN RM  SIZE RO TYPE  MOUNTPOINTS
# Those are the raid disk with the data
sda           8:0    0 14.6T  0 disk  
└─sda1        8:1    0 14.6T  0 part  
sdb           8:16   0 14.6T  0 disk  
└─sdb1        8:17   0 14.6T  0 part  
sdc           8:32   0 14.6T  0 disk  
└─sdc1        8:33   0 14.6T  0 part  
nvme0n1     259:0    0  1.8T  0 disk  
├─nvme0n1p1 259:1    0    4G  0 part  
├─nvme0n1p2 259:2    0  150G  0 part  
│ └─root    253:0    0  150G  0 crypt /
│ # Those are the separate integrity partition (not sure exactly how
│   much space I need for now)
├─nvme0n1p3 259:3    0  ???G  0 part  
├─nvme0n1p4 259:4    0  ???G  0 part  
└─nvme0n1p5 259:5    0  ???G  0 part  


-- 
Max Gautier

^ permalink raw reply

* Question on fstrim not operating the way I expected.
From: Michael D. Setzer II @ 2026-05-31 14:26 UTC (permalink / raw)
  To: util-linux

Have maintain a disk imaging program going back to 2004, and 
had script to clean partitions by writing nulls to unused sectors.
But with solid state drives that added wear to drives.
Thought fstrim would be a better solution.
My G4L program loads in ram with no partitions mounted. 
It then mounts the partition and runs fstrim once showing the space 
it finds, and then runs again show 0 space to trim.
Then partitions are unmount before backing up the partitions or 
drives. 
But if I run the fstrim again, it shows exactly the same numbers on 
first pass and then zeros on second pass. So looks like fstrim is only 
making changes to memory. Is very fast thou.
Mad an image of a 1T drive with the fstrim process, and it created 
an 82G image file. 
Ran Zerofree which my script offers as a second option, and made 
another image file, and it produced a 78G image file?
fstrim is very fast, but appears to not clear anything on physical 
disk.
zerofree is a much longer process. Takes about 30 minutes on 1TB 
drive, but does only write to non-zero blocks.
Older dd option would write to all unsed blocks, so would put wear.

Creating he image file takes about 34 minutes to image 1TB disk, 
but zerofree taking about 30 minutes make total time 64 minutes.

Usually the fstrim only takes 10 to 30 seconds.

Thanks.

+------------------------------------------------------------+
 Michael D. Setzer II - Computer Science Instructor (Retired)     
 mailto:mikes@guam.net                            
 mailto:msetzerii@gmail.com
 mailto:msetzerii@gmx.com
 Guam - Where America's Day Begins                        
 G4L Disk Imaging Project maintainer 
 http://sourceforge.net/projects/g4l/
+------------------------------------------------------------+




^ permalink raw reply

* [PATCH] include/mountutils.h: fix LSMT_ROOT definition
From: Thomas Petazzoni @ 2026-05-30  9:49 UTC (permalink / raw)
  To: util-linux; +Cc: Shubham Chakraborty, Thomas Petazzoni

From: Shubham Chakraborty <chakrabortyshubham66@gmail.com>

Commit
ded434a63f3eee7fd7805b18d6c9bb912016c3c8 ("include/mount-api-utils:
add statmount and listmount") introduce a fallback definition for the
LSMT_ROOT defined, but a small typo makes this fallback definition
ineffective:

 #ifdef LSMT_ROOT
 # define LSMT_ROOT ...
 #endif

Should obviously have been:

 #ifndef LSMT_ROOT
 # define LSMT_ROOT ...
 #endif

Signed-off-by: Shubham Chakraborty <chakrabortyshubham66@gmail.com>
[Thomas: improve commit message]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 include/mountutils.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/mountutils.h b/include/mountutils.h
index 9eba451d4..057a29d90 100644
--- a/include/mountutils.h
+++ b/include/mountutils.h
@@ -371,7 +371,7 @@ struct ul_statmount {
 /*
  * Special @mnt_id values that can be passed to listmount
  */
-#ifdef LSMT_ROOT
+#ifndef LSMT_ROOT
 # define LSMT_ROOT              0xffffffffffffffff    /* root mount */
 #endif
 
-- 
2.54.0


^ permalink raw reply related

* Re: Repost: [PATCH] Secure login and sulogin on S390x
From: Karel Zak @ 2026-05-26 16:00 UTC (permalink / raw)
  To: util-linux, Karel Zak
In-Reply-To: <ag7Mi1xhgyHjWhNn@boole.nue2.suse.org>


Hi Werner,

On Thu, May 21, 2026 at 11:12:39AM +0200, Dr. Werner Fink wrote:
> just to be sure that this change for s390x does not fall down behind.
> Are there some changes required?

Sorry for the delay. I have pushed it to GitHub for CI to check:
https://github.com/util-linux/util-linux/pull/4325. I haven't had time
to work on it further.

    Karel


-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com


^ permalink raw reply

* Repost: [PATCH] Secure login and sulogin on S390x
From: Dr. Werner Fink @ 2026-05-21  9:12 UTC (permalink / raw)
  To: util-linux; +Cc: Karel Zak
In-Reply-To: <afm64TLjowwedG4l@boole.nue2.suse.org>


[-- Attachment #1.1: Type: text/plain, Size: 253 bytes --]

Hi,

just to be sure that this change for s390x does not fall down behind.
Are there some changes required?

Werner

-- 
  "Having a smoking section in a restaurant is like having
          a peeing section in a swimming pool." -- Edward Burr

[-- Attachment #1.2: resend.patch --]
[-- Type: text/x-patch, Size: 21444 bytes --]

From e307759459f58a5d36d879bdf838e8319580a7bd Mon Sep 17 00:00:00 2001
From: Werner Fink <werner@suse.de>
Date: Thu, 21 May 2026 10:46:13 +0200
Subject: [PATCH] Secure login and sulogin on S390x

Some remarks: on S390x architecture of modern zSeries the hypervisor
does log the console I/O.  For both the 3215 half duplex line mode as
well as the 3270 full-screen/block mode console type the I/O is logged
on the hypervisor's side.  To control this there are command send via
/dev/vmcp to tell the  z/VM control program of the hypervisor not to
log during entering the password.  For the 3215 console also automatic
scroll is enabled which avoid to press CLEAR to get the password prompt
if on the next block.

Beside this for the ttysclp0, the serial ASCII terminal accessed via
a websocket has since ncurses 6.5-20250405 a new terminfo entry called
"sclp" to support not only the vt220 like behaviour but also the
colouring feature of ttysclp0.

Ensure to detect all special console case on S390x

Signed-off-by: Werner Fink <werner@suse.de>
---
 lib/ttyutils.c                 |   5 +-
 login-utils/Makemodule.am      |   9 +-
 login-utils/login.c            |  85 +++++++++++-
 login-utils/meson.build        |   5 +
 login-utils/sulogin-consoles.c |  44 ++++--
 login-utils/sulogin-consoles.h |   4 +
 login-utils/sulogin.c          |  64 +++++++--
 login-utils/vmcp.c             | 236 +++++++++++++++++++++++++++++++++
 login-utils/vmcp.h             |  29 ++++
 9 files changed, 460 insertions(+), 21 deletions(-)
 create mode 100644 login-utils/vmcp.c
 create mode 100644 login-utils/vmcp.h

diff --git a/lib/ttyutils.c b/lib/ttyutils.c
index bacd73077..3085419bd 100644
--- a/lib/ttyutils.c
+++ b/lib/ttyutils.c
@@ -21,7 +21,7 @@
 #  if defined (__s390__) || defined (__s390x__)
 #    define DEFAULT_TTYS0  "dumb"
 #    define DEFAULT_TTY32  "ibm327x"
-#    define DEFAULT_TTYS1  "vt220"
+#    define DEFAULT_TTYS1  "sclp"
 #  endif
 #  ifndef DEFAULT_STERM
 #    define DEFAULT_STERM  "vt102"
@@ -176,7 +176,8 @@ char *get_terminal_default_type(const char *ttyname, int is_serial)
 		 * Special terminal on first serial line on a S/390(x) which
 		 * is due legacy reasons a block terminal of type 3270 or
 		 * higher.  Whereas the second serial line on a S/390(x) is
-		 * a real character terminal which is compatible with VT220.
+		 * a real character terminal which is compatible with "sclp"
+		 * since ncurses 6.5-20250405 for e.g. color support.
 		 */
 		if (strcmp(ttyname, "ttyS0") == 0)		/* linux/drivers/s390/char/con3215.c */
 			return strdup(DEFAULT_TTYS0);
diff --git a/login-utils/Makemodule.am b/login-utils/Makemodule.am
index a82e4b70f..4e3205577 100644
--- a/login-utils/Makemodule.am
+++ b/login-utils/Makemodule.am
@@ -33,7 +33,9 @@ dist_noinst_DATA += login-utils/sulogin.8.adoc
 sulogin_SOURCES = \
 	login-utils/sulogin.c \
 	login-utils/sulogin-consoles.c \
-	login-utils/sulogin-consoles.h
+	login-utils/sulogin-consoles.h \
+	login-utils/vmcp.c \
+	login-utils/vmcp.h
 if USE_PLYMOUTH_SUPPORT
 sulogin_SOURCES += lib/plymouth-ctrl.c
 endif
@@ -58,7 +60,10 @@ bin_PROGRAMS += login
 MANPAGES += login-utils/login.1
 dist_noinst_DATA += login-utils/login.1.adoc
 login_SOURCES = \
-	login-utils/login.c
+	login-utils/login.c \
+	login-utils/vmcp.c \
+	login-utils/vmcp.h \
+	lib/logindefs.c
 login_LDADD = $(LDADD) libcommon.la libcommon_logindefs.la libcommon_shells.la -lpam
 if HAVE_LINUXPAM
 login_LDADD += -lpam_misc
diff --git a/login-utils/login.c b/login-utils/login.c
index da119ee98..5730c449b 100644
--- a/login-utils/login.c
+++ b/login-utils/login.c
@@ -85,6 +85,7 @@
 #include "pwdutils.h"
 
 #include "logindefs.h"
+#include "vmcp.h"
 
 #if defined (HAVE_LIBECONF) && defined (USE_VENDORDIR)
 # include "shells.h"
@@ -165,6 +166,85 @@ static int is_consoletty(int fd)
 }
 #endif
 
+#if defined(__s390__) || defined(__s390x__)
+/* Avoid that passwords are logged on the hypervisors console log */
+
+#define CON_3215	0x0010	/* s390x 3215 halfduplex console */
+#define CON_3270	0x0020	/* s390x 3270 console */
+#define CON_SCLP	0x0040	/* s390x sclp terminals */
+
+struct s390con {
+	int flags;
+	int vmcpfd;
+};
+
+static struct s390con s390_console_spool_stop(int fd)
+{
+	struct stat stb;
+	struct s390con con = { .flags = 0, .vmcpfd = -1 };
+
+	if ((fstat(fd, &stb) >= 0)) {
+		if (major(stb.st_rdev) == 4 && minor(stb.st_rdev) == 64)
+			con.flags |= CON_3215;
+		if (major(stb.st_rdev) == 4 && minor(stb.st_rdev) >= 65)
+			con.flags |= CON_SCLP;
+		else if (major(stb.st_rdev) == 227 && minor(stb.st_rdev) >= 1)
+			con.flags |= CON_3270;
+	}
+	if (con.flags & (CON_3215|CON_3270)) {
+		con.vmcpfd = openvmcp();
+		if (con.vmcpfd >= 0) {
+			char *msg = queryspool(con.vmcpfd);
+			if (msg) {
+				parsespool(msg);
+				free(msg);
+			}
+			/*
+			 * Avoid that console log during
+			 * password input
+			 */
+			stopspool(con.vmcpfd);
+		}
+	}
+	if (con.flags & CON_3215) {
+		if (con.vmcpfd >= 0) {
+			char *msg = queryterm(con.vmcpfd);
+			if (msg) {
+				parseterm(msg);
+				free(msg);
+			}
+			/*
+			 * Avoid that CLEAR has to be pressed for
+			 * password input
+			 */
+			setterm(con.vmcpfd, "0");
+# ifdef WARN_WITH_VMCP
+			warning3215(con.vmcpfd);
+# endif
+		}
+	}
+	return con;
+}
+
+static void s390_console_spool_restore(struct s390con *con)
+{
+	if (con->vmcpfd >= 0) {
+		if (con->flags & CON_3215)
+			restoreterm(con->vmcpfd);
+		if (con->flags & (CON_3215|CON_3270))
+			restorespool(con->vmcpfd);
+		clearvmcp();
+		close(con->vmcpfd);
+		con->vmcpfd = -1;
+	}
+}
+# define PREPARE_CONSOLE(fd)	struct s390con con = s390_console_spool_stop(fd)
+# define RESTORE_CONSOLE()	s390_console_spool_restore(&con)
+#else
+# define PREPARE_CONSOLE(fd)	/* */
+# define RESTORE_CONSOLE()	/* */
+#endif
+
 /*
  * Robert Ambrose writes:
  * A couple of my users have a problem with login processes hanging around
@@ -1584,8 +1664,11 @@ int main(int argc, char **argv)
 	/* login -f, then the user has already been authenticated */
 	cxt.noauth = cxt.noauth && getuid() == 0 ? 1 : 0;
 
-	if (!cxt.noauth)
+	if (!cxt.noauth) {
+		PREPARE_CONSOLE(0);
 		loginpam_auth(&cxt);
+		RESTORE_CONSOLE();
+        }
 
 	/*
 	 * Authentication may be skipped (for example, during krlogin, rlogin,
diff --git a/login-utils/meson.build b/login-utils/meson.build
index 251d8de46..5f6310b01 100644
--- a/login-utils/meson.build
+++ b/login-utils/meson.build
@@ -49,6 +49,7 @@ test_islocal_sources = files(
 
 test_consoles_sources = files(
   'sulogin-consoles.c',
+  'vmcp.c',
 )
 
 last_sources = files(
@@ -59,6 +60,8 @@ last_manadocs = files('last.1.adoc')
 
 login_sources = files(
   'login.c',
+  'vmcp.c',
+  'vmcp.h',
 )
 login_manadocs = files('login.1.adoc')
 
@@ -66,6 +69,8 @@ sulogin_sources = files(
   'sulogin.c',
   'sulogin-consoles.c',
   'sulogin-consoles.h',
+  'vmcp.c',
+  'vmcp.h',
 )
 sulogin_manadocs = files('sulogin.8.adoc')
 
diff --git a/login-utils/sulogin-consoles.c b/login-utils/sulogin-consoles.c
index c8156bfec..2d838f20e 100644
--- a/login-utils/sulogin-consoles.c
+++ b/login-utils/sulogin-consoles.c
@@ -312,7 +312,7 @@ static
 #ifdef __GNUC__
 __attribute__((__hot__))
 #endif
-int append_console(struct list_head *consoles, const char * const name)
+int append_console(struct list_head *consoles, const char * const name, dev_t dev)
 {
 	struct console *restrict tail;
 	const struct console *last = NULL;
@@ -343,7 +343,29 @@ int append_console(struct list_head *consoles, const char * const name)
 	tail->reset_tty_context = NULL;
 	tail->user_tty_context = NULL;
 #endif
-
+#if defined(__s390__) || defined(__s390x__)
+	/*
+	 * Stat the device path to determine its major/minor numbers. 
+	 * This ensures we detect s390x terminal types regardless of whether 
+	 * the console was found via /proc, /sys, cmdline, or a direct stdin 
+	 * fallback (e.g. sulogin < /dev/ttyS0).
+	 */
+	if (!dev) {
+		struct stat st;
+		if (stat(name, &st) == 0 && S_ISCHR(st.st_mode))
+			dev = st.st_rdev;
+	}
+	if (dev) {
+		unsigned int maj = major(dev);
+		unsigned int min = minor(dev);
+		if (maj == 4 && min == 64)
+			tail->flags |= CON_3215;
+		else if (maj == 4 && min >= 65)
+			tail->flags |= CON_SCLP;
+		else if (maj == 227 && min >= 1)
+			tail->flags |= CON_3270;
+	}
+#endif
 	return 0;
 }
 
@@ -385,10 +407,16 @@ static int detect_consoles_from_proc(struct list_head *consoles)
 		name = scandev(dir, comparedev);
 		if (!name)
 			continue;
-		rc = append_console(consoles, name);
+		rc = append_console(consoles, name, comparedev);
 		free(name);
 		if (rc < 0)
 			goto done;
+		if (!list_empty(consoles)) {
+			struct console *last;
+			last = list_last_entry(consoles, struct console, entry);
+			if (!strchr(fbuf, 'C'))
+				last->flags |= CON_CONSDEV;
+		}
 	}
 
 	rc = list_empty(consoles) ? 1 : 0;
@@ -447,7 +475,7 @@ static int detect_consoles_from_sysfs(struct list_head *consoles)
 		name = scandev(dir, comparedev);
 		if (!name)
 			continue;
-		rc = append_console(consoles, name);
+		rc = append_console(consoles, name, comparedev);
 		free(name);
 		if (rc < 0)
 			goto done;
@@ -535,7 +563,7 @@ static int detect_consoles_from_cmdline(struct list_head *consoles)
 		name = scandev(dir, comparedev);
 		if (!name)
 			continue;
-		rc = append_console(consoles, name);
+		rc = append_console(consoles, name, comparedev);
 		free(name);
 		if (rc < 0)
 			goto done;
@@ -593,7 +621,7 @@ static int detect_consoles_from_tiocgdev(struct list_head *consoles,
 			goto done;
 		}
 	}
-	rc = append_console(consoles, name);
+	rc = append_console(consoles, name, comparedev);
 	free(name);
 	if (rc < 0)
 		goto done;
@@ -707,7 +735,7 @@ int detect_consoles(const char *device, const int fallback, struct list_head *co
 		closedir(dir);
 
 		if (name) {
-			rc = append_console(consoles, name);
+			rc = append_console(consoles, name, comparedev);
 			free(name);
 			if (rc < 0)
 				return rc;
@@ -784,7 +812,7 @@ fallback:
 		n = strdup(name);
 		if (!n)
 			return -ENOMEM;
-		rc = append_console(consoles, n);
+		rc = append_console(consoles, n, 0);
 		free(n);
 		if (rc < 0)
 			return rc;
diff --git a/login-utils/sulogin-consoles.h b/login-utils/sulogin-consoles.h
index d3b4298e4..10fdf612c 100644
--- a/login-utils/sulogin-consoles.h
+++ b/login-utils/sulogin-consoles.h
@@ -39,6 +39,10 @@ struct console {
 #define	CON_SERIAL	0x0001
 #define	CON_NOTTY	0x0002
 #define	CON_EIO		0x0004
+#define	CON_CONSDEV	0x0008	/* Last on the kernel command line */
+#define	CON_3215	0x0010	/* s390x 3215 halfduplex console */
+#define	CON_3270	0x0020  /* s390x 3270 console */
+#define	CON_SCLP	0x0040	/* s390x sclp terminals */
 	pid_t pid;
 	struct chardata cp;
 	struct termios tio;
diff --git a/login-utils/sulogin.c b/login-utils/sulogin.c
index 23f5164e6..1984e6912 100644
--- a/login-utils/sulogin.c
+++ b/login-utils/sulogin.c
@@ -66,6 +66,7 @@
 #include "strutils.h"
 #include "ttyutils.h"
 #include "sulogin-consoles.h"
+#include "vmcp.h"
 #define CONMAX		16
 
 static unsigned int timeout;
@@ -218,7 +219,7 @@ static void tcinit(struct console *con)
 #endif
 
 #ifdef KDGKBMODE
-	if (!(con->flags & CON_SERIAL)
+	if (!(con->flags & (CON_SERIAL|CON_3215|CON_3270|CON_SCLP))
 	    && ioctl(fd, KDGKBMODE, &mode) < 0)
 		con->flags |= CON_SERIAL;
 	errno = 0;
@@ -265,6 +266,13 @@ static void tcinit(struct console *con)
 		}
 	}
 
+#if defined(__s390__) || defined(__s390x__)
+	if (con->flags & (CON_3215|CON_3270)) {
+		setlocale(LC_CTYPE, "POSIX");
+		setlocale(LC_MESSAGES, "POSIX");
+		goto setattr;
+	}
+#endif
 	/* Handle lines other than virtual consoles here */
 #if defined(KDGKBMODE) || defined(TIOCGSERIAL)
 	if (con->flags & CON_SERIAL)
@@ -292,7 +300,7 @@ static void tcinit(struct console *con)
 		cfsetospeed(tio, ospeed);
 
 #ifdef HAVE_STRUCT_TERMIOS_C_LINE
-		tio->c_line         = 0;
+		tio->c_line	 = 0;
 #endif
 		tio->c_cc[VTIME]    = 0;
 		tio->c_cc[VMIN]     = 1;
@@ -364,6 +372,10 @@ static void tcfinal(struct console *con)
 		free(term);
 	}
 
+#if defined(__s390__) || defined(__s390x__)
+	if (con->flags & (CON_3215|CON_3270))
+		return;
+#endif
 	if (!(con->flags & CON_SERIAL) || (con->flags & CON_NOTTY))
 		return;
 
@@ -983,9 +995,9 @@ static void usage(void)
 	fputs(_("Single-user login.\n"), out);
 
 	fputs(USAGE_OPTIONS, out);
-	fputs(_(" -p, --login-shell        start a login shell\n"
+	fputs(_(" -p, --login-shell	start a login shell\n"
 		" -t, --timeout <seconds>  max time to wait for a password (default: no limit)\n"
-		" -e, --force              examine password files directly if getpwnam(3) fails\n"),
+		" -e, --force	      examine password files directly if getpwnam(3) fails\n"),
 		out);
 
 	fputs(USAGE_SEPARATOR, out);
@@ -1012,8 +1024,8 @@ int main(int argc, char **argv)
 	static const struct option longopts[] = {
 		{ "login-shell",  no_argument,       NULL, 'p' },
 		{ "timeout",      required_argument, NULL, 't' },
-		{ "force",        no_argument,       NULL, 'e' },
-		{ "help",         no_argument,       NULL, 'h' },
+		{ "force",	no_argument,       NULL, 'e' },
+		{ "help",	 no_argument,       NULL, 'h' },
 		{ "version",      no_argument,       NULL, 'V' },
 		{ NULL, 0, NULL, 0 }
 	};
@@ -1193,10 +1205,46 @@ int main(int argc, char **argv)
 				char *answer;
 				int doshell = 0;
 				int deny = !opt_e && locked_account_password(pwd->pw_passwd);
-
+#if defined(__s390__) || defined(__s390x__)
+				int vmcpfd = -1;
+				if (con->flags & (CON_3215|CON_3270)) {
+					vmcpfd = openvmcp();
+					if (vmcpfd >= 0) {
+						char *msg = queryspool(vmcpfd);
+						if (msg) {
+							parsespool(msg);
+							free(msg);
+						}
+						stopspool(vmcpfd);
+					}
+				}
+				if (con->flags & CON_3215) {
+					if (vmcpfd >= 0) {
+						char *msg = queryterm(vmcpfd);
+						if (msg) {
+							parseterm(msg);
+							free(msg);
+						}
+						setterm(vmcpfd, "0");
+						warning3215(vmcpfd);
+					}
+				}
+#endif
 				doprompt(passwd, con, deny);
 
-				if ((answer = getpasswd(con)) == NULL)
+				answer = getpasswd(con);
+#if defined(__s390__) || defined(__s390x__)
+				if (vmcpfd >= 0) {
+					if (con->flags & CON_3215)
+						restoreterm(vmcpfd);
+					if (con->flags & (CON_3215|CON_3270))
+						restorespool(vmcpfd);
+					clearvmcp();
+					close(vmcpfd);
+					vmcpfd = -1;
+				}
+#endif
+				if (answer == NULL)
 					break;
 				if (deny) {
 #ifdef HAVE_EXPLICIT_BZERO
diff --git a/login-utils/vmcp.c b/login-utils/vmcp.c
new file mode 100644
index 000000000..52c2d4a6b
--- /dev/null
+++ b/login-utils/vmcp.c
@@ -0,0 +1,236 @@
+/*
+ * SPDX-License-Identifier: MIT
+ *
+ * vmcp.c - s390x 3215 console spool and terminal management
+ *
+ * Copyright 2026 Werner Fink, SUSE Software Solutions Germany GmbH
+ *
+ * Based on:
+ *
+ * Copyright IBM Corp. 2018
+ * s390-tools is free software; you can redistribute it and/or modify
+ * it under the terms of the MIT license. See LICENSE for details.
+ *
+ */
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/ioctl.h>
+
+int isinteger(const char *str)
+{
+    int errs = errno, ret = 1;
+    long __attribute__((__unused__)) val;
+    char *endptr;
+
+    errno = 0;
+    val = strtol(str, &endptr, 10);
+
+    /* Check if no digits were found at all */
+    if (str == endptr)
+	ret = 0;
+
+    /* Check for overflow or underflow */
+    if (errno == ERANGE)
+	ret = 0;
+
+    /* Check for trailing non-numeric characters (e.g., "123abc") */
+    if (*endptr != '\0')
+	ret = 0;
+
+    errno = errs;
+    return ret;
+}
+
+#if defined(__s390__) || defined(__s390x__)
+
+#define	VMCP_DEVICE_NODE	"/dev/vmcp"
+#define	VMCP_GETSIZE		_IOR(0x10, 3, int)
+#define	VMCP_SETBUF		_IOW(0x10, 2, int)
+#define	VMCP_GETCODE		_IOR(0x10, 1, int)
+
+static char *more, *hold;
+static int spooling;
+
+int openvmcp(void)
+{
+    return open(VMCP_DEVICE_NODE, O_RDWR|O_NOCTTY);
+}
+
+void clearvmcp(void)
+{
+    if (more) {
+	free(more);
+	more = NULL;
+    }
+    if (hold) {
+	free(hold);
+	hold = NULL;
+    }
+}
+
+static char* askvmcp(int fd, const char *question)
+{
+    long pagesize = sysconf(_SC_PAGESIZE);
+    int rc = 0, num, buffersize;
+    char* ret = NULL;
+
+    num = (strlen(question) + pagesize - 1)/pagesize;
+    buffersize = num * pagesize;
+
+    if (ioctl(fd, VMCP_SETBUF, &buffersize) == -1)
+	goto out;
+    do {
+	rc = write(fd, question, strlen(question));
+	if (rc < 0) {
+	    if (errno != EINTR)
+		goto out;
+	}
+    } while (rc < 0);
+    if (ioctl(fd, VMCP_GETCODE, &rc) == -1)
+	goto out;
+    if (ioctl(fd, VMCP_GETSIZE, &buffersize) == -1)
+	goto out;
+    ret = (char*)malloc(buffersize);
+    if (!ret)
+	goto out;
+    do {
+	rc = read(fd, ret, buffersize);
+	if (rc < 0) {
+	    if (errno != EINTR)
+		goto out;
+	}
+    } while (rc < 0);
+out:
+    return ret;
+}
+
+char* queryterm(int fd)
+{
+    const char* question = "QUERY TERMINAL";
+    return askvmcp(fd, question);
+}
+
+char* queryspool(int fd)
+{
+    const char* question = "QUERY VIRTUAL CONSOLE";
+    return askvmcp(fd, question);
+}
+
+static int writevmcp(int fd, char *instruction)
+{
+    long pagesize = sysconf(_SC_PAGESIZE);
+    int rc = 0, num, buffersize;
+    int ret = -1;
+
+    num = (strlen(instruction) + pagesize - 1)/pagesize;
+    buffersize = num * pagesize;
+
+    if (ioctl(fd, VMCP_SETBUF, &buffersize) == -1)
+	goto out;
+    do {
+	rc = write(fd, instruction, strlen(instruction));
+	if (rc < 0) {
+	    if (errno != EINTR)
+		goto out;
+	}
+    } while (rc < 0);
+    if (ioctl(fd, VMCP_GETCODE, &rc) == -1)
+	goto out;
+    if (ioctl(fd, VMCP_GETSIZE, &buffersize) == -1)
+	goto out;
+    if (rc == 0 && buffersize == 0)
+	ret = 0;
+out:
+    return ret;
+}
+
+int setterm(int fd, char *tout)
+{
+    char *instruction;
+    int ret = -1;
+
+    if (asprintf(&instruction, "TERMINAL MORE %s 0 HOLD OFF", tout) == -1)
+	goto out;
+
+    ret = writevmcp(fd, instruction);
+    free(instruction);
+out:
+    return ret;
+}
+
+int restoreterm(int fd)
+{
+    char* instruction;
+    int ret = -1;
+
+    if (!more || !hold)
+	goto out;
+    if (asprintf(&instruction, "TERMINAL %s %s", more, hold) == -1)
+	goto out;
+
+    ret = writevmcp(fd, instruction);
+    free(instruction);
+out:
+    return ret;
+}
+
+int stopspool(int fd)
+{
+    char* instruction = "SPOOL CONSOLE STOP";
+    if (!spooling)
+	return 1;
+    return writevmcp(fd, instruction);
+}
+
+int restorespool(int fd)
+{
+    char* instruction = "SPOOL CONSOLE START";
+    if (!spooling)
+	return 1;
+    return writevmcp(fd, instruction);
+}
+
+void parseterm(char *msg)
+{
+    int n;
+    char *token, *ptr;
+    for (n = 1, ptr = msg; ; n++, ptr = NULL) {
+	token = strtok(ptr, ",\n");
+	if (!token)
+	    break;
+	if (hold && more)
+	    break;
+	while (*token == ' ')
+	    token++;
+	if (strncmp("MORE ", token, 5) == 0)
+	    more = strdup(token);
+	if (strncmp("HOLD ", token, 5) == 0)
+	    hold = strdup(token);
+    }
+}
+
+void parsespool(char *msg)
+{
+    spooling = 0;
+    if (strstr(msg, " TERM START ") != NULL)
+	spooling = 1;
+}
+
+void warning3215(int fd)
+{
+    /*
+     * Warning: Do not translate this test as it might inlude then so called
+     * umlauts which in fact can not be encoded for the 3215 console interface.
+     * The 3215 console driver work in fact with EBCDIC codepage and the
+     * kernel has to translate such umlauts (multi or single bytes) with the
+     * correct EBCDIC character table (for german e.g. IBM-1141 or IBM-273).
+     */
+    (void) writevmcp(fd, "MESSAGE * WARNING: 3215 mode. Password visible!");
+    (void) writevmcp(fd, "MESSAGE * Ensure nobody is watching the screen.");
+}
+#endif
diff --git a/login-utils/vmcp.h b/login-utils/vmcp.h
new file mode 100644
index 000000000..50ef1ba90
--- /dev/null
+++ b/login-utils/vmcp.h
@@ -0,0 +1,29 @@
+/*
+ * SPDX-License-Identifier: MIT
+ *
+ * vmcp.c - s390x 3215 console spool and terminal management
+ *
+ * Copyright 2026 Werner Fink, SUSE Software Solutions Germany GmbH
+ *
+ * Based on:
+ *
+ * Copyright IBM Corp. 2018
+ * s390-tools is free software; you can redistribute it and/or modify
+ * it under the terms of the MIT license. See LICENSE for details.
+ *
+ */
+
+extern int isinteger(const char *str);
+#if defined(__s390__) || defined(__s390x__)
+extern int openvmcp(void);
+extern void clearvmcp(void);
+extern char* queryterm(int fd);
+extern char* queryspool(int fd);
+extern int setterm(int fd, char *tout);
+extern int stopspool(int fd);
+extern int restoreterm(int fd);
+extern int restorespool(int fd);
+extern void parseterm(char *msg);
+extern void parsespool(char *msg);
+extern void warning3215(int fd);
+#endif
-- 
2.51.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 894 bytes --]

^ permalink raw reply related

* Re: [PATCH v2 1/2] lscpu-arm: Include the ARM SMC CC SOC_ID name.
From: Paul Benoit @ 2026-05-20 14:33 UTC (permalink / raw)
  To: util-linux
In-Reply-To: <20260211212309.126190-1-paul@os.amperecomputing.com>

Hi,

I'm checking in to see if there are any comments on v2 of my patch set.
Since it been a while since I sent the patches, below is a reminder of
where things stand after the maintainer comments and my responses on v1.

v2 is no longer using the SMC CC SOC_ID Name as a proxy/override for
entries in the CPU parts table(s).  While it would be nice to not have
to update the CPU parts tables when new SMC CC compliant SoCs are
created, it would only have worked if all CPUs of a given SoC are of
the same type.

v2 will display the optional SMC CC SOC_ID name in a manner similar to
how the "BIOS Model name" is displayed.  the "SMCCC SOC_ID name" and
"BIOS Model name" strings will not necessarily be similar as the SoC
and system/firmware may be produced by different companies/
organizations.

v2 corrects the names of the 2 existing entries in the Ampere Computing
cpu part table.

Regards,
Paul


On 2/11/2026 4:23 PM, Paul Benoit wrote:
> On ARM SMC CC 1.6 compliant systems, output the optional SMC CC SOC_ID
> name if available.
> 
> Vendor ID:                   Ampere
>    BIOS Vendor ID:            Ampere (R)
>    Model name:                Ampere-1a
>      SMCCC SOC_ID name:       AmpereOne (R) A192-32X
>      BIOS Model name:         AmpereOne (R) A192-32X CPU @ 3.2GH
> 
> Signed-off-by: Paul Benoit <paul@os.amperecomputing.com>
> ---
>   sys-utils/lscpu-arm.c | 38 ++++++++++++++++++++++++++++++++++++++
>   sys-utils/lscpu.c     |  2 ++
>   sys-utils/lscpu.h     |  4 ++++
>   3 files changed, 44 insertions(+)
> 
> diff --git a/sys-utils/lscpu-arm.c b/sys-utils/lscpu-arm.c
> index ed255a3c7..f388080ad 100644
> --- a/sys-utils/lscpu-arm.c
> +++ b/sys-utils/lscpu-arm.c
> @@ -11,6 +11,7 @@
>    * The information here is gathered from
>    *  - ARM manuals
>    *  - Linux kernel: arch/armX/include/asm/cputype.h
> + *  - Linux kernel: Documentation/ABI/testing/sysfs-devices-soc
>    *  - GCC sources: config/arch/arch-cores.def
>    *  - Ancient wisdom
>    *  - SMBIOS tables (if applicable)
> @@ -460,6 +461,41 @@ static int arm_rXpY_decode(struct lscpu_cputype *ct)
>   	return 0;
>   }
>   
> +static void on_smc_platform_get_socidname(struct lscpu_cputype *ct)
> +{
> +	char *machinename = NULL;
> +	char *soc_id_jep106_id_str = NULL;
> +
> +	/* On systems that support SMC CC (Secure Monitor Call Calling
> +	 * Convention, get the SOC_ID name.  The Linux kernel obtains it from
> +	 * Trusted Firmware via an SMC CC call, and sets
> +	 * /sys/bus/soc/devices/soc0/machine _PATH_SOC_ID to this value.  lscpu
> +	 * will obtain the value from there.
> +	 *
> +	 * Documentation/ABI/testing/sysfs-devices-soc, in the Linux kernel
> +	 * source tree, gives insight into detecting a SMC CC compliant system
> +	 * by checking that start of the _PATH_SOC_ID value for "jep106:".
> +	 */
> +	ul_path_read_string(NULL, &soc_id_jep106_id_str, _PATH_SOC_ID);
> +
> +	if (soc_id_jep106_id_str) {
> +		if (strncmp(soc_id_jep106_id_str, "jep106:", 7) == 0) {
> +			ul_path_read_string(NULL, &machinename,
> +					    _PATH_SOC_MACHINENAME);
> +			if (machinename) {
> +				if (strnlen(machinename, sizeof(machinename))) {
> +					free(ct->socid_name);
> +					ct->socid_name = xstrdup(machinename);
> +				}
> +
> +				free(machinename);
> +			}
> +		}
> +
> +		free(soc_id_jep106_id_str);
> +	}
> +}
> +
>   static void arm_decode(struct lscpu_cxt *cxt, struct lscpu_cputype *ct)
>   {
>   	if (is_live(cxt) && access(_PATH_SYS_DMI, R_OK) == 0)
> @@ -468,6 +504,8 @@ static void arm_decode(struct lscpu_cxt *cxt, struct lscpu_cputype *ct)
>   	arm_ids_decode(ct);
>   	arm_rXpY_decode(ct);
>   
> +	on_smc_platform_get_socidname(ct);
> +
>   	if (is_live(cxt) && cxt->is_cluster)
>   		ct->nr_socket_on_cluster = get_number_of_physical_sockets_from_dmi();
>   }
> diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c
> index 4556aa6df..cd2d00312 100644
> --- a/sys-utils/lscpu.c
> +++ b/sys-utils/lscpu.c
> @@ -895,6 +895,8 @@ print_summary_cputype(struct lscpu_cxt *cxt,
>   		     struct libscols_line *sec)
>   {
>   	sec = add_summary_s(tb, sec, _("Model name:"), ct->modelname ? ct->modelname : "-");
> +	if (ct->socid_name)
> +		add_summary_s(tb, sec, _("SMCCC SOC_ID name:"), ct->socid_name);
>   	if (ct->bios_modelname)
>   		add_summary_s(tb, sec, _("BIOS Model name:"), ct->bios_modelname);
>   	if (ct->bios_family)
> diff --git a/sys-utils/lscpu.h b/sys-utils/lscpu.h
> index 0fae5d29e..b8011bc55 100644
> --- a/sys-utils/lscpu.h
> +++ b/sys-utils/lscpu.h
> @@ -46,6 +46,8 @@ UL_DEBUG_DECLARE_MASK(lscpu);
>   #define _PATH_SYS_NODE		_PATH_SYS_SYSTEM "/node"
>   #define _PATH_SYS_DMI		"/sys/firmware/dmi/tables/DMI"
>   #define _PATH_ACPI_PPTT		"/sys/firmware/acpi/tables/PPTT"
> +#define _PATH_SOC_ID		"/sys/devices/soc0/soc_id"
> +#define _PATH_SOC_MACHINENAME	"/sys/devices/soc0/machine"
>   
>   struct lscpu_cache {
>   	int		id;		/* unique identifier */
> @@ -119,6 +121,8 @@ struct lscpu_cputype {
>   	size_t nr_socket_on_cluster; /* the number of sockets if the is_cluster is 1 */
>   
>   	char	*isa;	/* loongarch */
> +
> +	char	*socid_name;	/* aarch64 */
>   };
>   
>   /* dispatching modes */


^ permalink raw reply

* [ANNOUNCE] util-linux v2.42.1
From: Karel Zak @ 2026-05-18 11:05 UTC (permalink / raw)
  To: linux-kernel, linux-fsdevel, util-linux

The util-linux release v2.42.1 is now available at
 
  http://www.kernel.org/pub/linux/utils/util-linux/v2.42/
 
Feedback and bug reports, as always, are welcomed.
 
  Karel


util-linux v2.42.1 Release Notes
================================

agetty:
    - Always call chdir after chroot (by Tobias Stoeckmann)

autotools:
    - Fix setpriv build with econf (by Tobias Stoeckmann)

bits:
    - use getline() to avoid stdin input truncation (by WanBingjiang)
    - prevent unsigned integer underflow and long-lived loop (by Christian Goeschel Ndjomouo)

build:
    - (copyfilerange) include syscall header check for fallback (by Christian Goeschel Ndjomouo)
    - Fix --disable-copyfilerange (by Tobias Stoeckmann)

build-sys:
    - drop libcommon_shells from binaries that only need ul_default_shell (by Karel Zak)

cfdisk:
    - fix memory leak of original_layout table (by Karel Zak)

chrt:
    - Fix confusing error messages when priority argument is required (by Rong Zhang)
    - Only show current scheduling policy when pid is given (by Rong Zhang)
    - pass correct integer types to printf (by Thomas Weißschuh)
    - (man) explain which kernel config options are needed for SCHED_EXT (by Christian Goeschel Ndjomouo)

ci:
    - use GCC 15 (by Thomas Weißschuh)
    - run 'make checkusage' only for autotools build (by Thomas Weißschuh)

CI:
    - replace ntp with ntpsec (by Karel Zak)

column:
    - fix missing out-of-bounds check in table reordering (by Christian Goeschel Ndjomouo)

copyfilerange:
    - (man) fix swapped offsets in command example (by Štěpán Němec)

dmesg:
    - fix out-of-bounds read when parsing malformed kmsg file (by WanBingjiang)

docs:
    - clarify wipefs --force description for partition-table signatures (by AndyLau-SOC)

eject:
    - tolerate ILLEGAL REQUEST on ALLOW_MEDIUM_REMOVAL (by Alessandro Ratti)

fallocate:
    - (man) mention supported file systems for --insert-range (by Christian Goeschel Ndjomouo)

fdisk:
    - fix trailing whitespace in user reply from readline completion (by Leonid Znamenok)

fincore:
    - (tests) fix tmpfs detection for out-of-tree builds (by Leonid Znamenok)

flock:
    - re-enable the initial shell selection logic (by Christian Goeschel Ndjomouo)

fsck.minix(man):
    - Fix asciidoctor table (by Tobias Stoeckmann)

hardlink:
    - avoid format string error for dev_t (by Thomas Weißschuh)

include:
    - (fileutils.h) add fallback for the copy_file_range syscall (by Christian Goeschel Ndjomouo)

ipcutils:
    - use memset explicitly to fill bpf_attr with zero (by Masatake YAMATO)

irqtop:
    - add vw_printw() fallback for slang builds (by Karel Zak)

irqtop/lsirq:
    - Handle EOF in get_irqinfo (by Tobias Stoeckmann)

last:
    - fix phantom detection for unset loginuid and X11 sessions (by Karel Zak)

lib:
    - split ul_default_shell() from shells.c into default_shell.c (by Karel Zak)
    - (cpuset.c) dont calculate allocation size for 0 ncpus (by Christian Goeschel Ndjomouo)

libblkid:
    - Fix typo in probe_zfs (by Tobias Stoeckmann)
    - Fix type access in zfs_extract_guid_name (by Tobias Stoeckmann)
    - Fix debug OOB read in zfs_process_value (by Tobias Stoeckmann)
    - Fix parse_dev debug output (by Tobias Stoeckmann)
    - Ignore secondary LUKS2 header in blkid_do_safeprobe() (by silentcreek)
    - reiserfs add block size validation for reiser4 (by Karel Zak)
    - erofs validate blkszbits before checksum calculation (by Karel Zak)
    - exfs avoid 32-bit overflow in rextsize validation (by Karel Zak)
    - solaris use 64-bit for partition offset calculations (by Karel Zak)
    - bsd use 64-bit for partition offset calculations (by Karel Zak)
    - mac use 64-bit for partition offset calculations (by Karel Zak)
    - dos use 64-bit for partition offset calculations (by Karel Zak)
    - udf avoid 32-bit overflow in offset calculations (by Karel Zak)
    - vfat avoid 32-bit overflow in offset calculations (by Karel Zak)
    - ubi fix probe return values (by Karel Zak)
    - f2fs tighten log_blocksize validation (by Karel Zak)
    - nilfs fix byte order and block size validation (by Karel Zak)
    - gpt fix wiper offset to use sector size (by Karel Zak)
    - udf cap descriptor sequence iteration count (by Karel Zak)
    - bcache add missing NULL check (by Karel Zak)
    - bsd read enough data to cover disklabel struct (by Karel Zak)
    - befs improve bounds checking in B+ tree search (by Karel Zak)
    - ntfs improve integer overflow checks (by Karel Zak)
    - introduce sysfs_devno_is_dm_hidden() for pre-open check (by Zdenek Kabelac)

libcommon:
    - move pidfd-utils.c to Linux-only sources (by Karel Zak)

liblastlog2:
    - (tests) avoid log spam (by Thomas Weißschuh)
    - wait on busy SQLite connections (by WanBingjiang)

libmount:
    - return btrfs rootfs from get_btrfs_fs_root() (by Karel Zak)
    - use match_source for mountinfo comparison (by Karel Zak)

lib/pidutils, lib/pidfd-utils:
    - use _() instead of N_() in err() calls (by Karel Zak)

lib/pwdutils:
    - fix compiler warning [-Werror=maybe-uninitialized] (by Karel Zak)

libsmartcols:
    - drop superfluous call yo yylex_init() (by Thomas Weißschuh)
    - (tests) fix failure reporting in filter test (by Thomas Weißschuh)
    - (tests) fix filter test name (by Thomas Weißschuh)
    - Ignore -Wsign-compare in filter-scanner.l (by Thomas Weißschuh)

libuser:
    - fix misleading error message (by Christian Goeschel Ndjomouo)

login:
    - Clean up PAM resources on error path (by Tobias Stoeckmann)

login-utils/auth:
    - Drop pam_setcred (by Tobias Stoeckmann)

lsblk(man):
    - Add COLORS section (by Tobias Stoeckmann)

lsclocks:
    - add missing newline character in option description (by Christian Goeschel Ndjomouo)

lscpu(man):
    - Move options into correct section (by Tobias Stoeckmann)

lsfd:
    - use memset explicitly to fill bpf_attr with zero (by Masatake YAMATO)

meson:
    - check slang headers only when slang library is found (by Karel Zak)
    - rename logindefs_c to lib_common_logindefs (by Karel Zak)
    - split shells.c out of lib_common into lib_common_shells (by Karel Zak)
    - respect build-dmesg for test_dmesg (by Thomas Weißschuh)
    - test for statx::stx_mnt_id in sys/stat.h (by Thomas Weißschuh)

mkfs.cramfs:
    - Consider -i only once (by Tobias Stoeckmann)
    - Add -p padding only once (by Tobias Stoeckmann)
    - Improve file size check (by Tobias Stoeckmann)

mkswap:
    - Fix --file chmod(2) check when file exists (by Johannes Wüller)

more:
    - align MORE_SHELL_LINES semantics with less(1) (by Karel Zak, Christian Goeschel Ndjomouo)

newgrp:
    - Correctly handle getline error (by Tobias Stoeckmann)

nsenter:
    - Fix AT_HANDLE_FID on musl (by Aleksi Hannula)

pidfd-utils:
    - Fix pidfd_get_inode declaration (by Tobias Stoeckmann)

po:
    - merge changes (by Karel Zak)
    - update ro.po (from translationproject.org) (by Remus-Gabriel Chelu)
    - update pt.po (from translationproject.org) (by Pedro Albuquerque)
    - update pl.po (from translationproject.org) (by Jakub Bogusz)
    - update ja.po (from translationproject.org) (by YOSHIDA Hideki)
    - update et.po (from translationproject.org) (by Toomas Soome)
    - update cs.po (from translationproject.org) (by Petr Písař)

po-man:
    - merge changes (by Karel Zak)
    - update ro.po (from translationproject.org) (by Remus-Gabriel Chelu)

po-man/po4a:
    - Add missing manual pages (by Tobias Stoeckmann)

readprofile:
    - (man) clarify not designed for privilege-elevation use (by Karel Zak)

script:
    - fix "--" separator when used as option argument (by Karel Zak)
    - fix command and command_norm memory leaks (by Karel Zak)
    - fix backward compatibility for options after non-option args (by Karel Zak)

scriptreplay(man):
    - Add right arrow documentation (by koraynilay)

strutils:
    - fix printf formats (by Thomas Weißschuh)

su:
    - Clean up PAM resources on all error paths (by Tobias Stoeckmann)
    - fix grammar on man page (by Christian Goeschel Ndjomouo)

su-common:
    - revert "su pass arguments after <user> to shell" (by Christian Goeschel Ndjomouo)

terminal-colors.d:
    - (man) re-apply improvements lost in merge (by Benno Schulenberg)

tests:
    - (lsfd/mkfds-udp*) make UDPLite related test cases skippable (by Masatake YAMATO)
    - (lsfd/option-inet{,-udp}) make UDPLite related test case skippable (by Masatake YAMATO)
    - (lsfd) add a function checking the availability of UDPLite socket (by Masatake YAMATO)
    - (lsfd::mkfds-udp) fix confusion between UDP and UDPLite (by Masatake YAMATO)
    - (test_mkfds) use memset explicitly to fill bpf_attr with zero (by Masatake YAMATO)
    - (ipcs/limits) skip when /proc/sys/kernel is read-only (by Karel Zak)
    - (bits) add --width tests for invalid values (by Christian Goeschel Ndjomouo)
    - add btrfs RAID is-mounted test for libmount (by Karel Zak)

tests/functions.sh:
    - consider '+' for metadata in kernel version parsing (by Christian Goeschel Ndjomouo)

tools:
    - (compare-buildsys) suppress common lines in diff output (by Karel Zak)

tools/git-tp-sync:
    - update po4a.cfg language list on sync (by Karel Zak)

write:
    - cleanup indentation and whitespace (by Karel Zak)
    - use mem2strcpy() for utmp strings (by Karel Zak)
    - always use utmp as fallback (by Karel Zak)

write, mesg:
    - add S_ISCHR() check for terminal device paths (by Karel Zak)

Misc:
    - Remove obsolete comment since 2015 (by Julien Nabet)
    - Link against libcommon_logindefs.la and libcommon_shells.la (by Stanislav Brabec)
    - Fix build with libeconf (by Stanislav Brabec)
    - [po-man] Add missing languages to po4a.cfg (by Mario Blättermann)



-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com


^ permalink raw reply

* Re: [PATCH] chrt: Add support for SCHED_FLAG_DL_OVERRUN
From: Furkan Çalışkan @ 2026-05-13 11:16 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux, bensberg, vineethr
In-Reply-To: <vokmtg7drod6gzs5wdltod32yx5absvzf7spdne5wdu7gnv6x4@ujrijopovjn5>

Hi Karel,

On 5/13/26 13:56, Karel Zak wrote:
> On Wed, May 13, 2026 at 01:01:00PM +0300, Furkan Caliskan wrote:
>> When set on a SCHED_DEADLINE task, the kernel sends SIGXCPU to the
>> task if it exceeds its runtime budget within a period. Without this
>> flag the task is silently throttled until the next period. Useful
>> for real-time applications that need to detect when they are not
>> meeting their timing requirements.
> 
> I have added this to the TODO list:
> https://github.com/util-linux/util-linux/issues/4339 ;-)
> 
> It seems you (1frn10) already use GitHub. Creating a pull request
> there will speed up testing, reviews, and CI.
> 
>     Karel
> 

Thanks for the feedback. I have opened a pull request here:
https://github.com/util-linux/util-linux/pull/4347

--
Furkan Caliskan

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox