As Vincent noticed, the y2038 conversion of semtimedop in linux-5.1
broke when commit 00bf25d693e7 ("y2038: use time32 syscall names on
32-bit") changed all system calls on all architectures that take
a 32-bit time_t to point to the _time32 implementation, but left out
semtimedop in the asm-generic header.
This affects all 32-bit architectures using asm-generic/unistd.h:
h8300, unicore32, openrisc, nios2, hexagon, c6x, arc, nds32 and csky.
The notable exception is riscv32, which has dropped support for the
time32 system calls entirely.
Reported-by: Vincent Chen <deanbo422(a)gmail.com>
Cc: stable(a)vger.kernel.org
Cc: Vincent Chen <deanbo422(a)gmail.com>
Cc: Greentime Hu <green.hu(a)gmail.com>
Cc: Yoshinori Sato <ysato(a)users.sourceforge.jp>
Cc: Guan Xuetao <gxt(a)pku.edu.cn>
Cc: Stafford Horne <shorne(a)gmail.com>
Cc: Jonas Bonn <jonas(a)southpole.se>
Cc: Stefan Kristiansson <stefan.kristiansson(a)saunalahti.fi>
Cc: Ley Foon Tan <lftan(a)altera.com>
Cc: Richard Kuo <rkuo(a)codeaurora.org>
Cc: Mark Salter <msalter(a)redhat.com>
Cc: Aurelien Jacquiot <jacquiot.aurelien(a)gmail.com>
Cc: Guo Ren <guoren(a)kernel.org>
Fixes: 00bf25d693e7 ("y2038: use time32 syscall names on 32-bit")
Signed-off-by: Arnd Bergmann <arnd(a)arndb.de>
---
Hi Vincent,
Sorry for the delay since your report. Does this address your
problem?
Anyone else, please note that this patch is required since
5.1 to make sysvipc work on the listed architectures.
---
include/uapi/asm-generic/unistd.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h
index 1be0e798e362..1fc8faa6e973 100644
--- a/include/uapi/asm-generic/unistd.h
+++ b/include/uapi/asm-generic/unistd.h
@@ -569,7 +569,7 @@ __SYSCALL(__NR_semget, sys_semget)
__SC_COMP(__NR_semctl, sys_semctl, compat_sys_semctl)
#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
#define __NR_semtimedop 192
-__SC_COMP(__NR_semtimedop, sys_semtimedop, sys_semtimedop_time32)
+__SC_3264(__NR_semtimedop, sys_semtimedop_time32, sys_semtimedop)
#endif
#define __NR_semop 193
__SYSCALL(__NR_semop, sys_semop)
--
2.20.0
Hello,
We ran automated tests on a patchset that was proposed for merging into this
kernel tree. The patches were applied to:
Kernel repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Commit: 218ca2e5affe - Linux 5.2.13
The results of these automated tests are provided below.
Overall result: FAILED (see details below)
Merge: OK
Compile: OK
Tests: FAILED
All kernel binaries, config files, and logs are available for download here:
https://artifacts.cki-project.org/pipelines/149570
One or more kernel tests failed:
ppc64le:
❌ selinux-policy: serge-testsuite
We hope that these logs can help you find the problem quickly. For the full
detail on our testing procedures, please scroll to the bottom of this message.
Please reply to this email if you have any questions about the tests that we
ran or if you have any suggestions on how to make future tests more effective.
,-. ,-.
( C ) ( K ) Continuous
`-',-.`-' Kernel
( I ) Integration
`-'
______________________________________________________________________________
Merge testing
-------------
We cloned this repository and checked out the following commit:
Repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Commit: 218ca2e5affe - Linux 5.2.13
We grabbed the 38896de0ab4b commit of the stable queue repository.
We then merged the patchset with `git am`:
batman-adv-fix-netlink-dumping-of-all-mcast_flags-bu.patch
libbpf-fix-erroneous-multi-closing-of-btf-fd.patch
libbpf-set-btf-fd-for-prog-only-when-there-is-suppor.patch
netfilter-nf_flow_table-fix-offload-for-flows-that-a.patch
net-mlx5e-fix-error-flow-of-cqe-recovery-on-tx-repor.patch
clk-samsung-change-signature-of-exynos5_subcmus_init.patch
clk-samsung-exynos5800-move-mau-subsystem-clocks-to-.patch
clk-samsung-exynos542x-move-mscl-subsystem-clocks-to.patch
net-tundra-tsi108-use-spin_lock_irqsave-instead-of-s.patch
netfilter-nf_tables-use-after-free-in-failing-rule-w.patch
netfilter-nf_flow_table-conntrack-picks-up-expired-f.patch
netfilter-nf_flow_table-teardown-flow-timeout-race.patch
tools-bpftool-fix-error-message-prog-object.patch
ixgbe-fix-possible-deadlock-in-ixgbe_service_task.patch
hv_netvsc-fix-a-warning-of-suspicious-rcu-usage.patch
net-tc35815-explicitly-check-net_ip_align-is-not-zer.patch
bluetooth-btqca-add-a-short-delay-before-downloading.patch
bluetooth-hci_qca-send-vs-pre-shutdown-command.patch
bluetooth-hidp-let-hidp_send_message-return-number-o.patch
s390-qeth-serialize-cmd-reply-with-concurrent-timeou.patch
ibmveth-convert-multicast-list-size-for-little-endia.patch
gpio-fix-build-error-of-function-redefinition.patch
netfilter-nft_flow_offload-skip-tcp-rst-and-fin-pack.patch
drm-mediatek-use-correct-device-to-import-prime-buff.patch
drm-mediatek-set-dma-max-segment-size.patch
scsi-qla2xxx-fix-gnl.l-memory-leak-on-adapter-init-f.patch
scsi-target-tcmu-avoid-use-after-free-after-command-.patch
cxgb4-fix-a-memory-leak-bug.patch
selftests-kvm-do-not-try-running-the-vm-in-vmx_set_n.patch
selftests-kvm-provide-common-function-to-enable-evmc.patch
selftests-kvm-fix-vmx_set_nested_state_test.patch
liquidio-add-cleanup-in-octeon_setup_iq.patch
net-myri10ge-fix-memory-leaks.patch
clk-fix-falling-back-to-legacy-parent-string-matchin.patch
clk-fix-potential-null-dereference-in-clk_fetch_pare.patch
lan78xx-fix-memory-leaks.patch
vfs-fix-page-locking-deadlocks-when-deduping-files.patch
cx82310_eth-fix-a-memory-leak-bug.patch
net-kalmia-fix-memory-leaks.patch
ibmvnic-unmap-dma-address-of-tx-descriptor-buffers-a.patch
net-cavium-fix-driver-name.patch
wimax-i2400m-fix-a-memory-leak-bug.patch
ravb-fix-use-after-free-ravb_tstamp_skb.patch
sched-core-schedule-new-worker-even-if-pi-blocked.patch
kprobes-fix-potential-deadlock-in-kprobe_optimizer.patch
hid-intel-ish-hid-ipc-add-ehl-device-id.patch
hid-cp2112-prevent-sleeping-function-called-from-inv.patch
x86-boot-compressed-64-fix-boot-on-machines-with-bro.patch
scsi-lpfc-mitigate-high-memory-pre-allocation-by-scs.patch
input-hyperv-keyboard-use-in-place-iterator-api-in-t.patch
tools-hv-kvp-eliminate-may-be-used-uninitialized-war.patch
nvme-multipath-fix-possible-i-o-hang-when-paths-are-.patch
nvme-fix-cntlid-validation-when-not-using-nvmeof.patch
rdma-cma-fix-null-ptr-deref-read-in-cma_cleanup.patch
ib-mlx4-fix-memory-leaks.patch
infiniband-hfi1-fix-a-memory-leak-bug.patch
infiniband-hfi1-fix-memory-leaks.patch
selftests-kvm-fix-state-save-load-on-processors-with.patch
selftests-kvm-make-platform_info_test-pass-on-amd.patch
drm-amdgpu-prevent-memory-leaks-in-amdgpu_cs-ioctl.patch
ceph-fix-buffer-free-while-holding-i_ceph_lock-in-__.patch
ceph-fix-buffer-free-while-holding-i_ceph_lock-in-__.patch
ceph-fix-buffer-free-while-holding-i_ceph_lock-in-fi.patch
kvm-arm-arm64-only-skip-mmio-insn-once.patch
afs-fix-leak-in-afs_lookup_cell_rcu.patch
afs-fix-possible-oops-in-afs_lookup-trace-event.patch
afs-use-correct-afs_call_type-in-yfs_fs_store_opaque.patch
rdma-bnxt_re-fix-stack-out-of-bounds-in-bnxt_qplib_r.patch
gpio-fix-irqchip-initialization-order.patch
kvm-arm-arm64-vgic-properly-initialise-private-irq-a.patch
x86-boot-compressed-64-fix-missing-initialization-in.patch
libceph-allow-ceph_buffer_put-to-receive-a-null-ceph.patch
Compile testing
---------------
We compiled the kernel for 3 architectures:
aarch64:
make options: -j30 INSTALL_MOD_STRIP=1 targz-pkg
ppc64le:
make options: -j30 INSTALL_MOD_STRIP=1 targz-pkg
x86_64:
make options: -j30 INSTALL_MOD_STRIP=1 targz-pkg
Hardware testing
----------------
We booted each kernel and ran the following tests:
aarch64:
⚡ Internal infrastructure issues prevented one or more tests (marked
with ⚡⚡⚡) from running on this architecture.
This is not the fault of the kernel that was tested.
ppc64le:
Host 1:
✅ Boot test [0]
✅ xfstests: xfs [1]
❌ selinux-policy: serge-testsuite [2]
🚧 ✅ Storage blktests [3]
Host 2:
✅ Boot test [0]
✅ Podman system integration test (as root) [4]
✅ Podman system integration test (as user) [4]
✅ Loopdev Sanity [5]
✅ jvm test suite [6]
✅ AMTU (Abstract Machine Test Utility) [7]
✅ LTP: openposix test suite [8]
✅ Ethernet drivers sanity [9]
✅ Networking socket: fuzz [10]
✅ audit: audit testsuite test [11]
✅ httpd: mod_ssl smoke sanity [12]
✅ iotop: sanity [13]
✅ tuned: tune-processes-through-perf [14]
✅ Usex - version 1.9-29 [15]
🚧 ✅ LTP lite [16]
🚧 ✅ Memory function: kaslr [17]
x86_64:
Host 1:
✅ Boot test [0]
✅ xfstests: xfs [1]
✅ selinux-policy: serge-testsuite [2]
🚧 ✅ Storage blktests [3]
Host 2:
✅ Boot test [0]
✅ Podman system integration test (as root) [4]
✅ Podman system integration test (as user) [4]
✅ Loopdev Sanity [5]
✅ jvm test suite [6]
✅ AMTU (Abstract Machine Test Utility) [7]
✅ LTP: openposix test suite [8]
✅ Ethernet drivers sanity [9]
✅ Networking socket: fuzz [10]
✅ audit: audit testsuite test [11]
✅ httpd: mod_ssl smoke sanity [12]
✅ iotop: sanity [13]
✅ tuned: tune-processes-through-perf [14]
✅ pciutils: sanity smoke test [18]
✅ Usex - version 1.9-29 [15]
✅ storage: SCSI VPD [19]
✅ stress: stress-ng [20]
🚧 ✅ LTP lite [16]
🚧 ❌ Memory function: kaslr [17]
Test source:
💚 Pull requests are welcome for new tests or improvements to existing tests!
[0]: https://github.com/CKI-project/tests-beaker/archive/master.zip#distribution…
[1]: https://github.com/CKI-project/tests-beaker/archive/master.zip#/filesystems…
[2]: https://github.com/CKI-project/tests-beaker/archive/master.zip#/packages/se…
[3]: https://github.com/CKI-project/tests-beaker/archive/master.zip#storage/blk
[4]: https://github.com/CKI-project/tests-beaker/archive/master.zip#/container/p…
[5]: https://github.com/CKI-project/tests-beaker/archive/master.zip#filesystems/…
[6]: https://github.com/CKI-project/tests-beaker/archive/master.zip#/jvm
[7]: https://github.com/CKI-project/tests-beaker/archive/master.zip#misc/amtu
[8]: https://github.com/CKI-project/tests-beaker/archive/master.zip#distribution…
[9]: https://github.com/CKI-project/tests-beaker/archive/master.zip#/networking/…
[10]: https://github.com/CKI-project/tests-beaker/archive/master.zip#/networking/…
[11]: https://github.com/CKI-project/tests-beaker/archive/master.zip#packages/aud…
[12]: https://github.com/CKI-project/tests-beaker/archive/master.zip#packages/htt…
[13]: https://github.com/CKI-project/tests-beaker/archive/master.zip#packages/iot…
[14]: https://github.com/CKI-project/tests-beaker/archive/master.zip#packages/tun…
[15]: https://github.com/CKI-project/tests-beaker/archive/master.zip#standards/us…
[16]: https://github.com/CKI-project/tests-beaker/archive/master.zip#distribution…
[17]: https://github.com/CKI-project/tests-beaker/archive/master.zip#memory/funct…
[18]: https://github.com/CKI-project/tests-beaker/archive/master.zip#pciutils/san…
[19]: https://github.com/CKI-project/tests-beaker/archive/master.zip#storage/scsi…
[20]: https://github.com/CKI-project/tests-beaker/archive/master.zip#stress/stres…
Waived tests
------------
If the test run included waived tests, they are marked with 🚧. Such tests are
executed but their results are not taken into account. Tests are waived when
their results are not reliable enough, e.g. when they're just introduced or are
being fixed.
As soon as we re-enable the various functions within the HW, they may go
off and read data via a GGTT offset. Hence, if we have not yet restored
the GGTT PTE before then, they may read and even *write* random locations
in memory.
Detected by DMAR faults during resume.
Signed-off-by: Chris Wilson <chris(a)chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala(a)linux.intel.com>
Cc: Martin Peres <martin.peres(a)linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen(a)linux.intel.com>
Cc: stable(a)vger.kernel.org
---
drivers/gpu/drm/i915/gem/i915_gem_pm.c | 3 ---
drivers/gpu/drm/i915/i915_drv.c | 5 +++++
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_pm.c b/drivers/gpu/drm/i915/gem/i915_gem_pm.c
index b3993d24b83d..9b1129aaacfe 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_pm.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_pm.c
@@ -242,9 +242,6 @@ void i915_gem_resume(struct drm_i915_private *i915)
mutex_lock(&i915->drm.struct_mutex);
intel_uncore_forcewake_get(&i915->uncore, FORCEWAKE_ALL);
- i915_gem_restore_gtt_mappings(i915);
- i915_gem_restore_fences(i915);
-
if (i915_gem_init_hw(i915))
goto err_wedged;
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 7b2c81a8bbaa..1af4eba968c0 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1877,6 +1877,11 @@ static int i915_drm_resume(struct drm_device *dev)
if (ret)
DRM_ERROR("failed to re-enable GGTT\n");
+ mutex_lock(&dev_priv->drm.struct_mutex);
+ i915_gem_restore_gtt_mappings(dev_priv);
+ i915_gem_restore_fences(dev_priv);
+ mutex_unlock(&dev_priv->drm.struct_mutex);
+
intel_csr_ucode_resume(dev_priv);
i915_restore_state(dev_priv);
--
2.23.0