This bug was fixed in the package linux-hwe-5.11 - 5.11.0-27.29~20.04.1
---------------
linux-hwe-5.11 (5.11.0-27.29~20.04.1) focal; urgency=medium
* focal/linux-hwe-5.11: 5.11.0-27.29~20.04.1 -proposed tracker (LP:
#1939554)
* Update SmartPQI driver (LP: #1933518)
- scsi: smartpqi: Add support for new product ids
- scsi: smartpqi: Refactor aio submission code
- scsi: smartpqi: Refactor scatterlist code
- scsi: smartpqi: Add support for RAID5 and RAID6 writes
- scsi: smartpqi: Add support for RAID1 writes
- scsi: smartpqi: Add support for BMIC sense feature cmd and feature bits
- scsi: smartpqi: Add support for long firmware version
- scsi: smartpqi: Align code with oob driver
- scsi: smartpqi: Add stream detection
- scsi: smartpqi: Add host level stream detection enable
- scsi: smartpqi: Disable WRITE SAME for HBA NVMe disks
- scsi: smartpqi: Remove timeouts from internal cmds
- scsi: smartpqi: Add support for wwid
- scsi: smartpqi: Update event handler
- scsi: smartpqi: Update soft reset management for OFA
- scsi: smartpqi: Synchronize device resets with mutex
- scsi: smartpqi: Update suspend/resume and shutdown
- scsi: smartpqi: Update RAID bypass handling
- scsi: smartpqi: Update OFA management
- scsi: smartpqi: Update device scan operations
- scsi: smartpqi: Fix driver synchronization issues
- scsi: smartpqi: Convert snprintf() to scnprintf()
- scsi: smartpqi: Add phy ID support for the physical drives
- scsi: smartpqi: Update SAS initiator_port_protocols and
target_port_protocols
- scsi: smartpqi: Add additional logging for LUN resets
- scsi: smartpqi: Update enclosure identifier in sysfs
- scsi: smartpqi: Correct system hangs when resuming from hibernation
- scsi: smartpqi: Update version to 2.1.8-045
- scsi: smartpqi: Fix blocks_per_row static checker issue
- scsi: smartpqi: Fix device pointer variable reference static checker issue
- scsi: smartpqi: Remove unused functions
* Hirsute update: upstream stable patchset 2021-06-14 (LP: #1931896) // HWE
kernels: NFSv4.1 NULL pointer dereference (LP: #1939157)
- NFSv4: Fix a NULL pointer dereference in pnfs_mark_matching_lsegs_return()
* REGRESSION: shiftfs lets sendfile fail with EINVAL (LP: #1939301)
- SAUCE: shiftfs: fix sendfile() invocations
-- Kleber Sacilotto de Souza <[email protected]> Wed, 11 Aug
2021 16:53:07 +0200
** Changed in: linux-hwe-5.11 (Ubuntu Focal)
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1939301
Title:
REGRESSION: shiftfs lets sendfile fail with EINVAL
Status in linux package in Ubuntu:
In Progress
Status in linux-hwe-5.11 package in Ubuntu:
Invalid
Status in linux source package in Focal:
Invalid
Status in linux-hwe-5.11 source package in Focal:
Fix Released
Status in linux-meta-hwe-5.11 source package in Focal:
Invalid
Status in linux source package in Hirsute:
Fix Committed
Status in linux-hwe-5.11 source package in Hirsute:
Invalid
Status in linux-meta-hwe-5.11 source package in Hirsute:
Invalid
Status in linux source package in Impish:
In Progress
Status in linux-hwe-5.11 source package in Impish:
Invalid
Status in linux-meta-hwe-5.11 source package in Impish:
Invalid
Bug description:
With the 5.11 HWE kernel landing for Ubuntu 20.04 we noticed that LXC
tools we're using in bionic containers as part of Anbox Cloud start to
fail when executed on the 5.11 kernel.
A simple reproducer looks like this:
1. Run Ubuntu 20.04 with HWE kernel (linux-generic-hwe-20.04,
5.11.0-25-generic #27~20.04.1-Ubuntu)
2. Install LXD and enable shiftfs
$ snap install lxd
$ snap set lxd shiftfs.enable true
$ snap restart --reload lxd
3. Launch bionic container and run `lxc-info`
$ lxc launch ubuntu:b c0
$ lxc shell c0
c0$ apt update
c0$ apt install -y lxc-utils
root@c1:~# apt show lxc-utils | grep Version
Version: 3.0.3-0ubuntu1~18.04.1
c0$ mkdir -p containers/test
c0$ touch containers/test/config
c0$ lxc-info -P containers -n test
Failed to load config for test
Failure to retrieve information on containers:test
Looking into the failing `lxc-info` call with strace reveals:
...
memfd_create(".lxc_config_file", MFD_CLOEXEC) = 4
openat(AT_FDCWD, "containers/test/config", O_RDONLY|O_CLOEXEC) = 5
sendfile(4, 5, NULL, 2147479552) = -1 EINVAL (Invalid argument
...
LXC >= 4.0.0 doesn't use sendfile anymore and with that isn't
affected. Any other tool using sendfile however is affected and will
fail. Bionic is affected as the 3.0.3 version of LXC it includes still
uses sendfile.
Disabling shiftfs makes things work again and can be considered as a
workaround to a certain degree, but not be applicable in all cases.
Further analysis with Christian (cbrauner) from the LXD team this
morning showed that shiftfs is missing an implementation for the now
required slice_read handler in the file_operations structure. So
whenever shiftfs is being used, all calls to sendfile will fail
because of the missing implementation. The generic handler for this
got removed in the following upstream change:
https://lore.kernel.org/lkml/[email protected]/
Christian implemented a quick fix:
https://paste.ubuntu.com/p/TPsjfCpnD5/
As of today I don't know of any customer of Anbox Cloud who is
affected by this as most of them run with one of our cloud kernels.
However as soon as 5.11 rolls out to the cloud kernels, we will hit
production systems and cause them to fail.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1939301/+subscriptions
--
Mailing list: https://launchpad.net/~kernel-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~kernel-packages
More help : https://help.launchpad.net/ListHelp