diff mbox series

util-linux: Bump to version 2.32

Message ID 20180521191623.7049-1-tpiepho@impinj.com
State Superseded
Headers show
Series util-linux: Bump to version 2.32 | expand

Commit Message

Trent Piepho May 21, 2018, 7:16 p.m. UTC
Remove upstreamed patch.

This version of util-linux includes a work-around for a kernel 4.16.4,
4.17 change in the way getrandom() works.  In early boot, getrandom()
can now block for a very long time if there is insufficient entropy,
which can happen on embedded systems or qemu where there are few entropy
sources.  Users of libuuid from util-linux can be affected by this.

Signed-off-by: Trent Piepho <tpiepho@impinj.com>
---
 package/util-linux/0001-docs-add-ISC-licence.patch | 38 ----------------------
 package/util-linux/util-linux.hash                 | 11 ++++---
 package/util-linux/util-linux.mk                   |  5 ++-
 3 files changed, 8 insertions(+), 46 deletions(-)
 delete mode 100644 package/util-linux/0001-docs-add-ISC-licence.patch

Comments

Trent Piepho May 21, 2018, 9:34 p.m. UTC | #1
Nevermind, I see I missed this change already being on buildroot/next.

If anyone wonders why mke2fs blocks for 2 seconds getting a filesystem
UUID on recent kernels on low boot entropy systems, it's because of the
problem described here.

On Mon, 2018-05-21 at 12:16 -0700, Trent Piepho wrote:
> This version of util-linux includes a work-around for a kernel 4.16.4,
> 4.17 change in the way getrandom() works.  In early boot, getrandom()
> can now block for a very long time if there is insufficient entropy,
> which can happen on embedded systems or qemu where there are few entropy
> sources.  Users of libuuid from util-linux can be affected by this.
>
Peter Korsgaard May 21, 2018, 10 p.m. UTC | #2
>>>>> "Trent" == Trent Piepho <tpiepho@impinj.com> writes:

Hi,

 > Nevermind, I see I missed this change already being on buildroot/next.
 > If anyone wonders why mke2fs blocks for 2 seconds getting a filesystem
 > UUID on recent kernels on low boot entropy systems, it's because of the
 > problem described here.

I actually also hit this on 4.14.39 recently. Perhaps we should include
this bump (or better just the getrandom changes) on master and on
2018.02.x?

Care to send a patch for master?
Carlos Santos May 23, 2018, 12:45 p.m. UTC | #3
> From: "Peter Korsgaard" <peter@korsgaard.com>
> To: "Trent Piepho" <tpiepho@impinj.com>
> Cc: "buildroot" <buildroot@buildroot.org>
> Sent: Monday, May 21, 2018 7:00:54 PM
> Subject: Re: [Buildroot] [PATCH] util-linux: Bump to version 2.32

>>>>>> "Trent" == Trent Piepho <tpiepho@impinj.com> writes:
> 
> Hi,
> 
> > Nevermind, I see I missed this change already being on buildroot/next.
> > If anyone wonders why mke2fs blocks for 2 seconds getting a filesystem
> > UUID on recent kernels on low boot entropy systems, it's because of the
> > problem described here.
> 
> I actually also hit this on 4.14.39 recently. Perhaps we should include
> this bump (or better just the getrandom changes) on master and on
> 2018.02.x?
> 
> Care to send a patch for master?

Isn't it simpler to cherry-pick commit 4b54bd3ae8, instead?
Peter Korsgaard May 24, 2018, 4:10 p.m. UTC | #4
>>>>> "Carlos" == Carlos Santos <casantos@datacom.ind.br> writes:

 >> From: "Peter Korsgaard" <peter@korsgaard.com>
 >> To: "Trent Piepho" <tpiepho@impinj.com>
 >> Cc: "buildroot" <buildroot@buildroot.org>
 >> Sent: Monday, May 21, 2018 7:00:54 PM
 >> Subject: Re: [Buildroot] [PATCH] util-linux: Bump to version 2.32

 >>>>>>> "Trent" == Trent Piepho <tpiepho@impinj.com> writes:
 >> 
 >> Hi,
 >> 
 >> > Nevermind, I see I missed this change already being on buildroot/next.
 >> > If anyone wonders why mke2fs blocks for 2 seconds getting a filesystem
 >> > UUID on recent kernels on low boot entropy systems, it's because of the
 >> > problem described here.
 >> 
 >> I actually also hit this on 4.14.39 recently. Perhaps we should include
 >> this bump (or better just the getrandom changes) on master and on
 >> 2018.02.x?
 >> 
 >> Care to send a patch for master?

 > Isn't it simpler to cherry-pick commit 4b54bd3ae8, instead?

First of all, 4b54bd3ae8 is already on master so the question is just
what we do for 2018.02.x?

Just cherrypicking the bump to 2.32 is certainly the easiest, but
perhaps also riskier than just cherry-picking the getrandom() changes:

git shortlog v2.31.. -- lib/randutils.c
Carlo Caione (1):
      lib/randutils: Do not block on getrandom()

Karel Zak (1):
      lib/randutils: don't break on EAGAIN, use usleep()

On the other hand, util-linux bumps are normally quite safe and we have
not had any issues reported, so perhaps we should just go for 2.32 for
2018.02.x as well?
Trent Piepho May 24, 2018, 4:29 p.m. UTC | #5
On Thu, 2018-05-24 at 18:10 +0200, Peter Korsgaard wrote:
> > > > > > "Carlos" == Carlos Santos <casantos@datacom.ind.br> writes:
>  >> > Nevermind, I see I missed this change already being on buildroot/next.
>  >> > If anyone wonders why mke2fs blocks for 2 seconds getting a filesystem
>  >> > UUID on recent kernels on low boot entropy systems, it's because of the
>  >> > problem described here.
>  >> 
>  >> I actually also hit this on 4.14.39 recently. Perhaps we should include
>  >> this bump (or better just the getrandom changes) on master and on
>  >> 2018.02.x?
>  >> 
>  >> Care to send a patch for master?
> 
>  > Isn't it simpler to cherry-pick commit 4b54bd3ae8, instead?
> 
> First of all, 4b54bd3ae8 is already on master so the question is just
> what we do for 2018.02.x?
> 
> Just cherrypicking the bump to 2.32 is certainly the easiest, but
> perhaps also riskier than just cherry-picking the getrandom() changes:
> 
> git shortlog v2.31.. -- lib/randutils.c
> Carlo Caione (1):
>       lib/randutils: Do not block on getrandom()
> 
> Karel Zak (1):
>       lib/randutils: don't break on EAGAIN, use usleep()
> 
> On the other hand, util-linux bumps are normally quite safe and we have
> not had any issues reported, so perhaps we should just go for 2.32 for
> 2018.02.x as well?

If you bump util-linux to 2.32, then systemd < 238 doesn't build
without systemd commit 227b8a762fea1458547be2cdf0e6e4aac0079730

core: don't include libmount.h in a header file (#8580)
Peter Korsgaard May 24, 2018, 6:15 p.m. UTC | #6
>>>>> "Trent" == Trent Piepho <tpiepho@impinj.com> writes:

Hi,

 >> First of all, 4b54bd3ae8 is already on master so the question is just
 >> what we do for 2018.02.x?
 >> 
 >> Just cherrypicking the bump to 2.32 is certainly the easiest, but
 >> perhaps also riskier than just cherry-picking the getrandom() changes:
 >> 
 >> git shortlog v2.31.. -- lib/randutils.c
 >> Carlo Caione (1):
 >> lib/randutils: Do not block on getrandom()
 >> 
 >> Karel Zak (1):
 >> lib/randutils: don't break on EAGAIN, use usleep()
 >> 
 >> On the other hand, util-linux bumps are normally quite safe and we have
 >> not had any issues reported, so perhaps we should just go for 2.32 for
 >> 2018.02.x as well?

 > If you bump util-linux to 2.32, then systemd < 238 doesn't build
 > without systemd commit 227b8a762fea1458547be2cdf0e6e4aac0079730

 > core: don't include libmount.h in a header file (#8580)

Hrmph, then I guess just backporting those two util-linux commits are a
better solution for 2018.02.x.

Thanks.
Peter Korsgaard May 27, 2018, 10:42 a.m. UTC | #7
>>>>> "Trent" == Trent Piepho <tpiepho@impinj.com> writes:

Hi,

 >> First of all, 4b54bd3ae8 is already on master so the question is just
 >> what we do for 2018.02.x?
 >> 
 >> Just cherrypicking the bump to 2.32 is certainly the easiest, but
 >> perhaps also riskier than just cherry-picking the getrandom() changes:
 >> 
 >> git shortlog v2.31.. -- lib/randutils.c
 >> Carlo Caione (1):
 >> lib/randutils: Do not block on getrandom()
 >> 
 >> Karel Zak (1):
 >> lib/randutils: don't break on EAGAIN, use usleep()
 >> 
 >> On the other hand, util-linux bumps are normally quite safe and we have
 >> not had any issues reported, so perhaps we should just go for 2.32 for
 >> 2018.02.x as well?

 > If you bump util-linux to 2.32, then systemd < 238 doesn't build
 > without systemd commit 227b8a762fea1458547be2cdf0e6e4aac0079730

 > core: don't include libmount.h in a header file (#8580)

Ok. I have sent a patch to instead backport the two randutils.c changes
between 2.31 and 2.32:

http://patchwork.ozlabs.org/patch/921077/
diff mbox series

Patch

diff --git a/package/util-linux/0001-docs-add-ISC-licence.patch b/package/util-linux/0001-docs-add-ISC-licence.patch
deleted file mode 100644
index aea7b9719c..0000000000
--- a/package/util-linux/0001-docs-add-ISC-licence.patch
+++ /dev/null
@@ -1,38 +0,0 @@ 
-From a9e4662d26b10789b28282d7e77ab189ef34cf5c Mon Sep 17 00:00:00 2001
-From: Carlos Santos <casantos@datacom.ind.br>
-Date: Sun, 14 Jan 2018 16:39:31 -0200
-Subject: [PATCH] docs: add ISC licence
-
-Save the top 21 lines of sys-utils/rfkill.c as COPYING.ISC. This is
-useful for Linux distributions an integration tools like Buildroot,
-to collect detailed legal information for each package.
-
-[kzak@redhat.com: - remove C-comments and rfkill header]
-
-Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
-Signed-off-by: Karel Zak <kzak@redhat.com>
----
- Documentation/licenses/COPYING.ISC | 11 +++++++++++
- 1 file changed, 11 insertions(+)
- create mode 100644 Documentation/licenses/COPYING.ISC
-
-diff --git a/Documentation/licenses/COPYING.ISC b/Documentation/licenses/COPYING.ISC
-new file mode 100644
-index 000000000..8351a30e3
---- /dev/null
-+++ b/Documentation/licenses/COPYING.ISC
-@@ -0,0 +1,11 @@
-+Permission to use, copy, modify, and/or distribute this software for any
-+purpose with or without fee is hereby granted, provided that the above
-+copyright notice and this permission notice appear in all copies.
-+
-+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
--- 
-2.14.3
-
diff --git a/package/util-linux/util-linux.hash b/package/util-linux/util-linux.hash
index 068bb45e6c..c39e1bf049 100644
--- a/package/util-linux/util-linux.hash
+++ b/package/util-linux/util-linux.hash
@@ -1,9 +1,10 @@ 
-# From https://www.kernel.org/pub/linux/utils/util-linux/v2.31/sha256sums.asc
-sha256 1a51b16fa9cd51d26ef9ab52d2f1de12403b810fc8252bf7d478df91b3cddf11  util-linux-2.31.1.tar.xz
+# From https://www.kernel.org/pub/linux/utils/util-linux/v2.32/sha256sums.asc
+sha256 6c7397abc764e32e8159c2e96042874a190303e77adceb4ac5bd502a272a4734  util-linux-2.32.tar.xz
+
 # License files, locally calculated
 sha256 1e4b65802b0df8115395c697029d03339f983d451a473a08643309c684410d9a  README.licensing
-sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  Documentation/licenses/COPYING.GPLv2
-sha256 ba7640f00d93e72e92b94b9d71f25ec53bac2f1682f5c4adcccb0018359f60f8  Documentation/licenses/COPYING.UCB
-sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551  Documentation/licenses/COPYING.LGPLv2.1
 sha256 9b718a9460fed5952466421235bc79eb49d4e9eacc920d7a9dd6285ab8fd6c6d  Documentation/licenses/COPYING.BSD-3
+sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  Documentation/licenses/COPYING.GPLv2
 sha256 e53348ce276358e9997014071c5294b36a18c4b34f32f00ee57b9acce0aafd63  Documentation/licenses/COPYING.ISC
+sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551  Documentation/licenses/COPYING.LGPLv2.1
+sha256 ba7640f00d93e72e92b94b9d71f25ec53bac2f1682f5c4adcccb0018359f60f8  Documentation/licenses/COPYING.UCB
diff --git a/package/util-linux/util-linux.mk b/package/util-linux/util-linux.mk
index 72a6d18178..5350fa9fd1 100644
--- a/package/util-linux/util-linux.mk
+++ b/package/util-linux/util-linux.mk
@@ -4,9 +4,8 @@ 
 #
 ################################################################################
 
-UTIL_LINUX_VERSION_MAJOR = 2.31
-UTIL_LINUX_VERSION_MINOR = 1
-UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR).$(UTIL_LINUX_VERSION_MINOR)
+UTIL_LINUX_VERSION_MAJOR = 2.32
+UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR)
 UTIL_LINUX_SOURCE = util-linux-$(UTIL_LINUX_VERSION).tar.xz
 UTIL_LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/util-linux/v$(UTIL_LINUX_VERSION_MAJOR)