Hello community, here is the log from the commit of package util-linux for openSUSE:Factory checked in at 2018-07-17 09:36:17 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/util-linux (Old) and /work/SRC/openSUSE:Factory/.util-linux.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "util-linux" Tue Jul 17 09:36:17 2018 rev:230 rq:621748 version:2.31.1 Changes: -------- --- /work/SRC/openSUSE:Factory/util-linux/python-libmount.changes 2018-05-25 21:33:59.319190836 +0200 +++ /work/SRC/openSUSE:Factory/.util-linux.new/python-libmount.changes 2018-07-17 09:36:20.502582147 +0200 @@ -7,0 +8,19 @@ +Thu May 10 17:22:14 CEST 2018 - sbrabec@suse.com + +- Fix lscpu and chcpu on systems with >1024 cores + (bnc#1091164, util-linux-lscpu-chcpu-new-cpu-macros.patch). +- Fix CPU count in chcpu + (bnc#1091164, util-linux-chcpu-cpu-count.patch). + +------------------------------------------------------------------- +Thu Apr 19 19:30:25 CEST 2018 - sbrabec@suse.com + +- Backport three upstream patches: + * Fix crash loop in lscpu + (bsc#1072947, util-linux-lscpu-loop.patch). + * Fix possible segfault of umount -a + (util-linux-libmount-umount-a-segfault.patch). + * Fix mount -a on NFS bind mounts (bsc#1080740, + util-linux-libmount-mount-a-nfs-bind-mount.patch). + +------------------------------------------------------------------- util-linux-systemd.changes: same change util-linux.changes: same change New: ---- util-linux-chcpu-cpu-count.patch util-linux-libmount-mount-a-nfs-bind-mount.patch util-linux-libmount-umount-a-segfault.patch util-linux-lscpu-chcpu-new-cpu-macros.patch util-linux-lscpu-loop.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-libmount.spec ++++++ --- /var/tmp/diff_new_pack.cydBZY/_old 2018-07-17 09:36:22.318575814 +0200 +++ /var/tmp/diff_new_pack.cydBZY/_new 2018-07-17 09:36:22.318575814 +0200 @@ -174,6 +174,16 @@ Patch6: util-linux-fincore-count.patch # PATCH-FIX-UPSTREAM util-linux-sysfs-nvme-devno.patch bsc1078662 sbrabec@suse.com -- Fix lsblk on NVMe. Patch7: util-linux-sysfs-nvme-devno.patch +# PATCH-FIX-UPSTREAM util-linux-lscpu-loop.patch bsc1072947 sbrabec@suse.com -- Fix crash loop in lscpu. +Patch8: util-linux-lscpu-loop.patch +# PATCH-FIX-UPSTREAM util-linux-libmount-umount-a-segfault.patch sbrabec@suse.com -- Fix possible segfault of umount -a. +Patch9: util-linux-libmount-umount-a-segfault.patch +# PATCH-FIX-UPSTREAM util-linux-libmount-mount-a-nfs-bind-mount.patch bsc1080740 sbrabec@suse.com -- Fix mount -a on NFS bind mounts. +Patch10: util-linux-libmount-mount-a-nfs-bind-mount.patch +# PATCH-FIX-UPSTREAM util-linux-lscpu-chcpu-new-cpu-macros.patch bnc1091164 sbrabec@suse.com -- Fix lscpu and chcpu on systems with >1024 cores. +Patch11: util-linux-lscpu-chcpu-new-cpu-macros.patch +# PATCH-FIX-UPSTREAM util-linux-chcpu-cpu-count.patch bnc1091164 sbrabec@suse.com -- chcpu: Properly count CPUs. +Patch12: util-linux-chcpu-cpu-count.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # %if %build_util_linux @@ -417,6 +427,11 @@ %patch5 -p1 %patch6 -p1 %patch7 -p1 +%patch8 -p1 +%patch9 -p1 +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 # # setctsid cp -p %{S:22} %{S:23} . util-linux-systemd.spec: same change ++++++ util-linux.spec ++++++ --- /var/tmp/diff_new_pack.cydBZY/_old 2018-07-17 09:36:22.374575618 +0200 +++ /var/tmp/diff_new_pack.cydBZY/_new 2018-07-17 09:36:22.378575605 +0200 @@ -174,6 +174,16 @@ Patch6: util-linux-fincore-count.patch # PATCH-FIX-UPSTREAM util-linux-sysfs-nvme-devno.patch bsc1078662 sbrabec@suse.com -- Fix lsblk on NVMe. Patch7: util-linux-sysfs-nvme-devno.patch +# PATCH-FIX-UPSTREAM util-linux-lscpu-loop.patch bsc1072947 sbrabec@suse.com -- Fix crash loop in lscpu. +Patch8: util-linux-lscpu-loop.patch +# PATCH-FIX-UPSTREAM util-linux-libmount-umount-a-segfault.patch sbrabec@suse.com -- Fix possible segfault of umount -a. +Patch9: util-linux-libmount-umount-a-segfault.patch +# PATCH-FIX-UPSTREAM util-linux-libmount-mount-a-nfs-bind-mount.patch bsc1080740 sbrabec@suse.com -- Fix mount -a on NFS bind mounts. +Patch10: util-linux-libmount-mount-a-nfs-bind-mount.patch +# PATCH-FIX-UPSTREAM util-linux-lscpu-chcpu-new-cpu-macros.patch bnc1091164 sbrabec@suse.com -- Fix lscpu and chcpu on systems with >1024 cores. +Patch11: util-linux-lscpu-chcpu-new-cpu-macros.patch +# PATCH-FIX-UPSTREAM util-linux-chcpu-cpu-count.patch bnc1091164 sbrabec@suse.com -- chcpu: Properly count CPUs. +Patch12: util-linux-chcpu-cpu-count.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # %if %build_util_linux @@ -417,6 +427,11 @@ %patch5 -p1 %patch6 -p1 %patch7 -p1 +%patch8 -p1 +%patch9 -p1 +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 # # setctsid cp -p %{S:22} %{S:23} . ++++++ util-linux-chcpu-cpu-count.patch ++++++
From 607274943bfd3d4856b872bc4278b36903fb2182 Mon Sep 17 00:00:00 2001 From: Stanislav Brabec
Date: Wed, 9 May 2018 22:13:07 +0200 Subject: [PATCH] chcpu: Fix maximal number of CPUs
chcpu.c mixed maxcpus (number of cpus) and setsize (size of CPU bit
mask). It effectively limits number of CPUs to 1/8 of the supported
amount.
Signed-off-by: Stanislav Brabec
From 7966cbba53890e1010861b75bd9923e793bbc975 Mon Sep 17 00:00:00 2001 From: NeilBrown
Date: Wed, 18 Apr 2018 13:31:38 +1000 Subject: [PATCH] libmount: fix mnt_table_is_fs_mounted() for NFS bind mounts.
When you bind-mount a subdirectory of a local filesystem, the
path to that subdirectory appears as the fourth field in mountinfo.
For nfs mounts, the fourth field is always "/", and the subdirectory
part is appended to the "special" (aka "device") field. This is
consistent with historical NFS usage which always includes a path in
the fs_spec field.
libmount needs to know about this when "mount -a" checks to see if
a filesystem is already mounted.
Without this fix, fstab lines like:
server::/path /dir nfs defaults 0 0
/dir/subdir /mnt/test none bind 0 0
result in a new mount at /mnt/test every time "mount -a" is run.
[kzak@redhat.com: - use strappend() rather than asprintf()]
Signed-off-by: NeilBrown
From f958101d2ea55174f8cd584efe41d4cefa9578c6 Mon Sep 17 00:00:00 2001 From: Richard Fuchs
Date: Tue, 17 Apr 2018 09:40:20 -0400 Subject: [PATCH] bugfix: fix possible segfault during umount -a
mnt_context_get_mtab() doesn't set its return **tb argument on error, and so in mnt_context_next_umount() mtab will remain uninitialized on error, later resulting in cxt->mtab containing garbage, possibly resulting in segfault on exit. --- libmount/src/context_umount.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libmount/src/context_umount.c b/libmount/src/context_umount.c index 45651b58e..240ec3be6 100644 --- a/libmount/src/context_umount.c +++ b/libmount/src/context_umount.c @@ -1003,11 +1003,12 @@ int mnt_context_next_umount(struct libmnt_context *cxt, rc = mnt_context_get_mtab(cxt, &mtab); cxt->mtab = NULL; /* do not reset mtab */ mnt_reset_context(cxt); - cxt->mtab = mtab; if (rc) return rc; + cxt->mtab = mtab; + do { rc = mnt_table_next_fs(mtab, itr, fs); if (rc != 0) -- 2.16.3 ++++++ util-linux-lscpu-chcpu-new-cpu-macros.patch ++++++
From 538b50cb0a4aac56b6b3b6e4d1e8ce886854c6d8 Mon Sep 17 00:00:00 2001 From: Stanislav Brabec
Date: Wed, 9 May 2018 18:08:32 +0200 Subject: [PATCH] lscpu, chcpu: Avoid use of the old CPU macros
The old CPU macros are limited to 1024 cores. As a result, lscpu cannot
count sockets on large systems. Use new scalable macros.
Signed-off-by: Stanislav Brabec
From 95f09bc63c564c50ec2c393352801cc056faaea2 Mon Sep 17 00:00:00 2001 From: Dirk Mueller
Date: Sat, 17 Mar 2018 13:18:38 +0100 Subject: [PATCH] Avoid crash in min/max caculation when cpu#0 being offline
When cpu#0 is offline, atof(NULL) is called which causes a segfault or endless loop depending on implementation circumstances. So instead of implicitely assumping that the first cpu is always available, do the presence checks for all including the first one. --- sys-utils/lscpu.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c index 6d1fde555..2132511a5 100644 --- a/sys-utils/lscpu.c +++ b/sys-utils/lscpu.c @@ -1108,10 +1108,10 @@ static char * cpu_max_mhz(struct lscpu_desc *desc, char *buf, size_t bufsz) { int i; - float cpu_freq = atof(desc->maxmhz[0]); + float cpu_freq = 0.0; if (desc->present) { - for (i = 1; i < desc->ncpuspos; i++) { + for (i = 0; i < desc->ncpuspos; i++) { if (CPU_ISSET(real_cpu_num(desc, i), desc->present) && desc->maxmhz[i]) { float freq = atof(desc->maxmhz[i]); @@ -1129,16 +1129,16 @@ cpu_max_mhz(struct lscpu_desc *desc, char *buf, size_t bufsz) static char * cpu_min_mhz(struct lscpu_desc *desc, char *buf, size_t bufsz) { - int i; - float cpu_freq = atof(desc->minmhz[0]); + int i; + float cpu_freq = -1.0; if (desc->present) { - for (i = 1; i < desc->ncpuspos; i++) { + for (i = 0; i < desc->ncpuspos; i++) { if (CPU_ISSET(real_cpu_num(desc, i), desc->present) && desc->minmhz[i]) { float freq = atof(desc->minmhz[i]); - if (freq < cpu_freq) + if (cpu_freq < 0.0 || freq < cpu_freq) cpu_freq = freq; } } -- 2.16.3