The three MSR lists(msrs_to_save[], emulated_msrs[] and
msr_based_features[]) are global arrays of kvm.ko, which are
adjusted (copy supported MSRs forward to override the unsupported MSRs)
when insmod kvm-{intel,amd}.ko, but it doesn't reset these three arrays
to their initial value when rmmod kvm-{intel,amd}.ko. Thus, at the next
installation, kvm-{intel,amd}.ko will do operations on the modified
arrays with some MSRs lost and some MSRs duplicated.
So define three constant arrays to hold the initial MSR lists and
initialize msrs_to_save[], emulated_msrs[] and msr_based_features[]
based on the constant arrays.
Cc: stable(a)vger.kernel.org
Reviewed-by: Xiaoyao Li <xiaoyao.li(a)intel.com>
Signed-off-by: Chenyi Qiang <chenyi.qiang(a)intel.com>
---
Changes in v2:
- define initial MSR lists with static const.
- change the dynamic allocation of supported MSR lists to static allocation.
arch/x86/kvm/x86.c | 51 +++++++++++++++++++++++++---------------------
1 file changed, 28 insertions(+), 23 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 89621025577a..0b4b6db5b13f 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -1138,13 +1138,15 @@ EXPORT_SYMBOL_GPL(kvm_rdpmc);
* List of msr numbers which we expose to userspace through KVM_GET_MSRS
* and KVM_SET_MSRS, and KVM_GET_MSR_INDEX_LIST.
*
- * This list is modified at module load time to reflect the
+ * The three MSR lists(msrs_to_save, emulated_msrs, msr_based_features)
+ * extract the supported MSRs from the related const lists.
+ * msrs_to_save is selected from the msrs_to_save_all to reflect the
* capabilities of the host cpu. This capabilities test skips MSRs that are
- * kvm-specific. Those are put in emulated_msrs; filtering of emulated_msrs
+ * kvm-specific. Those are put in emulated_msrs_all; filtering of emulated_msrs
* may depend on host virtualization features rather than host cpu features.
*/
-static u32 msrs_to_save[] = {
+static const u32 msrs_to_save_all[] = {
MSR_IA32_SYSENTER_CS, MSR_IA32_SYSENTER_ESP, MSR_IA32_SYSENTER_EIP,
MSR_STAR,
#ifdef CONFIG_X86_64
@@ -1185,9 +1187,10 @@ static u32 msrs_to_save[] = {
MSR_ARCH_PERFMON_EVENTSEL0 + 16, MSR_ARCH_PERFMON_EVENTSEL0 + 17,
};
+static u32 msrs_to_save[ARRAY_SIZE(msrs_to_save_all)];
static unsigned num_msrs_to_save;
-static u32 emulated_msrs[] = {
+static const u32 emulated_msrs_all[] = {
MSR_KVM_SYSTEM_TIME, MSR_KVM_WALL_CLOCK,
MSR_KVM_SYSTEM_TIME_NEW, MSR_KVM_WALL_CLOCK_NEW,
HV_X64_MSR_GUEST_OS_ID, HV_X64_MSR_HYPERCALL,
@@ -1226,7 +1229,7 @@ static u32 emulated_msrs[] = {
* by arch/x86/kvm/vmx/nested.c based on CPUID or other MSRs.
* We always support the "true" VMX control MSRs, even if the host
* processor does not, so I am putting these registers here rather
- * than in msrs_to_save.
+ * than in msrs_to_save_all.
*/
MSR_IA32_VMX_BASIC,
MSR_IA32_VMX_TRUE_PINBASED_CTLS,
@@ -1245,13 +1248,14 @@ static u32 emulated_msrs[] = {
MSR_KVM_POLL_CONTROL,
};
+static u32 emulated_msrs[ARRAY_SIZE(emulated_msrs_all)];
static unsigned num_emulated_msrs;
/*
* List of msr numbers which are used to expose MSR-based features that
* can be used by a hypervisor to validate requested CPU features.
*/
-static u32 msr_based_features[] = {
+static const u32 msr_based_features_all[] = {
MSR_IA32_VMX_BASIC,
MSR_IA32_VMX_TRUE_PINBASED_CTLS,
MSR_IA32_VMX_PINBASED_CTLS,
@@ -1276,6 +1280,7 @@ static u32 msr_based_features[] = {
MSR_IA32_ARCH_CAPABILITIES,
};
+static u32 msr_based_features[ARRAY_SIZE(msr_based_features_all)];
static unsigned int num_msr_based_features;
static u64 kvm_get_arch_capabilities(void)
@@ -5131,19 +5136,19 @@ static void kvm_init_msr_list(void)
unsigned i, j;
BUILD_BUG_ON_MSG(INTEL_PMC_MAX_FIXED != 4,
- "Please update the fixed PMCs in msrs_to_save[]");
+ "Please update the fixed PMCs in msrs_to_saved_all[]");
perf_get_x86_pmu_capability(&x86_pmu);
- for (i = j = 0; i < ARRAY_SIZE(msrs_to_save); i++) {
- if (rdmsr_safe(msrs_to_save[i], &dummy[0], &dummy[1]) < 0)
+ for (i = j = 0; i < ARRAY_SIZE(msrs_to_save_all); i++) {
+ if (rdmsr_safe(msrs_to_save_all[i], &dummy[0], &dummy[1]) < 0)
continue;
/*
* Even MSRs that are valid in the host may not be exposed
* to the guests in some cases.
*/
- switch (msrs_to_save[i]) {
+ switch (msrs_to_save_all[i]) {
case MSR_IA32_BNDCFGS:
if (!kvm_mpx_supported())
continue;
@@ -5171,17 +5176,17 @@ static void kvm_init_msr_list(void)
break;
case MSR_IA32_RTIT_ADDR0_A ... MSR_IA32_RTIT_ADDR3_B: {
if (!kvm_x86_ops->pt_supported() ||
- msrs_to_save[i] - MSR_IA32_RTIT_ADDR0_A >=
+ msrs_to_save_all[i] - MSR_IA32_RTIT_ADDR0_A >=
intel_pt_validate_hw_cap(PT_CAP_num_address_ranges) * 2)
continue;
break;
case MSR_ARCH_PERFMON_PERFCTR0 ... MSR_ARCH_PERFMON_PERFCTR0 + 17:
- if (msrs_to_save[i] - MSR_ARCH_PERFMON_PERFCTR0 >=
+ if (msrs_to_save_all[i] - MSR_ARCH_PERFMON_PERFCTR0 >=
min(INTEL_PMC_MAX_GENERIC, x86_pmu.num_counters_gp))
continue;
break;
case MSR_ARCH_PERFMON_EVENTSEL0 ... MSR_ARCH_PERFMON_EVENTSEL0 + 17:
- if (msrs_to_save[i] - MSR_ARCH_PERFMON_EVENTSEL0 >=
+ if (msrs_to_save_all[i] - MSR_ARCH_PERFMON_EVENTSEL0 >=
min(INTEL_PMC_MAX_GENERIC, x86_pmu.num_counters_gp))
continue;
}
@@ -5189,31 +5194,31 @@ static void kvm_init_msr_list(void)
break;
}
- if (j < i)
- msrs_to_save[j] = msrs_to_save[i];
+ if (j <= i)
+ msrs_to_save[j] = msrs_to_save_all[i];
j++;
}
num_msrs_to_save = j;
- for (i = j = 0; i < ARRAY_SIZE(emulated_msrs); i++) {
- if (!kvm_x86_ops->has_emulated_msr(emulated_msrs[i]))
+ for (i = j = 0; i < ARRAY_SIZE(emulated_msrs_all); i++) {
+ if (!kvm_x86_ops->has_emulated_msr(emulated_msrs_all[i]))
continue;
- if (j < i)
- emulated_msrs[j] = emulated_msrs[i];
+ if (j <= i)
+ emulated_msrs[j] = emulated_msrs_all[i];
j++;
}
num_emulated_msrs = j;
- for (i = j = 0; i < ARRAY_SIZE(msr_based_features); i++) {
+ for (i = j = 0; i < ARRAY_SIZE(msr_based_features_all); i++) {
struct kvm_msr_entry msr;
- msr.index = msr_based_features[i];
+ msr.index = msr_based_features_all[i];
if (kvm_get_msr_feature(&msr))
continue;
- if (j < i)
- msr_based_features[j] = msr_based_features[i];
+ if (j <= i)
+ msr_based_features[j] = msr_based_features_all[i];
j++;
}
num_msr_based_features = j;
--
2.17.1
This is a note to let you know that I've just added the patch titled
USB: chaoskey: fix error case of a timeout
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-testing branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will be merged to the usb-next branch sometime soon,
after it passes testing, and the merge window is open.
If you have any questions about this process, please let me know.
>From 92aa5986f4f7b5a8bf282ca0f50967f4326559f5 Mon Sep 17 00:00:00 2001
From: Oliver Neukum <oneukum(a)suse.com>
Date: Thu, 7 Nov 2019 15:28:55 +0100
Subject: USB: chaoskey: fix error case of a timeout
In case of a timeout or if a signal aborts a read
communication with the device needs to be ended
lest we overwrite an active URB the next time we
do IO to the device, as the URB may still be active.
Signed-off-by: Oliver Neukum <oneukum(a)suse.de>
Cc: stable <stable(a)vger.kernel.org>
Link: https://lore.kernel.org/r/20191107142856.16774-1-oneukum@suse.com
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/usb/misc/chaoskey.c | 24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/misc/chaoskey.c b/drivers/usb/misc/chaoskey.c
index 34e6cd6f40d3..87067c3d6109 100644
--- a/drivers/usb/misc/chaoskey.c
+++ b/drivers/usb/misc/chaoskey.c
@@ -384,13 +384,17 @@ static int _chaoskey_fill(struct chaoskey *dev)
!dev->reading,
(started ? NAK_TIMEOUT : ALEA_FIRST_TIMEOUT) );
- if (result < 0)
+ if (result < 0) {
+ usb_kill_urb(dev->urb);
goto out;
+ }
- if (result == 0)
+ if (result == 0) {
result = -ETIMEDOUT;
- else
+ usb_kill_urb(dev->urb);
+ } else {
result = dev->valid;
+ }
out:
/* Let the device go back to sleep eventually */
usb_autopm_put_interface(dev->interface);
@@ -526,7 +530,21 @@ static int chaoskey_suspend(struct usb_interface *interface,
static int chaoskey_resume(struct usb_interface *interface)
{
+ struct chaoskey *dev;
+ struct usb_device *udev = interface_to_usbdev(interface);
+
usb_dbg(interface, "resume");
+ dev = usb_get_intfdata(interface);
+
+ /*
+ * We may have lost power.
+ * In that case the device that needs a long time
+ * for the first requests needs an extended timeout
+ * again
+ */
+ if (le16_to_cpu(udev->descriptor.idVendor) == ALEA_VENDOR_ID)
+ dev->reads_started = false;
+
return 0;
}
#else
--
2.24.0
The driver was setting the device remote-wakeup feature during probe in
violation of the USB specification (which says it should only be set
just prior to suspending the device). This could potentially waste
power during suspend as well as lead to spurious wakeups.
Note that USB core would clear the remote-wakeup feature at first
resume.
Fixes: 0f64478cbc7a ("USB: add USB serial mos7720 driver")
Cc: stable <stable(a)vger.kernel.org> # 2.6.19
Signed-off-by: Johan Hovold <johan(a)kernel.org>
---
drivers/usb/serial/mos7720.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c
index 18110225d506..2ec4eeacebc7 100644
--- a/drivers/usb/serial/mos7720.c
+++ b/drivers/usb/serial/mos7720.c
@@ -1833,10 +1833,6 @@ static int mos7720_startup(struct usb_serial *serial)
product = le16_to_cpu(serial->dev->descriptor.idProduct);
dev = serial->dev;
- /* setting configuration feature to one */
- usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
- (__u8)0x03, 0x00, 0x01, 0x00, NULL, 0x00, 5000);
-
if (product == MOSCHIP_DEVICE_ID_7715) {
struct urb *urb = serial->port[0]->interrupt_in_urb;
--
2.23.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: 81584694bb70 - Linux 5.3.10
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/278269
One or more kernel tests failed:
ppc64le:
❌ selinux-policy: serge-testsuite
aarch64:
❌ selinux-policy: serge-testsuite
x86_64:
❌ 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: 81584694bb70 - Linux 5.3.10
We grabbed the 6a1591cf97f1 commit of the stable queue repository.
We then merged the patchset with `git am`:
bonding-fix-state-transition-issue-in-link-monitoring.patch
cdc-ncm-handle-incomplete-transfer-of-mtu.patch
ipv4-fix-table-id-reference-in-fib_sync_down_addr.patch
net-ethernet-octeon_mgmt-account-for-second-possible-vlan-header.patch
net-fix-data-race-in-neigh_event_send.patch
net-qualcomm-rmnet-fix-potential-uaf-when-unregistering.patch
net-tls-fix-sk_msg-trim-on-fallback-to-copy-mode.patch
net-usb-qmi_wwan-add-support-for-dw5821e-with-esim-support.patch
nfc-fdp-fix-incorrect-free-object.patch
nfc-netlink-fix-double-device-reference-drop.patch
nfc-st21nfca-fix-double-free.patch
qede-fix-null-pointer-deref-in-__qede_remove.patch
net-mscc-ocelot-don-t-handle-netdev-events-for-other-netdevs.patch
net-mscc-ocelot-fix-null-pointer-on-lag-slave-removal.patch
net-tls-don-t-pay-attention-to-sk_write_pending-when-pushing-partial-records.patch
net-tls-add-a-tx-lock.patch
selftests-tls-add-test-for-concurrent-recv-and-send.patch
ipv6-fixes-rt6_probe-and-fib6_nh-last_probe-init.patch
net-hns-fix-the-stray-netpoll-locks-causing-deadlock-in-napi-path.patch
net-prevent-load-store-tearing-on-sk-sk_stamp.patch
net-sched-prevent-duplicate-flower-rules-from-tcf_proto-destroy-race.patch
net-smc-fix-ethernet-interface-refcounting.patch
vsock-virtio-fix-sock-refcnt-holding-during-the-shutdown.patch
r8169-fix-page-read-in-r8168g_mdio_read.patch
alsa-timer-fix-incorrectly-assigned-timer-instance.patch
alsa-bebob-fix-to-detect-configured-source-of-sampling-clock-for-focusrite-saffire-pro-i-o-series.patch
alsa-hda-ca0132-fix-possible-workqueue-stall.patch
mm-memcontrol-fix-null-ptr-deref-in-percpu-stats-flush.patch
mm-memcontrol-fix-network-errors-from-failing-__gfp_atomic-charges.patch
mm-meminit-recalculate-pcpu-batch-and-high-limits-after-init-completes.patch
mm-thp-handle-page-cache-thp-correctly-in-pagetranscompoundmap.patch
mm-vmstat-hide-proc-pagetypeinfo-from-normal-users.patch
dump_stack-avoid-the-livelock-of-the-dump_lock.patch
mm-slab-make-page_cgroup_ino-to-recognize-non-compound-slab-pages-properly.patch
btrfs-consider-system-chunk-array-size-for-new-system-chunks.patch
btrfs-tree-checker-fix-wrong-check-on-max-devid.patch
btrfs-save-i_size-to-avoid-double-evaluation-of-i_size_read-in-compress_file_range.patch
tools-gpio-use-building_out_of_srctree-to-determine-srctree.patch
pinctrl-intel-avoid-potential-glitches-if-pin-is-in-gpio-mode.patch
perf-tools-fix-time-sorting.patch
perf-map-use-zalloc-for-map_groups.patch
drm-radeon-fix-si_enable_smc_cac-failed-issue.patch
hid-wacom-generic-treat-serial-number-and-related-fields-as-unsigned.patch
mm-khugepaged-fix-might_sleep-warn-with-config_highpte-y.patch
soundwire-depend-on-acpi.patch
soundwire-depend-on-acpi-of.patch
soundwire-bus-set-initial-value-to-port_status.patch
blkcg-make-blkcg_print_stat-print-stats-only-for-online-blkgs.patch
arm64-do-not-mask-out-pte_rdonly-in-pte_same.patch
asoc-rsnd-dma-fix-ssi9-4-5-6-7-busif-dma-address.patch
ceph-fix-use-after-free-in-__ceph_remove_cap.patch
ceph-fix-rcu-case-handling-in-ceph_d_revalidate.patch
ceph-add-missing-check-in-d_revalidate-snapdir-handling.patch
ceph-don-t-try-to-handle-hashed-dentries-in-non-o_creat-atomic_open.patch
ceph-don-t-allow-copy_file_range-when-stripe_count-1.patch
iio-adc-stm32-adc-fix-stopping-dma.patch
iio-imu-adis16480-make-sure-provided-frequency-is-positive.patch
iio-imu-inv_mpu6050-fix-no-data-on-mpu6050.patch
iio-srf04-fix-wrong-limitation-in-distance-measuring.patch
arm-sunxi-fix-cpu-powerdown-on-a83t.patch
arm-dts-imx6-logicpd-re-enable-snvs-power-key.patch
cpufreq-intel_pstate-fix-invalid-epb-setting.patch
clone3-validate-stack-arguments.patch
netfilter-nf_tables-align-nft_expr-private-data-to-64-bit.patch
netfilter-ipset-fix-an-error-code-in-ip_set_sockfn_get.patch
intel_th-gth-fix-the-window-switching-sequence.patch
intel_th-pci-add-comet-lake-pch-support.patch
intel_th-pci-add-jasper-lake-pch-support.patch
x86-dumpstack-64-don-t-evaluate-exception-stacks-before-setup.patch
x86-apic-32-avoid-bogus-ldr-warnings.patch
smb3-fix-persistent-handles-reconnect.patch
can-usb_8dev-fix-use-after-free-on-disconnect.patch
can-flexcan-disable-completely-the-ecc-mechanism.patch
can-c_can-c_can_poll-only-read-status-register-after-status-irq.patch
can-peak_usb-fix-a-potential-out-of-sync-while-decoding-packets.patch
can-rx-offload-can_rx_offload_queue_sorted-fix-error-handling-avoid-skb-mem-leak.patch
can-gs_usb-gs_can_open-prevent-memory-leak.patch
can-dev-add-missing-of_node_put-after-calling-of_get_child_by_name.patch
can-mcba_usb-fix-use-after-free-on-disconnect.patch
can-peak_usb-fix-slab-info-leak.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:
Host 1:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ Loopdev Sanity
✅ jvm test suite
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ Ethernet drivers sanity
✅ Networking socket: fuzz
✅ Networking route: pmtu
✅ Networking route_func: local
✅ Networking route_func: forward
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
✅ ALSA PCM loopback test
✅ ALSA Control (mixer) Userspace Element test
✅ Usex - version 1.9-29
✅ stress: stress-ng
🚧 ✅ CIFS Connectathon
🚧 ✅ POSIX pjd-fstest suites
Host 2:
✅ Boot test
❌ selinux-policy: serge-testsuite
✅ lvm thinp sanity
✅ storage: software RAID testing
🚧 ✅ Storage blktests
ppc64le:
Host 1:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ Loopdev Sanity
✅ jvm test suite
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ Ethernet drivers sanity
✅ Networking socket: fuzz
✅ Networking route: pmtu
✅ Networking route_func: local
✅ Networking route_func: forward
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
✅ ALSA PCM loopback test
✅ ALSA Control (mixer) Userspace Element test
✅ Usex - version 1.9-29
🚧 ✅ CIFS Connectathon
🚧 ✅ POSIX pjd-fstest suites
Host 2:
✅ Boot test
❌ selinux-policy: serge-testsuite
✅ lvm thinp sanity
✅ storage: software RAID testing
🚧 ✅ Storage blktests
x86_64:
Host 1:
✅ Boot test
❌ selinux-policy: serge-testsuite
✅ lvm thinp sanity
✅ storage: software RAID testing
🚧 ✅ Storage blktests
Host 2:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ Loopdev Sanity
✅ jvm test suite
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ Ethernet drivers sanity
✅ Networking socket: fuzz
✅ Networking route: pmtu
✅ Networking route_func: local
✅ Networking route_func: forward
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
✅ pciutils: sanity smoke test
✅ ALSA PCM loopback test
✅ ALSA Control (mixer) Userspace Element test
✅ Usex - version 1.9-29
✅ stress: stress-ng
🚧 ✅ CIFS Connectathon
🚧 ✅ POSIX pjd-fstest suites
Test sources: https://github.com/CKI-project/tests-beaker
💚 Pull requests are welcome for new tests or improvements to existing tests!
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.
Testing timeout
---------------
We aim to provide a report within reasonable timeframe. Tests that haven't
finished running are marked with ⏱. Reports for non-upstream kernels have
a Beaker recipe linked to next to each host.
We report "frequencies" (actual-frequency, requested-frequency) as the
number of accumulated cycles so that the average frequency over that
period may be determined by the user. This means the units we report to
the user are Mcycles (or just M), not MHz.
Signed-off-by: Chris Wilson <chris(a)chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin(a)intel.com>
Cc: stable(a)vger.kernel.org
---
drivers/gpu/drm/i915/i915_pmu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c
index 4804775644bf..9b02be0ad4e6 100644
--- a/drivers/gpu/drm/i915/i915_pmu.c
+++ b/drivers/gpu/drm/i915/i915_pmu.c
@@ -908,8 +908,8 @@ create_event_attributes(struct i915_pmu *pmu)
const char *name;
const char *unit;
} events[] = {
- __event(I915_PMU_ACTUAL_FREQUENCY, "actual-frequency", "MHz"),
- __event(I915_PMU_REQUESTED_FREQUENCY, "requested-frequency", "MHz"),
+ __event(I915_PMU_ACTUAL_FREQUENCY, "actual-frequency", "M"),
+ __event(I915_PMU_REQUESTED_FREQUENCY, "requested-frequency", "M"),
__event(I915_PMU_INTERRUPTS, "interrupts", NULL),
__event(I915_PMU_RC6_RESIDENCY, "rc6-residency", "ns"),
};
--
2.24.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: 81584694bb70 - Linux 5.3.10
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/278192
One or more kernel tests failed:
ppc64le:
❌ selinux-policy: serge-testsuite
aarch64:
❌ selinux-policy: serge-testsuite
x86_64:
❌ 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: 81584694bb70 - Linux 5.3.10
We grabbed the 94c2a109543a commit of the stable queue repository.
We then merged the patchset with `git am`:
bonding-fix-state-transition-issue-in-link-monitoring.patch
cdc-ncm-handle-incomplete-transfer-of-mtu.patch
ipv4-fix-table-id-reference-in-fib_sync_down_addr.patch
net-ethernet-octeon_mgmt-account-for-second-possible-vlan-header.patch
net-fix-data-race-in-neigh_event_send.patch
net-qualcomm-rmnet-fix-potential-uaf-when-unregistering.patch
net-tls-fix-sk_msg-trim-on-fallback-to-copy-mode.patch
net-usb-qmi_wwan-add-support-for-dw5821e-with-esim-support.patch
nfc-fdp-fix-incorrect-free-object.patch
nfc-netlink-fix-double-device-reference-drop.patch
nfc-st21nfca-fix-double-free.patch
qede-fix-null-pointer-deref-in-__qede_remove.patch
net-mscc-ocelot-don-t-handle-netdev-events-for-other-netdevs.patch
net-mscc-ocelot-fix-null-pointer-on-lag-slave-removal.patch
net-tls-don-t-pay-attention-to-sk_write_pending-when-pushing-partial-records.patch
net-tls-add-a-tx-lock.patch
selftests-tls-add-test-for-concurrent-recv-and-send.patch
ipv6-fixes-rt6_probe-and-fib6_nh-last_probe-init.patch
net-hns-fix-the-stray-netpoll-locks-causing-deadlock-in-napi-path.patch
net-prevent-load-store-tearing-on-sk-sk_stamp.patch
net-sched-prevent-duplicate-flower-rules-from-tcf_proto-destroy-race.patch
net-smc-fix-ethernet-interface-refcounting.patch
vsock-virtio-fix-sock-refcnt-holding-during-the-shutdown.patch
r8169-fix-page-read-in-r8168g_mdio_read.patch
alsa-timer-fix-incorrectly-assigned-timer-instance.patch
alsa-bebob-fix-to-detect-configured-source-of-sampling-clock-for-focusrite-saffire-pro-i-o-series.patch
alsa-hda-ca0132-fix-possible-workqueue-stall.patch
mm-memcontrol-fix-null-ptr-deref-in-percpu-stats-flush.patch
mm-memcontrol-fix-network-errors-from-failing-__gfp_atomic-charges.patch
mm-meminit-recalculate-pcpu-batch-and-high-limits-after-init-completes.patch
mm-thp-handle-page-cache-thp-correctly-in-pagetranscompoundmap.patch
mm-vmstat-hide-proc-pagetypeinfo-from-normal-users.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:
Host 1:
✅ Boot test
❌ selinux-policy: serge-testsuite
Host 2:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ jvm test suite
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ Ethernet drivers sanity
✅ Networking socket: fuzz
✅ Networking route: pmtu
✅ Networking route_func: local
✅ Networking route_func: forward
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
✅ ALSA PCM loopback test
✅ ALSA Control (mixer) Userspace Element test
✅ Usex - version 1.9-29
✅ stress: stress-ng
ppc64le:
Host 1:
✅ Boot test
❌ selinux-policy: serge-testsuite
Host 2:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ jvm test suite
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ Ethernet drivers sanity
✅ Networking socket: fuzz
✅ Networking route: pmtu
✅ Networking route_func: local
✅ Networking route_func: forward
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
✅ ALSA PCM loopback test
✅ ALSA Control (mixer) Userspace Element test
✅ Usex - version 1.9-29
x86_64:
Host 1:
✅ Boot test
❌ selinux-policy: serge-testsuite
Host 2:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ jvm test suite
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ Ethernet drivers sanity
✅ Networking socket: fuzz
✅ Networking route: pmtu
✅ Networking route_func: local
✅ Networking route_func: forward
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
✅ pciutils: sanity smoke test
✅ ALSA PCM loopback test
✅ ALSA Control (mixer) Userspace Element test
✅ Usex - version 1.9-29
✅ stress: stress-ng
Test sources: https://github.com/CKI-project/tests-beaker
💚 Pull requests are welcome for new tests or improvements to existing tests!
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.
Testing timeout
---------------
We aim to provide a report within reasonable timeframe. Tests that haven't
finished running are marked with ⏱. Reports for non-upstream kernels have
a Beaker recipe linked to next to each host.
Commit de53fd7aedb1 ("sched/fair: Fix low cpu usage with high
throttling by removing expiration of cpu-local slices") fixes a major
performance issue for containerized clouds such as Kubernetes.
Commit de53fd7aedb1 Fixes commit : 512ac999d275 ("sched/fair: Fix
bandwidth timer clock drift condition").
This should be applied to all stable kernels that applied commit
512ac999d275, and should probably be applied to all others as well.
The issues introduced by these pathes can be read about on the
Kubernetes github.
https://github.com/kubernetes/kubernetes/issues/67577
It may also be prudent to also apply the not yet accepted patch that
fixes some introduced compiler warnings discussed here.
https://lkml.org/lkml/2019/9/18/925
Thank you,
Dave Chiluk
From: Stefan Agner <stefan(a)agner.ch>
[ Upstream commit b1ec0802503820ccbc894aadfd2a44da20232f5e ]
After finding a reasonable gain, the function converts the configured
gain to a gain configuration option selector enum max9611_csa_gain.
Make the conversion clearly visible by using an explicit cast. This
also avoids a warning seen with clang:
drivers/iio/adc/max9611.c:292:16: warning: implicit conversion from
enumeration type 'enum max9611_conf_ids' to different enumeration
type 'enum max9611_csa_gain' [-Wenum-conversion]
*csa_gain = gain_selectors[i];
~ ^~~~~~~~~~~~~~~~~
Signed-off-by: Stefan Agner <stefan(a)agner.ch>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron(a)huawei.com>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
drivers/iio/adc/max9611.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/adc/max9611.c b/drivers/iio/adc/max9611.c
index 49c1956e6a674..0884435eec68d 100644
--- a/drivers/iio/adc/max9611.c
+++ b/drivers/iio/adc/max9611.c
@@ -289,7 +289,7 @@ static int max9611_read_csa_voltage(struct max9611_dev *max9611,
return ret;
if (*adc_raw > 0) {
- *csa_gain = gain_selectors[i];
+ *csa_gain = (enum max9611_csa_gain)gain_selectors[i];
return 0;
}
}
--
2.20.1
The patch below does not apply to the 4.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 5e269324db5adb2f5f6ec9a93a9c7b0672932b47 Mon Sep 17 00:00:00 2001
From: Joakim Zhang <qiangqing.zhang(a)nxp.com>
Date: Thu, 15 Aug 2019 08:00:26 +0000
Subject: [PATCH] can: flexcan: disable completely the ECC mechanism
The ECC (memory error detection and correction) mechanism can be
activated or not, controlled by the ECCDIS bit in CAN_MECR. When
disabled, updates on indications and reporting registers are stopped.
So if want to disable ECC completely, had better assert ECCDIS bit, not
just mask the related interrupts.
Fixes: cdce844865be ("can: flexcan: add vf610 support for FlexCAN")
Signed-off-by: Joakim Zhang <qiangqing.zhang(a)nxp.com>
Cc: linux-stable <stable(a)vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl(a)pengutronix.de>
diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
index dc5695dffc2e..1cd5179cb876 100644
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -1188,6 +1188,7 @@ static int flexcan_chip_start(struct net_device *dev)
reg_mecr = priv->read(®s->mecr);
reg_mecr &= ~FLEXCAN_MECR_ECRWRDIS;
priv->write(reg_mecr, ®s->mecr);
+ reg_mecr |= FLEXCAN_MECR_ECCDIS;
reg_mecr &= ~(FLEXCAN_MECR_NCEFAFRZ | FLEXCAN_MECR_HANCEI_MSK |
FLEXCAN_MECR_FANCEI_MSK);
priv->write(reg_mecr, ®s->mecr);
The patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 5e269324db5adb2f5f6ec9a93a9c7b0672932b47 Mon Sep 17 00:00:00 2001
From: Joakim Zhang <qiangqing.zhang(a)nxp.com>
Date: Thu, 15 Aug 2019 08:00:26 +0000
Subject: [PATCH] can: flexcan: disable completely the ECC mechanism
The ECC (memory error detection and correction) mechanism can be
activated or not, controlled by the ECCDIS bit in CAN_MECR. When
disabled, updates on indications and reporting registers are stopped.
So if want to disable ECC completely, had better assert ECCDIS bit, not
just mask the related interrupts.
Fixes: cdce844865be ("can: flexcan: add vf610 support for FlexCAN")
Signed-off-by: Joakim Zhang <qiangqing.zhang(a)nxp.com>
Cc: linux-stable <stable(a)vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl(a)pengutronix.de>
diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
index dc5695dffc2e..1cd5179cb876 100644
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -1188,6 +1188,7 @@ static int flexcan_chip_start(struct net_device *dev)
reg_mecr = priv->read(®s->mecr);
reg_mecr &= ~FLEXCAN_MECR_ECRWRDIS;
priv->write(reg_mecr, ®s->mecr);
+ reg_mecr |= FLEXCAN_MECR_ECCDIS;
reg_mecr &= ~(FLEXCAN_MECR_NCEFAFRZ | FLEXCAN_MECR_HANCEI_MSK |
FLEXCAN_MECR_FANCEI_MSK);
priv->write(reg_mecr, ®s->mecr);
The patch below does not apply to the 4.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From fe6f85ca121e9c74e7490fe66b0c5aae38e332c3 Mon Sep 17 00:00:00 2001
From: Jan Beulich <jbeulich(a)suse.com>
Date: Tue, 29 Oct 2019 10:34:19 +0100
Subject: [PATCH] x86/apic/32: Avoid bogus LDR warnings
The removal of the LDR initialization in the bigsmp_32 APIC code unearthed
a problem in setup_local_APIC().
The code checks unconditionally for a mismatch of the logical APIC id by
comparing the early APIC id which was initialized in get_smp_config() with
the actual LDR value in the APIC.
Due to the removal of the bogus LDR initialization the check now can
trigger on bigsmp_32 APIC systems emitting a warning for every booting
CPU. This is of course a false positive because the APIC is not using
logical destination mode.
Restrict the check and the possibly resulting fixup to systems which are
actually using the APIC in logical destination mode.
[ tglx: Massaged changelog and added Cc stable ]
Fixes: bae3a8d3308 ("x86/apic: Do not initialize LDR and DFR for bigsmp")
Signed-off-by: Jan Beulich <jbeulich(a)suse.com>
Signed-off-by: Thomas Gleixner <tglx(a)linutronix.de>
Cc: stable(a)vger.kernel.org
Link: https://lkml.kernel.org/r/666d8f91-b5a8-1afd-7add-821e72a35f03@suse.com
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 9e2dd2b296cd..2b0faf86da1b 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1586,9 +1586,6 @@ static void setup_local_APIC(void)
{
int cpu = smp_processor_id();
unsigned int value;
-#ifdef CONFIG_X86_32
- int logical_apicid, ldr_apicid;
-#endif
if (disable_apic) {
disable_ioapic_support();
@@ -1626,16 +1623,21 @@ static void setup_local_APIC(void)
apic->init_apic_ldr();
#ifdef CONFIG_X86_32
- /*
- * APIC LDR is initialized. If logical_apicid mapping was
- * initialized during get_smp_config(), make sure it matches the
- * actual value.
- */
- logical_apicid = early_per_cpu(x86_cpu_to_logical_apicid, cpu);
- ldr_apicid = GET_APIC_LOGICAL_ID(apic_read(APIC_LDR));
- WARN_ON(logical_apicid != BAD_APICID && logical_apicid != ldr_apicid);
- /* always use the value from LDR */
- early_per_cpu(x86_cpu_to_logical_apicid, cpu) = ldr_apicid;
+ if (apic->dest_logical) {
+ int logical_apicid, ldr_apicid;
+
+ /*
+ * APIC LDR is initialized. If logical_apicid mapping was
+ * initialized during get_smp_config(), make sure it matches
+ * the actual value.
+ */
+ logical_apicid = early_per_cpu(x86_cpu_to_logical_apicid, cpu);
+ ldr_apicid = GET_APIC_LOGICAL_ID(apic_read(APIC_LDR));
+ if (logical_apicid != BAD_APICID)
+ WARN_ON(logical_apicid != ldr_apicid);
+ /* Always use the value from LDR. */
+ early_per_cpu(x86_cpu_to_logical_apicid, cpu) = ldr_apicid;
+ }
#endif
/*
The patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From fe6f85ca121e9c74e7490fe66b0c5aae38e332c3 Mon Sep 17 00:00:00 2001
From: Jan Beulich <jbeulich(a)suse.com>
Date: Tue, 29 Oct 2019 10:34:19 +0100
Subject: [PATCH] x86/apic/32: Avoid bogus LDR warnings
The removal of the LDR initialization in the bigsmp_32 APIC code unearthed
a problem in setup_local_APIC().
The code checks unconditionally for a mismatch of the logical APIC id by
comparing the early APIC id which was initialized in get_smp_config() with
the actual LDR value in the APIC.
Due to the removal of the bogus LDR initialization the check now can
trigger on bigsmp_32 APIC systems emitting a warning for every booting
CPU. This is of course a false positive because the APIC is not using
logical destination mode.
Restrict the check and the possibly resulting fixup to systems which are
actually using the APIC in logical destination mode.
[ tglx: Massaged changelog and added Cc stable ]
Fixes: bae3a8d3308 ("x86/apic: Do not initialize LDR and DFR for bigsmp")
Signed-off-by: Jan Beulich <jbeulich(a)suse.com>
Signed-off-by: Thomas Gleixner <tglx(a)linutronix.de>
Cc: stable(a)vger.kernel.org
Link: https://lkml.kernel.org/r/666d8f91-b5a8-1afd-7add-821e72a35f03@suse.com
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 9e2dd2b296cd..2b0faf86da1b 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1586,9 +1586,6 @@ static void setup_local_APIC(void)
{
int cpu = smp_processor_id();
unsigned int value;
-#ifdef CONFIG_X86_32
- int logical_apicid, ldr_apicid;
-#endif
if (disable_apic) {
disable_ioapic_support();
@@ -1626,16 +1623,21 @@ static void setup_local_APIC(void)
apic->init_apic_ldr();
#ifdef CONFIG_X86_32
- /*
- * APIC LDR is initialized. If logical_apicid mapping was
- * initialized during get_smp_config(), make sure it matches the
- * actual value.
- */
- logical_apicid = early_per_cpu(x86_cpu_to_logical_apicid, cpu);
- ldr_apicid = GET_APIC_LOGICAL_ID(apic_read(APIC_LDR));
- WARN_ON(logical_apicid != BAD_APICID && logical_apicid != ldr_apicid);
- /* always use the value from LDR */
- early_per_cpu(x86_cpu_to_logical_apicid, cpu) = ldr_apicid;
+ if (apic->dest_logical) {
+ int logical_apicid, ldr_apicid;
+
+ /*
+ * APIC LDR is initialized. If logical_apicid mapping was
+ * initialized during get_smp_config(), make sure it matches
+ * the actual value.
+ */
+ logical_apicid = early_per_cpu(x86_cpu_to_logical_apicid, cpu);
+ ldr_apicid = GET_APIC_LOGICAL_ID(apic_read(APIC_LDR));
+ if (logical_apicid != BAD_APICID)
+ WARN_ON(logical_apicid != ldr_apicid);
+ /* Always use the value from LDR. */
+ early_per_cpu(x86_cpu_to_logical_apicid, cpu) = ldr_apicid;
+ }
#endif
/*
The patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 63bdef6cd6941917c823b9cc9aa0219d19fcb716 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede(a)redhat.com>
Date: Fri, 18 Oct 2019 11:08:42 +0200
Subject: [PATCH] pinctrl: cherryview: Fix irq_valid_mask calculation
Commit 03c4749dd6c7 ("gpio / ACPI: Drop unnecessary ACPI GPIO to Linux
GPIO translation") has made the cherryview gpio numbers sparse, to get
a 1:1 mapping between ACPI pin numbers and gpio numbers in Linux.
This has greatly simplified things, but the code setting the
irq_valid_mask was not updated for this, so the valid mask is still in
the old "compressed" numbering with the gaps in the pin numbers skipped,
which is wrong as irq_valid_mask needs to be expressed in gpio numbers.
This results in the following error on devices using pin 24 (0x0018) on
the north GPIO controller as an ACPI event source:
[ 0.422452] cherryview-pinctrl INT33FF:01: Failed to translate GPIO to IRQ
This has been reported (by email) to be happening on a Caterpillar CAT T20
tablet and I've reproduced this myself on a Medion Akoya e2215t 2-in-1.
This commit uses the pin number instead of the compressed index into
community->pins to clear the correct bits in irq_valid_mask for GPIOs
using GPEs for interrupts, fixing these errors and in case of the
Medion Akoya e2215t also fixing the LID switch not working.
Cc: stable(a)vger.kernel.org
Fixes: 03c4749dd6c7 ("gpio / ACPI: Drop unnecessary ACPI GPIO to Linux GPIO translation")
Signed-off-by: Hans de Goede <hdegoede(a)redhat.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko(a)linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg(a)linux.intel.com>
diff --git a/drivers/pinctrl/intel/pinctrl-cherryview.c b/drivers/pinctrl/intel/pinctrl-cherryview.c
index c6251eac8946..c31266e70559 100644
--- a/drivers/pinctrl/intel/pinctrl-cherryview.c
+++ b/drivers/pinctrl/intel/pinctrl-cherryview.c
@@ -1559,7 +1559,7 @@ static void chv_init_irq_valid_mask(struct gpio_chip *chip,
intsel >>= CHV_PADCTRL0_INTSEL_SHIFT;
if (intsel >= community->nirqs)
- clear_bit(i, valid_mask);
+ clear_bit(desc->number, valid_mask);
}
}
The patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 29c2c6aa32405dfee4a29911a51ba133edcedb0f Mon Sep 17 00:00:00 2001
From: Andy Shevchenko <andriy.shevchenko(a)linux.intel.com>
Date: Mon, 14 Oct 2019 12:51:04 +0300
Subject: [PATCH] pinctrl: intel: Avoid potential glitches if pin is in GPIO
mode
When consumer requests a pin, in order to be on the safest side,
we switch it first to GPIO mode followed by immediate transition
to the input state. Due to posted writes it's luckily to be a single
I/O transaction.
However, if firmware or boot loader already configures the pin
to the GPIO mode, user expects no glitches for the requested pin.
We may check if the pin is pre-configured and leave it as is
till the actual consumer toggles its state to avoid glitches.
Fixes: 7981c0015af2 ("pinctrl: intel: Add Intel Sunrisepoint pin controller and GPIO support")
Depends-on: f5a26acf0162 ("pinctrl: intel: Initialize GPIO properly when used through irqchip")
Cc: stable(a)vger.kernel.org
Cc: fei.yang(a)intel.com
Reported-by: Oliver Barta <oliver.barta(a)aptiv.com>
Reported-by: Malin Jonsson <malin.jonsson(a)ericsson.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko(a)linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg(a)linux.intel.com>
diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c
index bc013599a9a3..83981ad66a71 100644
--- a/drivers/pinctrl/intel/pinctrl-intel.c
+++ b/drivers/pinctrl/intel/pinctrl-intel.c
@@ -52,6 +52,7 @@
#define PADCFG0_GPIROUTNMI BIT(17)
#define PADCFG0_PMODE_SHIFT 10
#define PADCFG0_PMODE_MASK GENMASK(13, 10)
+#define PADCFG0_PMODE_GPIO 0
#define PADCFG0_GPIORXDIS BIT(9)
#define PADCFG0_GPIOTXDIS BIT(8)
#define PADCFG0_GPIORXSTATE BIT(1)
@@ -332,7 +333,7 @@ static void intel_pin_dbg_show(struct pinctrl_dev *pctldev, struct seq_file *s,
cfg1 = readl(intel_get_padcfg(pctrl, pin, PADCFG1));
mode = (cfg0 & PADCFG0_PMODE_MASK) >> PADCFG0_PMODE_SHIFT;
- if (!mode)
+ if (mode == PADCFG0_PMODE_GPIO)
seq_puts(s, "GPIO ");
else
seq_printf(s, "mode %d ", mode);
@@ -458,6 +459,11 @@ static void __intel_gpio_set_direction(void __iomem *padcfg0, bool input)
writel(value, padcfg0);
}
+static int intel_gpio_get_gpio_mode(void __iomem *padcfg0)
+{
+ return (readl(padcfg0) & PADCFG0_PMODE_MASK) >> PADCFG0_PMODE_SHIFT;
+}
+
static void intel_gpio_set_gpio_mode(void __iomem *padcfg0)
{
u32 value;
@@ -491,7 +497,20 @@ static int intel_gpio_request_enable(struct pinctrl_dev *pctldev,
}
padcfg0 = intel_get_padcfg(pctrl, pin, PADCFG0);
+
+ /*
+ * If pin is already configured in GPIO mode, we assume that
+ * firmware provides correct settings. In such case we avoid
+ * potential glitches on the pin. Otherwise, for the pin in
+ * alternative mode, consumer has to supply respective flags.
+ */
+ if (intel_gpio_get_gpio_mode(padcfg0) == PADCFG0_PMODE_GPIO) {
+ raw_spin_unlock_irqrestore(&pctrl->lock, flags);
+ return 0;
+ }
+
intel_gpio_set_gpio_mode(padcfg0);
+
/* Disable TX buffer and enable RX (this will be input) */
__intel_gpio_set_direction(padcfg0, true);
The patch below does not apply to the 4.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 29c2c6aa32405dfee4a29911a51ba133edcedb0f Mon Sep 17 00:00:00 2001
From: Andy Shevchenko <andriy.shevchenko(a)linux.intel.com>
Date: Mon, 14 Oct 2019 12:51:04 +0300
Subject: [PATCH] pinctrl: intel: Avoid potential glitches if pin is in GPIO
mode
When consumer requests a pin, in order to be on the safest side,
we switch it first to GPIO mode followed by immediate transition
to the input state. Due to posted writes it's luckily to be a single
I/O transaction.
However, if firmware or boot loader already configures the pin
to the GPIO mode, user expects no glitches for the requested pin.
We may check if the pin is pre-configured and leave it as is
till the actual consumer toggles its state to avoid glitches.
Fixes: 7981c0015af2 ("pinctrl: intel: Add Intel Sunrisepoint pin controller and GPIO support")
Depends-on: f5a26acf0162 ("pinctrl: intel: Initialize GPIO properly when used through irqchip")
Cc: stable(a)vger.kernel.org
Cc: fei.yang(a)intel.com
Reported-by: Oliver Barta <oliver.barta(a)aptiv.com>
Reported-by: Malin Jonsson <malin.jonsson(a)ericsson.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko(a)linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg(a)linux.intel.com>
diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c
index bc013599a9a3..83981ad66a71 100644
--- a/drivers/pinctrl/intel/pinctrl-intel.c
+++ b/drivers/pinctrl/intel/pinctrl-intel.c
@@ -52,6 +52,7 @@
#define PADCFG0_GPIROUTNMI BIT(17)
#define PADCFG0_PMODE_SHIFT 10
#define PADCFG0_PMODE_MASK GENMASK(13, 10)
+#define PADCFG0_PMODE_GPIO 0
#define PADCFG0_GPIORXDIS BIT(9)
#define PADCFG0_GPIOTXDIS BIT(8)
#define PADCFG0_GPIORXSTATE BIT(1)
@@ -332,7 +333,7 @@ static void intel_pin_dbg_show(struct pinctrl_dev *pctldev, struct seq_file *s,
cfg1 = readl(intel_get_padcfg(pctrl, pin, PADCFG1));
mode = (cfg0 & PADCFG0_PMODE_MASK) >> PADCFG0_PMODE_SHIFT;
- if (!mode)
+ if (mode == PADCFG0_PMODE_GPIO)
seq_puts(s, "GPIO ");
else
seq_printf(s, "mode %d ", mode);
@@ -458,6 +459,11 @@ static void __intel_gpio_set_direction(void __iomem *padcfg0, bool input)
writel(value, padcfg0);
}
+static int intel_gpio_get_gpio_mode(void __iomem *padcfg0)
+{
+ return (readl(padcfg0) & PADCFG0_PMODE_MASK) >> PADCFG0_PMODE_SHIFT;
+}
+
static void intel_gpio_set_gpio_mode(void __iomem *padcfg0)
{
u32 value;
@@ -491,7 +497,20 @@ static int intel_gpio_request_enable(struct pinctrl_dev *pctldev,
}
padcfg0 = intel_get_padcfg(pctrl, pin, PADCFG0);
+
+ /*
+ * If pin is already configured in GPIO mode, we assume that
+ * firmware provides correct settings. In such case we avoid
+ * potential glitches on the pin. Otherwise, for the pin in
+ * alternative mode, consumer has to supply respective flags.
+ */
+ if (intel_gpio_get_gpio_mode(padcfg0) == PADCFG0_PMODE_GPIO) {
+ raw_spin_unlock_irqrestore(&pctrl->lock, flags);
+ return 0;
+ }
+
intel_gpio_set_gpio_mode(padcfg0);
+
/* Disable TX buffer and enable RX (this will be input) */
__intel_gpio_set_direction(padcfg0, true);
The patch below does not apply to the 4.14-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 29c2c6aa32405dfee4a29911a51ba133edcedb0f Mon Sep 17 00:00:00 2001
From: Andy Shevchenko <andriy.shevchenko(a)linux.intel.com>
Date: Mon, 14 Oct 2019 12:51:04 +0300
Subject: [PATCH] pinctrl: intel: Avoid potential glitches if pin is in GPIO
mode
When consumer requests a pin, in order to be on the safest side,
we switch it first to GPIO mode followed by immediate transition
to the input state. Due to posted writes it's luckily to be a single
I/O transaction.
However, if firmware or boot loader already configures the pin
to the GPIO mode, user expects no glitches for the requested pin.
We may check if the pin is pre-configured and leave it as is
till the actual consumer toggles its state to avoid glitches.
Fixes: 7981c0015af2 ("pinctrl: intel: Add Intel Sunrisepoint pin controller and GPIO support")
Depends-on: f5a26acf0162 ("pinctrl: intel: Initialize GPIO properly when used through irqchip")
Cc: stable(a)vger.kernel.org
Cc: fei.yang(a)intel.com
Reported-by: Oliver Barta <oliver.barta(a)aptiv.com>
Reported-by: Malin Jonsson <malin.jonsson(a)ericsson.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko(a)linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg(a)linux.intel.com>
diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c
index bc013599a9a3..83981ad66a71 100644
--- a/drivers/pinctrl/intel/pinctrl-intel.c
+++ b/drivers/pinctrl/intel/pinctrl-intel.c
@@ -52,6 +52,7 @@
#define PADCFG0_GPIROUTNMI BIT(17)
#define PADCFG0_PMODE_SHIFT 10
#define PADCFG0_PMODE_MASK GENMASK(13, 10)
+#define PADCFG0_PMODE_GPIO 0
#define PADCFG0_GPIORXDIS BIT(9)
#define PADCFG0_GPIOTXDIS BIT(8)
#define PADCFG0_GPIORXSTATE BIT(1)
@@ -332,7 +333,7 @@ static void intel_pin_dbg_show(struct pinctrl_dev *pctldev, struct seq_file *s,
cfg1 = readl(intel_get_padcfg(pctrl, pin, PADCFG1));
mode = (cfg0 & PADCFG0_PMODE_MASK) >> PADCFG0_PMODE_SHIFT;
- if (!mode)
+ if (mode == PADCFG0_PMODE_GPIO)
seq_puts(s, "GPIO ");
else
seq_printf(s, "mode %d ", mode);
@@ -458,6 +459,11 @@ static void __intel_gpio_set_direction(void __iomem *padcfg0, bool input)
writel(value, padcfg0);
}
+static int intel_gpio_get_gpio_mode(void __iomem *padcfg0)
+{
+ return (readl(padcfg0) & PADCFG0_PMODE_MASK) >> PADCFG0_PMODE_SHIFT;
+}
+
static void intel_gpio_set_gpio_mode(void __iomem *padcfg0)
{
u32 value;
@@ -491,7 +497,20 @@ static int intel_gpio_request_enable(struct pinctrl_dev *pctldev,
}
padcfg0 = intel_get_padcfg(pctrl, pin, PADCFG0);
+
+ /*
+ * If pin is already configured in GPIO mode, we assume that
+ * firmware provides correct settings. In such case we avoid
+ * potential glitches on the pin. Otherwise, for the pin in
+ * alternative mode, consumer has to supply respective flags.
+ */
+ if (intel_gpio_get_gpio_mode(padcfg0) == PADCFG0_PMODE_GPIO) {
+ raw_spin_unlock_irqrestore(&pctrl->lock, flags);
+ return 0;
+ }
+
intel_gpio_set_gpio_mode(padcfg0);
+
/* Disable TX buffer and enable RX (this will be input) */
__intel_gpio_set_direction(padcfg0, true);
set_page_dirty says:
For pages with a mapping this should be done under the page lock
for the benefit of asynchronous memory errors who prefer a
consistent dirty state. This rule can be broken in some special
cases, but should be better not to.
Under those rules, it is only safe for us to use the plain set_page_dirty
calls for shmemfs/anonymous memory. Userptr may be used with real
mappings and so needs to use the locked version (set_page_dirty_lock).
However, following a try_to_unmap() we may want to remove the userptr and
so call put_pages(). However, try_to_unmap() acquires the page lock and
so we must avoid recursively locking the pages ourselves -- which means
that we cannot safely acquire the lock around set_page_dirty(). Since we
can't be sure of the lock, we have to risk skip dirtying the page, or
else risk calling set_page_dirty() without a lock and so risk fs
corruption.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=203317
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112012
Fixes: 5cc9ed4b9a7a ("drm/i915: Introduce mapping of user pages into video m
References: cb6d7c7dc7ff ("drm/i915/userptr: Acquire the page lock around set_page_dirty()")
References: 505a8ec7e11a ("Revert "drm/i915/userptr: Acquire the page lock around set_page_dirty()"")
References: 6dcc693bc57f ("ext4: warn when page is dirtied without buffers")
Signed-off-by: Chris Wilson <chris(a)chris-wilson.co.uk>
Cc: Lionel Landwerlin <lionel.g.landwerlin(a)intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin(a)intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen(a)linux.intel.com>
Cc: stable(a)vger.kernel.org
---
drivers/gpu/drm/i915/gem/i915_gem_userptr.c | 22 ++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_userptr.c b/drivers/gpu/drm/i915/gem/i915_gem_userptr.c
index 5e87126def2f..54ebc7ab71bc 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_userptr.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_userptr.c
@@ -651,8 +651,28 @@ i915_gem_userptr_put_pages(struct drm_i915_gem_object *obj,
obj->mm.dirty = false;
for_each_sgt_page(page, sgt_iter, pages) {
- if (obj->mm.dirty)
+ if (obj->mm.dirty && trylock_page(page)) {
+ /*
+ * As this may not be anonymous memory (e.g. shmem)
+ * but exist on a real mapping, we have to lock
+ * the page in order to dirty it -- holding
+ * the page reference is not sufficient to
+ * prevent the inode from being truncated.
+ * Play safe and take the lock.
+ *
+ * However...!
+ *
+ * The mmu-notifier can be invalidated for a
+ * migrate_page, that is alreadying holding the lock
+ * on the page. Such a try_to_unmap() will result
+ * in us calling put_pages() and so recursively try
+ * to lock the page. We avoid that deadlock with
+ * a trylock_page() and in exchange we risk missing
+ * some page dirtying.
+ */
set_page_dirty(page);
+ unlock_page(page);
+ }
mark_page_accessed(page);
put_page(page);
--
2.24.0
We report "frequencies" (actual-frequency, requested-frequency) as the
number of accumulated cycles so that the average frequency over that
period may be determined by the user. This means the units we report to
the user are Mcycles (or just M), not MHz.
Signed-off-by: Chris Wilson <chris(a)chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin(a)intel.com>
Cc: stable(a)vger.kernel.org
---
drivers/gpu/drm/i915/i915_pmu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c
index 4804775644bf..9b02be0ad4e6 100644
--- a/drivers/gpu/drm/i915/i915_pmu.c
+++ b/drivers/gpu/drm/i915/i915_pmu.c
@@ -908,8 +908,8 @@ create_event_attributes(struct i915_pmu *pmu)
const char *name;
const char *unit;
} events[] = {
- __event(I915_PMU_ACTUAL_FREQUENCY, "actual-frequency", "MHz"),
- __event(I915_PMU_REQUESTED_FREQUENCY, "requested-frequency", "MHz"),
+ __event(I915_PMU_ACTUAL_FREQUENCY, "actual-frequency", "M"),
+ __event(I915_PMU_REQUESTED_FREQUENCY, "requested-frequency", "M"),
__event(I915_PMU_INTERRUPTS, "interrupts", NULL),
__event(I915_PMU_RC6_RESIDENCY, "rc6-residency", "ns"),
};
--
2.24.0
Hello,
We ran automated tests on a recent commit from this kernel tree:
Kernel repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
Commit: b260a0862e3a - Linux 5.3.10
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/276570
One or more kernel tests failed:
ppc64le:
❌ selinux-policy: serge-testsuite
aarch64:
❌ selinux-policy: serge-testsuite
x86_64:
❌ 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
`-'
______________________________________________________________________________
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:
Host 1:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ Loopdev Sanity
✅ jvm test suite
✅ Memory function: memfd_create
✅ Memory function: kaslr
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ Networking bridge: sanity
✅ Ethernet drivers sanity
✅ Networking MACsec: sanity
✅ Networking socket: fuzz
✅ Networking sctp-auth: sockopts test
✅ Networking: igmp conformance test
✅ Networking route: pmtu
✅ Networking route_func: local
✅ Networking route_func: forward
✅ Networking TCP: keepalive test
✅ Networking UDP: socket
✅ Networking tunnel: geneve basic test
✅ Networking tunnel: gre basic
✅ L2TP basic test
✅ Networking tunnel: vxlan basic
✅ Networking ipsec: basic netns transport
✅ Networking ipsec: basic netns tunnel
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
✅ ALSA PCM loopback test
✅ ALSA Control (mixer) Userspace Element test
✅ Usex - version 1.9-29
✅ storage: SCSI VPD
✅ stress: stress-ng
✅ trace: ftrace/tracer
🚧 ✅ CIFS Connectathon
🚧 ✅ POSIX pjd-fstest suites
🚧 ✅ Networking vnic: ipvlan/basic
🚧 ✅ storage: dm/common
Host 2:
✅ Boot test
✅ xfstests: ext4
✅ xfstests: xfs
❌ selinux-policy: serge-testsuite
✅ lvm thinp sanity
✅ storage: software RAID testing
🚧 ✅ Storage blktests
ppc64le:
Host 1:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ Loopdev Sanity
✅ jvm test suite
✅ Memory function: memfd_create
✅ Memory function: kaslr
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ Networking bridge: sanity
✅ Ethernet drivers sanity
✅ Networking MACsec: sanity
✅ Networking socket: fuzz
✅ Networking sctp-auth: sockopts test
✅ Networking route: pmtu
✅ Networking route_func: local
✅ Networking route_func: forward
✅ Networking TCP: keepalive test
✅ Networking UDP: socket
✅ Networking tunnel: geneve basic test
✅ Networking tunnel: gre basic
✅ L2TP basic test
✅ Networking tunnel: vxlan basic
✅ Networking ipsec: basic netns tunnel
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
✅ ALSA PCM loopback test
✅ ALSA Control (mixer) Userspace Element test
✅ Usex - version 1.9-29
✅ trace: ftrace/tracer
🚧 ✅ CIFS Connectathon
🚧 ✅ POSIX pjd-fstest suites
🚧 ✅ Networking vnic: ipvlan/basic
🚧 ✅ storage: dm/common
Host 2:
✅ Boot test
✅ xfstests: ext4
✅ xfstests: xfs
❌ selinux-policy: serge-testsuite
✅ lvm thinp sanity
✅ storage: software RAID testing
🚧 ❌ Storage blktests
x86_64:
Host 1:
✅ Boot test
🚧 ✅ IPMI driver test
🚧 ✅ IPMItool loop stress test
Host 2:
✅ Boot test
✅ xfstests: ext4
✅ xfstests: xfs
❌ selinux-policy: serge-testsuite
✅ lvm thinp sanity
✅ storage: software RAID testing
🚧 ✅ IOMMU boot test
🚧 ✅ Storage blktests
Host 3:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ Loopdev Sanity
✅ jvm test suite
✅ Memory function: memfd_create
✅ Memory function: kaslr
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ Networking bridge: sanity
✅ Ethernet drivers sanity
✅ Networking MACsec: sanity
✅ Networking socket: fuzz
✅ Networking sctp-auth: sockopts test
✅ Networking: igmp conformance test
✅ Networking route: pmtu
✅ Networking route_func: local
✅ Networking route_func: forward
✅ Networking TCP: keepalive test
✅ Networking UDP: socket
✅ Networking tunnel: geneve basic test
✅ Networking tunnel: gre basic
✅ L2TP basic test
✅ Networking tunnel: vxlan basic
✅ Networking ipsec: basic netns transport
✅ Networking ipsec: basic netns tunnel
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
✅ pciutils: sanity smoke test
✅ ALSA PCM loopback test
✅ ALSA Control (mixer) Userspace Element test
✅ Usex - version 1.9-29
✅ storage: SCSI VPD
✅ stress: stress-ng
✅ trace: ftrace/tracer
🚧 ✅ CIFS Connectathon
🚧 ✅ POSIX pjd-fstest suites
🚧 ✅ Networking vnic: ipvlan/basic
🚧 ✅ storage: dm/common
Test sources: https://github.com/CKI-project/tests-beaker
💚 Pull requests are welcome for new tests or improvements to existing tests!
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.
Testing timeout
---------------
We aim to provide a report within reasonable timeframe. Tests that haven't
finished running are marked with ⏱. Reports for non-upstream kernels have
a Beaker recipe linked to next to each host.
This is an automatic generated email to let you know that the following patch were queued:
Subject: media: hantro: Fix s_fmt for dynamic resolution changes
Author: Ezequiel Garcia <ezequiel(a)collabora.com>
Date: Mon Oct 7 19:45:02 2019 +0200
Commit 953aaa1492c53 ("media: rockchip/vpu: Prepare things to support decoders")
changed the conditions under S_FMT was allowed for OUTPUT
CAPTURE buffers.
However, and according to the mem-to-mem stateless decoder specification,
in order to support dynamic resolution changes, S_FMT should be allowed
even if OUTPUT buffers have been allocated.
Relax decoder S_FMT restrictions on OUTPUT buffers, allowing a
resolution modification, provided the pixel format stays the same.
Tested on RK3288 platforms using ChromiumOS Video Decode/Encode
Accelerator Unittests.
[hverkuil: fix typo: In other -> In order]
Fixes: 953aaa1492c53 ("media: rockchip/vpu: Prepare things to support decoders")
Signed-off-by: Ezequiel Garcia <ezequiel(a)collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon(a)collabora.com>
Cc: <stable(a)vger.kernel.org> # for v5.4 and up
Signed-off-by: Hans Verkuil <hverkuil-cisco(a)xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab(a)kernel.org>
drivers/staging/media/hantro/hantro_v4l2.c | 28 +++++++++++++++++++---------
1 file changed, 19 insertions(+), 9 deletions(-)
---
diff --git a/drivers/staging/media/hantro/hantro_v4l2.c b/drivers/staging/media/hantro/hantro_v4l2.c
index 3dae52abb96c..fcf95c1d39ca 100644
--- a/drivers/staging/media/hantro/hantro_v4l2.c
+++ b/drivers/staging/media/hantro/hantro_v4l2.c
@@ -367,20 +367,27 @@ vidioc_s_fmt_out_mplane(struct file *file, void *priv, struct v4l2_format *f)
{
struct v4l2_pix_format_mplane *pix_mp = &f->fmt.pix_mp;
struct hantro_ctx *ctx = fh_to_ctx(priv);
+ struct vb2_queue *vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, f->type);
const struct hantro_fmt *formats;
unsigned int num_fmts;
- struct vb2_queue *vq;
int ret;
- /* Change not allowed if queue is busy. */
- vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, f->type);
- if (vb2_is_busy(vq))
- return -EBUSY;
+ ret = vidioc_try_fmt_out_mplane(file, priv, f);
+ if (ret)
+ return ret;
if (!hantro_is_encoder_ctx(ctx)) {
struct vb2_queue *peer_vq;
/*
+ * In order to support dynamic resolution change,
+ * the decoder admits a resolution change, as long
+ * as the pixelformat remains. Can't be done if streaming.
+ */
+ if (vb2_is_streaming(vq) || (vb2_is_busy(vq) &&
+ pix_mp->pixelformat != ctx->src_fmt.pixelformat))
+ return -EBUSY;
+ /*
* Since format change on the OUTPUT queue will reset
* the CAPTURE queue, we can't allow doing so
* when the CAPTURE queue has buffers allocated.
@@ -389,12 +396,15 @@ vidioc_s_fmt_out_mplane(struct file *file, void *priv, struct v4l2_format *f)
V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE);
if (vb2_is_busy(peer_vq))
return -EBUSY;
+ } else {
+ /*
+ * The encoder doesn't admit a format change if
+ * there are OUTPUT buffers allocated.
+ */
+ if (vb2_is_busy(vq))
+ return -EBUSY;
}
- ret = vidioc_try_fmt_out_mplane(file, priv, f);
- if (ret)
- return ret;
-
formats = hantro_get_formats(ctx, &num_fmts);
ctx->vpu_src_fmt = hantro_find_format(formats, num_fmts,
pix_mp->pixelformat);
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: 81584694bb70 - Linux 5.3.10
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/276577
One or more kernel tests failed:
ppc64le:
❌ selinux-policy: serge-testsuite
aarch64:
❌ selinux-policy: serge-testsuite
x86_64:
❌ 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: 81584694bb70 - Linux 5.3.10
We grabbed the 0fcd7407bd4c commit of the stable queue repository.
We then merged the patchset with `git am`:
bonding-fix-state-transition-issue-in-link-monitoring.patch
cdc-ncm-handle-incomplete-transfer-of-mtu.patch
ipv4-fix-table-id-reference-in-fib_sync_down_addr.patch
net-ethernet-octeon_mgmt-account-for-second-possible-vlan-header.patch
net-fix-data-race-in-neigh_event_send.patch
net-qualcomm-rmnet-fix-potential-uaf-when-unregistering.patch
net-tls-fix-sk_msg-trim-on-fallback-to-copy-mode.patch
net-usb-qmi_wwan-add-support-for-dw5821e-with-esim-support.patch
nfc-fdp-fix-incorrect-free-object.patch
nfc-netlink-fix-double-device-reference-drop.patch
nfc-st21nfca-fix-double-free.patch
qede-fix-null-pointer-deref-in-__qede_remove.patch
net-mscc-ocelot-don-t-handle-netdev-events-for-other-netdevs.patch
net-mscc-ocelot-fix-null-pointer-on-lag-slave-removal.patch
net-tls-don-t-pay-attention-to-sk_write_pending-when-pushing-partial-records.patch
net-tls-add-a-tx-lock.patch
selftests-tls-add-test-for-concurrent-recv-and-send.patch
ipv6-fixes-rt6_probe-and-fib6_nh-last_probe-init.patch
net-hns-fix-the-stray-netpoll-locks-causing-deadlock-in-napi-path.patch
net-prevent-load-store-tearing-on-sk-sk_stamp.patch
net-sched-prevent-duplicate-flower-rules-from-tcf_proto-destroy-race.patch
net-smc-fix-ethernet-interface-refcounting.patch
vsock-virtio-fix-sock-refcnt-holding-during-the-shutdown.patch
r8169-fix-page-read-in-r8168g_mdio_read.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:
Host 1:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ jvm test suite
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ Ethernet drivers sanity
✅ Networking socket: fuzz
✅ Networking route: pmtu
✅ Networking route_func: local
✅ Networking route_func: forward
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
✅ stress: stress-ng
Host 2:
✅ Boot test
❌ selinux-policy: serge-testsuite
ppc64le:
Host 1:
✅ Boot test
❌ selinux-policy: serge-testsuite
Host 2:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ jvm test suite
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ Ethernet drivers sanity
✅ Networking socket: fuzz
✅ Networking route: pmtu
✅ Networking route_func: local
✅ Networking route_func: forward
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
x86_64:
Host 1:
✅ Boot test
❌ selinux-policy: serge-testsuite
Host 2:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ jvm test suite
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ Ethernet drivers sanity
✅ Networking socket: fuzz
✅ Networking route: pmtu
✅ Networking route_func: local
✅ Networking route_func: forward
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
✅ pciutils: sanity smoke test
✅ stress: stress-ng
Test sources: https://github.com/CKI-project/tests-beaker
💚 Pull requests are welcome for new tests or improvements to existing tests!
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.
Testing timeout
---------------
We aim to provide a report within reasonable timeframe. Tests that haven't
finished running are marked with ⏱. Reports for non-upstream kernels have
a Beaker recipe linked to next to each host.
From: Julian Wiedmann <jwi(a)linux.ibm.com>
[ Upstream commit 4d19db777a2f32c9b76f6fd517ed8960576cb43e ]
Calling napi_schedule() from process context does not ensure that the
NET_RX softirq is run in a timely fashion. So trigger it manually.
This is no big issue with current code. A call to ndo_open() is usually
followed by a ndo_set_rx_mode() call, and for qeth this contains a
spin_unlock_bh(). Except for OSN, where qeth_l2_set_rx_mode() bails out
early.
Nevertheless it's best to not depend on this behaviour, and just fix
the issue at its source like all other drivers do. For instance see
commit 83a0c6e58901 ("i40e: Invoke softirqs after napi_reschedule").
Fixes: a1c3ed4c9ca0 ("qeth: NAPI support for l2 and l3 discipline")
Signed-off-by: Julian Wiedmann <jwi(a)linux.ibm.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
drivers/s390/net/qeth_l2_main.c | 3 +++
drivers/s390/net/qeth_l3_main.c | 3 +++
2 files changed, 6 insertions(+)
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
index 22045e7d78ac3..97211f7f0cf02 100644
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -996,7 +996,10 @@ static int __qeth_l2_open(struct net_device *dev)
if (qdio_stop_irq(card->data.ccwdev, 0) >= 0) {
napi_enable(&card->napi);
+ local_bh_disable();
napi_schedule(&card->napi);
+ /* kick-start the NAPI softirq: */
+ local_bh_enable();
} else
rc = -EIO;
return rc;
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index 2cc9bc1ef1e38..0d71d2e6419af 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -3031,7 +3031,10 @@ static int __qeth_l3_open(struct net_device *dev)
if (qdio_stop_irq(card->data.ccwdev, 0) >= 0) {
napi_enable(&card->napi);
+ local_bh_disable();
napi_schedule(&card->napi);
+ /* kick-start the NAPI softirq: */
+ local_bh_enable();
} else
rc = -EIO;
return rc;
--
2.20.1
From: Julian Wiedmann <jwi(a)linux.ibm.com>
[ Upstream commit 4d19db777a2f32c9b76f6fd517ed8960576cb43e ]
Calling napi_schedule() from process context does not ensure that the
NET_RX softirq is run in a timely fashion. So trigger it manually.
This is no big issue with current code. A call to ndo_open() is usually
followed by a ndo_set_rx_mode() call, and for qeth this contains a
spin_unlock_bh(). Except for OSN, where qeth_l2_set_rx_mode() bails out
early.
Nevertheless it's best to not depend on this behaviour, and just fix
the issue at its source like all other drivers do. For instance see
commit 83a0c6e58901 ("i40e: Invoke softirqs after napi_reschedule").
Fixes: a1c3ed4c9ca0 ("qeth: NAPI support for l2 and l3 discipline")
Signed-off-by: Julian Wiedmann <jwi(a)linux.ibm.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
drivers/s390/net/qeth_l2_main.c | 3 +++
drivers/s390/net/qeth_l3_main.c | 3 +++
2 files changed, 6 insertions(+)
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
index 6ba4e921d2fd3..51152681aba6e 100644
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -991,7 +991,10 @@ static int __qeth_l2_open(struct net_device *dev)
if (qdio_stop_irq(card->data.ccwdev, 0) >= 0) {
napi_enable(&card->napi);
+ local_bh_disable();
napi_schedule(&card->napi);
+ /* kick-start the NAPI softirq: */
+ local_bh_enable();
} else
rc = -EIO;
return rc;
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index 6e6ba1baf9c48..b40a61d9ad9ec 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -3005,7 +3005,10 @@ static int __qeth_l3_open(struct net_device *dev)
if (qdio_stop_irq(card->data.ccwdev, 0) >= 0) {
napi_enable(&card->napi);
+ local_bh_disable();
napi_schedule(&card->napi);
+ /* kick-start the NAPI softirq: */
+ local_bh_enable();
} else
rc = -EIO;
return rc;
--
2.20.1
From: Julian Wiedmann <jwi(a)linux.ibm.com>
[ Upstream commit 4d19db777a2f32c9b76f6fd517ed8960576cb43e ]
Calling napi_schedule() from process context does not ensure that the
NET_RX softirq is run in a timely fashion. So trigger it manually.
This is no big issue with current code. A call to ndo_open() is usually
followed by a ndo_set_rx_mode() call, and for qeth this contains a
spin_unlock_bh(). Except for OSN, where qeth_l2_set_rx_mode() bails out
early.
Nevertheless it's best to not depend on this behaviour, and just fix
the issue at its source like all other drivers do. For instance see
commit 83a0c6e58901 ("i40e: Invoke softirqs after napi_reschedule").
Fixes: a1c3ed4c9ca0 ("qeth: NAPI support for l2 and l3 discipline")
Signed-off-by: Julian Wiedmann <jwi(a)linux.ibm.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
drivers/s390/net/qeth_l2_main.c | 3 +++
drivers/s390/net/qeth_l3_main.c | 3 +++
2 files changed, 6 insertions(+)
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
index 2845316db5545..6fa07c2469150 100644
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -869,7 +869,10 @@ static int __qeth_l2_open(struct net_device *dev)
if (qdio_stop_irq(card->data.ccwdev, 0) >= 0) {
napi_enable(&card->napi);
+ local_bh_disable();
napi_schedule(&card->napi);
+ /* kick-start the NAPI softirq: */
+ local_bh_enable();
} else
rc = -EIO;
return rc;
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index d9830c86d0c11..8bccfd686b735 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -2849,7 +2849,10 @@ static int __qeth_l3_open(struct net_device *dev)
if (qdio_stop_irq(card->data.ccwdev, 0) >= 0) {
napi_enable(&card->napi);
+ local_bh_disable();
napi_schedule(&card->napi);
+ /* kick-start the NAPI softirq: */
+ local_bh_enable();
} else
rc = -EIO;
return rc;
--
2.20.1
This is the start of the stable review cycle for the 4.19.81 release.
There are 93 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Tue 29 Oct 2019 08:27:02 PM UTC.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.81-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.19.81-rc1
Greg KH <gregkh(a)linuxfoundation.org>
RDMA/cxgb4: Do not dma memory off of the stack
Tejun Heo <tj(a)kernel.org>
blk-rq-qos: fix first node deletion of rq_qos_del()
Rafael J. Wysocki <rafael.j.wysocki(a)intel.com>
PCI: PM: Fix pci_power_up()
Juergen Gross <jgross(a)suse.com>
xen/netback: fix error path of xenvif_connect_data()
Rafael J. Wysocki <rafael.j.wysocki(a)intel.com>
cpufreq: Avoid cpufreq_suspend() deadlock on system shutdown
Christophe JAILLET <christophe.jaillet(a)wanadoo.fr>
memstick: jmb38x_ms: Fix an error handling path in 'jmb38x_ms_probe()'
Qu Wenruo <wqu(a)suse.com>
btrfs: tracepoints: Fix bad entry members of qgroup events
Filipe Manana <fdmanana(a)suse.com>
Btrfs: check for the full sync flag while holding the inode lock during fsync
Filipe Manana <fdmanana(a)suse.com>
Btrfs: add missing extents release on file extent cluster relocation error
Qu Wenruo <wqu(a)suse.com>
btrfs: block-group: Fix a memory leak due to missing btrfs_put_block_group()
Patrick Williams <alpawi(a)amazon.com>
pinctrl: armada-37xx: swap polarity on LED group
Patrick Williams <alpawi(a)amazon.com>
pinctrl: armada-37xx: fix control of pins 32 and up
Dmitry Torokhov <dmitry.torokhov(a)gmail.com>
pinctrl: cherryview: restore Strago DMI workaround for all versions
Sean Christopherson <sean.j.christopherson(a)intel.com>
x86/apic/x2apic: Fix a NULL pointer deref when handling a dying cpu
Steve Wahl <steve.wahl(a)hpe.com>
x86/boot/64: Make level2_kernel_pgt pages invalid outside kernel area
Mikulas Patocka <mpatocka(a)redhat.com>
dm cache: fix bugs when a GFP_NOWAIT allocation fails
Prateek Sood <prsood(a)codeaurora.org>
tracing: Fix race in perf_trace_buf initialization
Alexander Shishkin <alexander.shishkin(a)linux.intel.com>
perf/aux: Fix AUX output stopping
Pavel Shilovsky <pshilov(a)microsoft.com>
CIFS: Fix use after free of file info structures
Roberto Bergantinos Corpas <rbergant(a)redhat.com>
CIFS: avoid using MID 0xFFFF
Marc Zyngier <marc.zyngier(a)arm.com>
arm64: Enable workaround for Cavium TX2 erratum 219 when running SMT
James Morse <james.morse(a)arm.com>
EDAC/ghes: Fix Use after free in ghes_edac remove path
Helge Deller <deller(a)gmx.de>
parisc: Fix vmap memory leak in ioremap()/iounmap()
Max Filippov <jcmvbkbc(a)gmail.com>
xtensa: drop EXPORT_SYMBOL for outs*/ins*
Jane Chu <jane.chu(a)oracle.com>
mm/memory-failure: poison read receives SIGKILL instead of SIGBUS if mmaped more than once
David Hildenbrand <david(a)redhat.com>
hugetlbfs: don't access uninitialized memmaps in pfn_range_valid_gigantic()
Qian Cai <cai(a)lca.pw>
mm/page_owner: don't access uninitialized memmaps when reading /proc/pagetypeinfo
Qian Cai <cai(a)lca.pw>
mm/slub: fix a deadlock in show_slab_objects()
David Hildenbrand <david(a)redhat.com>
mm/memory-failure.c: don't access uninitialized memmaps in memory_failure()
Faiz Abbas <faiz_abbas(a)ti.com>
mmc: cqhci: Commit descriptors before setting the doorbell
David Hildenbrand <david(a)redhat.com>
fs/proc/page.c: don't access uninitialized memmaps in fs/proc/page.c
David Hildenbrand <david(a)redhat.com>
drivers/base/memory.c: don't access uninitialized memmaps in soft_offline_page_store()
Hans de Goede <hdegoede(a)redhat.com>
drm/amdgpu: Bail earlier when amdgpu.cik_/si_support is not set to 1
Thomas Hellstrom <thellstrom(a)vmware.com>
drm/ttm: Restore ttm prefaulting
Kai-Heng Feng <kai.heng.feng(a)canonical.com>
drm/edid: Add 6 bpc quirk for SDC panel in Lenovo G50
Will Deacon <will(a)kernel.org>
mac80211: Reject malformed SSID elements
Will Deacon <will(a)kernel.org>
cfg80211: wext: avoid copying malformed SSIDs
John Garry <john.garry(a)huawei.com>
ACPI: CPPC: Set pcc_data[pcc_ss_id] to NULL in acpi_cppc_processor_exit()
Junya Monden <jmonden(a)jp.adit-jv.com>
ASoC: rsnd: Reinitialize bit clock inversion flag for every format setting
Evan Green <evgreen(a)chromium.org>
Input: synaptics-rmi4 - avoid processing unknown IRQs
Marco Felsch <m.felsch(a)pengutronix.de>
Input: da9063 - fix capability and drop KEY_SLEEP
Bart Van Assche <bvanassche(a)acm.org>
scsi: ch: Make it possible to open a ch device multiple times again
Yufen Yu <yuyufen(a)huawei.com>
scsi: core: try to get module before removing device
Damien Le Moal <damien.lemoal(a)wdc.com>
scsi: core: save/restore command resid for error handling
Oliver Neukum <oneukum(a)suse.com>
scsi: sd: Ignore a failure to sync cache due to lack of authorization
Steffen Maier <maier(a)linux.ibm.com>
scsi: zfcp: fix reaction on bit error threshold notification
Colin Ian King <colin.king(a)canonical.com>
staging: wlan-ng: fix exit return when sme->key_idx >= NUM_WEPKEYS
Paul Burton <paulburton(a)kernel.org>
MIPS: tlbex: Fix build_restore_pagemask KScratch restore
Johan Hovold <johan(a)kernel.org>
USB: ldusb: fix read info leaks
Johan Hovold <johan(a)kernel.org>
USB: usblp: fix use-after-free on disconnect
Johan Hovold <johan(a)kernel.org>
USB: ldusb: fix memleak on disconnect
Johan Hovold <johan(a)kernel.org>
USB: serial: ti_usb_3410_5052: fix port-close races
Gustavo A. R. Silva <gustavo(a)embeddedor.com>
usb: udc: lpc32xx: fix bad bit shift operation
Lukas Wunner <lukas(a)wunner.de>
ALSA: hda - Force runtime PM on Nvidia HDMI codecs
Szabolcs Szőke <szszoke.code(a)gmail.com>
ALSA: usb-audio: Disable quirks for BOSS Katana amplifiers
Daniel Drake <drake(a)endlessm.com>
ALSA: hda/realtek - Enable headset mic on Asus MJ401TA
Kailang Yang <kailang(a)realtek.com>
ALSA: hda/realtek - Add support for ALC711
Johan Hovold <johan(a)kernel.org>
USB: legousbtower: fix memleak on disconnect
Matthew Wilcox (Oracle) <willy(a)infradead.org>
memfd: Fix locking when tagging pins
Xin Long <lucien.xin(a)gmail.com>
sctp: change sctp_prot .no_autobind with true
Biao Huang <biao.huang(a)mediatek.com>
net: stmmac: disable/enable ptp_ref_clk in suspend/resume flow
Xin Long <lucien.xin(a)gmail.com>
net: ipv6: fix listify ip6_rcv_finish in case of forwarding
Cédric Le Goater <clg(a)kaod.org>
net/ibmvnic: Fix EOI when running in XIVE mode.
Thomas Bogendoerfer <tbogendoerfer(a)suse.de>
net: i82596: fix dma_alloc_attr for sni_82596
Florian Fainelli <f.fainelli(a)gmail.com>
net: bcmgenet: Set phydev->dev_flags only for internal PHYs
Florian Fainelli <f.fainelli(a)gmail.com>
net: bcmgenet: Fix RGMII_MODE_EN value for GENET v1/2/3
Eric Dumazet <edumazet(a)google.com>
net: avoid potential infinite loop in tc_ctl_action()
Stefano Brivio <sbrivio(a)redhat.com>
ipv4: Return -ENETUNREACH if we can't create route but saddr is valid
Wei Wang <weiwan(a)google.com>
ipv4: fix race condition between route lookup and invalidation
Yi Li <yilikernel(a)gmail.com>
ocfs2: fix panic due to ocfs2_wq is null
Alex Deucher <alexander.deucher(a)amd.com>
Revert "drm/radeon: Fix EEH during kexec"
Song Liu <songliubraving(a)fb.com>
md/raid0: fix warning message for parameter default_layout
Dan Williams <dan.j.williams(a)intel.com>
libata/ahci: Fix PCS quirk application
Jacob Keller <jacob.e.keller(a)intel.com>
namespace: fix namespace.pl script to support relative paths
Kai-Heng Feng <kai.heng.feng(a)canonical.com>
r8152: Set macpassthru in reset_resume callback
Randy Dunlap <rdunlap(a)infradead.org>
lib: textsearch: fix escapes in example code
Yizhuo <yzhai003(a)ucr.edu>
net: hisilicon: Fix usage of uninitialized variable in function mdio_sc_cfg_reg_write()
Christophe JAILLET <christophe.jaillet(a)wanadoo.fr>
mips: Loongson: Fix the link time qualifier of 'serial_exit()'
Wen Yang <wenyang(a)linux.alibaba.com>
net: dsa: rtl8366rb: add missing of_node_put after calling of_get_child_by_name
Pablo Neira Ayuso <pablo(a)netfilter.org>
netfilter: nft_connlimit: disable bh on garbage collection
Miaoqing Pan <miaoqing(a)codeaurora.org>
mac80211: fix txq null pointer dereference
Miaoqing Pan <miaoqing(a)codeaurora.org>
nl80211: fix null pointer dereference
Ross Lagerwall <ross.lagerwall(a)citrix.com>
xen/efi: Set nonblocking callbacks
Oleksij Rempel <o.rempel(a)pengutronix.de>
MIPS: dts: ar9331: fix interrupt-controller size
Michal Vokáč <michal.vokac(a)ysoft.com>
net: dsa: qca8k: Use up to 7 ports for all operations
Peter Ujfalusi <peter.ujfalusi(a)ti.com>
ARM: dts: am4372: Set memory bandwidth limit for DISPC
Navid Emamdoost <navid.emamdoost(a)gmail.com>
ieee802154: ca8210: prevent memory leak
Tony Lindgren <tony(a)atomide.com>
ARM: OMAP2+: Fix warnings with broken omap2_set_init_voltage()
Tony Lindgren <tony(a)atomide.com>
ARM: OMAP2+: Fix missing reset done flag for am3 and am43
Quinn Tran <qutran(a)marvell.com>
scsi: qla2xxx: Fix unbound sleep in fcport delete path.
Xiang Chen <chenxiang66(a)hisilicon.com>
scsi: megaraid: disable device when probe failed after enabled device
Stanley Chu <stanley.chu(a)mediatek.com>
scsi: ufs: skip shutdown if hba is not powered
Balbir Singh <sblbir(a)amzn.com>
nvme-pci: Fix a race in controller removal
-------------
Diffstat:
Makefile | 4 +-
arch/arm/boot/dts/am4372.dtsi | 2 +
.../mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c | 3 +-
arch/arm/mach-omap2/pm.c | 100 ---------------------
arch/arm/xen/efi.c | 2 +
arch/arm64/kernel/cpu_errata.c | 33 +++++++
arch/mips/boot/dts/qca/ar9331.dtsi | 2 +-
arch/mips/loongson64/common/serial.c | 2 +-
arch/mips/mm/tlbex.c | 23 +++--
arch/parisc/mm/ioremap.c | 12 +--
arch/x86/kernel/apic/x2apic_cluster.c | 3 +-
arch/x86/kernel/head64.c | 22 ++++-
arch/x86/xen/efi.c | 2 +
arch/xtensa/kernel/xtensa_ksyms.c | 7 --
block/blk-rq-qos.h | 13 ++-
drivers/acpi/cppc_acpi.c | 2 +-
drivers/ata/ahci.c | 4 +-
drivers/base/core.c | 3 +
drivers/base/memory.c | 3 +
drivers/cpufreq/cpufreq.c | 10 ---
drivers/edac/ghes_edac.c | 4 +
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 35 ++++++++
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 35 --------
drivers/gpu/drm/drm_edid.c | 3 +
drivers/gpu/drm/radeon/radeon_drv.c | 8 --
drivers/gpu/drm/ttm/ttm_bo_vm.c | 16 ++--
drivers/infiniband/hw/cxgb4/mem.c | 28 +++---
drivers/input/misc/da9063_onkey.c | 5 +-
drivers/input/rmi4/rmi_driver.c | 6 +-
drivers/md/dm-cache-target.c | 28 +-----
drivers/md/raid0.c | 2 +-
drivers/memstick/host/jmb38x_ms.c | 2 +-
drivers/mmc/host/cqhci.c | 3 +-
drivers/net/dsa/qca8k.c | 4 +-
drivers/net/dsa/rtl8366rb.c | 16 ++--
drivers/net/ethernet/broadcom/genet/bcmgenet.h | 1 +
drivers/net/ethernet/broadcom/genet/bcmmii.c | 11 ++-
drivers/net/ethernet/hisilicon/hns_mdio.c | 6 +-
drivers/net/ethernet/i825xx/lasi_82596.c | 4 +-
drivers/net/ethernet/i825xx/lib82596.c | 4 +-
drivers/net/ethernet/i825xx/sni_82596.c | 4 +-
drivers/net/ethernet/ibm/ibmvnic.c | 8 +-
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 12 ++-
drivers/net/ieee802154/ca8210.c | 2 +-
drivers/net/usb/r8152.c | 3 +-
drivers/net/xen-netback/interface.c | 1 -
drivers/nvme/host/core.c | 5 +-
drivers/pci/pci.c | 24 +++--
drivers/pinctrl/intel/pinctrl-cherryview.c | 4 -
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 26 +++---
drivers/s390/scsi/zfcp_fsf.c | 16 +++-
drivers/scsi/ch.c | 1 -
drivers/scsi/megaraid.c | 4 +-
drivers/scsi/qla2xxx/qla_target.c | 4 +
drivers/scsi/scsi_error.c | 3 +
drivers/scsi/scsi_sysfs.c | 11 ++-
drivers/scsi/sd.c | 3 +-
drivers/scsi/ufs/ufshcd.c | 3 +
drivers/staging/wlan-ng/cfg80211.c | 6 +-
drivers/usb/class/usblp.c | 4 +-
drivers/usb/gadget/udc/lpc32xx_udc.c | 6 +-
drivers/usb/misc/ldusb.c | 23 ++---
drivers/usb/misc/legousbtower.c | 5 +-
drivers/usb/serial/ti_usb_3410_5052.c | 10 +--
fs/btrfs/extent-tree.c | 1 +
fs/btrfs/file.c | 36 ++++----
fs/btrfs/relocation.c | 2 +
fs/cifs/file.c | 6 +-
fs/cifs/smb1ops.c | 3 +
fs/ocfs2/journal.c | 3 +-
fs/ocfs2/localalloc.c | 3 +-
fs/proc/page.c | 28 +++---
include/scsi/scsi_eh.h | 1 +
include/trace/events/btrfs.h | 3 +-
kernel/events/core.c | 2 +-
kernel/trace/trace_event_perf.c | 4 +
lib/textsearch.c | 4 +-
mm/hugetlb.c | 5 +-
mm/memfd.c | 18 ++--
mm/memory-failure.c | 36 ++++----
mm/page_owner.c | 5 +-
mm/slub.c | 13 ++-
net/ipv4/route.c | 11 ++-
net/ipv6/ip6_input.c | 4 +-
net/mac80211/debugfs_netdev.c | 11 ++-
net/mac80211/mlme.c | 5 +-
net/netfilter/nft_connlimit.c | 7 +-
net/sched/act_api.c | 14 +--
net/sctp/socket.c | 4 +-
net/wireless/nl80211.c | 3 +
net/wireless/wext-sme.c | 8 +-
scripts/namespace.pl | 13 +--
sound/pci/hda/patch_hdmi.c | 2 +
sound/pci/hda/patch_realtek.c | 14 +++
sound/soc/sh/rcar/core.c | 1 +
sound/usb/pcm.c | 3 +
96 files changed, 495 insertions(+), 439 deletions(-)
This is the start of the stable review cycle for the 4.9.200 release.
There are 34 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Sun 10 Nov 2019 05:42:11 PM UTC.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.9.200-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.9.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.9.200-rc1
Petr Vorel <pvorel(a)suse.cz>
alarmtimer: Change remaining ENOTSUPP to EOPNOTSUPP
Jeffrey Hugo <jeffrey.l.hugo(a)gmail.com>
dmaengine: qcom: bam_dma: Fix resource leak
Eric Dumazet <edumazet(a)google.com>
net/flow_dissector: switch to siphash
Seth Forshee <seth.forshee(a)canonical.com>
kbuild: add -fcf-protection=none when using retpoline flags
Masahiro Yamada <yamada.masahiro(a)socionext.com>
kbuild: use -fmacro-prefix-map to make __FILE__ a relative path
Kees Cook <keescook(a)chromium.org>
Kbuild: make designated_init attribute fatal
Eric Dumazet <edumazet(a)google.com>
inet: stop leaking jiffies on the wire
Eran Ben Elisha <eranbe(a)mellanox.com>
net/mlx4_core: Dynamically set guaranteed amount of counters per VF
Xin Long <lucien.xin(a)gmail.com>
vxlan: check tun_info options_len properly
Doug Berger <opendmb(a)gmail.com>
net: bcmgenet: reset 40nm EPHY on energy detect
Vivien Didelot <vivien.didelot(a)gmail.com>
net: dsa: fix switch tree list
Eric Dumazet <edumazet(a)google.com>
net: add READ_ONCE() annotation in __skb_wait_for_more_packets()
Wei Wang <weiwan(a)google.com>
selftests: net: reuseport_dualstack: fix uninitalized parameter
zhanglin <zhang.lin16(a)zte.com.cn>
net: Zeroing the structure ethtool_wolinfo in ethtool_get_wol()
Jiangfeng Xiao <xiaojiangfeng(a)huawei.com>
net: hisilicon: Fix ping latency when deal with high throughput
Tejun Heo <tj(a)kernel.org>
net: fix sk_page_frag() recursion from memory reclaim
Eric Dumazet <edumazet(a)google.com>
dccp: do not leak jiffies on the wire
Dave Wysochanski <dwysocha(a)redhat.com>
cifs: Fix cifsInodeInfo lock_sem deadlock when reconnect occurs
Jonas Gorski <jonas.gorski(a)gmail.com>
MIPS: bmips: mark exception vectors as char arrays
Navid Emamdoost <navid.emamdoost(a)gmail.com>
of: unittest: fix memory leak in unittest_data_add
Bodo Stroesser <bstroesser(a)ts.fujitsu.com>
scsi: target: core: Do not overwrite CDB byte 1
Peter Ujfalusi <peter.ujfalusi(a)ti.com>
ARM: davinci: dm365: Fix McBSP dma_slave_map entry
Yunfeng Ye <yeyunfeng(a)huawei.com>
perf kmem: Fix memory leak in compact_gfp_flags()
Anson Huang <Anson.Huang(a)nxp.com>
ARM: dts: imx7s: Correct GPT's ipg clock source
Thomas Bogendoerfer <tbogendoerfer(a)suse.de>
scsi: fix kconfig dependency warning related to 53C700_LE_ON_BE
Thomas Bogendoerfer <tbogendoerfer(a)suse.de>
scsi: sni_53c710: fix compilation error
Hannes Reinecke <hare(a)suse.com>
scsi: scsi_dh_alua: handle RTPG sense code correctly during state transitions
Russell King <rmk+kernel(a)armlinux.org.uk>
ARM: mm: fix alignment handler faults under memory pressure
Dan Carpenter <dan.carpenter(a)oracle.com>
pinctrl: ns2: Fix off by one bugs in ns2_pinmux_enable()
Adam Ford <aford173(a)gmail.com>
ARM: dts: logicpd-torpedo-som: Remove twl_keypad
Robin Murphy <robin.murphy(a)arm.com>
ASoc: rockchip: i2s: Fix RPM imbalance
Stuart Henderson <stuarth(a)opensource.cirrus.com>
ASoC: wm_adsp: Don't generate kcontrols without READ flags
Yizhuo <yzhai003(a)ucr.edu>
regulator: pfuze100-regulator: Variable "val" in pfuze100_regulator_probe() could be uninitialized
Axel Lin <axel.lin(a)ingics.com>
regulator: ti-abb: Fix timeout in ti_abb_wait_txdone/ti_abb_clear_all_txdone
-------------
Diffstat:
Makefile | 16 +++++++-
arch/arm/boot/dts/imx7s.dtsi | 8 ++--
arch/arm/boot/dts/logicpd-torpedo-som.dtsi | 4 ++
arch/arm/mach-davinci/dm365.c | 4 +-
arch/arm/mm/alignment.c | 44 ++++++++++++++++----
arch/mips/bcm63xx/prom.c | 2 +-
arch/mips/include/asm/bmips.h | 10 ++---
arch/mips/kernel/smp-bmips.c | 8 ++--
drivers/dma/qcom/bam_dma.c | 14 +++++++
drivers/net/ethernet/broadcom/genet/bcmgenet.c | 9 +++-
drivers/net/ethernet/hisilicon/hip04_eth.c | 15 ++++---
.../net/ethernet/mellanox/mlx4/resource_tracker.c | 42 +++++++++++--------
drivers/net/vxlan.c | 5 ++-
drivers/of/unittest.c | 1 +
drivers/pinctrl/bcm/pinctrl-ns2-mux.c | 4 +-
drivers/regulator/pfuze100-regulator.c | 8 +++-
drivers/regulator/ti-abb-regulator.c | 26 ++++--------
drivers/scsi/Kconfig | 2 +-
drivers/scsi/device_handler/scsi_dh_alua.c | 21 +++++++---
drivers/scsi/sni_53c710.c | 4 +-
drivers/target/target_core_device.c | 21 ----------
fs/cifs/cifsglob.h | 5 +++
fs/cifs/cifsproto.h | 1 +
fs/cifs/file.c | 23 +++++++----
fs/cifs/smb2file.c | 2 +-
include/linux/gfp.h | 23 +++++++++++
include/linux/skbuff.h | 3 +-
include/net/flow_dissector.h | 3 +-
include/net/fq.h | 2 +-
include/net/fq_impl.h | 4 +-
include/net/sock.h | 11 +++--
kernel/time/alarmtimer.c | 4 +-
net/core/datagram.c | 2 +-
net/core/ethtool.c | 4 +-
net/core/flow_dissector.c | 48 +++++++++-------------
net/dccp/ipv4.c | 4 +-
net/dsa/dsa2.c | 2 +-
net/ipv4/datagram.c | 2 +-
net/ipv4/tcp_ipv4.c | 4 +-
net/sched/sch_fq_codel.c | 6 +--
net/sched/sch_hhf.c | 8 ++--
net/sched/sch_sfb.c | 13 +++---
net/sched/sch_sfq.c | 14 ++++---
net/sctp/socket.c | 2 +-
sound/soc/codecs/wm_adsp.c | 3 +-
sound/soc/rockchip/rockchip_i2s.c | 2 +-
tools/perf/builtin-kmem.c | 1 +
tools/testing/selftests/net/reuseport_dualstack.c | 3 +-
48 files changed, 286 insertions(+), 181 deletions(-)
This is the start of the stable review cycle for the 4.4.200 release.
There are 75 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Sun 10 Nov 2019 05:42:11 PM UTC.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.200-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.4.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.4.200-rc1
zhangyi (F) <yi.zhang(a)huawei.com>
fs/dcache: move security_d_instantiate() behind attaching dentry to inode
Petr Vorel <pvorel(a)suse.cz>
alarmtimer: Change remaining ENOTSUPP to EOPNOTSUPP
Russell King <rmk+kernel(a)armlinux.org.uk>
ARM: fix the cockup in the previous patch
Russell King <rmk+kernel(a)armlinux.org.uk>
ARM: ensure that processor vtables is not lost after boot
Russell King <rmk+kernel(a)armlinux.org.uk>
ARM: spectre-v2: per-CPU vtables to work around big.Little systems
Russell King <rmk+kernel(a)armlinux.org.uk>
ARM: add PROC_VTABLE and PROC_TABLE macros
Russell King <rmk+kernel(a)armlinux.org.uk>
ARM: clean up per-processor check_bugs method call
Russell King <rmk+kernel(a)armlinux.org.uk>
ARM: split out processor lookup
Russell King <rmk+kernel(a)armlinux.org.uk>
ARM: make lookup_processor_type() non-__init
Julien Thierry <julien.thierry(a)arm.com>
ARM: 8810/1: vfp: Fix wrong assignement to ufp_exc
Julien Thierry <julien.thierry(a)arm.com>
ARM: 8796/1: spectre-v1,v1.1: provide helpers for address sanitization
Julien Thierry <julien.thierry(a)arm.com>
ARM: 8795/1: spectre-v1.1: use put_user() for __put_user()
Julien Thierry <julien.thierry(a)arm.com>
ARM: 8794/1: uaccess: Prevent speculative use of the current addr_limit
Julien Thierry <julien.thierry(a)arm.com>
ARM: 8793/1: signal: replace __put_user_error with __put_user
Julien Thierry <julien.thierry(a)arm.com>
ARM: 8792/1: oabi-compat: copy oabi events using __copy_to_user()
Julien Thierry <julien.thierry(a)arm.com>
ARM: 8791/1: vfp: use __copy_to_user() when saving VFP state
Julien Thierry <julien.thierry(a)arm.com>
ARM: 8789/1: signal: copy registers using __copy_to_user()
Russell King <rmk+kernel(a)armlinux.org.uk>
ARM: spectre-v1: mitigate user accesses
Russell King <rmk+kernel(a)armlinux.org.uk>
ARM: spectre-v1: use get_user() for __get_user()
Russell King <rmk+kernel(a)armlinux.org.uk>
ARM: use __inttype() in get_user()
Russell King <rmk+kernel(a)armlinux.org.uk>
ARM: oabi-compat: copy semops using __copy_from_user()
Russell King <rmk+kernel(a)armlinux.org.uk>
ARM: vfp: use __copy_from_user() when restoring VFP state
Russell King <rmk+kernel(a)armlinux.org.uk>
ARM: signal: copy registers using __copy_from_user()
Russell King <rmk+kernel(a)armlinux.org.uk>
ARM: spectre-v1: fix syscall entry
Russell King <rmk+kernel(a)armlinux.org.uk>
ARM: spectre-v1: add array_index_mask_nospec() implementation
Russell King <rmk+kernel(a)armlinux.org.uk>
ARM: spectre-v1: add speculation barrier (csdb) macros
Russell King <rmk+kernel(a)armlinux.org.uk>
ARM: spectre-v2: warn about incorrect context switching functions
Russell King <rmk+kernel(a)armlinux.org.uk>
ARM: spectre-v2: add firmware based hardening
Russell King <rmk+kernel(a)armlinux.org.uk>
ARM: spectre-v2: harden user aborts in kernel space
Russell King <rmk+kernel(a)armlinux.org.uk>
ARM: spectre-v2: add Cortex A8 and A15 validation of the IBE bit
Russell King <rmk+kernel(a)armlinux.org.uk>
ARM: spectre-v2: harden branch predictor on context switches
Russell King <rmk+kernel(a)armlinux.org.uk>
ARM: spectre: add Kconfig symbol for CPUs vulnerable to Spectre
Russell King <rmk+kernel(a)armlinux.org.uk>
ARM: bugs: add support for per-processor bug checking
Russell King <rmk+kernel(a)armlinux.org.uk>
ARM: bugs: hook processor bug checking into SMP and suspend paths
Russell King <rmk+kernel(a)armlinux.org.uk>
ARM: bugs: prepare processor bug infrastructure
Russell King <rmk+kernel(a)armlinux.org.uk>
ARM: add more CPU part numbers for Cortex and Brahma B15 CPUs
Marc Zyngier <marc.zyngier(a)arm.com>
arm/arm64: smccc-1.1: Handle function result as parameters
Marc Zyngier <marc.zyngier(a)arm.com>
arm/arm64: smccc-1.1: Make return values unsigned long
Marc Zyngier <marc.zyngier(a)arm.com>
arm/arm64: smccc: Add SMCCC-specific return codes
Marc Zyngier <marc.zyngier(a)arm.com>
arm/arm64: smccc: Implement SMCCC v1.1 inline primitive
Marc Zyngier <marc.zyngier(a)arm.com>
arm/arm64: smccc: Make function identifiers an unsigned quantity
Marc Zyngier <marc.zyngier(a)arm.com>
firmware/psci: Expose SMCCC version through psci_ops
Marc Zyngier <marc.zyngier(a)arm.com>
firmware/psci: Expose PSCI conduit
Marc Zyngier <marc.zyngier(a)arm.com>
arm64: KVM: Report SMCCC_ARCH_WORKAROUND_1 BP hardening support
Marc Zyngier <marc.zyngier(a)arm.com>
arm/arm64: KVM: Advertise SMCCC v1.1
Vladimir Murzin <vladimir.murzin(a)arm.com>
ARM: Move system register accessors to asm/cp15.h
Russell King <rmk+kernel(a)arm.linux.org.uk>
ARM: uaccess: remove put_user() code duplication
Jens Wiklander <jens.wiklander(a)linaro.org>
ARM: 8481/2: drivers: psci: replace psci firmware calls
Jens Wiklander <jens.wiklander(a)linaro.org>
ARM: 8480/2: arm64: add implementation for arm-smccc
Jens Wiklander <jens.wiklander(a)linaro.org>
ARM: 8479/2: add implementation for arm-smccc
Jens Wiklander <jens.wiklander(a)linaro.org>
ARM: 8478/2: arm/arm64: add arm-smccc
Andrey Ryabinin <ryabinin.a.a(a)gmail.com>
ARM: 8051/1: put_user: fix possible data corruption in put_user
Jeffrey Hugo <jeffrey.l.hugo(a)gmail.com>
dmaengine: qcom: bam_dma: Fix resource leak
Eric Dumazet <edumazet(a)google.com>
net/flow_dissector: switch to siphash
Eric Dumazet <edumazet(a)google.com>
inet: stop leaking jiffies on the wire
Eran Ben Elisha <eranbe(a)mellanox.com>
net/mlx4_core: Dynamically set guaranteed amount of counters per VF
Xin Long <lucien.xin(a)gmail.com>
vxlan: check tun_info options_len properly
Eric Dumazet <edumazet(a)google.com>
net: add READ_ONCE() annotation in __skb_wait_for_more_packets()
zhanglin <zhang.lin16(a)zte.com.cn>
net: Zeroing the structure ethtool_wolinfo in ethtool_get_wol()
Jiangfeng Xiao <xiaojiangfeng(a)huawei.com>
net: hisilicon: Fix ping latency when deal with high throughput
Tejun Heo <tj(a)kernel.org>
net: fix sk_page_frag() recursion from memory reclaim
Eric Dumazet <edumazet(a)google.com>
dccp: do not leak jiffies on the wire
Dave Wysochanski <dwysocha(a)redhat.com>
cifs: Fix cifsInodeInfo lock_sem deadlock when reconnect occurs
Jonas Gorski <jonas.gorski(a)gmail.com>
MIPS: bmips: mark exception vectors as char arrays
Navid Emamdoost <navid.emamdoost(a)gmail.com>
of: unittest: fix memory leak in unittest_data_add
Bodo Stroesser <bstroesser(a)ts.fujitsu.com>
scsi: target: core: Do not overwrite CDB byte 1
Yunfeng Ye <yeyunfeng(a)huawei.com>
perf kmem: Fix memory leak in compact_gfp_flags()
Thomas Bogendoerfer <tbogendoerfer(a)suse.de>
scsi: fix kconfig dependency warning related to 53C700_LE_ON_BE
Thomas Bogendoerfer <tbogendoerfer(a)suse.de>
scsi: sni_53c710: fix compilation error
Russell King <rmk+kernel(a)armlinux.org.uk>
ARM: mm: fix alignment handler faults under memory pressure
Adam Ford <aford173(a)gmail.com>
ARM: dts: logicpd-torpedo-som: Remove twl_keypad
Robin Murphy <robin.murphy(a)arm.com>
ASoc: rockchip: i2s: Fix RPM imbalance
Yizhuo <yzhai003(a)ucr.edu>
regulator: pfuze100-regulator: Variable "val" in pfuze100_regulator_probe() could be uninitialized
Axel Lin <axel.lin(a)ingics.com>
regulator: ti-abb: Fix timeout in ti_abb_wait_txdone/ti_abb_clear_all_txdone
Seth Forshee <seth.forshee(a)canonical.com>
kbuild: add -fcf-protection=none when using retpoline flags
-------------
Diffstat:
Makefile | 10 +-
arch/arm/Kconfig | 3 +-
arch/arm/boot/dts/logicpd-torpedo-som.dtsi | 4 +
arch/arm/include/asm/arch_gicv3.h | 27 +-
arch/arm/include/asm/assembler.h | 23 ++
arch/arm/include/asm/barrier.h | 34 +++
arch/arm/include/asm/bugs.h | 6 +-
arch/arm/include/asm/cp15.h | 18 ++
arch/arm/include/asm/cputype.h | 9 +
arch/arm/include/asm/proc-fns.h | 65 ++++-
arch/arm/include/asm/system_misc.h | 15 ++
arch/arm/include/asm/thread_info.h | 8 +-
arch/arm/include/asm/uaccess.h | 177 ++++++++-----
arch/arm/kernel/Makefile | 4 +-
arch/arm/kernel/armksyms.c | 6 +
arch/arm/kernel/bugs.c | 18 ++
arch/arm/kernel/entry-common.S | 18 +-
arch/arm/kernel/entry-header.S | 25 ++
arch/arm/kernel/head-common.S | 6 +-
arch/arm/kernel/psci-call.S | 31 ---
arch/arm/kernel/setup.c | 40 +--
arch/arm/kernel/signal.c | 125 ++++-----
arch/arm/kernel/smccc-call.S | 62 +++++
arch/arm/kernel/smp.c | 36 +++
arch/arm/kernel/suspend.c | 2 +
arch/arm/kernel/sys_oabi-compat.c | 16 +-
arch/arm/lib/copy_from_user.S | 5 +
arch/arm/mm/Kconfig | 23 ++
arch/arm/mm/Makefile | 2 +-
arch/arm/mm/alignment.c | 44 +++-
arch/arm/mm/fault.c | 3 +
arch/arm/mm/proc-macros.S | 13 +-
arch/arm/mm/proc-v7-2level.S | 6 -
arch/arm/mm/proc-v7-bugs.c | 161 ++++++++++++
arch/arm/mm/proc-v7.S | 154 ++++++++---
arch/arm/vfp/vfpmodule.c | 37 ++-
arch/arm64/Kconfig | 1 +
arch/arm64/kernel/Makefile | 4 +-
arch/arm64/kernel/arm64ksyms.c | 5 +
arch/arm64/kernel/asm-offsets.c | 3 +
arch/arm64/kernel/psci-call.S | 28 --
arch/arm64/kernel/smccc-call.S | 43 ++++
arch/mips/bcm63xx/prom.c | 2 +-
arch/mips/include/asm/bmips.h | 10 +-
arch/mips/kernel/smp-bmips.c | 8 +-
drivers/dma/qcom_bam_dma.c | 14 +
drivers/firmware/Kconfig | 3 +
drivers/firmware/psci.c | 78 +++++-
drivers/net/ethernet/hisilicon/hip04_eth.c | 15 +-
.../net/ethernet/mellanox/mlx4/resource_tracker.c | 42 +--
drivers/net/vxlan.c | 5 +-
drivers/of/unittest.c | 1 +
drivers/regulator/pfuze100-regulator.c | 8 +-
drivers/regulator/ti-abb-regulator.c | 26 +-
drivers/scsi/Kconfig | 2 +-
drivers/scsi/sni_53c710.c | 4 +-
drivers/target/target_core_device.c | 21 --
fs/cifs/cifsglob.h | 5 +
fs/cifs/cifsproto.h | 1 +
fs/cifs/file.c | 23 +-
fs/cifs/smb2file.c | 2 +-
fs/dcache.c | 2 +-
include/linux/arm-smccc.h | 283 +++++++++++++++++++++
include/linux/gfp.h | 23 ++
include/linux/psci.h | 13 +
include/linux/skbuff.h | 3 +-
include/net/flow_dissector.h | 3 +-
include/net/sock.h | 11 +-
kernel/time/alarmtimer.c | 4 +-
net/core/datagram.c | 2 +-
net/core/ethtool.c | 4 +-
net/core/flow_dissector.c | 48 ++--
net/dccp/ipv4.c | 4 +-
net/ipv4/datagram.c | 2 +-
net/ipv4/tcp_ipv4.c | 4 +-
net/sched/sch_fq_codel.c | 6 +-
net/sched/sch_hhf.c | 8 +-
net/sched/sch_sfb.c | 13 +-
net/sched/sch_sfq.c | 14 +-
net/sctp/socket.c | 2 +-
sound/soc/rockchip/rockchip_i2s.c | 2 +-
tools/perf/builtin-kmem.c | 1 +
82 files changed, 1556 insertions(+), 486 deletions(-)
Greetings,
Find attached email very confidential. reply for more details
Thanks.
Peter Wong
----------------------------------------------------
This email was sent by the shareware version of Postman Professional.
This is an automatic generated email to let you know that the following patch were queued:
Subject: media: vimc: sen: remove unused kthread_sen field
Author: Dafna Hirschfeld <dafna.hirschfeld(a)collabora.com>
Date: Tue Nov 5 18:53:17 2019 +0100
The field kthread_sen in the vimc_sen_device is
not set and used. So remove the field and
the code that check if it is non NULL
Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld(a)collabora.com>
Cc: <stable(a)vger.kernel.org> # for v5.4 and up
Signed-off-by: Hans Verkuil <hverkuil-cisco(a)xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung(a)kernel.org>
drivers/media/platform/vimc/vimc-sensor.c | 5 -----
1 file changed, 5 deletions(-)
---
diff --git a/drivers/media/platform/vimc/vimc-sensor.c b/drivers/media/platform/vimc/vimc-sensor.c
index 25ee89a067f7..32380f504591 100644
--- a/drivers/media/platform/vimc/vimc-sensor.c
+++ b/drivers/media/platform/vimc/vimc-sensor.c
@@ -18,7 +18,6 @@ struct vimc_sen_device {
struct vimc_ent_device ved;
struct v4l2_subdev sd;
struct tpg_data tpg;
- struct task_struct *kthread_sen;
u8 *frame;
/* The active format */
struct v4l2_mbus_framefmt mbus_format;
@@ -202,10 +201,6 @@ static int vimc_sen_s_stream(struct v4l2_subdev *sd, int enable)
const struct vimc_pix_map *vpix;
unsigned int frame_size;
- if (vsen->kthread_sen)
- /* tpg is already executing */
- return 0;
-
/* Calculate the frame size */
vpix = vimc_pix_map_by_code(vsen->mbus_format.code);
frame_size = vsen->mbus_format.width * vpix->bpp *
This is an automatic generated email to let you know that the following patch were queued:
Subject: media: vimc: sen: remove unused kthread_sen field
Author: Dafna Hirschfeld <dafna.hirschfeld(a)collabora.com>
Date: Tue Nov 5 18:53:17 2019 +0100
The field kthread_sen in the vimc_sen_device is
not set and used. So remove the field and
the code that check if it is non NULL
Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld(a)collabora.com>
Cc: <stable(a)vger.kernel.org> # for v5.4 and up
Signed-off-by: Hans Verkuil <hverkuil-cisco(a)xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab(a)kernel.org>
drivers/media/platform/vimc/vimc-sensor.c | 5 -----
1 file changed, 5 deletions(-)
---
diff --git a/drivers/media/platform/vimc/vimc-sensor.c b/drivers/media/platform/vimc/vimc-sensor.c
index 25ee89a067f7..32380f504591 100644
--- a/drivers/media/platform/vimc/vimc-sensor.c
+++ b/drivers/media/platform/vimc/vimc-sensor.c
@@ -18,7 +18,6 @@ struct vimc_sen_device {
struct vimc_ent_device ved;
struct v4l2_subdev sd;
struct tpg_data tpg;
- struct task_struct *kthread_sen;
u8 *frame;
/* The active format */
struct v4l2_mbus_framefmt mbus_format;
@@ -202,10 +201,6 @@ static int vimc_sen_s_stream(struct v4l2_subdev *sd, int enable)
const struct vimc_pix_map *vpix;
unsigned int frame_size;
- if (vsen->kthread_sen)
- /* tpg is already executing */
- return 0;
-
/* Calculate the frame size */
vpix = vimc_pix_map_by_code(vsen->mbus_format.code);
frame_size = vsen->mbus_format.width * vpix->bpp *
This is an automatic generated email to let you know that the following patch were queued:
Subject: media: hantro: Fix picture order count table enable
Author: Francois Buergisser <fbuergisser(a)chromium.org>
Date: Tue Oct 29 02:24:48 2019 +0100
The picture order count table only makes sense for profiles
higher than Baseline. This is confirmed by the H.264 specification
(See 8.2.1 Decoding process for picture order count), which
clarifies how POC are used for features not present in Baseline.
"""
Picture order counts are used to determine initial picture orderings
for reference pictures in the decoding of B slices, to represent picture
order differences between frames or fields for motion vector derivation
in temporal direct mode, for implicit mode weighted prediction in B slices,
and for decoder conformance checking.
"""
As a side note, this change matches various vendors downstream codebases,
including ChromiumOS and IMX VPU libraries.
Fixes: dea0a82f3d22 ("media: hantro: Add support for H264 decoding on G1")
Signed-off-by: Francois Buergisser <fbuergisser(a)chromium.org>
Signed-off-by: Ezequiel Garcia <ezequiel(a)collabora.com>
Signed-off-by: Jonas Karlman <jonas(a)kwiboo.se>
Reviewed-by: Boris Brezillon <boris.brezillon(a)collabora.com>
Tested-by: Boris Brezillon <boris.brezillon(a)collabora.com>
Cc: <stable(a)vger.kernel.org> # for v5.4 and up
Signed-off-by: Hans Verkuil <hverkuil-cisco(a)xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung(a)kernel.org>
drivers/staging/media/hantro/hantro_g1_h264_dec.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/drivers/staging/media/hantro/hantro_g1_h264_dec.c b/drivers/staging/media/hantro/hantro_g1_h264_dec.c
index a1cb18680200..70a6b5b26477 100644
--- a/drivers/staging/media/hantro/hantro_g1_h264_dec.c
+++ b/drivers/staging/media/hantro/hantro_g1_h264_dec.c
@@ -34,9 +34,11 @@ static void set_params(struct hantro_ctx *ctx)
reg = G1_REG_DEC_CTRL0_DEC_AXI_WR_ID(0x0);
if (sps->flags & V4L2_H264_SPS_FLAG_MB_ADAPTIVE_FRAME_FIELD)
reg |= G1_REG_DEC_CTRL0_SEQ_MBAFF_E;
- reg |= G1_REG_DEC_CTRL0_PICORD_COUNT_E;
- if (sps->profile_idc > 66 && dec_param->nal_ref_idc)
- reg |= G1_REG_DEC_CTRL0_WRITE_MVS_E;
+ if (sps->profile_idc > 66) {
+ reg |= G1_REG_DEC_CTRL0_PICORD_COUNT_E;
+ if (dec_param->nal_ref_idc)
+ reg |= G1_REG_DEC_CTRL0_WRITE_MVS_E;
+ }
if (!(sps->flags & V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY) &&
(sps->flags & V4L2_H264_SPS_FLAG_MB_ADAPTIVE_FRAME_FIELD ||
This is an automatic generated email to let you know that the following patch were queued:
Subject: media: hantro: Fix picture order count table enable
Author: Francois Buergisser <fbuergisser(a)chromium.org>
Date: Tue Oct 29 02:24:48 2019 +0100
The picture order count table only makes sense for profiles
higher than Baseline. This is confirmed by the H.264 specification
(See 8.2.1 Decoding process for picture order count), which
clarifies how POC are used for features not present in Baseline.
"""
Picture order counts are used to determine initial picture orderings
for reference pictures in the decoding of B slices, to represent picture
order differences between frames or fields for motion vector derivation
in temporal direct mode, for implicit mode weighted prediction in B slices,
and for decoder conformance checking.
"""
As a side note, this change matches various vendors downstream codebases,
including ChromiumOS and IMX VPU libraries.
Fixes: dea0a82f3d22 ("media: hantro: Add support for H264 decoding on G1")
Signed-off-by: Francois Buergisser <fbuergisser(a)chromium.org>
Signed-off-by: Ezequiel Garcia <ezequiel(a)collabora.com>
Signed-off-by: Jonas Karlman <jonas(a)kwiboo.se>
Reviewed-by: Boris Brezillon <boris.brezillon(a)collabora.com>
Tested-by: Boris Brezillon <boris.brezillon(a)collabora.com>
Cc: <stable(a)vger.kernel.org> # for v5.4 and up
Signed-off-by: Hans Verkuil <hverkuil-cisco(a)xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab(a)kernel.org>
drivers/staging/media/hantro/hantro_g1_h264_dec.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/drivers/staging/media/hantro/hantro_g1_h264_dec.c b/drivers/staging/media/hantro/hantro_g1_h264_dec.c
index a1cb18680200..70a6b5b26477 100644
--- a/drivers/staging/media/hantro/hantro_g1_h264_dec.c
+++ b/drivers/staging/media/hantro/hantro_g1_h264_dec.c
@@ -34,9 +34,11 @@ static void set_params(struct hantro_ctx *ctx)
reg = G1_REG_DEC_CTRL0_DEC_AXI_WR_ID(0x0);
if (sps->flags & V4L2_H264_SPS_FLAG_MB_ADAPTIVE_FRAME_FIELD)
reg |= G1_REG_DEC_CTRL0_SEQ_MBAFF_E;
- reg |= G1_REG_DEC_CTRL0_PICORD_COUNT_E;
- if (sps->profile_idc > 66 && dec_param->nal_ref_idc)
- reg |= G1_REG_DEC_CTRL0_WRITE_MVS_E;
+ if (sps->profile_idc > 66) {
+ reg |= G1_REG_DEC_CTRL0_PICORD_COUNT_E;
+ if (dec_param->nal_ref_idc)
+ reg |= G1_REG_DEC_CTRL0_WRITE_MVS_E;
+ }
if (!(sps->flags & V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY) &&
(sps->flags & V4L2_H264_SPS_FLAG_MB_ADAPTIVE_FRAME_FIELD ||
This is an automatic generated email to let you know that the following patch were queued:
Subject: media: hantro: Fix motion vectors usage condition
Author: Francois Buergisser <fbuergisser(a)chromium.org>
Date: Tue Oct 29 02:24:47 2019 +0100
The setting of the motion vectors usage and the setting of motion
vectors address are currently done under different conditions.
When decoding pre-recorded videos, this results of leaving the motion
vectors address unset, resulting in faulty memory accesses. Fix it
by using the same condition everywhere, which matches the profiles
that support motion vectors.
Fixes: dea0a82f3d22 ("media: hantro: Add support for H264 decoding on G1")
Signed-off-by: Francois Buergisser <fbuergisser(a)chromium.org>
Signed-off-by: Ezequiel Garcia <ezequiel(a)collabora.com>
Signed-off-by: Jonas Karlman <jonas(a)kwiboo.se>
Reviewed-by: Boris Brezillon <boris.brezillon(a)collabora.com>
Tested-by: Boris Brezillon <boris.brezillon(a)collabora.com>
Cc: <stable(a)vger.kernel.org> # for v5.4 and up
Signed-off-by: Hans Verkuil <hverkuil-cisco(a)xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab(a)kernel.org>
drivers/staging/media/hantro/hantro_g1_h264_dec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/drivers/staging/media/hantro/hantro_g1_h264_dec.c b/drivers/staging/media/hantro/hantro_g1_h264_dec.c
index 29130946dea4..a1cb18680200 100644
--- a/drivers/staging/media/hantro/hantro_g1_h264_dec.c
+++ b/drivers/staging/media/hantro/hantro_g1_h264_dec.c
@@ -35,7 +35,7 @@ static void set_params(struct hantro_ctx *ctx)
if (sps->flags & V4L2_H264_SPS_FLAG_MB_ADAPTIVE_FRAME_FIELD)
reg |= G1_REG_DEC_CTRL0_SEQ_MBAFF_E;
reg |= G1_REG_DEC_CTRL0_PICORD_COUNT_E;
- if (dec_param->nal_ref_idc)
+ if (sps->profile_idc > 66 && dec_param->nal_ref_idc)
reg |= G1_REG_DEC_CTRL0_WRITE_MVS_E;
if (!(sps->flags & V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY) &&
@@ -245,7 +245,7 @@ static void set_buffers(struct hantro_ctx *ctx)
vdpu_write_relaxed(vpu, dst_dma, G1_REG_ADDR_DST);
/* Higher profiles require DMV buffer appended to reference frames. */
- if (ctrls->sps->profile_idc > 66) {
+ if (ctrls->sps->profile_idc > 66 && ctrls->decode->nal_ref_idc) {
size_t pic_size = ctx->h264_dec.pic_size;
size_t mv_offset = round_up(pic_size, 8);
This is an automatic generated email to let you know that the following patch were queued:
Subject: media: hantro: Fix motion vectors usage condition
Author: Francois Buergisser <fbuergisser(a)chromium.org>
Date: Tue Oct 29 02:24:47 2019 +0100
The setting of the motion vectors usage and the setting of motion
vectors address are currently done under different conditions.
When decoding pre-recorded videos, this results of leaving the motion
vectors address unset, resulting in faulty memory accesses. Fix it
by using the same condition everywhere, which matches the profiles
that support motion vectors.
Fixes: dea0a82f3d22 ("media: hantro: Add support for H264 decoding on G1")
Signed-off-by: Francois Buergisser <fbuergisser(a)chromium.org>
Signed-off-by: Ezequiel Garcia <ezequiel(a)collabora.com>
Signed-off-by: Jonas Karlman <jonas(a)kwiboo.se>
Reviewed-by: Boris Brezillon <boris.brezillon(a)collabora.com>
Tested-by: Boris Brezillon <boris.brezillon(a)collabora.com>
Cc: <stable(a)vger.kernel.org> # for v5.4 and up
Signed-off-by: Hans Verkuil <hverkuil-cisco(a)xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung(a)kernel.org>
drivers/staging/media/hantro/hantro_g1_h264_dec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/drivers/staging/media/hantro/hantro_g1_h264_dec.c b/drivers/staging/media/hantro/hantro_g1_h264_dec.c
index 29130946dea4..a1cb18680200 100644
--- a/drivers/staging/media/hantro/hantro_g1_h264_dec.c
+++ b/drivers/staging/media/hantro/hantro_g1_h264_dec.c
@@ -35,7 +35,7 @@ static void set_params(struct hantro_ctx *ctx)
if (sps->flags & V4L2_H264_SPS_FLAG_MB_ADAPTIVE_FRAME_FIELD)
reg |= G1_REG_DEC_CTRL0_SEQ_MBAFF_E;
reg |= G1_REG_DEC_CTRL0_PICORD_COUNT_E;
- if (dec_param->nal_ref_idc)
+ if (sps->profile_idc > 66 && dec_param->nal_ref_idc)
reg |= G1_REG_DEC_CTRL0_WRITE_MVS_E;
if (!(sps->flags & V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY) &&
@@ -245,7 +245,7 @@ static void set_buffers(struct hantro_ctx *ctx)
vdpu_write_relaxed(vpu, dst_dma, G1_REG_ADDR_DST);
/* Higher profiles require DMV buffer appended to reference frames. */
- if (ctrls->sps->profile_idc > 66) {
+ if (ctrls->sps->profile_idc > 66 && ctrls->decode->nal_ref_idc) {
size_t pic_size = ctx->h264_dec.pic_size;
size_t mv_offset = round_up(pic_size, 8);
The patch titled
Subject: mm/page_io.c: do not free shared swap slots
has been added to the -mm tree. Its filename is
mm-do-not-free-shared-swap-slots.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/mm-do-not-free-shared-swap-slots.p…
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/mm-do-not-free-shared-swap-slots.p…
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Vinayak Menon <vinmenon(a)codeaurora.org>
Subject: mm/page_io.c: do not free shared swap slots
The following race is observed due to which a processes faulting on a swap
entry, finds the page neither in swapcache nor swap. This causes zram to
give a zero filled page that gets mapped to the process, resulting in a
user space crash later.
Consider parent and child processes Pa and Pb sharing the same swap slot
with swap_count 2. Swap is on zram with SWP_SYNCHRONOUS_IO set. Virtual
address 'VA' of Pa and Pb points to the shared swap entry.
Pa Pb
fault on VA fault on VA
do_swap_page do_swap_page
lookup_swap_cache fails lookup_swap_cache fails
Pb scheduled out
swapin_readahead (deletes zram entry)
swap_free (makes swap_count 1)
Pb scheduled in
swap_readpage (swap_count == 1)
Takes SWP_SYNCHRONOUS_IO path
zram enrty absent
zram gives a zero filled page
Fix this by making sure that swap slot is freed only when swap count drops
down to one.
Link: http://lkml.kernel.org/r/1571743294-14285-1-git-send-email-vinmenon@codeaur…
Fixes: aa8d22a11da9 ("mm: swap: SWP_SYNCHRONOUS_IO: skip swapcache only if swapped page has no other reference")
Signed-off-by: Vinayak Menon <vinmenon(a)codeaurora.org>
Suggested-by: Minchan Kim <minchan(a)google.com>
Acked-by: Minchan Kim <minchan(a)kernel.org>
Cc: Michal Hocko <mhocko(a)suse.com>
Cc: Hugh Dickins <hughd(a)google.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/page_io.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/mm/page_io.c~mm-do-not-free-shared-swap-slots
+++ a/mm/page_io.c
@@ -73,6 +73,7 @@ static void swap_slot_free_notify(struct
{
struct swap_info_struct *sis;
struct gendisk *disk;
+ swp_entry_t entry;
/*
* There is no guarantee that the page is in swap cache - the software
@@ -104,11 +105,10 @@ static void swap_slot_free_notify(struct
* we again wish to reclaim it.
*/
disk = sis->bdev->bd_disk;
- if (disk->fops->swap_slot_free_notify) {
- swp_entry_t entry;
+ entry.val = page_private(page);
+ if (disk->fops->swap_slot_free_notify && __swap_count(entry) == 1) {
unsigned long offset;
- entry.val = page_private(page);
offset = swp_offset(entry);
SetPageDirty(page);
_
Patches currently in -mm which might be from vinmenon(a)codeaurora.org are
mm-do-not-free-shared-swap-slots.patch
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: 37b4d0c37c0b - Linux 5.3.9
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/272982
One or more kernel tests failed:
ppc64le:
❌ selinux-policy: serge-testsuite
aarch64:
❌ selinux-policy: serge-testsuite
x86_64:
❌ 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: 37b4d0c37c0b - Linux 5.3.9
We grabbed the 0f688e389816 commit of the stable queue repository.
We then merged the patchset with `git am`:
regulator-of-fix-suspend-min-max-voltage-parsing.patch
asoc-samsung-arndale-add-missing-of-node-dereferenci.patch
asoc-wm8994-do-not-register-inapplicable-controls-fo.patch
regulator-da9062-fix-suspend_enable-disable-preparat.patch
asoc-topology-fix-a-signedness-bug-in-soc_tplg_dapm_.patch
arm64-dts-allwinner-a64-pine64-plus-add-phy-regulato.patch
arm64-dts-allwinner-a64-drop-pmu-node.patch
arm64-dts-allwinner-a64-sopine-baseboard-add-phy-reg.patch
arm64-dts-fix-gpio-to-pinmux-mapping.patch
regulator-ti-abb-fix-timeout-in-ti_abb_wait_txdone-t.patch
pinctrl-intel-allocate-irq-chip-dynamic.patch
asoc-sof-loader-fix-kernel-oops-on-firmware-boot-fai.patch
asoc-sof-topology-fix-parse-fail-issue-for-byte-bool.patch
asoc-sof-intel-hda-fix-warnings-during-fw-load.patch
asoc-sof-intel-initialise-and-verify-fw-crash-dump-d.patch
asoc-sof-intel-hda-disable-dmi-l1-entry-during-captu.patch
asoc-rt5682-add-null-handler-to-set_jack-function.patch
asoc-intel-sof_rt5682-add-remove-function-to-disable.patch
asoc-intel-bytcr_rt5651-add-null-check-to-support_bu.patch
regulator-pfuze100-regulator-variable-val-in-pfuze10.patch
asoc-wm_adsp-don-t-generate-kcontrols-without-read-f.patch
asoc-rockchip-i2s-fix-rpm-imbalance.patch
arm64-dts-rockchip-fix-rockpro64-rk808-interrupt-lin.patch
arm-dts-logicpd-torpedo-som-remove-twl_keypad.patch
arm64-dts-rockchip-fix-rockpro64-vdd-log-regulator-s.patch
arm64-dts-rockchip-fix-rockpro64-sdhci-settings.patch
pinctrl-ns2-fix-off-by-one-bugs-in-ns2_pinmux_enable.patch
pinctrl-stmfx-fix-null-pointer-on-remove.patch
arm64-dts-zii-ultra-fix-arm-regulator-states.patch
arm-dts-am3874-iceboard-fix-i2c-mux-idle-disconnect-.patch
asoc-msm8916-wcd-digital-add-missing-mix2-path-for-r.patch
asoc-simple_card_utils.h-fix-potential-multiple-rede.patch
arm-dts-use-level-interrupt-for-omap4-5-wlcore.patch
arm-mm-fix-alignment-handler-faults-under-memory-pre.patch
scsi-qla2xxx-fix-a-potential-null-pointer-dereferenc.patch
scsi-scsi_dh_alua-handle-rtpg-sense-code-correctly-d.patch
scsi-sni_53c710-fix-compilation-error.patch
scsi-fix-kconfig-dependency-warning-related-to-53c70.patch
arm-8908-1-add-__always_inline-to-functions-called-f.patch
arm-8914-1-nommu-fix-exc_ret-for-xip.patch
arm64-dts-rockchip-fix-rockpro64-sdmmc-settings.patch
arm64-dts-rockchip-fix-usb-c-on-hugsun-x99-tv-box.patch
arm64-dts-lx2160a-correct-cpu-core-idle-state-name.patch
arm-dts-imx6q-logicpd-re-enable-snvs-power-key.patch
arm-dts-vf610-zii-scu4-aib-specify-i2c-mux-idle-disc.patch
arm-dts-imx7s-correct-gpt-s-ipg-clock-source.patch
arm64-dts-imx8mq-use-correct-clock-for-usdhc-s-ipg-c.patch
arm64-dts-imx8mm-use-correct-clock-for-usdhc-s-ipg-c.patch
perf-tools-fix-resource-leak-of-closedir-on-the-erro.patch
perf-c2c-fix-memory-leak-in-build_cl_output.patch
8250-men-mcb-fix-error-checking-when-get_num_ports-r.patch
perf-kmem-fix-memory-leak-in-compact_gfp_flags.patch
arm-davinci-dm365-fix-mcbsp-dma_slave_map-entry.patch
drm-amdgpu-fix-potential-vm-faults.patch
drm-amdgpu-fix-error-handling-in-amdgpu_bo_list_crea.patch
scsi-target-core-do-not-overwrite-cdb-byte-1.patch
scsi-hpsa-add-missing-hunks-in-reset-patch.patch
asoc-intel-sof-rt5682-add-a-check-for-devm_clk_get.patch
asoc-sof-control-return-true-when-kcontrol-values-ch.patch
tracing-fix-gfp_t-format-for-synthetic-events.patch
arm-dts-bcm2837-rpi-cm3-avoid-leds-gpio-probing-issu.patch
i2c-aspeed-fix-master-pending-state-handling.patch
drm-komeda-don-t-flush-inactive-pipes.patch
arm-8926-1-v7m-remove-register-save-to-stack-before-.patch
selftests-kvm-vmx_set_nested_state_test-don-t-check-.patch
selftests-kvm-fix-sync_regs_test-with-newer-gccs.patch
alsa-hda-add-tigerlake-jasperlake-pci-id.patch
of-unittest-fix-memory-leak-in-unittest_data_add.patch
mips-bmips-mark-exception-vectors-as-char-arrays.patch
irqchip-gic-v3-its-use-the-exact-itslist-for-vmovp.patch
i2c-mt65xx-fix-null-ptr-dereference.patch
i2c-stm32f7-fix-first-byte-to-send-in-slave-mode.patch
i2c-stm32f7-fix-a-race-in-slave-mode-with-arbitratio.patch
i2c-stm32f7-remove-warning-when-compiling-with-w-1.patch
cifs-fix-cifsinodeinfo-lock_sem-deadlock-when-reconn.patch
irqchip-sifive-plic-skip-contexts-except-supervisor-.patch
nbd-protect-cmd-status-with-cmd-lock.patch
nbd-handle-racing-with-error-ed-out-commands.patch
cxgb4-fix-panic-when-attaching-to-uld-fail.patch
cxgb4-request-the-tx-cidx-updates-to-status-page.patch
dccp-do-not-leak-jiffies-on-the-wire.patch
erspan-fix-the-tun_info-options_len-check-for-erspan.patch
inet-stop-leaking-jiffies-on-the-wire.patch
net-annotate-accesses-to-sk-sk_incoming_cpu.patch
net-annotate-lockless-accesses-to-sk-sk_napi_id.patch
net-dsa-bcm_sf2-fix-imp-setup-for-port-different-than-8.patch
net-ethernet-ftgmac100-fix-dma-coherency-issue-with-sw-checksum.patch
net-fix-sk_page_frag-recursion-from-memory-reclaim.patch
net-hisilicon-fix-ping-latency-when-deal-with-high-throughput.patch
net-mlx4_core-dynamically-set-guaranteed-amount-of-counters-per-vf.patch
netns-fix-gfp-flags-in-rtnl_net_notifyid.patch
net-rtnetlink-fix-a-typo-fbd-fdb.patch
net-usb-lan78xx-disable-interrupts-before-calling-generic_handle_irq.patch
net-zeroing-the-structure-ethtool_wolinfo-in-ethtool_get_wol.patch
selftests-net-reuseport_dualstack-fix-uninitalized-parameter.patch
udp-fix-data-race-in-udp_set_dev_scratch.patch
vxlan-check-tun_info-options_len-properly.patch
net-add-skb_queue_empty_lockless.patch
udp-use-skb_queue_empty_lockless.patch
net-use-skb_queue_empty_lockless-in-poll-handlers.patch
net-use-skb_queue_empty_lockless-in-busy-poll-contexts.patch
net-add-read_once-annotation-in-__skb_wait_for_more_packets.patch
ipv4-fix-route-update-on-metric-change.patch
selftests-fib_tests-add-more-tests-for-metric-update.patch
net-smc-fix-closing-of-fallback-smc-sockets.patch
net-smc-keep-vlan_id-for-smc-r-in-smc_listen_work.patch
keys-fix-memory-leak-in-copy_net_ns.patch
net-phylink-fix-phylink_dbg-macro.patch
rxrpc-fix-handling-of-last-subpacket-of-jumbo-packet.patch
net-mlx5e-determine-source-port-properly-for-vlan-push-action.patch
net-mlx5e-remove-incorrect-match-criteria-assignment-line.patch
net-mlx5e-initialize-on-stack-link-modes-bitmap.patch
net-mlx5-fix-flow-counter-list-auto-bits-struct.patch
net-smc-fix-refcounting-for-non-blocking-connect.patch
net-mlx5-fix-rtable-reference-leak.patch
mlxsw-core-unpublish-devlink-parameters-during-reload.patch
r8169-fix-wrong-phy-id-issue-with-rtl8168dp.patch
net-mlx5e-fix-ethtool-self-test-link-speed.patch
net-mlx5e-fix-handling-of-compressed-cqes-in-case-of-low-napi-budget.patch
ipv4-fix-ipskb_frag_pmtu-handling-with-fragmentation.patch
net-bcmgenet-don-t-set-phydev-link-from-mac.patch
net-dsa-b53-do-not-clear-existing-mirrored-port-mask.patch
net-dsa-fix-switch-tree-list.patch
net-ensure-correct-skb-tstamp-in-various-fragmenters.patch
net-hns3-fix-mis-counting-irq-vector-numbers-issue.patch
net-netem-fix-error-path-for-corrupted-gso-frames.patch
net-reorder-struct-net-fields-to-avoid-false-sharing.patch
net-usb-lan78xx-connect-phy-before-registering-mac.patch
r8152-add-device-id-for-lenovo-thinkpad-usb-c-dock-gen-2.patch
net-netem-correct-the-parent-s-backlog-when-corrupted-packet-was-dropped.patch
net-phy-bcm7xxx-define-soft_reset-for-40nm-ephy.patch
net-bcmgenet-reset-40nm-ephy-on-energy-detect.patch
net-flow_dissector-switch-to-siphash.patch
platform-x86-pmc_atom-add-siemens-simatic-ipc227e-to-critclk_systems-dmi-table.patch
cifs-fix-retry-mid-list-corruption-on-reconnects.patch
selftests-powerpc-add-test-case-for-tlbie-vs-mtpidr-ordering-issue.patch
selftests-powerpc-fix-compile-error-on-tlbie_test-due-to-newer-gcc.patch
asoc-pcm3168a-the-codec-does-not-support-s32_le.patch
arm64-dts-ti-k3-am65-main-fix-gic-its-node-unit-address.patch
usb-gadget-udc-core-fix-segfault-if-udc_bind_to_driver-for-pending-driver-fails.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:
Host 1:
✅ Boot test
❌ selinux-policy: serge-testsuite
🚧 ✅ Storage blktests
Host 2:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ Loopdev Sanity
✅ jvm test suite
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ Networking bridge: sanity
✅ Ethernet drivers sanity
✅ Networking socket: fuzz
✅ Networking sctp-auth: sockopts test
✅ Networking route_func: local
✅ Networking route_func: forward
✅ Networking TCP: keepalive test
✅ Networking UDP: socket
✅ Networking tunnel: gre basic
✅ Networking tunnel: vxlan basic
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
✅ ALSA PCM loopback test
✅ ALSA Control (mixer) Userspace Element test
✅ Usex - version 1.9-29
✅ storage: SCSI VPD
✅ stress: stress-ng
✅ trace: ftrace/tracer
🚧 ✅ CIFS Connectathon
🚧 ✅ POSIX pjd-fstest suites
ppc64le:
Host 1:
✅ Boot test
❌ selinux-policy: serge-testsuite
🚧 ✅ Storage blktests
Host 2:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ Loopdev Sanity
✅ jvm test suite
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ Networking bridge: sanity
✅ Ethernet drivers sanity
✅ Networking socket: fuzz
✅ Networking sctp-auth: sockopts test
✅ Networking route_func: local
✅ Networking route_func: forward
✅ Networking TCP: keepalive test
✅ Networking UDP: socket
✅ Networking tunnel: gre basic
✅ Networking tunnel: vxlan basic
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
✅ ALSA PCM loopback test
✅ ALSA Control (mixer) Userspace Element test
✅ Usex - version 1.9-29
✅ trace: ftrace/tracer
🚧 ✅ CIFS Connectathon
🚧 ✅ POSIX pjd-fstest suites
x86_64:
Host 1:
✅ Boot test
❌ selinux-policy: serge-testsuite
🚧 ⚡⚡⚡ Storage blktests
Host 2:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ Loopdev Sanity
✅ jvm test suite
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ Networking bridge: sanity
✅ Ethernet drivers sanity
✅ Networking socket: fuzz
✅ Networking sctp-auth: sockopts test
✅ Networking route_func: local
✅ Networking route_func: forward
✅ Networking TCP: keepalive test
✅ Networking UDP: socket
✅ Networking tunnel: gre basic
✅ Networking tunnel: vxlan basic
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
✅ pciutils: sanity smoke test
✅ ALSA PCM loopback test
✅ ALSA Control (mixer) Userspace Element test
✅ Usex - version 1.9-29
✅ storage: SCSI VPD
✅ stress: stress-ng
✅ trace: ftrace/tracer
🚧 ✅ CIFS Connectathon
🚧 ✅ POSIX pjd-fstest suites
Test sources: https://github.com/CKI-project/tests-beaker
💚 Pull requests are welcome for new tests or improvements to existing tests!
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.
Testing timeout
---------------
We aim to provide a report within reasonable timeframe. Tests that haven't
finished running are marked with ⏱. Reports for non-upstream kernels have
a Beaker recipe linked to next to each host.
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: 37b4d0c37c0b - Linux 5.3.9
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/272770
One or more kernel tests failed:
ppc64le:
❌ selinux-policy: serge-testsuite
aarch64:
❌ selinux-policy: serge-testsuite
x86_64:
❌ 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: 37b4d0c37c0b - Linux 5.3.9
We grabbed the a429997a66bb commit of the stable queue repository.
We then merged the patchset with `git am`:
regulator-of-fix-suspend-min-max-voltage-parsing.patch
asoc-samsung-arndale-add-missing-of-node-dereferenci.patch
asoc-wm8994-do-not-register-inapplicable-controls-fo.patch
regulator-da9062-fix-suspend_enable-disable-preparat.patch
asoc-topology-fix-a-signedness-bug-in-soc_tplg_dapm_.patch
arm64-dts-allwinner-a64-pine64-plus-add-phy-regulato.patch
arm64-dts-allwinner-a64-drop-pmu-node.patch
arm64-dts-allwinner-a64-sopine-baseboard-add-phy-reg.patch
arm64-dts-fix-gpio-to-pinmux-mapping.patch
regulator-ti-abb-fix-timeout-in-ti_abb_wait_txdone-t.patch
pinctrl-intel-allocate-irq-chip-dynamic.patch
asoc-sof-loader-fix-kernel-oops-on-firmware-boot-fai.patch
asoc-sof-topology-fix-parse-fail-issue-for-byte-bool.patch
asoc-sof-intel-hda-fix-warnings-during-fw-load.patch
asoc-sof-intel-initialise-and-verify-fw-crash-dump-d.patch
asoc-sof-intel-hda-disable-dmi-l1-entry-during-captu.patch
asoc-rt5682-add-null-handler-to-set_jack-function.patch
asoc-intel-sof_rt5682-add-remove-function-to-disable.patch
asoc-intel-bytcr_rt5651-add-null-check-to-support_bu.patch
regulator-pfuze100-regulator-variable-val-in-pfuze10.patch
asoc-wm_adsp-don-t-generate-kcontrols-without-read-f.patch
asoc-rockchip-i2s-fix-rpm-imbalance.patch
arm64-dts-rockchip-fix-rockpro64-rk808-interrupt-lin.patch
arm-dts-logicpd-torpedo-som-remove-twl_keypad.patch
arm64-dts-rockchip-fix-rockpro64-vdd-log-regulator-s.patch
arm64-dts-rockchip-fix-rockpro64-sdhci-settings.patch
pinctrl-ns2-fix-off-by-one-bugs-in-ns2_pinmux_enable.patch
pinctrl-stmfx-fix-null-pointer-on-remove.patch
arm64-dts-zii-ultra-fix-arm-regulator-states.patch
arm-dts-am3874-iceboard-fix-i2c-mux-idle-disconnect-.patch
asoc-msm8916-wcd-digital-add-missing-mix2-path-for-r.patch
asoc-simple_card_utils.h-fix-potential-multiple-rede.patch
arm-dts-use-level-interrupt-for-omap4-5-wlcore.patch
arm-mm-fix-alignment-handler-faults-under-memory-pre.patch
scsi-qla2xxx-fix-a-potential-null-pointer-dereferenc.patch
scsi-scsi_dh_alua-handle-rtpg-sense-code-correctly-d.patch
scsi-sni_53c710-fix-compilation-error.patch
scsi-fix-kconfig-dependency-warning-related-to-53c70.patch
arm-8908-1-add-__always_inline-to-functions-called-f.patch
arm-8914-1-nommu-fix-exc_ret-for-xip.patch
arm64-dts-rockchip-fix-rockpro64-sdmmc-settings.patch
arm64-dts-rockchip-fix-usb-c-on-hugsun-x99-tv-box.patch
arm64-dts-lx2160a-correct-cpu-core-idle-state-name.patch
arm-dts-imx6q-logicpd-re-enable-snvs-power-key.patch
arm-dts-vf610-zii-scu4-aib-specify-i2c-mux-idle-disc.patch
arm-dts-imx7s-correct-gpt-s-ipg-clock-source.patch
arm64-dts-imx8mq-use-correct-clock-for-usdhc-s-ipg-c.patch
arm64-dts-imx8mm-use-correct-clock-for-usdhc-s-ipg-c.patch
perf-tools-fix-resource-leak-of-closedir-on-the-erro.patch
perf-c2c-fix-memory-leak-in-build_cl_output.patch
8250-men-mcb-fix-error-checking-when-get_num_ports-r.patch
perf-kmem-fix-memory-leak-in-compact_gfp_flags.patch
arm-davinci-dm365-fix-mcbsp-dma_slave_map-entry.patch
drm-amdgpu-fix-potential-vm-faults.patch
drm-amdgpu-fix-error-handling-in-amdgpu_bo_list_crea.patch
scsi-target-core-do-not-overwrite-cdb-byte-1.patch
scsi-hpsa-add-missing-hunks-in-reset-patch.patch
asoc-intel-sof-rt5682-add-a-check-for-devm_clk_get.patch
asoc-sof-control-return-true-when-kcontrol-values-ch.patch
tracing-fix-gfp_t-format-for-synthetic-events.patch
arm-dts-bcm2837-rpi-cm3-avoid-leds-gpio-probing-issu.patch
i2c-aspeed-fix-master-pending-state-handling.patch
drm-komeda-don-t-flush-inactive-pipes.patch
arm-8926-1-v7m-remove-register-save-to-stack-before-.patch
selftests-kvm-vmx_set_nested_state_test-don-t-check-.patch
selftests-kvm-fix-sync_regs_test-with-newer-gccs.patch
alsa-hda-add-tigerlake-jasperlake-pci-id.patch
of-unittest-fix-memory-leak-in-unittest_data_add.patch
mips-bmips-mark-exception-vectors-as-char-arrays.patch
irqchip-gic-v3-its-use-the-exact-itslist-for-vmovp.patch
i2c-mt65xx-fix-null-ptr-dereference.patch
i2c-stm32f7-fix-first-byte-to-send-in-slave-mode.patch
i2c-stm32f7-fix-a-race-in-slave-mode-with-arbitratio.patch
i2c-stm32f7-remove-warning-when-compiling-with-w-1.patch
cifs-fix-cifsinodeinfo-lock_sem-deadlock-when-reconn.patch
irqchip-sifive-plic-skip-contexts-except-supervisor-.patch
nbd-protect-cmd-status-with-cmd-lock.patch
nbd-handle-racing-with-error-ed-out-commands.patch
cxgb4-fix-panic-when-attaching-to-uld-fail.patch
cxgb4-request-the-tx-cidx-updates-to-status-page.patch
dccp-do-not-leak-jiffies-on-the-wire.patch
erspan-fix-the-tun_info-options_len-check-for-erspan.patch
inet-stop-leaking-jiffies-on-the-wire.patch
net-annotate-accesses-to-sk-sk_incoming_cpu.patch
net-annotate-lockless-accesses-to-sk-sk_napi_id.patch
net-dsa-bcm_sf2-fix-imp-setup-for-port-different-than-8.patch
net-ethernet-ftgmac100-fix-dma-coherency-issue-with-sw-checksum.patch
net-fix-sk_page_frag-recursion-from-memory-reclaim.patch
net-hisilicon-fix-ping-latency-when-deal-with-high-throughput.patch
net-mlx4_core-dynamically-set-guaranteed-amount-of-counters-per-vf.patch
netns-fix-gfp-flags-in-rtnl_net_notifyid.patch
net-rtnetlink-fix-a-typo-fbd-fdb.patch
net-usb-lan78xx-disable-interrupts-before-calling-generic_handle_irq.patch
net-zeroing-the-structure-ethtool_wolinfo-in-ethtool_get_wol.patch
selftests-net-reuseport_dualstack-fix-uninitalized-parameter.patch
udp-fix-data-race-in-udp_set_dev_scratch.patch
vxlan-check-tun_info-options_len-properly.patch
net-add-skb_queue_empty_lockless.patch
udp-use-skb_queue_empty_lockless.patch
net-use-skb_queue_empty_lockless-in-poll-handlers.patch
net-use-skb_queue_empty_lockless-in-busy-poll-contexts.patch
net-add-read_once-annotation-in-__skb_wait_for_more_packets.patch
ipv4-fix-route-update-on-metric-change.patch
selftests-fib_tests-add-more-tests-for-metric-update.patch
net-smc-fix-closing-of-fallback-smc-sockets.patch
net-smc-keep-vlan_id-for-smc-r-in-smc_listen_work.patch
keys-fix-memory-leak-in-copy_net_ns.patch
net-phylink-fix-phylink_dbg-macro.patch
rxrpc-fix-handling-of-last-subpacket-of-jumbo-packet.patch
net-mlx5e-determine-source-port-properly-for-vlan-push-action.patch
net-mlx5e-remove-incorrect-match-criteria-assignment-line.patch
net-mlx5e-initialize-on-stack-link-modes-bitmap.patch
net-mlx5-fix-flow-counter-list-auto-bits-struct.patch
net-smc-fix-refcounting-for-non-blocking-connect.patch
net-mlx5-fix-rtable-reference-leak.patch
mlxsw-core-unpublish-devlink-parameters-during-reload.patch
r8169-fix-wrong-phy-id-issue-with-rtl8168dp.patch
net-mlx5e-fix-ethtool-self-test-link-speed.patch
net-mlx5e-fix-handling-of-compressed-cqes-in-case-of-low-napi-budget.patch
ipv4-fix-ipskb_frag_pmtu-handling-with-fragmentation.patch
net-bcmgenet-don-t-set-phydev-link-from-mac.patch
net-dsa-b53-do-not-clear-existing-mirrored-port-mask.patch
net-dsa-fix-switch-tree-list.patch
net-ensure-correct-skb-tstamp-in-various-fragmenters.patch
net-hns3-fix-mis-counting-irq-vector-numbers-issue.patch
net-netem-fix-error-path-for-corrupted-gso-frames.patch
net-reorder-struct-net-fields-to-avoid-false-sharing.patch
net-usb-lan78xx-connect-phy-before-registering-mac.patch
r8152-add-device-id-for-lenovo-thinkpad-usb-c-dock-gen-2.patch
net-netem-correct-the-parent-s-backlog-when-corrupted-packet-was-dropped.patch
net-phy-bcm7xxx-define-soft_reset-for-40nm-ephy.patch
net-bcmgenet-reset-40nm-ephy-on-energy-detect.patch
net-flow_dissector-switch-to-siphash.patch
platform-x86-pmc_atom-add-siemens-simatic-ipc227e-to-critclk_systems-dmi-table.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:
Host 1:
✅ Boot test
❌ selinux-policy: serge-testsuite
🚧 ✅ Storage blktests
Host 2:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ Loopdev Sanity
✅ jvm test suite
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ Networking bridge: sanity
✅ Ethernet drivers sanity
✅ Networking socket: fuzz
✅ Networking sctp-auth: sockopts test
✅ Networking route_func: local
✅ Networking route_func: forward
✅ Networking TCP: keepalive test
✅ Networking UDP: socket
✅ Networking tunnel: gre basic
✅ Networking tunnel: vxlan basic
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
✅ ALSA PCM loopback test
✅ ALSA Control (mixer) Userspace Element test
✅ Usex - version 1.9-29
✅ storage: SCSI VPD
✅ stress: stress-ng
✅ trace: ftrace/tracer
🚧 ✅ CIFS Connectathon
🚧 ✅ POSIX pjd-fstest suites
ppc64le:
Host 1:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ Loopdev Sanity
✅ jvm test suite
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ Networking bridge: sanity
✅ Ethernet drivers sanity
✅ Networking socket: fuzz
✅ Networking sctp-auth: sockopts test
✅ Networking route_func: local
✅ Networking route_func: forward
✅ Networking TCP: keepalive test
✅ Networking UDP: socket
✅ Networking tunnel: gre basic
✅ Networking tunnel: vxlan basic
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
✅ ALSA PCM loopback test
✅ ALSA Control (mixer) Userspace Element test
✅ Usex - version 1.9-29
✅ trace: ftrace/tracer
🚧 ✅ CIFS Connectathon
🚧 ✅ POSIX pjd-fstest suites
Host 2:
✅ Boot test
❌ selinux-policy: serge-testsuite
🚧 ✅ Storage blktests
x86_64:
Host 1:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ Loopdev Sanity
✅ jvm test suite
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ Networking bridge: sanity
✅ Ethernet drivers sanity
✅ Networking socket: fuzz
✅ Networking sctp-auth: sockopts test
✅ Networking route_func: local
✅ Networking route_func: forward
✅ Networking TCP: keepalive test
✅ Networking UDP: socket
✅ Networking tunnel: gre basic
✅ Networking tunnel: vxlan basic
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
✅ pciutils: sanity smoke test
✅ ALSA PCM loopback test
✅ ALSA Control (mixer) Userspace Element test
✅ Usex - version 1.9-29
✅ storage: SCSI VPD
✅ stress: stress-ng
✅ trace: ftrace/tracer
🚧 ✅ CIFS Connectathon
🚧 ✅ POSIX pjd-fstest suites
Host 2:
✅ Boot test
❌ selinux-policy: serge-testsuite
🚧 ✅ Storage blktests
Test sources: https://github.com/CKI-project/tests-beaker
💚 Pull requests are welcome for new tests or improvements to existing tests!
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.
Testing timeout
---------------
We aim to provide a report within reasonable timeframe. Tests that haven't
finished running are marked with ⏱. Reports for non-upstream kernels have
a Beaker recipe linked to next to each host.
From: "Aneesh Kumar K.V" <aneesh.kumar(a)linux.ibm.com>
commit 93cad5f789951eaa27c3392b15294b4e51253944 upstream.
Cc: stable(a)vger.kernel.org # v5.3
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar(a)linux.ibm.com>
[mpe: Some minor fixes to make it build]
Signed-off-by: Michael Ellerman <mpe(a)ellerman.id.au>
Link: https://lore.kernel.org/r/20190924035254.24612-4-aneesh.kumar@linux.ibm.com
[sandipan: Backported to v5.3]
Signed-off-by: Sandipan Das <sandipan(a)linux.ibm.com>
---
tools/testing/selftests/powerpc/mm/Makefile | 2 +
.../testing/selftests/powerpc/mm/tlbie_test.c | 734 ++++++++++++++++++
2 files changed, 736 insertions(+)
create mode 100644 tools/testing/selftests/powerpc/mm/tlbie_test.c
diff --git a/tools/testing/selftests/powerpc/mm/Makefile b/tools/testing/selftests/powerpc/mm/Makefile
index f1fbc15800c4..ed1565809d2b 100644
--- a/tools/testing/selftests/powerpc/mm/Makefile
+++ b/tools/testing/selftests/powerpc/mm/Makefile
@@ -4,6 +4,7 @@ noarg:
TEST_GEN_PROGS := hugetlb_vs_thp_test subpage_prot prot_sao segv_errors wild_bctr \
large_vm_fork_separation
+TEST_GEN_PROGS_EXTENDED := tlbie_test
TEST_GEN_FILES := tempfile
top_srcdir = ../../../../..
@@ -19,3 +20,4 @@ $(OUTPUT)/large_vm_fork_separation: CFLAGS += -m64
$(OUTPUT)/tempfile:
dd if=/dev/zero of=$@ bs=64k count=1
+$(OUTPUT)/tlbie_test: LDLIBS += -lpthread
diff --git a/tools/testing/selftests/powerpc/mm/tlbie_test.c b/tools/testing/selftests/powerpc/mm/tlbie_test.c
new file mode 100644
index 000000000000..9868a5ddd847
--- /dev/null
+++ b/tools/testing/selftests/powerpc/mm/tlbie_test.c
@@ -0,0 +1,734 @@
+// SPDX-License-Identifier: GPL-2.0
+
+/*
+ * Copyright 2019, Nick Piggin, Gautham R. Shenoy, Aneesh Kumar K.V, IBM Corp.
+ */
+
+/*
+ *
+ * Test tlbie/mtpidr race. We have 4 threads doing flush/load/compare/store
+ * sequence in a loop. The same threads also rung a context switch task
+ * that does sched_yield() in loop.
+ *
+ * The snapshot thread mark the mmap area PROT_READ in between, make a copy
+ * and copy it back to the original area. This helps us to detect if any
+ * store continued to happen after we marked the memory PROT_READ.
+ */
+
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <sys/mman.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <sys/ipc.h>
+#include <sys/shm.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <linux/futex.h>
+#include <unistd.h>
+#include <asm/unistd.h>
+#include <string.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sched.h>
+#include <time.h>
+#include <stdarg.h>
+#include <sched.h>
+#include <pthread.h>
+#include <signal.h>
+#include <sys/prctl.h>
+
+static inline void dcbf(volatile unsigned int *addr)
+{
+ __asm__ __volatile__ ("dcbf %y0; sync" : : "Z"(*(unsigned char *)addr) : "memory");
+}
+
+static void err_msg(char *msg)
+{
+
+ time_t now;
+ time(&now);
+ printf("=================================\n");
+ printf(" Error: %s\n", msg);
+ printf(" %s", ctime(&now));
+ printf("=================================\n");
+ exit(1);
+}
+
+static char *map1;
+static char *map2;
+static pid_t rim_process_pid;
+
+/*
+ * A "rim-sequence" is defined to be the sequence of the following
+ * operations performed on a memory word:
+ * 1) FLUSH the contents of that word.
+ * 2) LOAD the contents of that word.
+ * 3) COMPARE the contents of that word with the content that was
+ * previously stored at that word
+ * 4) STORE new content into that word.
+ *
+ * The threads in this test that perform the rim-sequence are termed
+ * as rim_threads.
+ */
+
+/*
+ * A "corruption" is defined to be the failed COMPARE operation in a
+ * rim-sequence.
+ *
+ * A rim_thread that detects a corruption informs about it to all the
+ * other rim_threads, and the mem_snapshot thread.
+ */
+static volatile unsigned int corruption_found;
+
+/*
+ * This defines the maximum number of rim_threads in this test.
+ *
+ * The THREAD_ID_BITS denote the number of bits required
+ * to represent the thread_ids [0..MAX_THREADS - 1].
+ * We are being a bit paranoid here and set it to 8 bits,
+ * though 6 bits suffice.
+ *
+ */
+#define MAX_THREADS 64
+#define THREAD_ID_BITS 8
+#define THREAD_ID_MASK ((1 << THREAD_ID_BITS) - 1)
+static unsigned int rim_thread_ids[MAX_THREADS];
+static pthread_t rim_threads[MAX_THREADS];
+
+
+/*
+ * Each rim_thread works on an exclusive "chunk" of size
+ * RIM_CHUNK_SIZE.
+ *
+ * The ith rim_thread works on the ith chunk.
+ *
+ * The ith chunk begins at
+ * map1 + (i * RIM_CHUNK_SIZE)
+ */
+#define RIM_CHUNK_SIZE 1024
+#define BITS_PER_BYTE 8
+#define WORD_SIZE (sizeof(unsigned int))
+#define WORD_BITS (WORD_SIZE * BITS_PER_BYTE)
+#define WORDS_PER_CHUNK (RIM_CHUNK_SIZE/WORD_SIZE)
+
+static inline char *compute_chunk_start_addr(unsigned int thread_id)
+{
+ char *chunk_start;
+
+ chunk_start = (char *)((unsigned long)map1 +
+ (thread_id * RIM_CHUNK_SIZE));
+
+ return chunk_start;
+}
+
+/*
+ * The "word-offset" of a word-aligned address inside a chunk, is
+ * defined to be the number of words that precede the address in that
+ * chunk.
+ *
+ * WORD_OFFSET_BITS denote the number of bits required to represent
+ * the word-offsets of all the word-aligned addresses of a chunk.
+ */
+#define WORD_OFFSET_BITS (__builtin_ctz(WORDS_PER_CHUNK))
+#define WORD_OFFSET_MASK ((1 << WORD_OFFSET_BITS) - 1)
+
+static inline unsigned int compute_word_offset(char *start, unsigned int *addr)
+{
+ unsigned int delta_bytes, ret;
+ delta_bytes = (unsigned long)addr - (unsigned long)start;
+
+ ret = delta_bytes/WORD_SIZE;
+
+ return ret;
+}
+
+/*
+ * A "sweep" is defined to be the sequential execution of the
+ * rim-sequence by a rim_thread on its chunk one word at a time,
+ * starting from the first word of its chunk and ending with the last
+ * word of its chunk.
+ *
+ * Each sweep of a rim_thread is uniquely identified by a sweep_id.
+ * SWEEP_ID_BITS denote the number of bits required to represent
+ * the sweep_ids of rim_threads.
+ *
+ * As to why SWEEP_ID_BITS are computed as a function of THREAD_ID_BITS,
+ * WORD_OFFSET_BITS, and WORD_BITS, see the "store-pattern" below.
+ */
+#define SWEEP_ID_BITS (WORD_BITS - (THREAD_ID_BITS + WORD_OFFSET_BITS))
+#define SWEEP_ID_MASK ((1 << SWEEP_ID_BITS) - 1)
+
+/*
+ * A "store-pattern" is the word-pattern that is stored into a word
+ * location in the 4)STORE step of the rim-sequence.
+ *
+ * In the store-pattern, we shall encode:
+ *
+ * - The thread-id of the rim_thread performing the store
+ * (The most significant THREAD_ID_BITS)
+ *
+ * - The word-offset of the address into which the store is being
+ * performed (The next WORD_OFFSET_BITS)
+ *
+ * - The sweep_id of the current sweep in which the store is
+ * being performed. (The lower SWEEP_ID_BITS)
+ *
+ * Store Pattern: 32 bits
+ * |------------------|--------------------|---------------------------------|
+ * | Thread id | Word offset | sweep_id |
+ * |------------------|--------------------|---------------------------------|
+ * THREAD_ID_BITS WORD_OFFSET_BITS SWEEP_ID_BITS
+ *
+ * In the store pattern, the (Thread-id + Word-offset) uniquely identify the
+ * address to which the store is being performed i.e,
+ * address == map1 +
+ * (Thread-id * RIM_CHUNK_SIZE) + (Word-offset * WORD_SIZE)
+ *
+ * And the sweep_id in the store pattern identifies the time when the
+ * store was performed by the rim_thread.
+ *
+ * We shall use this property in the 3)COMPARE step of the
+ * rim-sequence.
+ */
+#define SWEEP_ID_SHIFT 0
+#define WORD_OFFSET_SHIFT (SWEEP_ID_BITS)
+#define THREAD_ID_SHIFT (WORD_OFFSET_BITS + SWEEP_ID_BITS)
+
+/*
+ * Compute the store pattern for a given thread with id @tid, at
+ * location @addr in the sweep identified by @sweep_id
+ */
+static inline unsigned int compute_store_pattern(unsigned int tid,
+ unsigned int *addr,
+ unsigned int sweep_id)
+{
+ unsigned int ret = 0;
+ char *start = compute_chunk_start_addr(tid);
+ unsigned int word_offset = compute_word_offset(start, addr);
+
+ ret += (tid & THREAD_ID_MASK) << THREAD_ID_SHIFT;
+ ret += (word_offset & WORD_OFFSET_MASK) << WORD_OFFSET_SHIFT;
+ ret += (sweep_id & SWEEP_ID_MASK) << SWEEP_ID_SHIFT;
+ return ret;
+}
+
+/* Extract the thread-id from the given store-pattern */
+static inline unsigned int extract_tid(unsigned int pattern)
+{
+ unsigned int ret;
+
+ ret = (pattern >> THREAD_ID_SHIFT) & THREAD_ID_MASK;
+ return ret;
+}
+
+/* Extract the word-offset from the given store-pattern */
+static inline unsigned int extract_word_offset(unsigned int pattern)
+{
+ unsigned int ret;
+
+ ret = (pattern >> WORD_OFFSET_SHIFT) & WORD_OFFSET_MASK;
+
+ return ret;
+}
+
+/* Extract the sweep-id from the given store-pattern */
+static inline unsigned int extract_sweep_id(unsigned int pattern)
+
+{
+ unsigned int ret;
+
+ ret = (pattern >> SWEEP_ID_SHIFT) & SWEEP_ID_MASK;
+
+ return ret;
+}
+
+/************************************************************
+ * *
+ * Logging the output of the verification *
+ * *
+ ************************************************************/
+#define LOGDIR_NAME_SIZE 100
+static char logdir[LOGDIR_NAME_SIZE];
+
+static FILE *fp[MAX_THREADS];
+static const char logfilename[] ="Thread-%02d-Chunk";
+
+static inline void start_verification_log(unsigned int tid,
+ unsigned int *addr,
+ unsigned int cur_sweep_id,
+ unsigned int prev_sweep_id)
+{
+ FILE *f;
+ char logfile[30];
+ char path[LOGDIR_NAME_SIZE + 30];
+ char separator[2] = "/";
+ char *chunk_start = compute_chunk_start_addr(tid);
+ unsigned int size = RIM_CHUNK_SIZE;
+
+ sprintf(logfile, logfilename, tid);
+ strcpy(path, logdir);
+ strcat(path, separator);
+ strcat(path, logfile);
+ f = fopen(path, "w");
+
+ if (!f) {
+ err_msg("Unable to create logfile\n");
+ }
+
+ fp[tid] = f;
+
+ fprintf(f, "----------------------------------------------------------\n");
+ fprintf(f, "PID = %d\n", rim_process_pid);
+ fprintf(f, "Thread id = %02d\n", tid);
+ fprintf(f, "Chunk Start Addr = 0x%016lx\n", (unsigned long)chunk_start);
+ fprintf(f, "Chunk Size = %d\n", size);
+ fprintf(f, "Next Store Addr = 0x%016lx\n", (unsigned long)addr);
+ fprintf(f, "Current sweep-id = 0x%08x\n", cur_sweep_id);
+ fprintf(f, "Previous sweep-id = 0x%08x\n", prev_sweep_id);
+ fprintf(f, "----------------------------------------------------------\n");
+}
+
+static inline void log_anamoly(unsigned int tid, unsigned int *addr,
+ unsigned int expected, unsigned int observed)
+{
+ FILE *f = fp[tid];
+
+ fprintf(f, "Thread %02d: Addr 0x%lx: Expected 0x%x, Observed 0x%x\n",
+ tid, (unsigned long)addr, expected, observed);
+ fprintf(f, "Thread %02d: Expected Thread id = %02d\n", tid, extract_tid(expected));
+ fprintf(f, "Thread %02d: Observed Thread id = %02d\n", tid, extract_tid(observed));
+ fprintf(f, "Thread %02d: Expected Word offset = %03d\n", tid, extract_word_offset(expected));
+ fprintf(f, "Thread %02d: Observed Word offset = %03d\n", tid, extract_word_offset(observed));
+ fprintf(f, "Thread %02d: Expected sweep-id = 0x%x\n", tid, extract_sweep_id(expected));
+ fprintf(f, "Thread %02d: Observed sweep-id = 0x%x\n", tid, extract_sweep_id(observed));
+ fprintf(f, "----------------------------------------------------------\n");
+}
+
+static inline void end_verification_log(unsigned int tid, unsigned nr_anamolies)
+{
+ FILE *f = fp[tid];
+ char logfile[30];
+ char path[LOGDIR_NAME_SIZE + 30];
+ char separator[] = "/";
+
+ fclose(f);
+
+ if (nr_anamolies == 0) {
+ remove(path);
+ return;
+ }
+
+ sprintf(logfile, logfilename, tid);
+ strcpy(path, logdir);
+ strcat(path, separator);
+ strcat(path, logfile);
+
+ printf("Thread %02d chunk has %d corrupted words. For details check %s\n",
+ tid, nr_anamolies, path);
+}
+
+/*
+ * When a COMPARE step of a rim-sequence fails, the rim_thread informs
+ * everyone else via the shared_memory pointed to by
+ * corruption_found variable. On seeing this, every thread verifies the
+ * content of its chunk as follows.
+ *
+ * Suppose a thread identified with @tid was about to store (but not
+ * yet stored) to @next_store_addr in its current sweep identified
+ * @cur_sweep_id. Let @prev_sweep_id indicate the previous sweep_id.
+ *
+ * This implies that for all the addresses @addr < @next_store_addr,
+ * Thread @tid has already performed a store as part of its current
+ * sweep. Hence we expect the content of such @addr to be:
+ * |-------------------------------------------------|
+ * | tid | word_offset(addr) | cur_sweep_id |
+ * |-------------------------------------------------|
+ *
+ * Since Thread @tid is yet to perform stores on address
+ * @next_store_addr and above, we expect the content of such an
+ * address @addr to be:
+ * |-------------------------------------------------|
+ * | tid | word_offset(addr) | prev_sweep_id |
+ * |-------------------------------------------------|
+ *
+ * The verifier function @verify_chunk does this verification and logs
+ * any anamolies that it finds.
+ */
+static void verify_chunk(unsigned int tid, unsigned int *next_store_addr,
+ unsigned int cur_sweep_id,
+ unsigned int prev_sweep_id)
+{
+ unsigned int *iter_ptr;
+ unsigned int size = RIM_CHUNK_SIZE;
+ unsigned int expected;
+ unsigned int observed;
+ char *chunk_start = compute_chunk_start_addr(tid);
+
+ int nr_anamolies = 0;
+
+ start_verification_log(tid, next_store_addr,
+ cur_sweep_id, prev_sweep_id);
+
+ for (iter_ptr = (unsigned int *)chunk_start;
+ (unsigned long)iter_ptr < (unsigned long)chunk_start + size;
+ iter_ptr++) {
+ unsigned int expected_sweep_id;
+
+ if (iter_ptr < next_store_addr) {
+ expected_sweep_id = cur_sweep_id;
+ } else {
+ expected_sweep_id = prev_sweep_id;
+ }
+
+ expected = compute_store_pattern(tid, iter_ptr, expected_sweep_id);
+
+ dcbf((volatile unsigned int*)iter_ptr); //Flush before reading
+ observed = *iter_ptr;
+
+ if (observed != expected) {
+ nr_anamolies++;
+ log_anamoly(tid, iter_ptr, expected, observed);
+ }
+ }
+
+ end_verification_log(tid, nr_anamolies);
+}
+
+static void set_pthread_cpu(pthread_t th, int cpu)
+{
+ cpu_set_t run_cpu_mask;
+ struct sched_param param;
+
+ CPU_ZERO(&run_cpu_mask);
+ CPU_SET(cpu, &run_cpu_mask);
+ pthread_setaffinity_np(th, sizeof(cpu_set_t), &run_cpu_mask);
+
+ param.sched_priority = 1;
+ if (0 && sched_setscheduler(0, SCHED_FIFO, ¶m) == -1) {
+ /* haven't reproduced with this setting, it kills random preemption which may be a factor */
+ fprintf(stderr, "could not set SCHED_FIFO, run as root?\n");
+ }
+}
+
+static void set_mycpu(int cpu)
+{
+ cpu_set_t run_cpu_mask;
+ struct sched_param param;
+
+ CPU_ZERO(&run_cpu_mask);
+ CPU_SET(cpu, &run_cpu_mask);
+ sched_setaffinity(0, sizeof(cpu_set_t), &run_cpu_mask);
+
+ param.sched_priority = 1;
+ if (0 && sched_setscheduler(0, SCHED_FIFO, ¶m) == -1) {
+ fprintf(stderr, "could not set SCHED_FIFO, run as root?\n");
+ }
+}
+
+static volatile int segv_wait;
+
+static void segv_handler(int signo, siginfo_t *info, void *extra)
+{
+ while (segv_wait) {
+ sched_yield();
+ }
+
+}
+
+static void set_segv_handler(void)
+{
+ struct sigaction sa;
+
+ sa.sa_flags = SA_SIGINFO;
+ sa.sa_sigaction = segv_handler;
+
+ if (sigaction(SIGSEGV, &sa, NULL) == -1) {
+ perror("sigaction");
+ exit(EXIT_FAILURE);
+ }
+}
+
+int timeout = 0;
+/*
+ * This function is executed by every rim_thread.
+ *
+ * This function performs sweeps over the exclusive chunks of the
+ * rim_threads executing the rim-sequence one word at a time.
+ */
+static void *rim_fn(void *arg)
+{
+ unsigned int tid = *((unsigned int *)arg);
+
+ int size = RIM_CHUNK_SIZE;
+ char *chunk_start = compute_chunk_start_addr(tid);
+
+ unsigned int prev_sweep_id;
+ unsigned int cur_sweep_id = 0;
+
+ /* word access */
+ unsigned int pattern = cur_sweep_id;
+ unsigned int *pattern_ptr = &pattern;
+ unsigned int *w_ptr, read_data;
+
+ set_segv_handler();
+
+ /*
+ * Let us initialize the chunk:
+ *
+ * Each word-aligned address addr in the chunk,
+ * is initialized to :
+ * |-------------------------------------------------|
+ * | tid | word_offset(addr) | 0 |
+ * |-------------------------------------------------|
+ */
+ for (w_ptr = (unsigned int *)chunk_start;
+ (unsigned long)w_ptr < (unsigned long)(chunk_start) + size;
+ w_ptr++) {
+
+ *pattern_ptr = compute_store_pattern(tid, w_ptr, cur_sweep_id);
+ *w_ptr = *pattern_ptr;
+ }
+
+ while (!corruption_found && !timeout) {
+ prev_sweep_id = cur_sweep_id;
+ cur_sweep_id = cur_sweep_id + 1;
+
+ for (w_ptr = (unsigned int *)chunk_start;
+ (unsigned long)w_ptr < (unsigned long)(chunk_start) + size;
+ w_ptr++) {
+ unsigned int old_pattern;
+
+ /*
+ * Compute the pattern that we would have
+ * stored at this location in the previous
+ * sweep.
+ */
+ old_pattern = compute_store_pattern(tid, w_ptr, prev_sweep_id);
+
+ /*
+ * FLUSH:Ensure that we flush the contents of
+ * the cache before loading
+ */
+ dcbf((volatile unsigned int*)w_ptr); //Flush
+
+ /* LOAD: Read the value */
+ read_data = *w_ptr; //Load
+
+ /*
+ * COMPARE: Is it the same as what we had stored
+ * in the previous sweep ? It better be!
+ */
+ if (read_data != old_pattern) {
+ /* No it isn't! Tell everyone */
+ corruption_found = 1;
+ }
+
+ /*
+ * Before performing a store, let us check if
+ * any rim_thread has found a corruption.
+ */
+ if (corruption_found || timeout) {
+ /*
+ * Yes. Someone (including us!) has found
+ * a corruption :(
+ *
+ * Let us verify that our chunk is
+ * correct.
+ */
+ /* But first, let us allow the dust to settle down! */
+ verify_chunk(tid, w_ptr, cur_sweep_id, prev_sweep_id);
+
+ return 0;
+ }
+
+ /*
+ * Compute the new pattern that we are going
+ * to write to this location
+ */
+ *pattern_ptr = compute_store_pattern(tid, w_ptr, cur_sweep_id);
+
+ /*
+ * STORE: Now let us write this pattern into
+ * the location
+ */
+ *w_ptr = *pattern_ptr;
+ }
+ }
+
+ return NULL;
+}
+
+
+static unsigned long start_cpu = 0;
+static unsigned long nrthreads = 4;
+
+static pthread_t mem_snapshot_thread;
+
+static void *mem_snapshot_fn(void *arg)
+{
+ int page_size = getpagesize();
+ size_t size = page_size;
+ void *tmp = malloc(size);
+
+ while (!corruption_found && !timeout) {
+ /* Stop memory migration once corruption is found */
+ segv_wait = 1;
+
+ mprotect(map1, size, PROT_READ);
+
+ /*
+ * Load from the working alias (map1). Loading from map2
+ * also fails.
+ */
+ memcpy(tmp, map1, size);
+
+ /*
+ * Stores must go via map2 which has write permissions, but
+ * the corrupted data tends to be seen in the snapshot buffer,
+ * so corruption does not appear to be introduced at the
+ * copy-back via map2 alias here.
+ */
+ memcpy(map2, tmp, size);
+ /*
+ * Before releasing other threads, must ensure the copy
+ * back to
+ */
+ asm volatile("sync" ::: "memory");
+ mprotect(map1, size, PROT_READ|PROT_WRITE);
+ asm volatile("sync" ::: "memory");
+ segv_wait = 0;
+
+ usleep(1); /* This value makes a big difference */
+ }
+
+ return 0;
+}
+
+void alrm_sighandler(int sig)
+{
+ timeout = 1;
+}
+
+int main(int argc, char *argv[])
+{
+ int c;
+ int page_size = getpagesize();
+ time_t now;
+ int i, dir_error;
+ pthread_attr_t attr;
+ key_t shm_key = (key_t) getpid();
+ int shmid, run_time = 20 * 60;
+ struct sigaction sa_alrm;
+
+ snprintf(logdir, LOGDIR_NAME_SIZE,
+ "/tmp/logdir-%u", (unsigned int)getpid());
+ while ((c = getopt(argc, argv, "r:hn:l:t:")) != -1) {
+ switch(c) {
+ case 'r':
+ start_cpu = strtoul(optarg, NULL, 10);
+ break;
+ case 'h':
+ printf("%s [-r <start_cpu>] [-n <nrthreads>] [-l <logdir>] [-t <timeout>]\n", argv[0]);
+ exit(0);
+ break;
+ case 'n':
+ nrthreads = strtoul(optarg, NULL, 10);
+ break;
+ case 'l':
+ strncpy(logdir, optarg, LOGDIR_NAME_SIZE);
+ break;
+ case 't':
+ run_time = strtoul(optarg, NULL, 10);
+ break;
+ default:
+ printf("invalid option\n");
+ exit(0);
+ break;
+ }
+ }
+
+ if (nrthreads > MAX_THREADS)
+ nrthreads = MAX_THREADS;
+
+ shmid = shmget(shm_key, page_size, IPC_CREAT|0666);
+ if (shmid < 0) {
+ err_msg("Failed shmget\n");
+ }
+
+ map1 = shmat(shmid, NULL, 0);
+ if (map1 == (void *) -1) {
+ err_msg("Failed shmat");
+ }
+
+ map2 = shmat(shmid, NULL, 0);
+ if (map2 == (void *) -1) {
+ err_msg("Failed shmat");
+ }
+
+ dir_error = mkdir(logdir, 0755);
+
+ if (dir_error) {
+ err_msg("Failed mkdir");
+ }
+
+ printf("start_cpu list:%lu\n", start_cpu);
+ printf("number of worker threads:%lu + 1 snapshot thread\n", nrthreads);
+ printf("Allocated address:0x%016lx + secondary map:0x%016lx\n", (unsigned long)map1, (unsigned long)map2);
+ printf("logdir at : %s\n", logdir);
+ printf("Timeout: %d seconds\n", run_time);
+
+ time(&now);
+ printf("=================================\n");
+ printf(" Starting Test\n");
+ printf(" %s", ctime(&now));
+ printf("=================================\n");
+
+ for (i = 0; i < nrthreads; i++) {
+ if (1 && !fork()) {
+ prctl(PR_SET_PDEATHSIG, SIGKILL);
+ set_mycpu(start_cpu + i);
+ for (;;)
+ sched_yield();
+ exit(0);
+ }
+ }
+
+
+ sa_alrm.sa_handler = &alrm_sighandler;
+ sigemptyset(&sa_alrm.sa_mask);
+ sa_alrm.sa_flags = 0;
+
+ if (sigaction(SIGALRM, &sa_alrm, 0) == -1) {
+ err_msg("Failed signal handler registration\n");
+ }
+
+ alarm(run_time);
+
+ pthread_attr_init(&attr);
+ for (i = 0; i < nrthreads; i++) {
+ rim_thread_ids[i] = i;
+ pthread_create(&rim_threads[i], &attr, rim_fn, &rim_thread_ids[i]);
+ set_pthread_cpu(rim_threads[i], start_cpu + i);
+ }
+
+ pthread_create(&mem_snapshot_thread, &attr, mem_snapshot_fn, map1);
+ set_pthread_cpu(mem_snapshot_thread, start_cpu + i);
+
+
+ pthread_join(mem_snapshot_thread, NULL);
+ for (i = 0; i < nrthreads; i++) {
+ pthread_join(rim_threads[i], NULL);
+ }
+
+ if (!timeout) {
+ time(&now);
+ printf("=================================\n");
+ printf(" Data Corruption Detected\n");
+ printf(" %s", ctime(&now));
+ printf(" See logfiles in %s\n", logdir);
+ printf("=================================\n");
+ return 1;
+ }
+ return 0;
+}
--
2.21.0
This is a backport of "iio: stm32-adc: fix a race with dma and irq" series
on top of v4.14.148 at the time of writing. The original series doesn't
apply cleanly on v4.14.x: the precursor patch needed a slight update.
Original series can be found in [1].
[1] https://www.lkml.org/lkml/2019/9/17/394
Original cover-letter:
This series fixes a race condition observed when using several ADCs with DMA
and irq.
There's a precusor patch to the fix. It keeps registers definitions as a whole
block, to ease readability and allow simple (readl) access path to EOC bits in
stm32-adc-core driver.
Fabrice Gasnier (2):
iio: adc: stm32-adc: move registers definitions
iio: adc: stm32-adc: fix a race when using several adcs with dma and
irq
drivers/iio/adc/stm32-adc-core.c | 70 +++++++++++---------
drivers/iio/adc/stm32-adc-core.h | 135 +++++++++++++++++++++++++++++++++++++++
drivers/iio/adc/stm32-adc.c | 107 -------------------------------
3 files changed, 175 insertions(+), 137 deletions(-)
--
2.7.4
This is a backport to v4.4 of the Spectre v1 and v2 mitigations for 32-bit
ARM that have already been backported to v4.9.
Patches #17 and up were cherry-picked from the v4.9 tree, and applied cleanly.
The first 16 patches are prerequisites that were introduced between v4.4 and
v4.9, and some needed minor massaging to apply. Some notable issues:
- the 32-bit KVM host parts were omitted, given the lack of demand and the
fact that those pieces saw significantly more churn during the v4.4-v4.9
timeframe due to the fact that the code is shared with arm64
- some other changes are shared between ARM and arm64 (notably, the ARM SMCCCC
changes), so the backport affects both architectures.
Patches can be found at [0]. They were build and boot tested using a variety
of ARM and arm64 configs and platforms, both locally and on KernelCI.
An RFC of this series was sent out to the linux-arm-kernel mailing list
and cc'ed to the maintainer, and no objections were raised. (The only
difference between the RFC and this submission is that I have dropped
a couple of mostly unrelated patches that were only there to make patch #8
match its context more closely in the file include/linux/arm-smccc.h)
Cc: Russell King <rmk+kernel(a)armlinux.org.uk>
Cc: Linus Walleij <linus.walleij(a)linaro.org>
[0] https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git/log/?h=arm32…
[1] https://lore.kernel.org/linux-arm-kernel/20191105205846.1394-1-ardb@kernel.…
Andrey Ryabinin (1):
ARM: 8051/1: put_user: fix possible data corruption in put_user
Jens Wiklander (4):
ARM: 8478/2: arm/arm64: add arm-smccc
ARM: 8479/2: add implementation for arm-smccc
ARM: 8480/2: arm64: add implementation for arm-smccc
ARM: 8481/2: drivers: psci: replace psci firmware calls
Julien Thierry (8):
ARM: 8789/1: signal: copy registers using __copy_to_user()
ARM: 8791/1: vfp: use __copy_to_user() when saving VFP state
ARM: 8792/1: oabi-compat: copy oabi events using __copy_to_user()
ARM: 8793/1: signal: replace __put_user_error with __put_user
ARM: 8794/1: uaccess: Prevent speculative use of the current
addr_limit
ARM: 8795/1: spectre-v1.1: use put_user() for __put_user()
ARM: 8796/1: spectre-v1,v1.1: provide helpers for address sanitization
ARM: 8810/1: vfp: Fix wrong assignement to ufp_exc
Marc Zyngier (3):
arm/arm64: smccc: Add SMCCC-specific return codes
arm/arm64: smccc-1.1: Make return values unsigned long
arm/arm64: smccc-1.1: Handle function result as parameters
Mark Rutland (6):
arm/arm64: KVM: Advertise SMCCC v1.1
arm64: KVM: Report SMCCC_ARCH_WORKAROUND_1 BP hardening support
firmware/psci: Expose PSCI conduit
firmware/psci: Expose SMCCC version through psci_ops
arm/arm64: smccc: Make function identifiers an unsigned quantity
arm/arm64: smccc: Implement SMCCC v1.1 inline primitive
Russell King (27):
ARM: uaccess: remove put_user() code duplication
ARM: add more CPU part numbers for Cortex and Brahma B15 CPUs
ARM: bugs: prepare processor bug infrastructure
ARM: bugs: hook processor bug checking into SMP and suspend paths
ARM: bugs: add support for per-processor bug checking
ARM: spectre: add Kconfig symbol for CPUs vulnerable to Spectre
ARM: spectre-v2: harden branch predictor on context switches
ARM: spectre-v2: add Cortex A8 and A15 validation of the IBE bit
ARM: spectre-v2: harden user aborts in kernel space
ARM: spectre-v2: add firmware based hardening
ARM: spectre-v2: warn about incorrect context switching functions
ARM: spectre-v1: add speculation barrier (csdb) macros
ARM: spectre-v1: add array_index_mask_nospec() implementation
ARM: spectre-v1: fix syscall entry
ARM: signal: copy registers using __copy_from_user()
ARM: vfp: use __copy_from_user() when restoring VFP state
ARM: oabi-compat: copy semops using __copy_from_user()
ARM: use __inttype() in get_user()
ARM: spectre-v1: use get_user() for __get_user()
ARM: spectre-v1: mitigate user accesses
ARM: make lookup_processor_type() non-__init
ARM: split out processor lookup
ARM: clean up per-processor check_bugs method call
ARM: add PROC_VTABLE and PROC_TABLE macros
ARM: spectre-v2: per-CPU vtables to work around big.Little systems
ARM: ensure that processor vtables is not lost after boot
ARM: fix the cockup in the previous patch
Vladimir Murzin (1):
ARM: Move system register accessors to asm/cp15.h
arch/arm/Kconfig | 3 +-
arch/arm/include/asm/arch_gicv3.h | 27 +-
arch/arm/include/asm/assembler.h | 23 ++
arch/arm/include/asm/barrier.h | 34 +++
arch/arm/include/asm/bugs.h | 6 +-
arch/arm/include/asm/cp15.h | 18 ++
arch/arm/include/asm/cputype.h | 9 +
arch/arm/include/asm/proc-fns.h | 65 ++++-
arch/arm/include/asm/system_misc.h | 15 ++
arch/arm/include/asm/thread_info.h | 8 +-
arch/arm/include/asm/uaccess.h | 177 +++++++-----
arch/arm/kernel/Makefile | 4 +-
arch/arm/kernel/armksyms.c | 6 +
arch/arm/kernel/bugs.c | 18 ++
arch/arm/kernel/entry-common.S | 18 +-
arch/arm/kernel/entry-header.S | 25 ++
arch/arm/kernel/head-common.S | 6 +-
arch/arm/kernel/psci-call.S | 31 ---
arch/arm/kernel/setup.c | 40 +--
arch/arm/kernel/signal.c | 125 +++++----
arch/arm/kernel/smccc-call.S | 62 +++++
arch/arm/kernel/smp.c | 36 +++
arch/arm/kernel/suspend.c | 2 +
arch/arm/kernel/sys_oabi-compat.c | 16 +-
arch/arm/lib/copy_from_user.S | 5 +
arch/arm/mm/Kconfig | 23 ++
arch/arm/mm/Makefile | 2 +-
arch/arm/mm/fault.c | 3 +
arch/arm/mm/proc-macros.S | 13 +-
arch/arm/mm/proc-v7-2level.S | 6 -
arch/arm/mm/proc-v7-bugs.c | 161 +++++++++++
arch/arm/mm/proc-v7.S | 154 ++++++++---
arch/arm/vfp/vfpmodule.c | 37 ++-
arch/arm64/Kconfig | 1 +
arch/arm64/kernel/Makefile | 4 +-
arch/arm64/kernel/arm64ksyms.c | 5 +
arch/arm64/kernel/asm-offsets.c | 3 +
arch/arm64/kernel/psci-call.S | 28 --
arch/arm64/kernel/smccc-call.S | 43 +++
drivers/firmware/Kconfig | 3 +
drivers/firmware/psci.c | 78 +++++-
include/linux/arm-smccc.h | 283 ++++++++++++++++++++
include/linux/psci.h | 13 +
43 files changed, 1313 insertions(+), 326 deletions(-)
create mode 100644 arch/arm/kernel/bugs.c
delete mode 100644 arch/arm/kernel/psci-call.S
create mode 100644 arch/arm/kernel/smccc-call.S
create mode 100644 arch/arm/mm/proc-v7-bugs.c
delete mode 100644 arch/arm64/kernel/psci-call.S
create mode 100644 arch/arm64/kernel/smccc-call.S
create mode 100644 include/linux/arm-smccc.h
--
2.20.1
The patch titled
Subject: mm: slub: really fix slab walking for init_on_free
has been added to the -mm tree. Its filename is
mm-slub-really-fix-slab-walking-for-init_on_free.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/mm-slub-really-fix-slab-walking-fo…
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/mm-slub-really-fix-slab-walking-fo…
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Laura Abbott <labbott(a)redhat.com>
Subject: mm: slub: really fix slab walking for init_on_free
Commit 1b7e816fc80e ("mm: slub: Fix slab walking for init_on_free") fixed
one problem with the slab walking but missed a key detail: When walking
the list, the head and tail pointers need to be updated since we end up
reversing the list as a result. Without doing this, bulk free is broken.
One way this is exposed is a NULL pointer with slub_debug=F:
=============================================================================
BUG skbuff_head_cache (Tainted: G T): Object already free
-----------------------------------------------------------------------------
INFO: Slab 0x000000000d2d2f8f objects=16 used=3 fp=0x0000000064309071 flags=0x3fff00000000201
BUG: kernel NULL pointer dereference, address: 0000000000000000
PGD 0 P4D 0
Oops: 0000 [#1] PREEMPT SMP PTI
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G B T 5.3.8 #1
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015
RIP: 0010:print_trailer+0x70/0x1d5
Code: 28 4d 8b 4d 00 4d 8b 45 20 81 e2 ff 7f 00 00 e8 86 ce ef ff 8b 4b 20 48 89 ea 48 89 ee 4c 29 e2 48 c7 c7 90 6f d4 89 48 01 e9 <48> 33 09 48 33 8b 70 01 00 00 e8 61 ce ef ff f6 43 09 04 74 35 8b
RSP: 0018:ffffbf7680003d58 EFLAGS: 00010046
RAX: 000000000000005d RBX: ffffa3d2bb08e540 RCX: 0000000000000000
RDX: 00005c2d8fdc2000 RSI: 0000000000000000 RDI: ffffffff89d46f90
RBP: 0000000000000000 R08: 0000000000000242 R09: 000000000000006c
R10: 0000000000000000 R11: 0000000000000030 R12: ffffa3d27023e000
R13: fffff11080c08f80 R14: ffffa3d2bb047a80 R15: 0000000000000002
FS: 0000000000000000(0000) GS:ffffa3d2be400000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000007a6c4000 CR4: 00000000000006f0
Call Trace:
<IRQ>
free_debug_processing.cold.37+0xc9/0x149
? __kfree_skb_flush+0x30/0x40
? __kfree_skb_flush+0x30/0x40
__slab_free+0x22a/0x3d0
? tcp_wfree+0x2a/0x140
? __sock_wfree+0x1b/0x30
kmem_cache_free_bulk+0x415/0x420
? __kfree_skb_flush+0x30/0x40
__kfree_skb_flush+0x30/0x40
net_rx_action+0x2dd/0x480
__do_softirq+0xf0/0x246
irq_exit+0x93/0xb0
do_IRQ+0xa0/0x110
common_interrupt+0xf/0xf
</IRQ>
Given we're now almost identical to the existing debugging code which
correctly walks the list, combine with that.
Link: https://lkml.kernel.org/r/20191104170303.GA50361@gandi.net
Link: http://lkml.kernel.org/r/20191106222208.26815-1-labbott@redhat.com
Fixes: 1b7e816fc80e ("mm: slub: Fix slab walking for init_on_free")
Signed-off-by: Laura Abbott <labbott(a)redhat.com>
Reported-by: Thibaut Sautereau <thibaut.sautereau(a)clip-os.org>
Cc: Kees Cook <keescook(a)chromium.org>
Cc: Alexander Potapenko <glider(a)google.com>
Cc: "David S. Miller" <davem(a)davemloft.net>
Cc: Vlastimil Babka <vbabka(a)suse.cz>
Cc: <clipos(a)ssi.gouv.fr>
Cc: Christoph Lameter <cl(a)linux.com>
Cc: Pekka Enberg <penberg(a)kernel.org>
Cc: David Rientjes <rientjes(a)google.com>
Cc: Joonsoo Kim <iamjoonsoo.kim(a)lge.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/slub.c | 39 +++++++++------------------------------
1 file changed, 9 insertions(+), 30 deletions(-)
--- a/mm/slub.c~mm-slub-really-fix-slab-walking-for-init_on_free
+++ a/mm/slub.c
@@ -1433,12 +1433,15 @@ static inline bool slab_free_freelist_ho
void *old_tail = *tail ? *tail : *head;
int rsize;
- if (slab_want_init_on_free(s)) {
- void *p = NULL;
+ /* Head and tail of the reconstructed freelist */
+ *head = NULL;
+ *tail = NULL;
+
+ do {
+ object = next;
+ next = get_freepointer(s, object);
- do {
- object = next;
- next = get_freepointer(s, object);
+ if (slab_want_init_on_free(s)) {
/*
* Clear the object and the metadata, but don't touch
* the redzone.
@@ -1448,29 +1451,8 @@ static inline bool slab_free_freelist_ho
: 0;
memset((char *)object + s->inuse, 0,
s->size - s->inuse - rsize);
- set_freepointer(s, object, p);
- p = object;
- } while (object != old_tail);
- }
-
-/*
- * Compiler cannot detect this function can be removed if slab_free_hook()
- * evaluates to nothing. Thus, catch all relevant config debug options here.
- */
-#if defined(CONFIG_LOCKDEP) || \
- defined(CONFIG_DEBUG_KMEMLEAK) || \
- defined(CONFIG_DEBUG_OBJECTS_FREE) || \
- defined(CONFIG_KASAN)
-
- next = *head;
- /* Head and tail of the reconstructed freelist */
- *head = NULL;
- *tail = NULL;
-
- do {
- object = next;
- next = get_freepointer(s, object);
+ }
/* If object's reuse doesn't have to be delayed */
if (!slab_free_hook(s, object)) {
/* Move object to the new freelist */
@@ -1485,9 +1467,6 @@ static inline bool slab_free_freelist_ho
*tail = NULL;
return *head != NULL;
-#else
- return true;
-#endif
}
static void *setup_object(struct kmem_cache *s, struct page *page,
_
Patches currently in -mm which might be from labbott(a)redhat.com are
mm-slub-really-fix-slab-walking-for-init_on_free.patch
The OMAP36xx and AM/DM37x TRMs say that the maximum divider for DSS fclk
(in CM_CLKSEL_DSS) is 32. Experimentation shows that this is not
correct, and using divider of 32 breaks DSS with a flood or underflows
and sync losts. Dividers up to 31 seem to work fine.
There is another patch to the DT files to limit the divider correctly,
but as the DSS driver also needs to know the maximum divider to be able
to iteratively find good rates, we also need to do the fix in the DSS
driver.
Signed-off-by: Adam Ford <aford173(a)gmail.com>
Cc: Tomi Valkeinen <tomi.valkeinen(a)ti.com>
Cc: stable(a)vger.kernel.org # linux-4.4.y only
diff --git a/drivers/video/fbdev/omap2/dss/dss.c b/drivers/video/fbdev/omap2/dss/dss.c
index 9200a8668b49..a57c3a5f4bf8 100644
--- a/drivers/video/fbdev/omap2/dss/dss.c
+++ b/drivers/video/fbdev/omap2/dss/dss.c
@@ -843,7 +843,7 @@ static const struct dss_features omap34xx_dss_feats = {
};
static const struct dss_features omap3630_dss_feats = {
- .fck_div_max = 32,
+ .fck_div_max = 31,
.dss_fck_multiplier = 1,
.parent_clk_name = "dpll4_ck",
.dpi_select_source = &dss_dpi_select_source_omap2_omap3,
--
2.17.1
The OMAP36xx and AM/DM37x TRMs say that the maximum divider for DSS fclk
(in CM_CLKSEL_DSS) is 32. Experimentation shows that this is not
correct, and using divider of 32 breaks DSS with a flood or underflows
and sync losts. Dividers up to 31 seem to work fine.
There is another patch to the DT files to limit the divider correctly,
but as the DSS driver also needs to know the maximum divider to be able
to iteratively find good rates, we also need to do the fix in the DSS
driver.
Signed-off-by: Adam Ford <aford173(a)gmail.com>
Cc: Tomi Valkeinen <tomi.valkeinen(a)ti.com>
Cc: stable(a)vger.kernel.org #linux-4.9.y+
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dss.c b/drivers/video/fbdev/omap2/omapfb/dss/dss.c
index 48c6500c24e1..4429ad37b64c 100644
--- a/drivers/video/fbdev/omap2/omapfb/dss/dss.c
+++ b/drivers/video/fbdev/omap2/omapfb/dss/dss.c
@@ -843,7 +843,7 @@ static const struct dss_features omap34xx_dss_feats = {
};
static const struct dss_features omap3630_dss_feats = {
- .fck_div_max = 32,
+ .fck_div_max = 31,
.dss_fck_multiplier = 1,
.parent_clk_name = "dpll4_ck",
.dpi_select_source = &dss_dpi_select_source_omap2_omap3,
--
2.17.1
Commit 7667819385457b4aeb5fac94f67f52ab52cc10d5 upstream.
bam_dma_terminate_all() will leak resources if any of the transactions are
committed to the hardware (present in the desc fifo), and not complete.
Since bam_dma_terminate_all() does not cause the hardware to be updated,
the hardware will still operate on any previously committed transactions.
This can cause memory corruption if the memory for the transaction has been
reassigned, and will cause a sync issue between the BAM and its client(s).
Fix this by properly updating the hardware in bam_dma_terminate_all().
Fixes: e7c0fe2a5c84 ("dmaengine: add Qualcomm BAM dma driver")
Signed-off-by: Jeffrey Hugo <jeffrey.l.hugo(a)gmail.com>
Cc: stable(a)vger.kernel.org
Link: https://lore.kernel.org/r/20191017152606.34120-1-jeffrey.l.hugo@gmail.com
Signed-off-by: Vinod Koul <vkoul(a)kernel.org>
---
Backported to 4.14 which is lacking 6b4faeac05bc
("dmaengine: qcom-bam: Process multiple pending descriptors")
This version also applies to 4.9.
---
drivers/dma/qcom/bam_dma.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c
index 8fbf175fdcc7..57c5cc51f862 100644
--- a/drivers/dma/qcom/bam_dma.c
+++ b/drivers/dma/qcom/bam_dma.c
@@ -690,7 +690,21 @@ static int bam_dma_terminate_all(struct dma_chan *chan)
/* remove all transactions, including active transaction */
spin_lock_irqsave(&bchan->vc.lock, flag);
+ /*
+ * If we have transactions queued, then some might be committed to the
+ * hardware in the desc fifo. The only way to reset the desc fifo is
+ * to do a hardware reset (either by pipe or the entire block).
+ * bam_chan_init_hw() will trigger a pipe reset, and also reinit the
+ * pipe. If the pipe is left disabled (default state after pipe reset)
+ * and is accessed by a connected hardware engine, a fatal error in
+ * the BAM will occur. There is a small window where this could happen
+ * with bam_chan_init_hw(), but it is assumed that the caller has
+ * stopped activity on any attached hardware engine. Make sure to do
+ * this first so that the BAM hardware doesn't cause memory corruption
+ * by accessing freed resources.
+ */
if (bchan->curr_txd) {
+ bam_chan_init_hw(bchan, bchan->curr_txd->dir);
list_add(&bchan->curr_txd->vd.node, &bchan->vc.desc_issued);
bchan->curr_txd = NULL;
}
--
2.17.1
In gfs2_page_mkwrite's gfs2_allocate_page_backing helper, try to
allocate as many blocks at once as we need. Pass in the size of the
requested allocation.
Fixes: 35af80aef99b ("gfs2: don't use buffer_heads in gfs2_allocate_page_backing")
Cc: stable(a)vger.kernel.org # v5.3+
Signed-off-by: Andreas Gruenbacher <agruenba(a)redhat.com>
---
fs/gfs2/file.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
index 33ace1832294..30b857017fd3 100644
--- a/fs/gfs2/file.c
+++ b/fs/gfs2/file.c
@@ -381,27 +381,28 @@ static void gfs2_size_hint(struct file *filep, loff_t offset, size_t size)
/**
* gfs2_allocate_page_backing - Allocate blocks for a write fault
* @page: The (locked) page to allocate backing for
+ * @length: Size of the allocation
*
* We try to allocate all the blocks required for the page in one go. This
* might fail for various reasons, so we keep trying until all the blocks to
* back this page are allocated. If some of the blocks are already allocated,
* that is ok too.
*/
-static int gfs2_allocate_page_backing(struct page *page)
+static int gfs2_allocate_page_backing(struct page *page, unsigned int length)
{
u64 pos = page_offset(page);
- u64 size = PAGE_SIZE;
do {
struct iomap iomap = { };
- if (gfs2_iomap_get_alloc(page->mapping->host, pos, 1, &iomap))
+ if (gfs2_iomap_get_alloc(page->mapping->host, pos, length, &iomap))
return -EIO;
- iomap.length = min(iomap.length, size);
- size -= iomap.length;
+ if (length < iomap.length)
+ iomap.length = length;
+ length -= iomap.length;
pos += iomap.length;
- } while (size > 0);
+ } while (length > 0);
return 0;
}
@@ -501,7 +502,7 @@ static vm_fault_t gfs2_page_mkwrite(struct vm_fault *vmf)
if (gfs2_is_stuffed(ip))
ret = gfs2_unstuff_dinode(ip, page);
if (ret == 0)
- ret = gfs2_allocate_page_backing(page);
+ ret = gfs2_allocate_page_backing(page, PAGE_SIZE);
out_trans_end:
if (ret)
--
2.20.1
From: Tamizh chelvam <tamizhr(a)codeaurora.org>
[ Upstream commit bd1d395070cca4f42a93e520b0597274789274a4 ]
When continuously running wifi up/down sequence, the napi poll
can be scheduled after the CE buffers being freed by ath10k_pci_flush
Steps:
In a certain condition, during wifi down below scenario might occur.
ath10k_stop->ath10k_hif_stop->napi_schedule->ath10k_pci_flush->napi_poll(napi_synchronize).
In the above scenario, CE buffer entries will be freed up and become NULL in
ath10k_pci_flush. And the napi_poll has been invoked after the flush process
and it will try to get the skb from the CE buffer entry and perform some action on that.
Since the CE buffer already cleaned by pci flush this action will create NULL
pointer dereference and trigger below kernel panic.
Unable to handle kernel NULL pointer dereference at virtual address 0000005c
PC is at ath10k_pci_htt_rx_cb+0x64/0x3ec [ath10k_pci]
ath10k_pci_htt_rx_cb [ath10k_pci]
ath10k_ce_per_engine_service+0x74/0xc4 [ath10k_pci]
ath10k_ce_per_engine_service [ath10k_pci]
ath10k_ce_per_engine_service_any+0x74/0x80 [ath10k_pci]
ath10k_ce_per_engine_service_any [ath10k_pci]
ath10k_pci_napi_poll+0x48/0xec [ath10k_pci]
ath10k_pci_napi_poll [ath10k_pci]
net_rx_action+0xac/0x160
net_rx_action
__do_softirq+0xdc/0x208
__do_softirq
irq_exit+0x84/0xe0
irq_exit
__handle_domain_irq+0x80/0xa0
__handle_domain_irq
gic_handle_irq+0x38/0x5c
gic_handle_irq
__irq_usr+0x44/0x60
Tested on QCA4019 and firmware version 10.4.3.2.1.1-00010
Signed-off-by: Tamizh chelvam <tamizhr(a)codeaurora.org>
Signed-off-by: Kalle Valo <kvalo(a)codeaurora.org>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
drivers/net/wireless/ath/ath10k/ahb.c | 4 ++--
drivers/net/wireless/ath/ath10k/pci.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/ahb.c b/drivers/net/wireless/ath/ath10k/ahb.c
index da770af830369..125b5c31b2b0a 100644
--- a/drivers/net/wireless/ath/ath10k/ahb.c
+++ b/drivers/net/wireless/ath/ath10k/ahb.c
@@ -658,10 +658,10 @@ static void ath10k_ahb_hif_stop(struct ath10k *ar)
ath10k_ahb_irq_disable(ar);
synchronize_irq(ar_ahb->irq);
- ath10k_pci_flush(ar);
-
napi_synchronize(&ar->napi);
napi_disable(&ar->napi);
+
+ ath10k_pci_flush(ar);
}
static int ath10k_ahb_hif_power_up(struct ath10k *ar)
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index 25b8d501d437e..b7bac14d1487b 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -1781,9 +1781,9 @@ static void ath10k_pci_hif_stop(struct ath10k *ar)
ath10k_pci_irq_disable(ar);
ath10k_pci_irq_sync(ar);
- ath10k_pci_flush(ar);
napi_synchronize(&ar->napi);
napi_disable(&ar->napi);
+ ath10k_pci_flush(ar);
spin_lock_irqsave(&ar_pci->ps_lock, flags);
WARN_ON(ar_pci->ps_wake_refcount > 0);
--
2.20.1
From: Stefan Agner <stefan(a)agner.ch>
[ Upstream commit b1ec0802503820ccbc894aadfd2a44da20232f5e ]
After finding a reasonable gain, the function converts the configured
gain to a gain configuration option selector enum max9611_csa_gain.
Make the conversion clearly visible by using an explicit cast. This
also avoids a warning seen with clang:
drivers/iio/adc/max9611.c:292:16: warning: implicit conversion from
enumeration type 'enum max9611_conf_ids' to different enumeration
type 'enum max9611_csa_gain' [-Wenum-conversion]
*csa_gain = gain_selectors[i];
~ ^~~~~~~~~~~~~~~~~
Signed-off-by: Stefan Agner <stefan(a)agner.ch>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron(a)huawei.com>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
drivers/iio/adc/max9611.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/adc/max9611.c b/drivers/iio/adc/max9611.c
index c61fbf5602718..33be07c78b96f 100644
--- a/drivers/iio/adc/max9611.c
+++ b/drivers/iio/adc/max9611.c
@@ -289,7 +289,7 @@ static int max9611_read_csa_voltage(struct max9611_dev *max9611,
return ret;
if (*adc_raw > 0) {
- *csa_gain = gain_selectors[i];
+ *csa_gain = (enum max9611_csa_gain)gain_selectors[i];
return 0;
}
}
--
2.20.1
This is a note to let you know that I've just added the patch titled
phy: renesas: rcar-gen3-usb2: Fix sysfs interface of "role"
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-next branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release
during the merge window.
If you have any questions about this process, please let me know.
>From 4bd5ead82d4b877ebe41daf95f28cda53205b039 Mon Sep 17 00:00:00 2001
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh(a)renesas.com>
Date: Mon, 7 Oct 2019 16:55:10 +0900
Subject: phy: renesas: rcar-gen3-usb2: Fix sysfs interface of "role"
Since the role_store() uses strncmp(), it's possible to refer
out-of-memory if the sysfs data size is smaller than strlen("host").
This patch fixes it by using sysfs_streq() instead of strncmp().
Reported-by: Pavel Machek <pavel(a)denx.de>
Fixes: 9bb86777fb71 ("phy: rcar-gen3-usb2: add sysfs for usb role swap")
Cc: <stable(a)vger.kernel.org> # v4.10+
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh(a)renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas(a)glider.be>
Acked-by: Pavel Machek <pavel(a)denx.de>
Signed-off-by: Kishon Vijay Abraham I <kishon(a)ti.com>
---
drivers/phy/renesas/phy-rcar-gen3-usb2.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
index 49ec67d46ccc..bfb22f868857 100644
--- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c
+++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
@@ -21,6 +21,7 @@
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/regulator/consumer.h>
+#include <linux/string.h>
#include <linux/usb/of.h>
#include <linux/workqueue.h>
@@ -320,9 +321,9 @@ static ssize_t role_store(struct device *dev, struct device_attribute *attr,
if (!ch->is_otg_channel || !rcar_gen3_is_any_rphy_initialized(ch))
return -EIO;
- if (!strncmp(buf, "host", strlen("host")))
+ if (sysfs_streq(buf, "host"))
new_mode = PHY_MODE_USB_HOST;
- else if (!strncmp(buf, "peripheral", strlen("peripheral")))
+ else if (sysfs_streq(buf, "peripheral"))
new_mode = PHY_MODE_USB_DEVICE;
else
return -EINVAL;
--
2.24.0
This is a note to let you know that I've just added the patch titled
appledisplay: fix error handling in the scheduled work
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-next branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release
during the merge window.
If you have any questions about this process, please let me know.
>From 91feb01596e5efc0cc922cc73f5583114dccf4d2 Mon Sep 17 00:00:00 2001
From: Oliver Neukum <oneukum(a)suse.com>
Date: Wed, 6 Nov 2019 13:49:01 +0100
Subject: appledisplay: fix error handling in the scheduled work
The work item can operate on
1. stale memory left over from the last transfer
the actual length of the data transfered needs to be checked
2. memory already freed
the error handling in appledisplay_probe() needs
to cancel the work in that case
Reported-and-tested-by: syzbot+495dab1f175edc9c2f13(a)syzkaller.appspotmail.com
Signed-off-by: Oliver Neukum <oneukum(a)suse.com>
Cc: stable <stable(a)vger.kernel.org>
Link: https://lore.kernel.org/r/20191106124902.7765-1-oneukum@suse.com
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/usb/misc/appledisplay.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/misc/appledisplay.c b/drivers/usb/misc/appledisplay.c
index ac92725458b5..ba1eaabc7796 100644
--- a/drivers/usb/misc/appledisplay.c
+++ b/drivers/usb/misc/appledisplay.c
@@ -164,7 +164,12 @@ static int appledisplay_bl_get_brightness(struct backlight_device *bd)
0,
pdata->msgdata, 2,
ACD_USB_TIMEOUT);
- brightness = pdata->msgdata[1];
+ if (retval < 2) {
+ if (retval >= 0)
+ retval = -EMSGSIZE;
+ } else {
+ brightness = pdata->msgdata[1];
+ }
mutex_unlock(&pdata->sysfslock);
if (retval < 0)
@@ -299,6 +304,7 @@ static int appledisplay_probe(struct usb_interface *iface,
if (pdata) {
if (pdata->urb) {
usb_kill_urb(pdata->urb);
+ cancel_delayed_work_sync(&pdata->work);
if (pdata->urbdata)
usb_free_coherent(pdata->udev, ACD_URB_BUFFER_LEN,
pdata->urbdata, pdata->urb->transfer_dma);
--
2.24.0
This is a note to let you know that I've just added the patch titled
usbip: tools: fix fd leakage in the function of
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-next branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release
during the merge window.
If you have any questions about this process, please let me know.
>From 26a4d4c00f85cb844dd11dd35e848b079c2f5e8f Mon Sep 17 00:00:00 2001
From: Hewenliang <hewenliang4(a)huawei.com>
Date: Fri, 25 Oct 2019 00:35:15 -0400
Subject: usbip: tools: fix fd leakage in the function of
read_attr_usbip_status
We should close the fd before the return of read_attr_usbip_status.
Fixes: 3391ba0e2792 ("usbip: tools: Extract generic code to be shared with vudc backend")
Signed-off-by: Hewenliang <hewenliang4(a)huawei.com>
Cc: stable <stable(a)vger.kernel.org>
Link: https://lore.kernel.org/r/20191025043515.20053-1-hewenliang4@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
tools/usb/usbip/libsrc/usbip_host_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/usb/usbip/libsrc/usbip_host_common.c b/tools/usb/usbip/libsrc/usbip_host_common.c
index 2813aa821c82..d1d8ba2a4a40 100644
--- a/tools/usb/usbip/libsrc/usbip_host_common.c
+++ b/tools/usb/usbip/libsrc/usbip_host_common.c
@@ -57,7 +57,7 @@ static int32_t read_attr_usbip_status(struct usbip_usb_device *udev)
}
value = atoi(status);
-
+ close(fd);
return value;
}
--
2.24.0
This is a note to let you know that I've just added the patch titled
usb: Allow USB device to be warm reset in suspended state
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-next branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release
during the merge window.
If you have any questions about this process, please let me know.
>From e76b3bf7654c3c94554c24ba15a3d105f4006c80 Mon Sep 17 00:00:00 2001
From: Kai-Heng Feng <kai.heng.feng(a)canonical.com>
Date: Wed, 6 Nov 2019 14:27:10 +0800
Subject: usb: Allow USB device to be warm reset in suspended state
On Dell WD15 dock, sometimes USB ethernet cannot be detected after plugging
cable to the ethernet port, the hub and roothub get runtime resumed and
runtime suspended immediately:
...
[ 433.315169] xhci_hcd 0000:3a:00.0: hcd_pci_runtime_resume: 0
[ 433.315204] usb usb4: usb auto-resume
[ 433.315226] hub 4-0:1.0: hub_resume
[ 433.315239] xhci_hcd 0000:3a:00.0: Get port status 4-1 read: 0x10202e2, return 0x10343
[ 433.315264] usb usb4-port1: status 0343 change 0001
[ 433.315279] xhci_hcd 0000:3a:00.0: clear port1 connect change, portsc: 0x10002e2
[ 433.315293] xhci_hcd 0000:3a:00.0: Get port status 4-2 read: 0x2a0, return 0x2a0
[ 433.317012] xhci_hcd 0000:3a:00.0: xhci_hub_status_data: stopping port polling.
[ 433.422282] xhci_hcd 0000:3a:00.0: Get port status 4-1 read: 0x10002e2, return 0x343
[ 433.422307] usb usb4-port1: do warm reset
[ 433.422311] usb 4-1: device reset not allowed in state 8
[ 433.422339] hub 4-0:1.0: state 7 ports 2 chg 0002 evt 0000
[ 433.422346] xhci_hcd 0000:3a:00.0: Get port status 4-1 read: 0x10002e2, return 0x343
[ 433.422356] usb usb4-port1: do warm reset
[ 433.422358] usb 4-1: device reset not allowed in state 8
[ 433.422428] xhci_hcd 0000:3a:00.0: set port remote wake mask, actual port 0 status = 0xf0002e2
[ 433.422455] xhci_hcd 0000:3a:00.0: set port remote wake mask, actual port 1 status = 0xe0002a0
[ 433.422465] hub 4-0:1.0: hub_suspend
[ 433.422475] usb usb4: bus auto-suspend, wakeup 1
[ 433.426161] xhci_hcd 0000:3a:00.0: xhci_hub_status_data: stopping port polling.
[ 433.466209] xhci_hcd 0000:3a:00.0: port 0 polling in bus suspend, waiting
[ 433.510204] xhci_hcd 0000:3a:00.0: port 0 polling in bus suspend, waiting
[ 433.554051] xhci_hcd 0000:3a:00.0: port 0 polling in bus suspend, waiting
[ 433.598235] xhci_hcd 0000:3a:00.0: port 0 polling in bus suspend, waiting
[ 433.642154] xhci_hcd 0000:3a:00.0: port 0 polling in bus suspend, waiting
[ 433.686204] xhci_hcd 0000:3a:00.0: port 0 polling in bus suspend, waiting
[ 433.730205] xhci_hcd 0000:3a:00.0: port 0 polling in bus suspend, waiting
[ 433.774203] xhci_hcd 0000:3a:00.0: port 0 polling in bus suspend, waiting
[ 433.818207] xhci_hcd 0000:3a:00.0: port 0 polling in bus suspend, waiting
[ 433.862040] xhci_hcd 0000:3a:00.0: port 0 polling in bus suspend, waiting
[ 433.862053] xhci_hcd 0000:3a:00.0: xhci_hub_status_data: stopping port polling.
[ 433.862077] xhci_hcd 0000:3a:00.0: xhci_suspend: stopping port polling.
[ 433.862096] xhci_hcd 0000:3a:00.0: // Setting command ring address to 0x8578fc001
[ 433.862312] xhci_hcd 0000:3a:00.0: hcd_pci_runtime_suspend: 0
[ 433.862445] xhci_hcd 0000:3a:00.0: PME# enabled
[ 433.902376] xhci_hcd 0000:3a:00.0: restoring config space at offset 0xc (was 0x0, writing 0x20)
[ 433.902395] xhci_hcd 0000:3a:00.0: restoring config space at offset 0x4 (was 0x100000, writing 0x100403)
[ 433.902490] xhci_hcd 0000:3a:00.0: PME# disabled
[ 433.902504] xhci_hcd 0000:3a:00.0: enabling bus mastering
[ 433.902547] xhci_hcd 0000:3a:00.0: // Setting command ring address to 0x8578fc001
[ 433.902649] pcieport 0000:00:1b.0: PME: Spurious native interrupt!
[ 433.902839] xhci_hcd 0000:3a:00.0: Port change event, 4-1, id 3, portsc: 0xb0202e2
[ 433.902842] xhci_hcd 0000:3a:00.0: resume root hub
[ 433.902845] xhci_hcd 0000:3a:00.0: handle_port_status: starting port polling.
[ 433.902877] xhci_hcd 0000:3a:00.0: xhci_resume: starting port polling.
[ 433.902889] xhci_hcd 0000:3a:00.0: xhci_hub_status_data: stopping port polling.
[ 433.902891] xhci_hcd 0000:3a:00.0: hcd_pci_runtime_resume: 0
[ 433.902919] usb usb4: usb wakeup-resume
[ 433.902942] usb usb4: usb auto-resume
[ 433.902966] hub 4-0:1.0: hub_resume
...
As Mathias pointed out, the hub enters Cold Attach Status state and
requires a warm reset. However usb_reset_device() bails out early when
the device is in suspended state, as its callers port_event() and
hub_event() don't always resume the device.
Since there's nothing wrong to reset a suspended device, allow
usb_reset_device() to do so to solve the issue.
Signed-off-by: Kai-Heng Feng <kai.heng.feng(a)canonical.com>
Acked-by: Alan Stern <stern(a)rowland.harvard.edu>
Cc: stable <stable(a)vger.kernel.org>
Link: https://lore.kernel.org/r/20191106062710.29880-1-kai.heng.feng@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/usb/core/hub.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index fdcfa85b5b12..1709895387b9 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -5840,7 +5840,7 @@ static int usb_reset_and_verify_device(struct usb_device *udev)
/**
* usb_reset_device - warn interface drivers and perform a USB port reset
- * @udev: device to reset (not in SUSPENDED or NOTATTACHED state)
+ * @udev: device to reset (not in NOTATTACHED state)
*
* Warns all drivers bound to registered interfaces (using their pre_reset
* method), performs the port reset, and then lets the drivers know that
@@ -5868,8 +5868,7 @@ int usb_reset_device(struct usb_device *udev)
struct usb_host_config *config = udev->actconfig;
struct usb_hub *hub = usb_hub_to_struct_hub(udev->parent);
- if (udev->state == USB_STATE_NOTATTACHED ||
- udev->state == USB_STATE_SUSPENDED) {
+ if (udev->state == USB_STATE_NOTATTACHED) {
dev_dbg(&udev->dev, "device reset not allowed in state %d\n",
udev->state);
return -EINVAL;
--
2.24.0
This is an automatic generated email to let you know that the following patch were queued:
Subject: media: vivid: Fix wrong locking that causes race conditions on streaming stop
Author: Alexander Popov <alex.popov(a)linux.com>
Date: Sun Nov 3 23:17:19 2019 +0100
There is the same incorrect approach to locking implemented in
vivid_stop_generating_vid_cap(), vivid_stop_generating_vid_out() and
sdr_cap_stop_streaming().
These functions are called during streaming stopping with vivid_dev.mutex
locked. And they all do the same mistake while stopping their kthreads,
which need to lock this mutex as well. See the example from
vivid_stop_generating_vid_cap():
/* shutdown control thread */
vivid_grab_controls(dev, false);
mutex_unlock(&dev->mutex);
kthread_stop(dev->kthread_vid_cap);
dev->kthread_vid_cap = NULL;
mutex_lock(&dev->mutex);
But when this mutex is unlocked, another vb2_fop_read() can lock it
instead of vivid_thread_vid_cap() and manipulate the buffer queue.
That causes a use-after-free access later.
To fix those issues let's:
1. avoid unlocking the mutex in vivid_stop_generating_vid_cap(),
vivid_stop_generating_vid_out() and sdr_cap_stop_streaming();
2. use mutex_trylock() with schedule_timeout_uninterruptible() in
the loops of the vivid kthread handlers.
Signed-off-by: Alexander Popov <alex.popov(a)linux.com>
Acked-by: Linus Torvalds <torvalds(a)linux-foundation.org>
Tested-by: Hans Verkuil <hverkuil-cisco(a)xs4all.nl>
Signed-off-by: Hans Verkuil <hverkuil-cisco(a)xs4all.nl>
Cc: <stable(a)vger.kernel.org> # for v3.18 and up
Signed-off-by: Mauro Carvalho Chehab <mchehab(a)kernel.org>
drivers/media/platform/vivid/vivid-kthread-cap.c | 8 +++++---
drivers/media/platform/vivid/vivid-kthread-out.c | 8 +++++---
drivers/media/platform/vivid/vivid-sdr-cap.c | 8 +++++---
3 files changed, 15 insertions(+), 9 deletions(-)
---
diff --git a/drivers/media/platform/vivid/vivid-kthread-cap.c b/drivers/media/platform/vivid/vivid-kthread-cap.c
index 9f981e8bae6e..01a9d671b947 100644
--- a/drivers/media/platform/vivid/vivid-kthread-cap.c
+++ b/drivers/media/platform/vivid/vivid-kthread-cap.c
@@ -818,7 +818,11 @@ static int vivid_thread_vid_cap(void *data)
if (kthread_should_stop())
break;
- mutex_lock(&dev->mutex);
+ if (!mutex_trylock(&dev->mutex)) {
+ schedule_timeout_uninterruptible(1);
+ continue;
+ }
+
cur_jiffies = jiffies;
if (dev->cap_seq_resync) {
dev->jiffies_vid_cap = cur_jiffies;
@@ -998,8 +1002,6 @@ void vivid_stop_generating_vid_cap(struct vivid_dev *dev, bool *pstreaming)
/* shutdown control thread */
vivid_grab_controls(dev, false);
- mutex_unlock(&dev->mutex);
kthread_stop(dev->kthread_vid_cap);
dev->kthread_vid_cap = NULL;
- mutex_lock(&dev->mutex);
}
diff --git a/drivers/media/platform/vivid/vivid-kthread-out.c b/drivers/media/platform/vivid/vivid-kthread-out.c
index c974235d7de3..6780687978f9 100644
--- a/drivers/media/platform/vivid/vivid-kthread-out.c
+++ b/drivers/media/platform/vivid/vivid-kthread-out.c
@@ -166,7 +166,11 @@ static int vivid_thread_vid_out(void *data)
if (kthread_should_stop())
break;
- mutex_lock(&dev->mutex);
+ if (!mutex_trylock(&dev->mutex)) {
+ schedule_timeout_uninterruptible(1);
+ continue;
+ }
+
cur_jiffies = jiffies;
if (dev->out_seq_resync) {
dev->jiffies_vid_out = cur_jiffies;
@@ -344,8 +348,6 @@ void vivid_stop_generating_vid_out(struct vivid_dev *dev, bool *pstreaming)
/* shutdown control thread */
vivid_grab_controls(dev, false);
- mutex_unlock(&dev->mutex);
kthread_stop(dev->kthread_vid_out);
dev->kthread_vid_out = NULL;
- mutex_lock(&dev->mutex);
}
diff --git a/drivers/media/platform/vivid/vivid-sdr-cap.c b/drivers/media/platform/vivid/vivid-sdr-cap.c
index 9acc709b0740..2b7522e16efc 100644
--- a/drivers/media/platform/vivid/vivid-sdr-cap.c
+++ b/drivers/media/platform/vivid/vivid-sdr-cap.c
@@ -141,7 +141,11 @@ static int vivid_thread_sdr_cap(void *data)
if (kthread_should_stop())
break;
- mutex_lock(&dev->mutex);
+ if (!mutex_trylock(&dev->mutex)) {
+ schedule_timeout_uninterruptible(1);
+ continue;
+ }
+
cur_jiffies = jiffies;
if (dev->sdr_cap_seq_resync) {
dev->jiffies_sdr_cap = cur_jiffies;
@@ -303,10 +307,8 @@ static void sdr_cap_stop_streaming(struct vb2_queue *vq)
}
/* shutdown control thread */
- mutex_unlock(&dev->mutex);
kthread_stop(dev->kthread_sdr_cap);
dev->kthread_sdr_cap = NULL;
- mutex_lock(&dev->mutex);
}
static void sdr_cap_buf_request_complete(struct vb2_buffer *vb)
This is an automatic generated email to let you know that the following patch were queued:
Subject: media: vivid: Fix wrong locking that causes race conditions on streaming stop
Author: Alexander Popov <alex.popov(a)linux.com>
Date: Sun Nov 3 23:17:19 2019 +0100
There is the same incorrect approach to locking implemented in
vivid_stop_generating_vid_cap(), vivid_stop_generating_vid_out() and
sdr_cap_stop_streaming().
These functions are called during streaming stopping with vivid_dev.mutex
locked. And they all do the same mistake while stopping their kthreads,
which need to lock this mutex as well. See the example from
vivid_stop_generating_vid_cap():
/* shutdown control thread */
vivid_grab_controls(dev, false);
mutex_unlock(&dev->mutex);
kthread_stop(dev->kthread_vid_cap);
dev->kthread_vid_cap = NULL;
mutex_lock(&dev->mutex);
But when this mutex is unlocked, another vb2_fop_read() can lock it
instead of vivid_thread_vid_cap() and manipulate the buffer queue.
That causes a use-after-free access later.
To fix those issues let's:
1. avoid unlocking the mutex in vivid_stop_generating_vid_cap(),
vivid_stop_generating_vid_out() and sdr_cap_stop_streaming();
2. use mutex_trylock() with schedule_timeout_uninterruptible() in
the loops of the vivid kthread handlers.
Signed-off-by: Alexander Popov <alex.popov(a)linux.com>
Acked-by: Linus Torvalds <torvalds(a)linux-foundation.org>
Tested-by: Hans Verkuil <hverkuil-cisco(a)xs4all.nl>
Signed-off-by: Hans Verkuil <hverkuil-cisco(a)xs4all.nl>
Cc: <stable(a)vger.kernel.org> # for v3.18 and up
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung(a)kernel.org>
drivers/media/platform/vivid/vivid-kthread-cap.c | 8 +++++---
drivers/media/platform/vivid/vivid-kthread-out.c | 8 +++++---
drivers/media/platform/vivid/vivid-sdr-cap.c | 8 +++++---
3 files changed, 15 insertions(+), 9 deletions(-)
---
diff --git a/drivers/media/platform/vivid/vivid-kthread-cap.c b/drivers/media/platform/vivid/vivid-kthread-cap.c
index 9f981e8bae6e..01a9d671b947 100644
--- a/drivers/media/platform/vivid/vivid-kthread-cap.c
+++ b/drivers/media/platform/vivid/vivid-kthread-cap.c
@@ -818,7 +818,11 @@ static int vivid_thread_vid_cap(void *data)
if (kthread_should_stop())
break;
- mutex_lock(&dev->mutex);
+ if (!mutex_trylock(&dev->mutex)) {
+ schedule_timeout_uninterruptible(1);
+ continue;
+ }
+
cur_jiffies = jiffies;
if (dev->cap_seq_resync) {
dev->jiffies_vid_cap = cur_jiffies;
@@ -998,8 +1002,6 @@ void vivid_stop_generating_vid_cap(struct vivid_dev *dev, bool *pstreaming)
/* shutdown control thread */
vivid_grab_controls(dev, false);
- mutex_unlock(&dev->mutex);
kthread_stop(dev->kthread_vid_cap);
dev->kthread_vid_cap = NULL;
- mutex_lock(&dev->mutex);
}
diff --git a/drivers/media/platform/vivid/vivid-kthread-out.c b/drivers/media/platform/vivid/vivid-kthread-out.c
index c974235d7de3..6780687978f9 100644
--- a/drivers/media/platform/vivid/vivid-kthread-out.c
+++ b/drivers/media/platform/vivid/vivid-kthread-out.c
@@ -166,7 +166,11 @@ static int vivid_thread_vid_out(void *data)
if (kthread_should_stop())
break;
- mutex_lock(&dev->mutex);
+ if (!mutex_trylock(&dev->mutex)) {
+ schedule_timeout_uninterruptible(1);
+ continue;
+ }
+
cur_jiffies = jiffies;
if (dev->out_seq_resync) {
dev->jiffies_vid_out = cur_jiffies;
@@ -344,8 +348,6 @@ void vivid_stop_generating_vid_out(struct vivid_dev *dev, bool *pstreaming)
/* shutdown control thread */
vivid_grab_controls(dev, false);
- mutex_unlock(&dev->mutex);
kthread_stop(dev->kthread_vid_out);
dev->kthread_vid_out = NULL;
- mutex_lock(&dev->mutex);
}
diff --git a/drivers/media/platform/vivid/vivid-sdr-cap.c b/drivers/media/platform/vivid/vivid-sdr-cap.c
index 9acc709b0740..2b7522e16efc 100644
--- a/drivers/media/platform/vivid/vivid-sdr-cap.c
+++ b/drivers/media/platform/vivid/vivid-sdr-cap.c
@@ -141,7 +141,11 @@ static int vivid_thread_sdr_cap(void *data)
if (kthread_should_stop())
break;
- mutex_lock(&dev->mutex);
+ if (!mutex_trylock(&dev->mutex)) {
+ schedule_timeout_uninterruptible(1);
+ continue;
+ }
+
cur_jiffies = jiffies;
if (dev->sdr_cap_seq_resync) {
dev->jiffies_sdr_cap = cur_jiffies;
@@ -303,10 +307,8 @@ static void sdr_cap_stop_streaming(struct vb2_queue *vq)
}
/* shutdown control thread */
- mutex_unlock(&dev->mutex);
kthread_stop(dev->kthread_sdr_cap);
dev->kthread_sdr_cap = NULL;
- mutex_lock(&dev->mutex);
}
static void sdr_cap_buf_request_complete(struct vb2_buffer *vb)
This is a note to let you know that I've just added the patch titled
staging: rtl8192e: fix potential use after free
to my staging git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
in the staging-next branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release
during the merge window.
If you have any questions about this process, please let me know.
>From b7aa39a2ed0112d07fc277ebd24a08a7b2368ab9 Mon Sep 17 00:00:00 2001
From: Pan Bian <bianpan2016(a)163.com>
Date: Tue, 5 Nov 2019 22:49:11 +0800
Subject: staging: rtl8192e: fix potential use after free
The variable skb is released via kfree_skb() when the return value of
_rtl92e_tx is not zero. However, after that, skb is accessed again to
read its length, which may result in a use after free bug. This patch
fixes the bug by moving the release operation to where skb is never
used later.
Signed-off-by: Pan Bian <bianpan2016(a)163.com>
Reviewed-by: Dan Carpenter <dan.carpenter(a)oracle.com>
Cc: stable <stable(a)vger.kernel.org>
Link: https://lore.kernel.org/r/1572965351-6745-1-git-send-email-bianpan2016@163.…
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index b08712a9c029..dace81a7d1ba 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -1616,14 +1616,15 @@ static void _rtl92e_hard_data_xmit(struct sk_buff *skb, struct net_device *dev,
memcpy((unsigned char *)(skb->cb), &dev, sizeof(dev));
skb_push(skb, priv->rtllib->tx_headroom);
ret = _rtl92e_tx(dev, skb);
- if (ret != 0)
- kfree_skb(skb);
if (queue_index != MGNT_QUEUE) {
priv->rtllib->stats.tx_bytes += (skb->len -
priv->rtllib->tx_headroom);
priv->rtllib->stats.tx_packets++;
}
+
+ if (ret != 0)
+ kfree_skb(skb);
}
static int _rtl92e_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
--
2.24.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: 37b4d0c37c0b - Linux 5.3.9
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/271580
One or more kernel tests failed:
x86_64:
❌ iotop: sanity
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: 37b4d0c37c0b - Linux 5.3.9
We grabbed the 591b923e15aa commit of the stable queue repository.
We then merged the patchset with `git am`:
regulator-of-fix-suspend-min-max-voltage-parsing.patch
asoc-samsung-arndale-add-missing-of-node-dereferenci.patch
asoc-wm8994-do-not-register-inapplicable-controls-fo.patch
regulator-da9062-fix-suspend_enable-disable-preparat.patch
asoc-topology-fix-a-signedness-bug-in-soc_tplg_dapm_.patch
arm64-dts-allwinner-a64-pine64-plus-add-phy-regulato.patch
arm64-dts-allwinner-a64-drop-pmu-node.patch
arm64-dts-allwinner-a64-sopine-baseboard-add-phy-reg.patch
arm64-dts-fix-gpio-to-pinmux-mapping.patch
regulator-ti-abb-fix-timeout-in-ti_abb_wait_txdone-t.patch
pinctrl-intel-allocate-irq-chip-dynamic.patch
asoc-sof-loader-fix-kernel-oops-on-firmware-boot-fai.patch
asoc-sof-topology-fix-parse-fail-issue-for-byte-bool.patch
asoc-sof-intel-hda-fix-warnings-during-fw-load.patch
asoc-sof-intel-initialise-and-verify-fw-crash-dump-d.patch
asoc-sof-intel-hda-disable-dmi-l1-entry-during-captu.patch
asoc-rt5682-add-null-handler-to-set_jack-function.patch
asoc-intel-sof_rt5682-add-remove-function-to-disable.patch
asoc-intel-bytcr_rt5651-add-null-check-to-support_bu.patch
regulator-pfuze100-regulator-variable-val-in-pfuze10.patch
asoc-wm_adsp-don-t-generate-kcontrols-without-read-f.patch
asoc-rockchip-i2s-fix-rpm-imbalance.patch
arm64-dts-rockchip-fix-rockpro64-rk808-interrupt-lin.patch
arm-dts-logicpd-torpedo-som-remove-twl_keypad.patch
arm64-dts-rockchip-fix-rockpro64-vdd-log-regulator-s.patch
arm64-dts-rockchip-fix-rockpro64-sdhci-settings.patch
pinctrl-ns2-fix-off-by-one-bugs-in-ns2_pinmux_enable.patch
pinctrl-stmfx-fix-null-pointer-on-remove.patch
arm64-dts-zii-ultra-fix-arm-regulator-states.patch
arm-dts-am3874-iceboard-fix-i2c-mux-idle-disconnect-.patch
asoc-msm8916-wcd-digital-add-missing-mix2-path-for-r.patch
asoc-simple_card_utils.h-fix-potential-multiple-rede.patch
arm-dts-use-level-interrupt-for-omap4-5-wlcore.patch
arm-mm-fix-alignment-handler-faults-under-memory-pre.patch
scsi-qla2xxx-fix-a-potential-null-pointer-dereferenc.patch
scsi-scsi_dh_alua-handle-rtpg-sense-code-correctly-d.patch
scsi-sni_53c710-fix-compilation-error.patch
scsi-fix-kconfig-dependency-warning-related-to-53c70.patch
arm-8908-1-add-__always_inline-to-functions-called-f.patch
arm-8914-1-nommu-fix-exc_ret-for-xip.patch
arm64-dts-rockchip-fix-rockpro64-sdmmc-settings.patch
arm64-dts-rockchip-fix-usb-c-on-hugsun-x99-tv-box.patch
arm64-dts-lx2160a-correct-cpu-core-idle-state-name.patch
arm-dts-imx6q-logicpd-re-enable-snvs-power-key.patch
arm-dts-vf610-zii-scu4-aib-specify-i2c-mux-idle-disc.patch
arm-dts-imx7s-correct-gpt-s-ipg-clock-source.patch
arm64-dts-imx8mq-use-correct-clock-for-usdhc-s-ipg-c.patch
arm64-dts-imx8mm-use-correct-clock-for-usdhc-s-ipg-c.patch
perf-tools-fix-resource-leak-of-closedir-on-the-erro.patch
perf-c2c-fix-memory-leak-in-build_cl_output.patch
8250-men-mcb-fix-error-checking-when-get_num_ports-r.patch
perf-kmem-fix-memory-leak-in-compact_gfp_flags.patch
arm-davinci-dm365-fix-mcbsp-dma_slave_map-entry.patch
drm-amdgpu-fix-potential-vm-faults.patch
drm-amdgpu-fix-error-handling-in-amdgpu_bo_list_crea.patch
scsi-target-core-do-not-overwrite-cdb-byte-1.patch
scsi-hpsa-add-missing-hunks-in-reset-patch.patch
asoc-intel-sof-rt5682-add-a-check-for-devm_clk_get.patch
asoc-sof-control-return-true-when-kcontrol-values-ch.patch
tracing-fix-gfp_t-format-for-synthetic-events.patch
arm-dts-bcm2837-rpi-cm3-avoid-leds-gpio-probing-issu.patch
i2c-aspeed-fix-master-pending-state-handling.patch
drm-komeda-don-t-flush-inactive-pipes.patch
arm-8926-1-v7m-remove-register-save-to-stack-before-.patch
selftests-kvm-vmx_set_nested_state_test-don-t-check-.patch
selftests-kvm-fix-sync_regs_test-with-newer-gccs.patch
alsa-hda-add-tigerlake-jasperlake-pci-id.patch
of-unittest-fix-memory-leak-in-unittest_data_add.patch
mips-bmips-mark-exception-vectors-as-char-arrays.patch
irqchip-gic-v3-its-use-the-exact-itslist-for-vmovp.patch
i2c-mt65xx-fix-null-ptr-dereference.patch
i2c-stm32f7-fix-first-byte-to-send-in-slave-mode.patch
i2c-stm32f7-fix-a-race-in-slave-mode-with-arbitratio.patch
i2c-stm32f7-remove-warning-when-compiling-with-w-1.patch
cifs-fix-cifsinodeinfo-lock_sem-deadlock-when-reconn.patch
irqchip-sifive-plic-skip-contexts-except-supervisor-.patch
nbd-protect-cmd-status-with-cmd-lock.patch
nbd-handle-racing-with-error-ed-out-commands.patch
cxgb4-fix-panic-when-attaching-to-uld-fail.patch
cxgb4-request-the-tx-cidx-updates-to-status-page.patch
dccp-do-not-leak-jiffies-on-the-wire.patch
erspan-fix-the-tun_info-options_len-check-for-erspan.patch
inet-stop-leaking-jiffies-on-the-wire.patch
net-annotate-accesses-to-sk-sk_incoming_cpu.patch
net-annotate-lockless-accesses-to-sk-sk_napi_id.patch
net-dsa-bcm_sf2-fix-imp-setup-for-port-different-than-8.patch
net-ethernet-ftgmac100-fix-dma-coherency-issue-with-sw-checksum.patch
net-fix-sk_page_frag-recursion-from-memory-reclaim.patch
net-hisilicon-fix-ping-latency-when-deal-with-high-throughput.patch
net-mlx4_core-dynamically-set-guaranteed-amount-of-counters-per-vf.patch
netns-fix-gfp-flags-in-rtnl_net_notifyid.patch
net-rtnetlink-fix-a-typo-fbd-fdb.patch
net-usb-lan78xx-disable-interrupts-before-calling-generic_handle_irq.patch
net-zeroing-the-structure-ethtool_wolinfo-in-ethtool_get_wol.patch
selftests-net-reuseport_dualstack-fix-uninitalized-parameter.patch
udp-fix-data-race-in-udp_set_dev_scratch.patch
vxlan-check-tun_info-options_len-properly.patch
net-add-skb_queue_empty_lockless.patch
udp-use-skb_queue_empty_lockless.patch
net-use-skb_queue_empty_lockless-in-poll-handlers.patch
net-use-skb_queue_empty_lockless-in-busy-poll-contexts.patch
net-add-read_once-annotation-in-__skb_wait_for_more_packets.patch
ipv4-fix-route-update-on-metric-change.patch
selftests-fib_tests-add-more-tests-for-metric-update.patch
net-smc-fix-closing-of-fallback-smc-sockets.patch
net-smc-keep-vlan_id-for-smc-r-in-smc_listen_work.patch
keys-fix-memory-leak-in-copy_net_ns.patch
net-phylink-fix-phylink_dbg-macro.patch
rxrpc-fix-handling-of-last-subpacket-of-jumbo-packet.patch
net-mlx5e-determine-source-port-properly-for-vlan-push-action.patch
net-mlx5e-remove-incorrect-match-criteria-assignment-line.patch
net-mlx5e-initialize-on-stack-link-modes-bitmap.patch
net-mlx5-fix-flow-counter-list-auto-bits-struct.patch
net-smc-fix-refcounting-for-non-blocking-connect.patch
net-mlx5-fix-rtable-reference-leak.patch
mlxsw-core-unpublish-devlink-parameters-during-reload.patch
r8169-fix-wrong-phy-id-issue-with-rtl8168dp.patch
net-mlx5e-fix-ethtool-self-test-link-speed.patch
net-mlx5e-fix-handling-of-compressed-cqes-in-case-of-low-napi-budget.patch
ipv4-fix-ipskb_frag_pmtu-handling-with-fragmentation.patch
net-bcmgenet-don-t-set-phydev-link-from-mac.patch
net-dsa-b53-do-not-clear-existing-mirrored-port-mask.patch
net-dsa-fix-switch-tree-list.patch
net-ensure-correct-skb-tstamp-in-various-fragmenters.patch
net-hns3-fix-mis-counting-irq-vector-numbers-issue.patch
net-netem-fix-error-path-for-corrupted-gso-frames.patch
net-reorder-struct-net-fields-to-avoid-false-sharing.patch
net-usb-lan78xx-connect-phy-before-registering-mac.patch
r8152-add-device-id-for-lenovo-thinkpad-usb-c-dock-gen-2.patch
net-netem-correct-the-parent-s-backlog-when-corrupted-packet-was-dropped.patch
net-phy-bcm7xxx-define-soft_reset-for-40nm-ephy.patch
net-bcmgenet-reset-40nm-ephy-on-energy-detect.patch
net-flow_dissector-switch-to-siphash.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:
Host 1:
✅ Boot test
✅ selinux-policy: serge-testsuite
🚧 ✅ Storage blktests
Host 2:
⚡ 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.
⚡⚡⚡ Boot test
⚡⚡⚡ Podman system integration test (as root)
⚡⚡⚡ Podman system integration test (as user)
⚡⚡⚡ LTP lite
⚡⚡⚡ Loopdev Sanity
⚡⚡⚡ jvm test suite
⚡⚡⚡ AMTU (Abstract Machine Test Utility)
⚡⚡⚡ LTP: openposix test suite
⚡⚡⚡ Networking bridge: sanity
⚡⚡⚡ Ethernet drivers sanity
⚡⚡⚡ Networking socket: fuzz
⚡⚡⚡ Networking sctp-auth: sockopts test
⚡⚡⚡ Networking route_func: local
⚡⚡⚡ Networking route_func: forward
⚡⚡⚡ Networking TCP: keepalive test
⚡⚡⚡ Networking UDP: socket
⚡⚡⚡ Networking tunnel: gre basic
⚡⚡⚡ Networking tunnel: vxlan basic
⚡⚡⚡ audit: audit testsuite test
⚡⚡⚡ httpd: mod_ssl smoke sanity
⚡⚡⚡ iotop: sanity
⚡⚡⚡ tuned: tune-processes-through-perf
⚡⚡⚡ ALSA PCM loopback test
⚡⚡⚡ ALSA Control (mixer) Userspace Element test
⚡⚡⚡ Usex - version 1.9-29
⚡⚡⚡ storage: SCSI VPD
⚡⚡⚡ stress: stress-ng
⚡⚡⚡ trace: ftrace/tracer
🚧 ⚡⚡⚡ CIFS Connectathon
🚧 ⚡⚡⚡ POSIX pjd-fstest suites
ppc64le:
Host 1:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ Loopdev Sanity
✅ jvm test suite
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ Networking bridge: sanity
✅ Ethernet drivers sanity
✅ Networking socket: fuzz
✅ Networking sctp-auth: sockopts test
✅ Networking route_func: local
✅ Networking route_func: forward
✅ Networking TCP: keepalive test
✅ Networking UDP: socket
✅ Networking tunnel: gre basic
✅ Networking tunnel: vxlan basic
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
✅ ALSA PCM loopback test
✅ ALSA Control (mixer) Userspace Element test
✅ Usex - version 1.9-29
✅ trace: ftrace/tracer
🚧 ✅ CIFS Connectathon
🚧 ✅ POSIX pjd-fstest suites
Host 2:
✅ Boot test
✅ selinux-policy: serge-testsuite
🚧 ❌ Storage blktests
x86_64:
Host 1:
✅ Boot test
✅ selinux-policy: serge-testsuite
🚧 ✅ Storage blktests
Host 2:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ Loopdev Sanity
✅ jvm test suite
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ Networking bridge: sanity
✅ Ethernet drivers sanity
✅ Networking socket: fuzz
✅ Networking sctp-auth: sockopts test
✅ Networking route_func: local
✅ Networking route_func: forward
✅ Networking TCP: keepalive test
✅ Networking UDP: socket
✅ Networking tunnel: gre basic
✅ Networking tunnel: vxlan basic
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
❌ iotop: sanity
⚡⚡⚡ tuned: tune-processes-through-perf
⚡⚡⚡ pciutils: sanity smoke test
⚡⚡⚡ ALSA PCM loopback test
⚡⚡⚡ ALSA Control (mixer) Userspace Element test
⚡⚡⚡ Usex - version 1.9-29
⚡⚡⚡ storage: SCSI VPD
⚡⚡⚡ stress: stress-ng
⚡⚡⚡ trace: ftrace/tracer
🚧 ⚡⚡⚡ CIFS Connectathon
🚧 ⚡⚡⚡ POSIX pjd-fstest suites
Test sources: https://github.com/CKI-project/tests-beaker
💚 Pull requests are welcome for new tests or improvements to existing tests!
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.
Testing timeout
---------------
We aim to provide a report within reasonable timeframe. Tests that haven't
finished running are marked with ⏱. Reports for non-upstream kernels have
a Beaker recipe linked to next to each host.
Greetings,
Find attached email very confidential. reply for more details
Thanks.
Peter Wong
----------------------------------------------------
This email was sent by the shareware version of Postman Professional.
The patch titled
Subject: mm: memcontrol: fix network errors from failing __GFP_ATOMIC charges
has been removed from the -mm tree. Its filename was
mm-memcontrol-fix-network-errors-from-failing-__gfp_atomic-charges.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Johannes Weiner <hannes(a)cmpxchg.org>
Subject: mm: memcontrol: fix network errors from failing __GFP_ATOMIC charges
While upgrading from 4.16 to 5.2, we noticed these allocation errors in
the log of the new kernel:
[ 8642.253395] SLUB: Unable to allocate memory on node -1, gfp=0xa20(GFP_ATOMIC)
[ 8642.269170] cache: tw_sock_TCPv6(960:helper-logs), object size: 232, buffer size: 240, default order: 1, min order: 0
[ 8642.293009] node 0: slabs: 5, objs: 170, free: 0
slab_out_of_memory+1
___slab_alloc+969
__slab_alloc+14
kmem_cache_alloc+346
inet_twsk_alloc+60
tcp_time_wait+46
tcp_fin+206
tcp_data_queue+2034
tcp_rcv_state_process+784
tcp_v6_do_rcv+405
__release_sock+118
tcp_close+385
inet_release+46
__sock_release+55
sock_close+17
__fput+170
task_work_run+127
exit_to_usermode_loop+191
do_syscall_64+212
entry_SYSCALL_64_after_hwframe+68
accompanied by an increase in machines going completely radio silent under
memory pressure.
One thing that changed since 4.16 is e699e2c6a654 ("net, mm: account sock
objects to kmemcg"), which made these slab caches subject to cgroup memory
accounting and control.
The problem with that is that cgroups, unlike the page allocator, do not
maintain dedicated atomic reserves. As a cgroup's usage hovers at its
limit, atomic allocations - such as done during network rx - can fail
consistently for extended periods of time. The kernel is not able to
operate under these conditions.
We don't want to revert the culprit patch, because it indeed tracks a
potentially substantial amount of memory used by a cgroup.
We also don't want to implement dedicated atomic reserves for cgroups.
There is no point in keeping a fixed margin of unused bytes in the
cgroup's memory budget to accomodate a consumer that is impossible to
predict - we'd be wasting memory and get into configuration headaches, not
unlike what we have going with min_free_kbytes. We do this for physical
mem because we have to, but cgroups are an accounting game.
Instead, account these privileged allocations to the cgroup, but let them
bypass the configured limit if they have to. This way, we get the
benefits of accounting the consumed memory and have it exert pressure on
the rest of the cgroup, but like with the page allocator, we shift the
burden of reclaimining on behalf of atomic allocations onto the regular
allocations that can block.
Link: http://lkml.kernel.org/r/20191022233708.365764-1-hannes@cmpxchg.org
Fixes: e699e2c6a654 ("net, mm: account sock objects to kmemcg")
Signed-off-by: Johannes Weiner <hannes(a)cmpxchg.org>
Reviewed-by: Shakeel Butt <shakeelb(a)google.com>
Cc: Suleiman Souhlal <suleiman(a)google.com>
Cc: Michal Hocko <mhocko(a)kernel.org>
Cc: <stable(a)vger.kernel.org> [4.18+]
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/memcontrol.c | 9 +++++++++
1 file changed, 9 insertions(+)
--- a/mm/memcontrol.c~mm-memcontrol-fix-network-errors-from-failing-__gfp_atomic-charges
+++ a/mm/memcontrol.c
@@ -2535,6 +2535,15 @@ retry:
}
/*
+ * Memcg doesn't have a dedicated reserve for atomic
+ * allocations. But like the global atomic pool, we need to
+ * put the burden of reclaim on regular allocation requests
+ * and let these go through as privileged allocations.
+ */
+ if (gfp_mask & __GFP_ATOMIC)
+ goto force;
+
+ /*
* Unlike in global OOM situations, memcg is not in a physical
* memory shortage. Allow dying and OOM-killed tasks to
* bypass the last charges so that they can exit quickly and
_
Patches currently in -mm which might be from hannes(a)cmpxchg.org are
mm-memcontrol-remove-dead-code-from-memory_max_write.patch
mm-memcontrol-try-harder-to-set-a-new-memoryhigh.patch
mm-drop-mmap_sem-before-calling-balance_dirty_pages-in-write-fault.patch
mm-vmscan-simplify-lruvec_lru_size.patch
mm-clean-up-and-clarify-lruvec-lookup-procedure.patch
mm-vmscan-move-inactive_list_is_low-swap-check-to-the-caller.patch
mm-vmscan-naming-fixes-global_reclaim-and-sane_reclaim.patch
mm-vmscan-replace-shrink_node-loop-with-a-retry-jump.patch
mm-vmscan-turn-shrink_node_memcg-into-shrink_lruvec.patch
mm-vmscan-split-shrink_node-into-node-part-and-memcgs-part.patch
mm-vmscan-split-shrink_node-into-node-part-and-memcgs-part-fix.patch
mm-vmscan-harmonize-writeback-congestion-tracking-for-nodes-memcgs.patch
kernel-sysctl-make-drop_caches-write-only.patch
The patch titled
Subject: mm: slab: make page_cgroup_ino() to recognize non-compound slab pages properly
has been removed from the -mm tree. Its filename was
mm-slab-make-page_cgroup_ino-to-recognize-non-compound-slab-pages-properly.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Roman Gushchin <guro(a)fb.com>
Subject: mm: slab: make page_cgroup_ino() to recognize non-compound slab pages properly
page_cgroup_ino() doesn't return a valid memcg pointer for non-compound
slab pages, because it depends on PgHead AND PgSlab flags to be set to
determine the memory cgroup from the kmem_cache. It's correct for
compound pages, but not for generic small pages. Those don't have PgHead
set, so it ends up returning zero.
Fix this by replacing the condition to PageSlab() && !PageTail().
Before this patch:
[root@localhost ~]# ./page-types -c /sys/fs/cgroup/user.slice/user-0.slice/user(a)0.service/ | grep slab
0x0000000000000080 38 0 _______S___________________________________ slab
After this patch:
[root@localhost ~]# ./page-types -c /sys/fs/cgroup/user.slice/user-0.slice/user(a)0.service/ | grep slab
0x0000000000000080 147 0 _______S___________________________________ slab
Also, hwpoison_filter_task() uses output of page_cgroup_ino() in order
to filter error injection events based on memcg. So if
page_cgroup_ino() fails to return memcg pointer, we just fail to inject
memory error. Considering that hwpoison filter is for testing,
affected users are limited and the impact should be marginal.
[n-horiguchi(a)ah.jp.nec.com: changelog additions]
Link: http://lkml.kernel.org/r/20191031012151.2722280-1-guro@fb.com
Fixes: 4d96ba353075 ("mm: memcg/slab: stop setting page->mem_cgroup pointer for slab pages")
Signed-off-by: Roman Gushchin <guro(a)fb.com>
Reviewed-by: Shakeel Butt <shakeelb(a)google.com>
Acked-by: David Rientjes <rientjes(a)google.com>
Cc: Vladimir Davydov <vdavydov.dev(a)gmail.com>
Cc: Daniel Jordan <daniel.m.jordan(a)oracle.com>
Cc: Naoya Horiguchi <n-horiguchi(a)ah.jp.nec.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/memcontrol.c | 2 +-
mm/slab.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
--- a/mm/memcontrol.c~mm-slab-make-page_cgroup_ino-to-recognize-non-compound-slab-pages-properly
+++ a/mm/memcontrol.c
@@ -484,7 +484,7 @@ ino_t page_cgroup_ino(struct page *page)
unsigned long ino = 0;
rcu_read_lock();
- if (PageHead(page) && PageSlab(page))
+ if (PageSlab(page) && !PageTail(page))
memcg = memcg_from_slab_page(page);
else
memcg = READ_ONCE(page->mem_cgroup);
--- a/mm/slab.h~mm-slab-make-page_cgroup_ino-to-recognize-non-compound-slab-pages-properly
+++ a/mm/slab.h
@@ -323,8 +323,8 @@ static inline struct kmem_cache *memcg_r
* Expects a pointer to a slab page. Please note, that PageSlab() check
* isn't sufficient, as it returns true also for tail compound slab pages,
* which do not have slab_cache pointer set.
- * So this function assumes that the page can pass PageHead() and PageSlab()
- * checks.
+ * So this function assumes that the page can pass PageSlab() && !PageTail()
+ * check.
*
* The kmem_cache can be reparented asynchronously. The caller must ensure
* the memcg lifetime, e.g. by taking rcu_read_lock() or cgroup_mutex.
_
Patches currently in -mm which might be from guro(a)fb.com are
mm-memcg-switch-to-css_tryget-in-get_mem_cgroup_from_mm.patch
mm-hugetlb-switch-to-css_tryget-in-hugetlb_cgroup_charge_cgroup.patch
The patch titled
Subject: dump_stack: avoid the livelock of the dump_lock
has been removed from the -mm tree. Its filename was
dump_stack-avoid-the-livelock-of-the-dump_lock.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Kevin Hao <haokexin(a)gmail.com>
Subject: dump_stack: avoid the livelock of the dump_lock
In the current code, we use the atomic_cmpxchg() to serialize the output
of the dump_stack(), but this implementation suffers the thundering herd
problem. We have observed such kind of livelock on a Marvell cn96xx
board(24 cpus) when heavily using the dump_stack() in a kprobe handler.
Actually we can let the competitors to wait for the releasing of the lock
before jumping to atomic_cmpxchg(). This will definitely mitigate the
thundering herd problem. Thanks Linus for the suggestion.
[akpm(a)linux-foundation.org: fix comment]
Link: http://lkml.kernel.org/r/20191030031637.6025-1-haokexin@gmail.com
Fixes: b58d977432c8 ("dump_stack: serialize the output from dump_stack()")
Signed-off-by: Kevin Hao <haokexin(a)gmail.com>
Suggested-by: Linus Torvalds <torvalds(a)linux-foundation.org>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
lib/dump_stack.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
--- a/lib/dump_stack.c~dump_stack-avoid-the-livelock-of-the-dump_lock
+++ a/lib/dump_stack.c
@@ -106,7 +106,12 @@ retry:
was_locked = 1;
} else {
local_irq_restore(flags);
- cpu_relax();
+ /*
+ * Wait for the lock to release before jumping to
+ * atomic_cmpxchg() in order to mitigate the thundering herd
+ * problem.
+ */
+ do { cpu_relax(); } while (atomic_read(&dump_lock) != -1);
goto retry;
}
_
Patches currently in -mm which might be from haokexin(a)gmail.com are
The patch titled
Subject: mm, vmstat: hide /proc/pagetypeinfo from normal users
has been removed from the -mm tree. Its filename was
mm-vmstat-hide-proc-pagetypeinfo-from-normal-users.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Michal Hocko <mhocko(a)suse.com>
Subject: mm, vmstat: hide /proc/pagetypeinfo from normal users
/proc/pagetypeinfo is a debugging tool to examine internal page allocator
state wrt to fragmentation. It is not very useful for any other use so
normal users really do not need to read this file.
Waiman Long has noticed that reading this file can have negative side
effects because zone->lock is necessary for gathering data and that a)
interferes with the page allocator and its users and b) can lead to hard
lockups on large machines which have very long free_list.
Reduce both issues by simply not exporting the file to regular users.
Link: http://lkml.kernel.org/r/20191025072610.18526-2-mhocko@kernel.org
Fixes: 467c996c1e19 ("Print out statistics in relation to fragmentation avoidance to /proc/pagetypeinfo")
Signed-off-by: Michal Hocko <mhocko(a)suse.com>
Reported-by: Waiman Long <longman(a)redhat.com>
Acked-by: Mel Gorman <mgorman(a)suse.de>
Acked-by: Vlastimil Babka <vbabka(a)suse.cz>
Acked-by: Waiman Long <longman(a)redhat.com>
Acked-by: Rafael Aquini <aquini(a)redhat.com>
Acked-by: David Rientjes <rientjes(a)google.com>
Reviewed-by: Andrew Morton <akpm(a)linux-foundation.org>
Cc: David Hildenbrand <david(a)redhat.com>
Cc: Johannes Weiner <hannes(a)cmpxchg.org>
Cc: Roman Gushchin <guro(a)fb.com>
Cc: Konstantin Khlebnikov <khlebnikov(a)yandex-team.ru>
Cc: Jann Horn <jannh(a)google.com>
Cc: Song Liu <songliubraving(a)fb.com>
Cc: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/vmstat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/vmstat.c~mm-vmstat-hide-proc-pagetypeinfo-from-normal-users
+++ a/mm/vmstat.c
@@ -1972,7 +1972,7 @@ void __init init_mm_internals(void)
#endif
#ifdef CONFIG_PROC_FS
proc_create_seq("buddyinfo", 0444, NULL, &fragmentation_op);
- proc_create_seq("pagetypeinfo", 0444, NULL, &pagetypeinfo_op);
+ proc_create_seq("pagetypeinfo", 0400, NULL, &pagetypeinfo_op);
proc_create_seq("vmstat", 0444, NULL, &vmstat_op);
proc_create_seq("zoneinfo", 0444, NULL, &zoneinfo_op);
#endif
_
Patches currently in -mm which might be from mhocko(a)suse.com are
The patch titled
Subject: mm: thp: handle page cache THP correctly in PageTransCompoundMap
has been removed from the -mm tree. Its filename was
mm-thp-handle-page-cache-thp-correctly-in-pagetranscompoundmap.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Yang Shi <yang.shi(a)linux.alibaba.com>
Subject: mm: thp: handle page cache THP correctly in PageTransCompoundMap
We have a usecase to use tmpfs as QEMU memory backend and we would like to
take the advantage of THP as well. But, our test shows the EPT is not PMD
mapped even though the underlying THP are PMD mapped on host. The number
showed by /sys/kernel/debug/kvm/largepage is much less than the number of
PMD mapped shmem pages as the below:
7f2778200000-7f2878200000 rw-s 00000000 00:14 262232 /dev/shm/qemu_back_mem.mem.Hz2hSf (deleted)
Size: 4194304 kB
[snip]
AnonHugePages: 0 kB
ShmemPmdMapped: 579584 kB
[snip]
Locked: 0 kB
cat /sys/kernel/debug/kvm/largepages
12
And some benchmarks do worse than with anonymous THPs.
By digging into the code we figured out that commit 127393fbe597 ("mm:
thp: kvm: fix memory corruption in KVM with THP enabled") checks if there
is a single PTE mapping on the page for anonymous THP when setting up EPT
map. But, the _mapcount < 0 check doesn't fit to page cache THP since
every subpage of page cache THP would get _mapcount inc'ed once it is PMD
mapped, so PageTransCompoundMap() always returns false for page cache THP.
This would prevent KVM from setting up PMD mapped EPT entry.
So we need handle page cache THP correctly. However, when page cache
THP's PMD gets split, kernel just remove the map instead of setting up PTE
map like what anonymous THP does. Before KVM calls get_user_pages() the
subpages may get PTE mapped even though it is still a THP since the page
cache THP may be mapped by other processes at the mean time.
Checking its _mapcount and whether the THP has PTE mapped or not.
Although this may report some false negative cases (PTE mapped by other
processes), it looks not trivial to make this accurate.
With this fix /sys/kernel/debug/kvm/largepage would show reasonable pages
are PMD mapped by EPT as the below:
7fbeaee00000-7fbfaee00000 rw-s 00000000 00:14 275464 /dev/shm/qemu_back_mem.mem.SKUvat (deleted)
Size: 4194304 kB
[snip]
AnonHugePages: 0 kB
ShmemPmdMapped: 557056 kB
[snip]
Locked: 0 kB
cat /sys/kernel/debug/kvm/largepages
271
And the benchmarks are as same as anonymous THPs.
[yang.shi(a)linux.alibaba.com: v4]
Link: http://lkml.kernel.org/r/1571865575-42913-1-git-send-email-yang.shi@linux.a…
Link: http://lkml.kernel.org/r/1571769577-89735-1-git-send-email-yang.shi@linux.a…
Fixes: dd78fedde4b9 ("rmap: support file thp")
Signed-off-by: Yang Shi <yang.shi(a)linux.alibaba.com>
Reported-by: Gang Deng <gavin.dg(a)linux.alibaba.com>
Tested-by: Gang Deng <gavin.dg(a)linux.alibaba.com>
Suggested-by: Hugh Dickins <hughd(a)google.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov(a)linux.intel.com>
Cc: Andrea Arcangeli <aarcange(a)redhat.com>
Cc: Matthew Wilcox <willy(a)infradead.org>
Cc: <stable(a)vger.kernel.org> [4.8+]
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
include/linux/mm.h | 5 -----
include/linux/mm_types.h | 5 +++++
include/linux/page-flags.h | 20 ++++++++++++++++++--
3 files changed, 23 insertions(+), 7 deletions(-)
--- a/include/linux/mm.h~mm-thp-handle-page-cache-thp-correctly-in-pagetranscompoundmap
+++ a/include/linux/mm.h
@@ -695,11 +695,6 @@ static inline void *kvcalloc(size_t n, s
extern void kvfree(const void *addr);
-static inline atomic_t *compound_mapcount_ptr(struct page *page)
-{
- return &page[1].compound_mapcount;
-}
-
static inline int compound_mapcount(struct page *page)
{
VM_BUG_ON_PAGE(!PageCompound(page), page);
--- a/include/linux/mm_types.h~mm-thp-handle-page-cache-thp-correctly-in-pagetranscompoundmap
+++ a/include/linux/mm_types.h
@@ -221,6 +221,11 @@ struct page {
#endif
} _struct_page_alignment;
+static inline atomic_t *compound_mapcount_ptr(struct page *page)
+{
+ return &page[1].compound_mapcount;
+}
+
/*
* Used for sizing the vmemmap region on some architectures
*/
--- a/include/linux/page-flags.h~mm-thp-handle-page-cache-thp-correctly-in-pagetranscompoundmap
+++ a/include/linux/page-flags.h
@@ -622,12 +622,28 @@ static inline int PageTransCompound(stru
*
* Unlike PageTransCompound, this is safe to be called only while
* split_huge_pmd() cannot run from under us, like if protected by the
- * MMU notifier, otherwise it may result in page->_mapcount < 0 false
+ * MMU notifier, otherwise it may result in page->_mapcount check false
* positives.
+ *
+ * We have to treat page cache THP differently since every subpage of it
+ * would get _mapcount inc'ed once it is PMD mapped. But, it may be PTE
+ * mapped in the current process so comparing subpage's _mapcount to
+ * compound_mapcount to filter out PTE mapped case.
*/
static inline int PageTransCompoundMap(struct page *page)
{
- return PageTransCompound(page) && atomic_read(&page->_mapcount) < 0;
+ struct page *head;
+
+ if (!PageTransCompound(page))
+ return 0;
+
+ if (PageAnon(page))
+ return atomic_read(&page->_mapcount) < 0;
+
+ head = compound_head(page);
+ /* File THP is PMD mapped and not PTE mapped */
+ return atomic_read(&page->_mapcount) ==
+ atomic_read(compound_mapcount_ptr(head));
}
/*
_
Patches currently in -mm which might be from yang.shi(a)linux.alibaba.com are
mm-mempolicy-fix-the-wrong-return-value-and-potential-pages-leak-of-mbind.patch
mm-rmap-use-vm_bug_on-in-__page_check_anon_rmap.patch
mm-vmscan-remove-unused-scan_control-parameter-from-pageout.patch
The patch titled
Subject: mm, meminit: recalculate pcpu batch and high limits after init completes
has been removed from the -mm tree. Its filename was
mm-meminit-recalculate-pcpu-batch-and-high-limits-after-init-completes.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Mel Gorman <mgorman(a)techsingularity.net>
Subject: mm, meminit: recalculate pcpu batch and high limits after init completes
Deferred memory initialisation updates zone->managed_pages during the
initialisation phase but before that finishes, the per-cpu page allocator
(pcpu) calculates the number of pages allocated/freed in batches as well
as the maximum number of pages allowed on a per-cpu list. As
zone->managed_pages is not up to date yet, the pcpu initialisation
calculates inappropriately low batch and high values.
This increases zone lock contention quite severely in some cases with the
degree of severity depending on how many CPUs share a local zone and the
size of the zone. A private report indicated that kernel build times were
excessive with extremely high system CPU usage. A perf profile indicated
that a large chunk of time was lost on zone->lock contention.
This patch recalculates the pcpu batch and high values after deferred
initialisation completes for every populated zone in the system. It was
tested on a 2-socket AMD EPYC 2 machine using a kernel compilation
workload -- allmodconfig and all available CPUs.
mmtests configuration: config-workload-kernbench-max Configuration was
modified to build on a fresh XFS partition.
kernbench
5.4.0-rc3 5.4.0-rc3
vanilla resetpcpu-v2
Amean user-256 13249.50 ( 0.00%) 16401.31 * -23.79%*
Amean syst-256 14760.30 ( 0.00%) 4448.39 * 69.86%*
Amean elsp-256 162.42 ( 0.00%) 119.13 * 26.65%*
Stddev user-256 42.97 ( 0.00%) 19.15 ( 55.43%)
Stddev syst-256 336.87 ( 0.00%) 6.71 ( 98.01%)
Stddev elsp-256 2.46 ( 0.00%) 0.39 ( 84.03%)
5.4.0-rc3 5.4.0-rc3
vanilla resetpcpu-v2
Duration User 39766.24 49221.79
Duration System 44298.10 13361.67
Duration Elapsed 519.11 388.87
The patch reduces system CPU usage by 69.86% and total build time by
26.65%. The variance of system CPU usage is also much reduced.
Before, this was the breakdown of batch and high values over all zones was.
256 batch: 1
256 batch: 63
512 batch: 7
256 high: 0
256 high: 378
512 high: 42
512 pcpu pagesets had a batch limit of 7 and a high limit of 42. After
the patch:
256 batch: 1
768 batch: 63
256 high: 0
768 high: 378
[mgorman(a)techsingularity.net: fix merge/linkage snafu]
Link: http://lkml.kernel.org/r/20191023084705.GD3016@techsingularity.netLink: http://lkml.kernel.org/r/20191021094808.28824-2-mgorman@techsingularity.net
Signed-off-by: Mel Gorman <mgorman(a)techsingularity.net>
Acked-by: Michal Hocko <mhocko(a)suse.com>
Acked-by: Vlastimil Babka <vbabka(a)suse.cz>
Acked-by: David Hildenbrand <david(a)redhat.com>
Cc: Matt Fleming <matt(a)codeblueprint.co.uk>
Cc: Thomas Gleixner <tglx(a)linutronix.de>
Cc: Borislav Petkov <bp(a)alien8.de>
Cc: Qian Cai <cai(a)lca.pw>
Cc: <stable(a)vger.kernel.org> [4.1+]
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/page_alloc.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
--- a/mm/page_alloc.c~mm-meminit-recalculate-pcpu-batch-and-high-limits-after-init-completes
+++ a/mm/page_alloc.c
@@ -1948,6 +1948,14 @@ void __init page_alloc_init_late(void)
wait_for_completion(&pgdat_init_all_done_comp);
/*
+ * The number of managed pages has changed due to the initialisation
+ * so the pcpu batch and high limits needs to be updated or the limits
+ * will be artificially small.
+ */
+ for_each_populated_zone(zone)
+ zone_pcp_update(zone);
+
+ /*
* We initialized the rest of the deferred pages. Permanently disable
* on-demand struct page initialization.
*/
@@ -8514,7 +8522,6 @@ void free_contig_range(unsigned long pfn
WARN(count != 0, "%d pages are still in use!\n", count);
}
-#ifdef CONFIG_MEMORY_HOTPLUG
/*
* The zone indicated has a new number of managed_pages; batch sizes and percpu
* page high values need to be recalulated.
@@ -8528,7 +8535,6 @@ void __meminit zone_pcp_update(struct zo
per_cpu_ptr(zone->pageset, cpu));
mutex_unlock(&pcp_batch_high_lock);
}
-#endif
void zone_pcp_reset(struct zone *zone)
{
_
Patches currently in -mm which might be from mgorman(a)techsingularity.net are
mm-pcp-share-common-code-between-memory-hotplug-and-percpu-sysctl-handler.patch
mm-pcpu-make-zone-pcp-updates-and-reset-internal-to-the-mm.patch
Hello stable!
I'd like to see the following commit included in -stable trees:
commit 32b5a2c9950b9284000059d752f7afa164deb15e
Author: Maxim Mikityanskiy <maxtram95(a)gmail.com>
Date: Tue May 7 20:28:15 2019 +0300
wireless: Skip directory when generating certificates
As it is, CONFIG_CFG80211_EXTRA_REGDB_KEYDIR is broken between v4.15 and v5.2.
Thanks,
Brian
P.S. I've take the "Option 2" in
Documentation/process/stable-kernel-rules.rst. Let me know if I should
do differently.
Since following patch was merged 5.4-rc3, minimum value for
threads-max changed to 1.
kernel/sysctl.c: do not override max_threads provided by userspace
b0f53dbc4bc4c371f38b14c391095a3bb8a0bb40
Signed-off-by: Masanari Iida <standby24x7(a)gmail.com>
---
Documentation/admin-guide/sysctl/kernel.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/admin-guide/sysctl/kernel.rst
index 032c7cd3cede..38e0f10d7d9f 100644
--- a/Documentation/admin-guide/sysctl/kernel.rst
+++ b/Documentation/admin-guide/sysctl/kernel.rst
@@ -1101,7 +1101,7 @@ During initialization the kernel sets this value such that even if the
maximum number of threads is created, the thread structures occupy only
a part (1/8th) of the available RAM pages.
-The minimum value that can be written to threads-max is 20.
+The minimum value that can be written to threads-max is 1.
The maximum value that can be written to threads-max is given by the
constant FUTEX_TID_MASK (0x3fffffff).
--
2.24.0.rc1
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: 37b4d0c37c0b - Linux 5.3.9
The results of these automated tests are provided below.
Overall result: PASSED
Merge: OK
Compile: OK
Tests: OK
All kernel binaries, config files, and logs are available for download here:
https://artifacts.cki-project.org/pipelines/269865
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: 37b4d0c37c0b - Linux 5.3.9
We grabbed the 53b52b123f7b commit of the stable queue repository.
We then merged the patchset with `git am`:
regulator-of-fix-suspend-min-max-voltage-parsing.patch
asoc-samsung-arndale-add-missing-of-node-dereferenci.patch
asoc-wm8994-do-not-register-inapplicable-controls-fo.patch
regulator-da9062-fix-suspend_enable-disable-preparat.patch
asoc-topology-fix-a-signedness-bug-in-soc_tplg_dapm_.patch
arm64-dts-allwinner-a64-pine64-plus-add-phy-regulato.patch
arm64-dts-allwinner-a64-drop-pmu-node.patch
arm64-dts-allwinner-a64-sopine-baseboard-add-phy-reg.patch
arm64-dts-fix-gpio-to-pinmux-mapping.patch
regulator-ti-abb-fix-timeout-in-ti_abb_wait_txdone-t.patch
pinctrl-intel-allocate-irq-chip-dynamic.patch
asoc-sof-loader-fix-kernel-oops-on-firmware-boot-fai.patch
asoc-sof-topology-fix-parse-fail-issue-for-byte-bool.patch
asoc-sof-intel-hda-fix-warnings-during-fw-load.patch
asoc-sof-intel-initialise-and-verify-fw-crash-dump-d.patch
asoc-sof-intel-hda-disable-dmi-l1-entry-during-captu.patch
asoc-rt5682-add-null-handler-to-set_jack-function.patch
asoc-intel-sof_rt5682-add-remove-function-to-disable.patch
asoc-intel-bytcr_rt5651-add-null-check-to-support_bu.patch
regulator-pfuze100-regulator-variable-val-in-pfuze10.patch
asoc-wm_adsp-don-t-generate-kcontrols-without-read-f.patch
asoc-rockchip-i2s-fix-rpm-imbalance.patch
arm64-dts-rockchip-fix-rockpro64-rk808-interrupt-lin.patch
arm-dts-logicpd-torpedo-som-remove-twl_keypad.patch
arm64-dts-rockchip-fix-rockpro64-vdd-log-regulator-s.patch
arm64-dts-rockchip-fix-rockpro64-sdhci-settings.patch
pinctrl-ns2-fix-off-by-one-bugs-in-ns2_pinmux_enable.patch
pinctrl-stmfx-fix-null-pointer-on-remove.patch
arm64-dts-zii-ultra-fix-arm-regulator-states.patch
arm-dts-am3874-iceboard-fix-i2c-mux-idle-disconnect-.patch
asoc-msm8916-wcd-digital-add-missing-mix2-path-for-r.patch
asoc-simple_card_utils.h-fix-potential-multiple-rede.patch
arm-dts-use-level-interrupt-for-omap4-5-wlcore.patch
arm-mm-fix-alignment-handler-faults-under-memory-pre.patch
scsi-qla2xxx-fix-a-potential-null-pointer-dereferenc.patch
scsi-scsi_dh_alua-handle-rtpg-sense-code-correctly-d.patch
scsi-sni_53c710-fix-compilation-error.patch
scsi-fix-kconfig-dependency-warning-related-to-53c70.patch
arm-8908-1-add-__always_inline-to-functions-called-f.patch
arm-8914-1-nommu-fix-exc_ret-for-xip.patch
arm64-dts-rockchip-fix-rockpro64-sdmmc-settings.patch
arm64-dts-rockchip-fix-usb-c-on-hugsun-x99-tv-box.patch
arm64-dts-lx2160a-correct-cpu-core-idle-state-name.patch
arm-dts-imx6q-logicpd-re-enable-snvs-power-key.patch
arm-dts-vf610-zii-scu4-aib-specify-i2c-mux-idle-disc.patch
arm-dts-imx7s-correct-gpt-s-ipg-clock-source.patch
arm64-dts-imx8mq-use-correct-clock-for-usdhc-s-ipg-c.patch
arm64-dts-imx8mm-use-correct-clock-for-usdhc-s-ipg-c.patch
perf-tools-fix-resource-leak-of-closedir-on-the-erro.patch
perf-c2c-fix-memory-leak-in-build_cl_output.patch
8250-men-mcb-fix-error-checking-when-get_num_ports-r.patch
perf-kmem-fix-memory-leak-in-compact_gfp_flags.patch
arm-davinci-dm365-fix-mcbsp-dma_slave_map-entry.patch
drm-amdgpu-fix-potential-vm-faults.patch
drm-amdgpu-fix-error-handling-in-amdgpu_bo_list_crea.patch
scsi-target-core-do-not-overwrite-cdb-byte-1.patch
scsi-hpsa-add-missing-hunks-in-reset-patch.patch
asoc-intel-sof-rt5682-add-a-check-for-devm_clk_get.patch
asoc-sof-control-return-true-when-kcontrol-values-ch.patch
tracing-fix-gfp_t-format-for-synthetic-events.patch
arm-dts-bcm2837-rpi-cm3-avoid-leds-gpio-probing-issu.patch
i2c-aspeed-fix-master-pending-state-handling.patch
drm-komeda-don-t-flush-inactive-pipes.patch
arm-8926-1-v7m-remove-register-save-to-stack-before-.patch
selftests-kvm-vmx_set_nested_state_test-don-t-check-.patch
selftests-kvm-fix-sync_regs_test-with-newer-gccs.patch
alsa-hda-add-tigerlake-jasperlake-pci-id.patch
of-unittest-fix-memory-leak-in-unittest_data_add.patch
mips-bmips-mark-exception-vectors-as-char-arrays.patch
irqchip-gic-v3-its-use-the-exact-itslist-for-vmovp.patch
i2c-mt65xx-fix-null-ptr-dereference.patch
i2c-stm32f7-fix-first-byte-to-send-in-slave-mode.patch
i2c-stm32f7-fix-a-race-in-slave-mode-with-arbitratio.patch
i2c-stm32f7-remove-warning-when-compiling-with-w-1.patch
cifs-fix-cifsinodeinfo-lock_sem-deadlock-when-reconn.patch
irqchip-sifive-plic-skip-contexts-except-supervisor-.patch
nbd-protect-cmd-status-with-cmd-lock.patch
nbd-handle-racing-with-error-ed-out-commands.patch
ata-libahci_platform-fix-regulator_get_optional-misu.patch
cxgb4-fix-panic-when-attaching-to-uld-fail.patch
cxgb4-request-the-tx-cidx-updates-to-status-page.patch
dccp-do-not-leak-jiffies-on-the-wire.patch
erspan-fix-the-tun_info-options_len-check-for-erspan.patch
inet-stop-leaking-jiffies-on-the-wire.patch
net-annotate-accesses-to-sk-sk_incoming_cpu.patch
net-annotate-lockless-accesses-to-sk-sk_napi_id.patch
net-dsa-bcm_sf2-fix-imp-setup-for-port-different-than-8.patch
net-ethernet-ftgmac100-fix-dma-coherency-issue-with-sw-checksum.patch
net-fix-sk_page_frag-recursion-from-memory-reclaim.patch
net-hisilicon-fix-ping-latency-when-deal-with-high-throughput.patch
net-mlx4_core-dynamically-set-guaranteed-amount-of-counters-per-vf.patch
netns-fix-gfp-flags-in-rtnl_net_notifyid.patch
net-rtnetlink-fix-a-typo-fbd-fdb.patch
net-usb-lan78xx-disable-interrupts-before-calling-generic_handle_irq.patch
net-zeroing-the-structure-ethtool_wolinfo-in-ethtool_get_wol.patch
selftests-net-reuseport_dualstack-fix-uninitalized-parameter.patch
udp-fix-data-race-in-udp_set_dev_scratch.patch
vxlan-check-tun_info-options_len-properly.patch
net-add-skb_queue_empty_lockless.patch
udp-use-skb_queue_empty_lockless.patch
net-use-skb_queue_empty_lockless-in-poll-handlers.patch
net-use-skb_queue_empty_lockless-in-busy-poll-contexts.patch
net-add-read_once-annotation-in-__skb_wait_for_more_packets.patch
ipv4-fix-route-update-on-metric-change.patch
selftests-fib_tests-add-more-tests-for-metric-update.patch
net-smc-fix-closing-of-fallback-smc-sockets.patch
net-smc-keep-vlan_id-for-smc-r-in-smc_listen_work.patch
keys-fix-memory-leak-in-copy_net_ns.patch
net-phylink-fix-phylink_dbg-macro.patch
rxrpc-fix-handling-of-last-subpacket-of-jumbo-packet.patch
net-mlx5e-determine-source-port-properly-for-vlan-push-action.patch
net-mlx5e-remove-incorrect-match-criteria-assignment-line.patch
net-mlx5e-initialize-on-stack-link-modes-bitmap.patch
net-mlx5-fix-flow-counter-list-auto-bits-struct.patch
net-smc-fix-refcounting-for-non-blocking-connect.patch
net-mlx5-fix-rtable-reference-leak.patch
mlxsw-core-unpublish-devlink-parameters-during-reload.patch
r8169-fix-wrong-phy-id-issue-with-rtl8168dp.patch
net-mlx5e-fix-ethtool-self-test-link-speed.patch
net-mlx5e-fix-handling-of-compressed-cqes-in-case-of-low-napi-budget.patch
ipv4-fix-ipskb_frag_pmtu-handling-with-fragmentation.patch
net-bcmgenet-don-t-set-phydev-link-from-mac.patch
net-dsa-b53-do-not-clear-existing-mirrored-port-mask.patch
net-dsa-fix-switch-tree-list.patch
net-ensure-correct-skb-tstamp-in-various-fragmenters.patch
net-hns3-fix-mis-counting-irq-vector-numbers-issue.patch
net-netem-fix-error-path-for-corrupted-gso-frames.patch
net-reorder-struct-net-fields-to-avoid-false-sharing.patch
net-usb-lan78xx-connect-phy-before-registering-mac.patch
r8152-add-device-id-for-lenovo-thinkpad-usb-c-dock-gen-2.patch
net-netem-correct-the-parent-s-backlog-when-corrupted-packet-was-dropped.patch
net-phy-bcm7xxx-define-soft_reset-for-40nm-ephy.patch
net-bcmgenet-reset-40nm-ephy-on-energy-detect.patch
net-flow_dissector-switch-to-siphash.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:
Host 1:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ Loopdev Sanity
✅ jvm test suite
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ Networking bridge: sanity
✅ Ethernet drivers sanity
✅ Networking socket: fuzz
✅ Networking sctp-auth: sockopts test
✅ Networking route_func: local
✅ Networking route_func: forward
✅ Networking TCP: keepalive test
✅ Networking UDP: socket
✅ Networking tunnel: gre basic
✅ Networking tunnel: vxlan basic
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
✅ ALSA PCM loopback test
✅ ALSA Control (mixer) Userspace Element test
✅ Usex - version 1.9-29
✅ storage: SCSI VPD
✅ stress: stress-ng
✅ trace: ftrace/tracer
🚧 ✅ CIFS Connectathon
🚧 ✅ POSIX pjd-fstest suites
Host 2:
✅ Boot test
✅ selinux-policy: serge-testsuite
🚧 ✅ Storage blktests
ppc64le:
Host 1:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ Loopdev Sanity
✅ jvm test suite
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ Networking bridge: sanity
✅ Ethernet drivers sanity
✅ Networking socket: fuzz
✅ Networking sctp-auth: sockopts test
✅ Networking route_func: local
✅ Networking route_func: forward
✅ Networking TCP: keepalive test
✅ Networking UDP: socket
✅ Networking tunnel: gre basic
✅ Networking tunnel: vxlan basic
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
✅ ALSA PCM loopback test
✅ ALSA Control (mixer) Userspace Element test
✅ Usex - version 1.9-29
✅ trace: ftrace/tracer
🚧 ✅ CIFS Connectathon
🚧 ✅ POSIX pjd-fstest suites
Host 2:
✅ Boot test
✅ selinux-policy: serge-testsuite
🚧 ✅ Storage blktests
x86_64:
Host 1:
✅ Boot test
✅ selinux-policy: serge-testsuite
🚧 ✅ Storage blktests
Host 2:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ Loopdev Sanity
✅ jvm test suite
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ Networking bridge: sanity
✅ Ethernet drivers sanity
✅ Networking socket: fuzz
✅ Networking sctp-auth: sockopts test
✅ Networking route_func: local
✅ Networking route_func: forward
✅ Networking TCP: keepalive test
✅ Networking UDP: socket
✅ Networking tunnel: gre basic
✅ Networking tunnel: vxlan basic
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
✅ pciutils: sanity smoke test
✅ ALSA PCM loopback test
✅ ALSA Control (mixer) Userspace Element test
✅ Usex - version 1.9-29
✅ storage: SCSI VPD
✅ stress: stress-ng
✅ trace: ftrace/tracer
🚧 ✅ CIFS Connectathon
🚧 ✅ POSIX pjd-fstest suites
Test sources: https://github.com/CKI-project/tests-beaker
💚 Pull requests are welcome for new tests or improvements to existing tests!
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.
Testing timeout
---------------
We aim to provide a report within reasonable timeframe. Tests that haven't
finished running are marked with ⏱. Reports for non-upstream kernels have
a Beaker recipe linked to next to each host.
Hello,
We ran automated tests on a recent commit from this kernel tree:
Kernel repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
Commit: dfe283e9fdac - Linux 5.3.9-rc1
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/262380
One or more kernel tests failed:
x86_64:
❌ LTP lite
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
`-'
______________________________________________________________________________
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:
Host 1:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ Loopdev Sanity
✅ jvm test suite
✅ Memory function: memfd_create
✅ Memory function: kaslr
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ Ethernet drivers sanity
✅ Networking MACsec: sanity
✅ Networking socket: fuzz
✅ Networking sctp-auth: sockopts test
✅ Networking: igmp conformance test
✅ Networking route: pmtu
✅ Networking TCP: keepalive test
✅ Networking UDP: socket
✅ Networking tunnel: geneve basic test
✅ Networking tunnel: gre basic
✅ Networking tunnel: vxlan basic
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
✅ ALSA PCM loopback test
✅ ALSA Control (mixer) Userspace Element test
✅ Usex - version 1.9-29
✅ storage: SCSI VPD
✅ trace: ftrace/tracer
🚧 ✅ CIFS Connectathon
🚧 ✅ POSIX pjd-fstest suites
🚧 ✅ Networking bridge: sanity
🚧 ✅ Networking route_func: local
✅ Networking route_func: forward
🚧 ✅ L2TP basic test
🚧 ✅ Networking vnic: ipvlan/basic
🚧 ✅ storage: dm/common
🚧 ✅ Networking ipsec: basic netns transport
🚧 ✅ Networking ipsec: basic netns tunnel
Host 2:
✅ Boot test
✅ xfstests: ext4
✅ xfstests: xfs
✅ selinux-policy: serge-testsuite
✅ lvm thinp sanity
✅ storage: software RAID testing
🚧 ✅ Storage blktests
ppc64le:
Host 1:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ Loopdev Sanity
✅ jvm test suite
✅ Memory function: memfd_create
✅ Memory function: kaslr
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ Ethernet drivers sanity
✅ Networking MACsec: sanity
✅ Networking socket: fuzz
✅ Networking sctp-auth: sockopts test
✅ Networking route: pmtu
✅ Networking TCP: keepalive test
✅ Networking UDP: socket
✅ Networking tunnel: geneve basic test
✅ Networking tunnel: gre basic
✅ Networking tunnel: vxlan basic
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
✅ ALSA PCM loopback test
✅ ALSA Control (mixer) Userspace Element test
✅ Usex - version 1.9-29
✅ trace: ftrace/tracer
🚧 ✅ CIFS Connectathon
🚧 ✅ POSIX pjd-fstest suites
🚧 ✅ Networking bridge: sanity
🚧 ✅ Networking route_func: local
✅ Networking route_func: forward
🚧 ✅ L2TP basic test
🚧 ✅ Networking ipsec: basic netns tunnel
🚧 ✅ Networking vnic: ipvlan/basic
🚧 ✅ storage: dm/common
Host 2:
✅ Boot test
✅ xfstests: ext4
✅ xfstests: xfs
✅ selinux-policy: serge-testsuite
✅ lvm thinp sanity
✅ storage: software RAID testing
🚧 ✅ Storage blktests
x86_64:
Host 1:
✅ Boot test
🚧 ✅ IPMI driver test
🚧 ✅ IPMItool loop stress test
Host 2:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
❌ LTP lite
✅ Loopdev Sanity
✅ jvm test suite
✅ Memory function: memfd_create
✅ Memory function: kaslr
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ Ethernet drivers sanity
✅ Networking MACsec: sanity
✅ Networking socket: fuzz
✅ Networking sctp-auth: sockopts test
✅ Networking: igmp conformance test
✅ Networking route: pmtu
✅ Networking TCP: keepalive test
✅ Networking UDP: socket
✅ Networking tunnel: geneve basic test
✅ Networking tunnel: gre basic
✅ Networking tunnel: vxlan basic
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
✅ pciutils: sanity smoke test
✅ ALSA PCM loopback test
✅ ALSA Control (mixer) Userspace Element test
✅ Usex - version 1.9-29
✅ storage: SCSI VPD
✅ stress: stress-ng
✅ trace: ftrace/tracer
🚧 ✅ CIFS Connectathon
🚧 ✅ POSIX pjd-fstest suites
🚧 ✅ Networking bridge: sanity
🚧 ✅ Networking route_func: local
✅ Networking route_func: forward
🚧 ✅ L2TP basic test
🚧 ✅ Networking vnic: ipvlan/basic
🚧 ✅ storage: dm/common
🚧 ✅ Networking ipsec: basic netns transport
🚧 ✅ Networking ipsec: basic netns tunnel
Host 3:
✅ Boot test
✅ xfstests: ext4
✅ xfstests: xfs
✅ selinux-policy: serge-testsuite
✅ lvm thinp sanity
✅ storage: software RAID testing
🚧 ✅ IOMMU boot test
🚧 ✅ Storage blktests
Test sources: https://github.com/CKI-project/tests-beaker
💚 Pull requests are welcome for new tests or improvements to existing tests!
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.
Testing timeout
---------------
We aim to provide a report within reasonable timeframe. Tests that haven't
finished running are marked with ⏱. Reports for non-upstream kernels have
a Beaker recipe linked to next to each host.
v4.11-rc1 did introduce a patch series that rearranged the
sdio quirks into a header file. Unfortunately this did forget
to handle SDIO_VENDOR_ID_TI differently between wl1251 and
wl1271 with the result that although the wl1251 was found on
the sdio bus, the firmware did not load any more and there was
no interface registration.
This patch defines separate constants to be used by sdio quirks
and drivers.
Fixes: 884f38607897 ("mmc: core: move some sdio IDs out of quirks file")
Signed-off-by: H. Nikolaus Schaller <hns(a)goldelico.com>
Cc: <stable(a)vger.kernel.org> # 4.11.0
---
include/linux/mmc/sdio_ids.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/mmc/sdio_ids.h b/include/linux/mmc/sdio_ids.h
index d1a5d5df02f5..08b25c02b5a1 100644
--- a/include/linux/mmc/sdio_ids.h
+++ b/include/linux/mmc/sdio_ids.h
@@ -71,6 +71,8 @@
#define SDIO_VENDOR_ID_TI 0x0097
#define SDIO_DEVICE_ID_TI_WL1271 0x4076
+#define SDIO_VENDOR_ID_TI_WL1251 0x104c
+#define SDIO_DEVICE_ID_TI_WL1251 0x9066
#define SDIO_VENDOR_ID_STE 0x0020
#define SDIO_DEVICE_ID_STE_CW1200 0x2280
--
2.23.0
Pandora_wl1251_init_card was used to do special pdata based
setup of the sdio mmc interface. This does no longer work with
v4.7 and later. A fix requires a device tree based mmc3 setup.
Therefore we move the special setup to omap_hsmmc.c instead
of calling some pdata supplied init_card function.
The new code checks for a DT child node compatible to wl1251
so it will not affect other MMC3 use cases.
Generally, this code was and still is a hack and should be
moved to mmc core to e.g. read such properties from optional
DT child nodes.
Fixes: 81eef6ca9201 ("mmc: omap_hsmmc: Use dma_request_chan() for requesting DMA channel")
Signed-off-by: H. Nikolaus Schaller <hns(a)goldelico.com>
Cc: <stable(a)vger.kernel.org> # 4.7.0
---
drivers/mmc/host/omap_hsmmc.c | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 952fa4063ff8..a7192731ac13 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1512,6 +1512,34 @@ static void omap_hsmmc_init_card(struct mmc_host *mmc, struct mmc_card *card)
if (mmc_pdata(host)->init_card)
mmc_pdata(host)->init_card(card);
+ else if (card->type == MMC_TYPE_SDIO || card->type == MMC_TYPE_SD_COMBO) {
+ struct device_node *np = mmc_dev(mmc)->of_node;
+
+ /*
+ * REVISIT: should be moved to sdio core and made more
+ * general e.g. by expanding the DT bindings of child nodes
+ * to provide a mechanism to provide this information:
+ * Documentation/devicetree/bindings/mmc/mmc-card.txt
+ */
+
+ np = of_get_compatible_child(np, "ti,wl1251");
+ if (np) {
+ /*
+ * We have TI wl1251 attached to MMC3. Pass this information to
+ * SDIO core because it can't be probed by normal methods.
+ */
+
+ dev_info(host->dev, "found wl1251\n");
+ card->quirks |= MMC_QUIRK_NONSTD_SDIO;
+ card->cccr.wide_bus = 1;
+ card->cis.vendor = 0x104c;
+ card->cis.device = 0x9066;
+ card->cis.blksize = 512;
+ card->cis.max_dtr = 24000000;
+ card->ocr = 0x80;
+ of_node_put(np);
+ }
+ }
}
static void omap_hsmmc_enable_sdio_irq(struct mmc_host *mmc, int enable)
--
2.23.0
This is a note to let you know that I've just added the patch titled
usbip: tools: fix fd leakage in the function of
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-testing branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will be merged to the usb-next branch sometime soon,
after it passes testing, and the merge window is open.
If you have any questions about this process, please let me know.
>From 26a4d4c00f85cb844dd11dd35e848b079c2f5e8f Mon Sep 17 00:00:00 2001
From: Hewenliang <hewenliang4(a)huawei.com>
Date: Fri, 25 Oct 2019 00:35:15 -0400
Subject: usbip: tools: fix fd leakage in the function of
read_attr_usbip_status
We should close the fd before the return of read_attr_usbip_status.
Fixes: 3391ba0e2792 ("usbip: tools: Extract generic code to be shared with vudc backend")
Signed-off-by: Hewenliang <hewenliang4(a)huawei.com>
Cc: stable <stable(a)vger.kernel.org>
Link: https://lore.kernel.org/r/20191025043515.20053-1-hewenliang4@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
tools/usb/usbip/libsrc/usbip_host_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/usb/usbip/libsrc/usbip_host_common.c b/tools/usb/usbip/libsrc/usbip_host_common.c
index 2813aa821c82..d1d8ba2a4a40 100644
--- a/tools/usb/usbip/libsrc/usbip_host_common.c
+++ b/tools/usb/usbip/libsrc/usbip_host_common.c
@@ -57,7 +57,7 @@ static int32_t read_attr_usbip_status(struct usbip_usb_device *udev)
}
value = atoi(status);
-
+ close(fd);
return value;
}
--
2.23.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: 37b4d0c37c0b - Linux 5.3.9
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/268208
One or more kernel tests failed:
ppc64le:
❌ Networking socket: fuzz
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: 37b4d0c37c0b - Linux 5.3.9
We grabbed the 942874d8a91d commit of the stable queue repository.
We then merged the patchset with `git am`:
regulator-of-fix-suspend-min-max-voltage-parsing.patch
asoc-samsung-arndale-add-missing-of-node-dereferenci.patch
asoc-wm8994-do-not-register-inapplicable-controls-fo.patch
regulator-da9062-fix-suspend_enable-disable-preparat.patch
asoc-topology-fix-a-signedness-bug-in-soc_tplg_dapm_.patch
arm64-dts-allwinner-a64-pine64-plus-add-phy-regulato.patch
arm64-dts-allwinner-a64-drop-pmu-node.patch
arm64-dts-allwinner-a64-sopine-baseboard-add-phy-reg.patch
arm64-dts-fix-gpio-to-pinmux-mapping.patch
regulator-ti-abb-fix-timeout-in-ti_abb_wait_txdone-t.patch
pinctrl-intel-allocate-irq-chip-dynamic.patch
asoc-sof-loader-fix-kernel-oops-on-firmware-boot-fai.patch
asoc-sof-topology-fix-parse-fail-issue-for-byte-bool.patch
asoc-sof-intel-hda-fix-warnings-during-fw-load.patch
asoc-sof-intel-initialise-and-verify-fw-crash-dump-d.patch
asoc-sof-intel-hda-disable-dmi-l1-entry-during-captu.patch
asoc-rt5682-add-null-handler-to-set_jack-function.patch
asoc-intel-sof_rt5682-add-remove-function-to-disable.patch
asoc-intel-bytcr_rt5651-add-null-check-to-support_bu.patch
regulator-pfuze100-regulator-variable-val-in-pfuze10.patch
asoc-wm_adsp-don-t-generate-kcontrols-without-read-f.patch
asoc-rockchip-i2s-fix-rpm-imbalance.patch
arm64-dts-rockchip-fix-rockpro64-rk808-interrupt-lin.patch
arm-dts-logicpd-torpedo-som-remove-twl_keypad.patch
arm64-dts-rockchip-fix-rockpro64-vdd-log-regulator-s.patch
arm64-dts-rockchip-fix-rockpro64-sdhci-settings.patch
pinctrl-ns2-fix-off-by-one-bugs-in-ns2_pinmux_enable.patch
pinctrl-stmfx-fix-null-pointer-on-remove.patch
arm64-dts-zii-ultra-fix-arm-regulator-states.patch
arm-dts-am3874-iceboard-fix-i2c-mux-idle-disconnect-.patch
asoc-msm8916-wcd-digital-add-missing-mix2-path-for-r.patch
asoc-simple_card_utils.h-fix-potential-multiple-rede.patch
arm-dts-use-level-interrupt-for-omap4-5-wlcore.patch
arm-mm-fix-alignment-handler-faults-under-memory-pre.patch
scsi-qla2xxx-fix-a-potential-null-pointer-dereferenc.patch
scsi-scsi_dh_alua-handle-rtpg-sense-code-correctly-d.patch
scsi-sni_53c710-fix-compilation-error.patch
scsi-fix-kconfig-dependency-warning-related-to-53c70.patch
arm-8908-1-add-__always_inline-to-functions-called-f.patch
arm-8914-1-nommu-fix-exc_ret-for-xip.patch
arm64-dts-rockchip-fix-rockpro64-sdmmc-settings.patch
arm64-dts-rockchip-fix-usb-c-on-hugsun-x99-tv-box.patch
arm64-dts-lx2160a-correct-cpu-core-idle-state-name.patch
arm-dts-imx6q-logicpd-re-enable-snvs-power-key.patch
arm-dts-vf610-zii-scu4-aib-specify-i2c-mux-idle-disc.patch
arm-dts-imx7s-correct-gpt-s-ipg-clock-source.patch
arm64-dts-imx8mq-use-correct-clock-for-usdhc-s-ipg-c.patch
arm64-dts-imx8mm-use-correct-clock-for-usdhc-s-ipg-c.patch
perf-tools-fix-resource-leak-of-closedir-on-the-erro.patch
perf-c2c-fix-memory-leak-in-build_cl_output.patch
8250-men-mcb-fix-error-checking-when-get_num_ports-r.patch
perf-kmem-fix-memory-leak-in-compact_gfp_flags.patch
arm-davinci-dm365-fix-mcbsp-dma_slave_map-entry.patch
drm-amdgpu-fix-potential-vm-faults.patch
drm-amdgpu-fix-error-handling-in-amdgpu_bo_list_crea.patch
scsi-target-core-do-not-overwrite-cdb-byte-1.patch
scsi-hpsa-add-missing-hunks-in-reset-patch.patch
asoc-intel-sof-rt5682-add-a-check-for-devm_clk_get.patch
asoc-sof-control-return-true-when-kcontrol-values-ch.patch
tracing-fix-gfp_t-format-for-synthetic-events.patch
arm-dts-bcm2837-rpi-cm3-avoid-leds-gpio-probing-issu.patch
i2c-aspeed-fix-master-pending-state-handling.patch
drm-komeda-don-t-flush-inactive-pipes.patch
arm-8926-1-v7m-remove-register-save-to-stack-before-.patch
selftests-kvm-vmx_set_nested_state_test-don-t-check-.patch
selftests-kvm-fix-sync_regs_test-with-newer-gccs.patch
alsa-hda-add-tigerlake-jasperlake-pci-id.patch
of-unittest-fix-memory-leak-in-unittest_data_add.patch
mips-bmips-mark-exception-vectors-as-char-arrays.patch
irqchip-gic-v3-its-use-the-exact-itslist-for-vmovp.patch
i2c-mt65xx-fix-null-ptr-dereference.patch
i2c-stm32f7-fix-first-byte-to-send-in-slave-mode.patch
i2c-stm32f7-fix-a-race-in-slave-mode-with-arbitratio.patch
i2c-stm32f7-remove-warning-when-compiling-with-w-1.patch
cifs-fix-cifsinodeinfo-lock_sem-deadlock-when-reconn.patch
irqchip-sifive-plic-skip-contexts-except-supervisor-.patch
nbd-protect-cmd-status-with-cmd-lock.patch
nbd-handle-racing-with-error-ed-out-commands.patch
ata-libahci_platform-fix-regulator_get_optional-misu.patch
cxgb4-fix-panic-when-attaching-to-uld-fail.patch
cxgb4-request-the-tx-cidx-updates-to-status-page.patch
dccp-do-not-leak-jiffies-on-the-wire.patch
erspan-fix-the-tun_info-options_len-check-for-erspan.patch
inet-stop-leaking-jiffies-on-the-wire.patch
net-annotate-accesses-to-sk-sk_incoming_cpu.patch
net-annotate-lockless-accesses-to-sk-sk_napi_id.patch
net-dsa-bcm_sf2-fix-imp-setup-for-port-different-than-8.patch
net-ethernet-ftgmac100-fix-dma-coherency-issue-with-sw-checksum.patch
net-fix-sk_page_frag-recursion-from-memory-reclaim.patch
net-hisilicon-fix-ping-latency-when-deal-with-high-throughput.patch
net-mlx4_core-dynamically-set-guaranteed-amount-of-counters-per-vf.patch
netns-fix-gfp-flags-in-rtnl_net_notifyid.patch
net-rtnetlink-fix-a-typo-fbd-fdb.patch
net-usb-lan78xx-disable-interrupts-before-calling-generic_handle_irq.patch
net-zeroing-the-structure-ethtool_wolinfo-in-ethtool_get_wol.patch
selftests-net-reuseport_dualstack-fix-uninitalized-parameter.patch
udp-fix-data-race-in-udp_set_dev_scratch.patch
vxlan-check-tun_info-options_len-properly.patch
net-add-skb_queue_empty_lockless.patch
udp-use-skb_queue_empty_lockless.patch
net-use-skb_queue_empty_lockless-in-poll-handlers.patch
net-use-skb_queue_empty_lockless-in-busy-poll-contexts.patch
net-add-read_once-annotation-in-__skb_wait_for_more_packets.patch
ipv4-fix-route-update-on-metric-change.patch
selftests-fib_tests-add-more-tests-for-metric-update.patch
net-smc-fix-closing-of-fallback-smc-sockets.patch
net-smc-keep-vlan_id-for-smc-r-in-smc_listen_work.patch
keys-fix-memory-leak-in-copy_net_ns.patch
net-phylink-fix-phylink_dbg-macro.patch
rxrpc-fix-handling-of-last-subpacket-of-jumbo-packet.patch
net-mlx5e-determine-source-port-properly-for-vlan-push-action.patch
net-mlx5e-remove-incorrect-match-criteria-assignment-line.patch
net-mlx5e-initialize-on-stack-link-modes-bitmap.patch
net-mlx5-fix-flow-counter-list-auto-bits-struct.patch
net-smc-fix-refcounting-for-non-blocking-connect.patch
net-mlx5-fix-rtable-reference-leak.patch
mlxsw-core-unpublish-devlink-parameters-during-reload.patch
r8169-fix-wrong-phy-id-issue-with-rtl8168dp.patch
net-mlx5e-fix-ethtool-self-test-link-speed.patch
net-mlx5e-fix-handling-of-compressed-cqes-in-case-of-low-napi-budget.patch
ipv4-fix-ipskb_frag_pmtu-handling-with-fragmentation.patch
net-bcmgenet-don-t-set-phydev-link-from-mac.patch
net-dsa-b53-do-not-clear-existing-mirrored-port-mask.patch
net-dsa-fix-switch-tree-list.patch
net-ensure-correct-skb-tstamp-in-various-fragmenters.patch
net-hns3-fix-mis-counting-irq-vector-numbers-issue.patch
net-netem-fix-error-path-for-corrupted-gso-frames.patch
net-reorder-struct-net-fields-to-avoid-false-sharing.patch
net-usb-lan78xx-connect-phy-before-registering-mac.patch
r8152-add-device-id-for-lenovo-thinkpad-usb-c-dock-gen-2.patch
net-netem-correct-the-parent-s-backlog-when-corrupted-packet-was-dropped.patch
net-phy-bcm7xxx-define-soft_reset-for-40nm-ephy.patch
net-bcmgenet-soft-reset-40nm-ephys-before-mac-init.patch
net-bcmgenet-reset-40nm-ephy-on-energy-detect.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
✅ selinux-policy: serge-testsuite
🚧 ❌ Storage blktests
Host 2:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ Loopdev Sanity
✅ jvm test suite
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ Networking bridge: sanity
✅ Ethernet drivers sanity
❌ Networking socket: fuzz
⚡⚡⚡ Networking sctp-auth: sockopts test
⚡⚡⚡ Networking route_func: local
⚡⚡⚡ Networking route_func: forward
⚡⚡⚡ Networking TCP: keepalive test
⚡⚡⚡ Networking UDP: socket
⚡⚡⚡ Networking tunnel: gre basic
⚡⚡⚡ Networking tunnel: vxlan basic
⚡⚡⚡ audit: audit testsuite test
⚡⚡⚡ httpd: mod_ssl smoke sanity
⚡⚡⚡ iotop: sanity
⚡⚡⚡ tuned: tune-processes-through-perf
⚡⚡⚡ ALSA PCM loopback test
⚡⚡⚡ ALSA Control (mixer) Userspace Element test
⚡⚡⚡ Usex - version 1.9-29
⚡⚡⚡ trace: ftrace/tracer
🚧 ⚡⚡⚡ CIFS Connectathon
🚧 ⚡⚡⚡ POSIX pjd-fstest suites
x86_64:
⚡ 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.
Test sources: https://github.com/CKI-project/tests-beaker
💚 Pull requests are welcome for new tests or improvements to existing tests!
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.
Testing timeout
---------------
We aim to provide a report within reasonable timeframe. Tests that haven't
finished running are marked with ⏱. Reports for non-upstream kernels have
a Beaker recipe linked to next to each host.
This is a note to let you know that I've just added the patch titled
appledisplay: fix error handling in the scheduled work
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-testing branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will be merged to the usb-next branch sometime soon,
after it passes testing, and the merge window is open.
If you have any questions about this process, please let me know.
>From 91feb01596e5efc0cc922cc73f5583114dccf4d2 Mon Sep 17 00:00:00 2001
From: Oliver Neukum <oneukum(a)suse.com>
Date: Wed, 6 Nov 2019 13:49:01 +0100
Subject: appledisplay: fix error handling in the scheduled work
The work item can operate on
1. stale memory left over from the last transfer
the actual length of the data transfered needs to be checked
2. memory already freed
the error handling in appledisplay_probe() needs
to cancel the work in that case
Reported-and-tested-by: syzbot+495dab1f175edc9c2f13(a)syzkaller.appspotmail.com
Signed-off-by: Oliver Neukum <oneukum(a)suse.com>
Cc: stable <stable(a)vger.kernel.org>
Link: https://lore.kernel.org/r/20191106124902.7765-1-oneukum@suse.com
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/usb/misc/appledisplay.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/misc/appledisplay.c b/drivers/usb/misc/appledisplay.c
index ac92725458b5..ba1eaabc7796 100644
--- a/drivers/usb/misc/appledisplay.c
+++ b/drivers/usb/misc/appledisplay.c
@@ -164,7 +164,12 @@ static int appledisplay_bl_get_brightness(struct backlight_device *bd)
0,
pdata->msgdata, 2,
ACD_USB_TIMEOUT);
- brightness = pdata->msgdata[1];
+ if (retval < 2) {
+ if (retval >= 0)
+ retval = -EMSGSIZE;
+ } else {
+ brightness = pdata->msgdata[1];
+ }
mutex_unlock(&pdata->sysfslock);
if (retval < 0)
@@ -299,6 +304,7 @@ static int appledisplay_probe(struct usb_interface *iface,
if (pdata) {
if (pdata->urb) {
usb_kill_urb(pdata->urb);
+ cancel_delayed_work_sync(&pdata->work);
if (pdata->urbdata)
usb_free_coherent(pdata->udev, ACD_URB_BUFFER_LEN,
pdata->urbdata, pdata->urb->transfer_dma);
--
2.23.0
This is a note to let you know that I've just added the patch titled
usb: Allow USB device to be warm reset in suspended state
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-testing branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will be merged to the usb-next branch sometime soon,
after it passes testing, and the merge window is open.
If you have any questions about this process, please let me know.
>From e76b3bf7654c3c94554c24ba15a3d105f4006c80 Mon Sep 17 00:00:00 2001
From: Kai-Heng Feng <kai.heng.feng(a)canonical.com>
Date: Wed, 6 Nov 2019 14:27:10 +0800
Subject: usb: Allow USB device to be warm reset in suspended state
On Dell WD15 dock, sometimes USB ethernet cannot be detected after plugging
cable to the ethernet port, the hub and roothub get runtime resumed and
runtime suspended immediately:
...
[ 433.315169] xhci_hcd 0000:3a:00.0: hcd_pci_runtime_resume: 0
[ 433.315204] usb usb4: usb auto-resume
[ 433.315226] hub 4-0:1.0: hub_resume
[ 433.315239] xhci_hcd 0000:3a:00.0: Get port status 4-1 read: 0x10202e2, return 0x10343
[ 433.315264] usb usb4-port1: status 0343 change 0001
[ 433.315279] xhci_hcd 0000:3a:00.0: clear port1 connect change, portsc: 0x10002e2
[ 433.315293] xhci_hcd 0000:3a:00.0: Get port status 4-2 read: 0x2a0, return 0x2a0
[ 433.317012] xhci_hcd 0000:3a:00.0: xhci_hub_status_data: stopping port polling.
[ 433.422282] xhci_hcd 0000:3a:00.0: Get port status 4-1 read: 0x10002e2, return 0x343
[ 433.422307] usb usb4-port1: do warm reset
[ 433.422311] usb 4-1: device reset not allowed in state 8
[ 433.422339] hub 4-0:1.0: state 7 ports 2 chg 0002 evt 0000
[ 433.422346] xhci_hcd 0000:3a:00.0: Get port status 4-1 read: 0x10002e2, return 0x343
[ 433.422356] usb usb4-port1: do warm reset
[ 433.422358] usb 4-1: device reset not allowed in state 8
[ 433.422428] xhci_hcd 0000:3a:00.0: set port remote wake mask, actual port 0 status = 0xf0002e2
[ 433.422455] xhci_hcd 0000:3a:00.0: set port remote wake mask, actual port 1 status = 0xe0002a0
[ 433.422465] hub 4-0:1.0: hub_suspend
[ 433.422475] usb usb4: bus auto-suspend, wakeup 1
[ 433.426161] xhci_hcd 0000:3a:00.0: xhci_hub_status_data: stopping port polling.
[ 433.466209] xhci_hcd 0000:3a:00.0: port 0 polling in bus suspend, waiting
[ 433.510204] xhci_hcd 0000:3a:00.0: port 0 polling in bus suspend, waiting
[ 433.554051] xhci_hcd 0000:3a:00.0: port 0 polling in bus suspend, waiting
[ 433.598235] xhci_hcd 0000:3a:00.0: port 0 polling in bus suspend, waiting
[ 433.642154] xhci_hcd 0000:3a:00.0: port 0 polling in bus suspend, waiting
[ 433.686204] xhci_hcd 0000:3a:00.0: port 0 polling in bus suspend, waiting
[ 433.730205] xhci_hcd 0000:3a:00.0: port 0 polling in bus suspend, waiting
[ 433.774203] xhci_hcd 0000:3a:00.0: port 0 polling in bus suspend, waiting
[ 433.818207] xhci_hcd 0000:3a:00.0: port 0 polling in bus suspend, waiting
[ 433.862040] xhci_hcd 0000:3a:00.0: port 0 polling in bus suspend, waiting
[ 433.862053] xhci_hcd 0000:3a:00.0: xhci_hub_status_data: stopping port polling.
[ 433.862077] xhci_hcd 0000:3a:00.0: xhci_suspend: stopping port polling.
[ 433.862096] xhci_hcd 0000:3a:00.0: // Setting command ring address to 0x8578fc001
[ 433.862312] xhci_hcd 0000:3a:00.0: hcd_pci_runtime_suspend: 0
[ 433.862445] xhci_hcd 0000:3a:00.0: PME# enabled
[ 433.902376] xhci_hcd 0000:3a:00.0: restoring config space at offset 0xc (was 0x0, writing 0x20)
[ 433.902395] xhci_hcd 0000:3a:00.0: restoring config space at offset 0x4 (was 0x100000, writing 0x100403)
[ 433.902490] xhci_hcd 0000:3a:00.0: PME# disabled
[ 433.902504] xhci_hcd 0000:3a:00.0: enabling bus mastering
[ 433.902547] xhci_hcd 0000:3a:00.0: // Setting command ring address to 0x8578fc001
[ 433.902649] pcieport 0000:00:1b.0: PME: Spurious native interrupt!
[ 433.902839] xhci_hcd 0000:3a:00.0: Port change event, 4-1, id 3, portsc: 0xb0202e2
[ 433.902842] xhci_hcd 0000:3a:00.0: resume root hub
[ 433.902845] xhci_hcd 0000:3a:00.0: handle_port_status: starting port polling.
[ 433.902877] xhci_hcd 0000:3a:00.0: xhci_resume: starting port polling.
[ 433.902889] xhci_hcd 0000:3a:00.0: xhci_hub_status_data: stopping port polling.
[ 433.902891] xhci_hcd 0000:3a:00.0: hcd_pci_runtime_resume: 0
[ 433.902919] usb usb4: usb wakeup-resume
[ 433.902942] usb usb4: usb auto-resume
[ 433.902966] hub 4-0:1.0: hub_resume
...
As Mathias pointed out, the hub enters Cold Attach Status state and
requires a warm reset. However usb_reset_device() bails out early when
the device is in suspended state, as its callers port_event() and
hub_event() don't always resume the device.
Since there's nothing wrong to reset a suspended device, allow
usb_reset_device() to do so to solve the issue.
Signed-off-by: Kai-Heng Feng <kai.heng.feng(a)canonical.com>
Acked-by: Alan Stern <stern(a)rowland.harvard.edu>
Cc: stable <stable(a)vger.kernel.org>
Link: https://lore.kernel.org/r/20191106062710.29880-1-kai.heng.feng@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/usb/core/hub.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index fdcfa85b5b12..1709895387b9 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -5840,7 +5840,7 @@ static int usb_reset_and_verify_device(struct usb_device *udev)
/**
* usb_reset_device - warn interface drivers and perform a USB port reset
- * @udev: device to reset (not in SUSPENDED or NOTATTACHED state)
+ * @udev: device to reset (not in NOTATTACHED state)
*
* Warns all drivers bound to registered interfaces (using their pre_reset
* method), performs the port reset, and then lets the drivers know that
@@ -5868,8 +5868,7 @@ int usb_reset_device(struct usb_device *udev)
struct usb_host_config *config = udev->actconfig;
struct usb_hub *hub = usb_hub_to_struct_hub(udev->parent);
- if (udev->state == USB_STATE_NOTATTACHED ||
- udev->state == USB_STATE_SUSPENDED) {
+ if (udev->state == USB_STATE_NOTATTACHED) {
dev_dbg(&udev->dev, "device reset not allowed in state %d\n",
udev->state);
return -EINVAL;
--
2.23.0
For clarity, this commit should be handled the same way for all stable
trees (not just 5.3), and I am replying again since my phone used HTML
which was blocked by the mailing lists :(.
My preference is to omit this commit rather than reverting it in the
near future, but if you would prefer to add this one and then revert it
because it is easier for you I will let you make that call.
Thanks,
Doug
On 11/6/19 7:08 AM, Doug Berger wrote:
> Yes, that was my intention.
>
> I was trying to reduce some code churn and associated merge conflicts in
> the backports.
>
> It is not a functional problem to backport this and then backport the
> recent reversion, but I would think it would simplify things to just not
> backport this one in the first place. Perhaps it's too late to simplify
> things:).
>
> Sorry for the confusion,
> Doug
>
>
>
> On Wed, Nov 6, 2019, 6:56 AM Greg Kroah-Hartman
> <gregkh(a)linuxfoundation.org <mailto:gregkh@linuxfoundation.org>> wrote:
>
> On Wed, Nov 06, 2019 at 06:43:37AM -0800, Doug Berger wrote:
> > Please do not apply this patch to the stable trees. It has been
> superceded
> > by a recent patch set and reverted upstream.
>
> So drop this and keep the one after this? That would be 25382b991d25
> ("net: bcmgenet: reset 40nm EPHY on energy detect")
>
>
> thanks,
>
> greg k-h
>
This is a note to let you know that I've just added the patch titled
phy: renesas: rcar-gen3-usb2: Fix sysfs interface of "role"
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-testing branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will be merged to the char-misc-next branch sometime soon,
after it passes testing, and the merge window is open.
If you have any questions about this process, please let me know.
>From 4bd5ead82d4b877ebe41daf95f28cda53205b039 Mon Sep 17 00:00:00 2001
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh(a)renesas.com>
Date: Mon, 7 Oct 2019 16:55:10 +0900
Subject: phy: renesas: rcar-gen3-usb2: Fix sysfs interface of "role"
Since the role_store() uses strncmp(), it's possible to refer
out-of-memory if the sysfs data size is smaller than strlen("host").
This patch fixes it by using sysfs_streq() instead of strncmp().
Reported-by: Pavel Machek <pavel(a)denx.de>
Fixes: 9bb86777fb71 ("phy: rcar-gen3-usb2: add sysfs for usb role swap")
Cc: <stable(a)vger.kernel.org> # v4.10+
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh(a)renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas(a)glider.be>
Acked-by: Pavel Machek <pavel(a)denx.de>
Signed-off-by: Kishon Vijay Abraham I <kishon(a)ti.com>
---
drivers/phy/renesas/phy-rcar-gen3-usb2.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
index 49ec67d46ccc..bfb22f868857 100644
--- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c
+++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
@@ -21,6 +21,7 @@
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/regulator/consumer.h>
+#include <linux/string.h>
#include <linux/usb/of.h>
#include <linux/workqueue.h>
@@ -320,9 +321,9 @@ static ssize_t role_store(struct device *dev, struct device_attribute *attr,
if (!ch->is_otg_channel || !rcar_gen3_is_any_rphy_initialized(ch))
return -EIO;
- if (!strncmp(buf, "host", strlen("host")))
+ if (sysfs_streq(buf, "host"))
new_mode = PHY_MODE_USB_HOST;
- else if (!strncmp(buf, "peripheral", strlen("peripheral")))
+ else if (sysfs_streq(buf, "peripheral"))
new_mode = PHY_MODE_USB_DEVICE;
else
return -EINVAL;
--
2.23.0
set_page_dirty says:
For pages with a mapping this should be done under the page lock
for the benefit of asynchronous memory errors who prefer a
consistent dirty state. This rule can be broken in some special
cases, but should be better not to.
Under those rules, it is only safe for us to use the plain set_page_dirty
calls for shmemfs/anonymous memory. Userptr may be used with real
mappings and so needs to use the locked version (set_page_dirty_lock).
However, following a try_to_unmap() we may want to remove the userptr and
so call put_pages(). However, try_to_unmap() acquires the page lock and
so we must avoid recursively locking the pages ourselves -- which means
that we cannot safely acquire the lock around set_page_dirty(). Since we
can't be sure of the lock, we have to risk skip dirtying the page, or
else risk calling set_page_dirty() without a lock and so risk fs
corruption.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=203317
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112012
Fixes: 5cc9ed4b9a7a ("drm/i915: Introduce mapping of user pages into video m
References: cb6d7c7dc7ff ("drm/i915/userptr: Acquire the page lock around set_page_dirty()")
References: 505a8ec7e11a ("Revert "drm/i915/userptr: Acquire the page lock around set_page_dirty()"")
References: 6dcc693bc57f ("ext4: warn when page is dirtied without buffers")
Signed-off-by: Chris Wilson <chris(a)chris-wilson.co.uk>
Cc: Lionel Landwerlin <lionel.g.landwerlin(a)intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin(a)intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen(a)linux.intel.com>
Cc: stable(a)vger.kernel.org
---
drivers/gpu/drm/i915/gem/i915_gem_userptr.c | 22 ++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_userptr.c b/drivers/gpu/drm/i915/gem/i915_gem_userptr.c
index 1e045c337044..4c72d74d6576 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_userptr.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_userptr.c
@@ -646,8 +646,28 @@ i915_gem_userptr_put_pages(struct drm_i915_gem_object *obj,
obj->mm.dirty = false;
for_each_sgt_page(page, sgt_iter, pages) {
- if (obj->mm.dirty)
+ if (obj->mm.dirty && trylock_page(page)) {
+ /*
+ * As this may not be anonymous memory (e.g. shmem)
+ * but exist on a real mapping, we have to lock
+ * the page in order to dirty it -- holding
+ * the page reference is not sufficient to
+ * prevent the inode from being truncated.
+ * Play safe and take the lock.
+ *
+ * However...!
+ *
+ * The mmu-notifier can be invalidated for a
+ * migrate_page, that is alreadying holding the lock
+ * on the page. Such a try_to_unmap() will result
+ * in us calling put_pages() and so recursively try
+ * to lock the page. We avoid that deadlock with
+ * a trylock_page() and in exchange we risk missing
+ * some page dirtying.
+ */
set_page_dirty(page);
+ unlock_page(page);
+ }
mark_page_accessed(page);
put_page(page);
--
2.24.0
From: Peng Fan <peng.fan(a)nxp.com>
The dmaengine_prep_slave_sg needs to use sg count returned
by dma_map_sg, not use sport->dma_tx_nents, because the return
value of dma_map_sg is not always same with "nents".
When enabling iommu for lpuart + edma, iommu framework may concatenate
two sgs into one.
Fixes: 6250cc30c4c4e ("tty: serial: fsl_lpuart: Use scatter/gather DMA for Tx")
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Peng Fan <peng.fan(a)nxp.com>
---
V2:
Assign ret to sport->dma_tx_nents, then we no need to fix dma_unmap_sg
Hi Greg,
I saw v1 patch merged to tty-next, please help to replace with V2 if this
is ok for you, or you need I have a follow up fix for v1.
drivers/tty/serial/fsl_lpuart.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
index 3e17bb8a0b16..ec5ea098669e 100644
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -436,6 +436,7 @@ static void lpuart_dma_tx(struct lpuart_port *sport)
return;
}
+ sport->dma_tx_nents = ret;
sport->dma_tx_desc = dmaengine_prep_slave_sg(sport->dma_tx_chan, sgl,
sport->dma_tx_nents,
DMA_MEM_TO_DEV, DMA_PREP_INTERRUPT);
--
2.16.4
The patch titled
Subject: mm: hugetlb: switch to css_tryget() in hugetlb_cgroup_charge_cgroup()
has been added to the -mm tree. Its filename is
mm-hugetlb-switch-to-css_tryget-in-hugetlb_cgroup_charge_cgroup.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/mm-hugetlb-switch-to-css_tryget-in…
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/mm-hugetlb-switch-to-css_tryget-in…
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Roman Gushchin <guro(a)fb.com>
Subject: mm: hugetlb: switch to css_tryget() in hugetlb_cgroup_charge_cgroup()
An exiting task might belong to an offline cgroup. In this case an
attempt to grab a cgroup reference from the task can end up with an
infinite loop in hugetlb_cgroup_charge_cgroup(), because neither the
cgroup will become online, neither the task will be migrated to a live
cgroup.
Fix this by switching over to css_tryget(). As css_tryget_online() can't
guarantee that the cgroup won't go offline, in most cases the check
doesn't make sense. In this particular case users of
hugetlb_cgroup_charge_cgroup() are not affected by this change.
A similar problem is described by commit 18fa84a2db0e ("cgroup: Use
css_tryget() instead of css_tryget_online() in task_get_css()").
Link: http://lkml.kernel.org/r/20191106225131.3543616-2-guro@fb.com
Signed-off-by: Roman Gushchin <guro(a)fb.com>
Acked-by: Johannes Weiner <hannes(a)cmpxchg.org>
Cc: Tejun Heo <tj(a)kernel.org>
Cc: Michal Hocko <mhocko(a)kernel.org>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/hugetlb_cgroup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/hugetlb_cgroup.c~mm-hugetlb-switch-to-css_tryget-in-hugetlb_cgroup_charge_cgroup
+++ a/mm/hugetlb_cgroup.c
@@ -196,7 +196,7 @@ int hugetlb_cgroup_charge_cgroup(int idx
again:
rcu_read_lock();
h_cg = hugetlb_cgroup_from_task(current);
- if (!css_tryget_online(&h_cg->css)) {
+ if (!css_tryget(&h_cg->css)) {
rcu_read_unlock();
goto again;
}
_
Patches currently in -mm which might be from guro(a)fb.com are
mm-slab-make-page_cgroup_ino-to-recognize-non-compound-slab-pages-properly.patch
mm-memcg-switch-to-css_tryget-in-get_mem_cgroup_from_mm.patch
mm-hugetlb-switch-to-css_tryget-in-hugetlb_cgroup_charge_cgroup.patch
The patch titled
Subject: mm: memcg: switch to css_tryget() in get_mem_cgroup_from_mm()
has been added to the -mm tree. Its filename is
mm-memcg-switch-to-css_tryget-in-get_mem_cgroup_from_mm.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/mm-memcg-switch-to-css_tryget-in-g…
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/mm-memcg-switch-to-css_tryget-in-g…
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Roman Gushchin <guro(a)fb.com>
Subject: mm: memcg: switch to css_tryget() in get_mem_cgroup_from_mm()
We've encountered a rcu stall in get_mem_cgroup_from_mm():
rcu: INFO: rcu_sched self-detected stall on CPU
rcu: 33-....: (21000 ticks this GP) idle=6c6/1/0x4000000000000002 softirq=35441/35441 fqs=5017
(t=21031 jiffies g=324821 q=95837) NMI backtrace for cpu 33
<...>
RIP: 0010:get_mem_cgroup_from_mm+0x2f/0x90
<...>
__memcg_kmem_charge+0x55/0x140
__alloc_pages_nodemask+0x267/0x320
pipe_write+0x1ad/0x400
new_sync_write+0x127/0x1c0
__kernel_write+0x4f/0xf0
dump_emit+0x91/0xc0
writenote+0xa0/0xc0
elf_core_dump+0x11af/0x1430
do_coredump+0xc65/0xee0
? unix_stream_sendmsg+0x37d/0x3b0
get_signal+0x132/0x7c0
do_signal+0x36/0x640
? recalc_sigpending+0x17/0x50
exit_to_usermode_loop+0x61/0xd0
do_syscall_64+0xd4/0x100
entry_SYSCALL_64_after_hwframe+0x44/0xa9
The problem is caused by an exiting task which is associated with an
offline memcg. We're iterating over and over in the do {} while
(!css_tryget_online()) loop, but obviously the memcg won't become online
and the exiting task won't be migrated to a live memcg.
Let's fix it by switching from css_tryget_online() to css_tryget().
As css_tryget_online() cannot guarantee that the memcg won't go offline,
the check is usually useless, except some rare cases when for example it
determines if something should be presented to a user.
A similar problem is described by commit 18fa84a2db0e ("cgroup: Use
css_tryget() instead of css_tryget_online() in task_get_css()").
Johannes:
: The bug aside, it doesn't matter whether the cgroup is online for the
: callers. It used to matter when offlining needed to evacuate all charges
: from the memcg, and so needed to prevent new ones from showing up, but we
: don't care now.
Link: http://lkml.kernel.org/r/20191106225131.3543616-1-guro@fb.com
Signed-off-by: Roman Gushchin <guro(a)fb.com>
Acked-by: Johannes Weiner <hannes(a)cmpxchg.org>
Cc: Tejun Heo <tj(a)kernel.org>
Cc: Michal Hocko <mhocko(a)kernel.org>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/memcontrol.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/memcontrol.c~mm-memcg-switch-to-css_tryget-in-get_mem_cgroup_from_mm
+++ a/mm/memcontrol.c
@@ -960,7 +960,7 @@ struct mem_cgroup *get_mem_cgroup_from_m
if (unlikely(!memcg))
memcg = root_mem_cgroup;
}
- } while (!css_tryget_online(&memcg->css));
+ } while (!css_tryget(&memcg->css));
rcu_read_unlock();
return memcg;
}
_
Patches currently in -mm which might be from guro(a)fb.com are
mm-slab-make-page_cgroup_ino-to-recognize-non-compound-slab-pages-properly.patch
mm-memcg-switch-to-css_tryget-in-get_mem_cgroup_from_mm.patch
mm-hugetlb-switch-to-css_tryget-in-hugetlb_cgroup_charge_cgroup.patch
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: 37b4d0c37c0b - Linux 5.3.9
The results of these automated tests are provided below.
Overall result: PASSED
Merge: OK
Compile: OK
Tests: OK
All kernel binaries, config files, and logs are available for download here:
https://artifacts.cki-project.org/pipelines/268506
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: 37b4d0c37c0b - Linux 5.3.9
We grabbed the b6cfbed0ac3d commit of the stable queue repository.
We then merged the patchset with `git am`:
regulator-of-fix-suspend-min-max-voltage-parsing.patch
asoc-samsung-arndale-add-missing-of-node-dereferenci.patch
asoc-wm8994-do-not-register-inapplicable-controls-fo.patch
regulator-da9062-fix-suspend_enable-disable-preparat.patch
asoc-topology-fix-a-signedness-bug-in-soc_tplg_dapm_.patch
arm64-dts-allwinner-a64-pine64-plus-add-phy-regulato.patch
arm64-dts-allwinner-a64-drop-pmu-node.patch
arm64-dts-allwinner-a64-sopine-baseboard-add-phy-reg.patch
arm64-dts-fix-gpio-to-pinmux-mapping.patch
regulator-ti-abb-fix-timeout-in-ti_abb_wait_txdone-t.patch
pinctrl-intel-allocate-irq-chip-dynamic.patch
asoc-sof-loader-fix-kernel-oops-on-firmware-boot-fai.patch
asoc-sof-topology-fix-parse-fail-issue-for-byte-bool.patch
asoc-sof-intel-hda-fix-warnings-during-fw-load.patch
asoc-sof-intel-initialise-and-verify-fw-crash-dump-d.patch
asoc-sof-intel-hda-disable-dmi-l1-entry-during-captu.patch
asoc-rt5682-add-null-handler-to-set_jack-function.patch
asoc-intel-sof_rt5682-add-remove-function-to-disable.patch
asoc-intel-bytcr_rt5651-add-null-check-to-support_bu.patch
regulator-pfuze100-regulator-variable-val-in-pfuze10.patch
asoc-wm_adsp-don-t-generate-kcontrols-without-read-f.patch
asoc-rockchip-i2s-fix-rpm-imbalance.patch
arm64-dts-rockchip-fix-rockpro64-rk808-interrupt-lin.patch
arm-dts-logicpd-torpedo-som-remove-twl_keypad.patch
arm64-dts-rockchip-fix-rockpro64-vdd-log-regulator-s.patch
arm64-dts-rockchip-fix-rockpro64-sdhci-settings.patch
pinctrl-ns2-fix-off-by-one-bugs-in-ns2_pinmux_enable.patch
pinctrl-stmfx-fix-null-pointer-on-remove.patch
arm64-dts-zii-ultra-fix-arm-regulator-states.patch
arm-dts-am3874-iceboard-fix-i2c-mux-idle-disconnect-.patch
asoc-msm8916-wcd-digital-add-missing-mix2-path-for-r.patch
asoc-simple_card_utils.h-fix-potential-multiple-rede.patch
arm-dts-use-level-interrupt-for-omap4-5-wlcore.patch
arm-mm-fix-alignment-handler-faults-under-memory-pre.patch
scsi-qla2xxx-fix-a-potential-null-pointer-dereferenc.patch
scsi-scsi_dh_alua-handle-rtpg-sense-code-correctly-d.patch
scsi-sni_53c710-fix-compilation-error.patch
scsi-fix-kconfig-dependency-warning-related-to-53c70.patch
arm-8908-1-add-__always_inline-to-functions-called-f.patch
arm-8914-1-nommu-fix-exc_ret-for-xip.patch
arm64-dts-rockchip-fix-rockpro64-sdmmc-settings.patch
arm64-dts-rockchip-fix-usb-c-on-hugsun-x99-tv-box.patch
arm64-dts-lx2160a-correct-cpu-core-idle-state-name.patch
arm-dts-imx6q-logicpd-re-enable-snvs-power-key.patch
arm-dts-vf610-zii-scu4-aib-specify-i2c-mux-idle-disc.patch
arm-dts-imx7s-correct-gpt-s-ipg-clock-source.patch
arm64-dts-imx8mq-use-correct-clock-for-usdhc-s-ipg-c.patch
arm64-dts-imx8mm-use-correct-clock-for-usdhc-s-ipg-c.patch
perf-tools-fix-resource-leak-of-closedir-on-the-erro.patch
perf-c2c-fix-memory-leak-in-build_cl_output.patch
8250-men-mcb-fix-error-checking-when-get_num_ports-r.patch
perf-kmem-fix-memory-leak-in-compact_gfp_flags.patch
arm-davinci-dm365-fix-mcbsp-dma_slave_map-entry.patch
drm-amdgpu-fix-potential-vm-faults.patch
drm-amdgpu-fix-error-handling-in-amdgpu_bo_list_crea.patch
scsi-target-core-do-not-overwrite-cdb-byte-1.patch
scsi-hpsa-add-missing-hunks-in-reset-patch.patch
asoc-intel-sof-rt5682-add-a-check-for-devm_clk_get.patch
asoc-sof-control-return-true-when-kcontrol-values-ch.patch
tracing-fix-gfp_t-format-for-synthetic-events.patch
arm-dts-bcm2837-rpi-cm3-avoid-leds-gpio-probing-issu.patch
i2c-aspeed-fix-master-pending-state-handling.patch
drm-komeda-don-t-flush-inactive-pipes.patch
arm-8926-1-v7m-remove-register-save-to-stack-before-.patch
selftests-kvm-vmx_set_nested_state_test-don-t-check-.patch
selftests-kvm-fix-sync_regs_test-with-newer-gccs.patch
alsa-hda-add-tigerlake-jasperlake-pci-id.patch
of-unittest-fix-memory-leak-in-unittest_data_add.patch
mips-bmips-mark-exception-vectors-as-char-arrays.patch
irqchip-gic-v3-its-use-the-exact-itslist-for-vmovp.patch
i2c-mt65xx-fix-null-ptr-dereference.patch
i2c-stm32f7-fix-first-byte-to-send-in-slave-mode.patch
i2c-stm32f7-fix-a-race-in-slave-mode-with-arbitratio.patch
i2c-stm32f7-remove-warning-when-compiling-with-w-1.patch
cifs-fix-cifsinodeinfo-lock_sem-deadlock-when-reconn.patch
irqchip-sifive-plic-skip-contexts-except-supervisor-.patch
nbd-protect-cmd-status-with-cmd-lock.patch
nbd-handle-racing-with-error-ed-out-commands.patch
ata-libahci_platform-fix-regulator_get_optional-misu.patch
cxgb4-fix-panic-when-attaching-to-uld-fail.patch
cxgb4-request-the-tx-cidx-updates-to-status-page.patch
dccp-do-not-leak-jiffies-on-the-wire.patch
erspan-fix-the-tun_info-options_len-check-for-erspan.patch
inet-stop-leaking-jiffies-on-the-wire.patch
net-annotate-accesses-to-sk-sk_incoming_cpu.patch
net-annotate-lockless-accesses-to-sk-sk_napi_id.patch
net-dsa-bcm_sf2-fix-imp-setup-for-port-different-than-8.patch
net-ethernet-ftgmac100-fix-dma-coherency-issue-with-sw-checksum.patch
net-fix-sk_page_frag-recursion-from-memory-reclaim.patch
net-hisilicon-fix-ping-latency-when-deal-with-high-throughput.patch
net-mlx4_core-dynamically-set-guaranteed-amount-of-counters-per-vf.patch
netns-fix-gfp-flags-in-rtnl_net_notifyid.patch
net-rtnetlink-fix-a-typo-fbd-fdb.patch
net-usb-lan78xx-disable-interrupts-before-calling-generic_handle_irq.patch
net-zeroing-the-structure-ethtool_wolinfo-in-ethtool_get_wol.patch
selftests-net-reuseport_dualstack-fix-uninitalized-parameter.patch
udp-fix-data-race-in-udp_set_dev_scratch.patch
vxlan-check-tun_info-options_len-properly.patch
net-add-skb_queue_empty_lockless.patch
udp-use-skb_queue_empty_lockless.patch
net-use-skb_queue_empty_lockless-in-poll-handlers.patch
net-use-skb_queue_empty_lockless-in-busy-poll-contexts.patch
net-add-read_once-annotation-in-__skb_wait_for_more_packets.patch
ipv4-fix-route-update-on-metric-change.patch
selftests-fib_tests-add-more-tests-for-metric-update.patch
net-smc-fix-closing-of-fallback-smc-sockets.patch
net-smc-keep-vlan_id-for-smc-r-in-smc_listen_work.patch
keys-fix-memory-leak-in-copy_net_ns.patch
net-phylink-fix-phylink_dbg-macro.patch
rxrpc-fix-handling-of-last-subpacket-of-jumbo-packet.patch
net-mlx5e-determine-source-port-properly-for-vlan-push-action.patch
net-mlx5e-remove-incorrect-match-criteria-assignment-line.patch
net-mlx5e-initialize-on-stack-link-modes-bitmap.patch
net-mlx5-fix-flow-counter-list-auto-bits-struct.patch
net-smc-fix-refcounting-for-non-blocking-connect.patch
net-mlx5-fix-rtable-reference-leak.patch
mlxsw-core-unpublish-devlink-parameters-during-reload.patch
r8169-fix-wrong-phy-id-issue-with-rtl8168dp.patch
net-mlx5e-fix-ethtool-self-test-link-speed.patch
net-mlx5e-fix-handling-of-compressed-cqes-in-case-of-low-napi-budget.patch
ipv4-fix-ipskb_frag_pmtu-handling-with-fragmentation.patch
net-bcmgenet-don-t-set-phydev-link-from-mac.patch
net-dsa-b53-do-not-clear-existing-mirrored-port-mask.patch
net-dsa-fix-switch-tree-list.patch
net-ensure-correct-skb-tstamp-in-various-fragmenters.patch
net-hns3-fix-mis-counting-irq-vector-numbers-issue.patch
net-netem-fix-error-path-for-corrupted-gso-frames.patch
net-reorder-struct-net-fields-to-avoid-false-sharing.patch
net-usb-lan78xx-connect-phy-before-registering-mac.patch
r8152-add-device-id-for-lenovo-thinkpad-usb-c-dock-gen-2.patch
net-netem-correct-the-parent-s-backlog-when-corrupted-packet-was-dropped.patch
net-phy-bcm7xxx-define-soft_reset-for-40nm-ephy.patch
net-bcmgenet-soft-reset-40nm-ephys-before-mac-init.patch
net-bcmgenet-reset-40nm-ephy-on-energy-detect.patch
net-flow_dissector-switch-to-siphash.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
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ Loopdev Sanity
✅ jvm test suite
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ Networking bridge: sanity
✅ Ethernet drivers sanity
✅ Networking socket: fuzz
✅ Networking sctp-auth: sockopts test
✅ Networking route_func: local
✅ Networking route_func: forward
✅ Networking TCP: keepalive test
✅ Networking UDP: socket
✅ Networking tunnel: gre basic
✅ Networking tunnel: vxlan basic
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
✅ ALSA PCM loopback test
✅ ALSA Control (mixer) Userspace Element test
✅ Usex - version 1.9-29
✅ trace: ftrace/tracer
🚧 ✅ CIFS Connectathon
🚧 ✅ POSIX pjd-fstest suites
Host 2:
✅ Boot test
✅ selinux-policy: serge-testsuite
🚧 ✅ Storage blktests
x86_64:
⚡ 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.
Test sources: https://github.com/CKI-project/tests-beaker
💚 Pull requests are welcome for new tests or improvements to existing tests!
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.
Testing timeout
---------------
We aim to provide a report within reasonable timeframe. Tests that haven't
finished running are marked with ⏱. Reports for non-upstream kernels have
a Beaker recipe linked to next to each host.
Hello,
We ran automated tests on a recent commit from this kernel tree:
Kernel repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
Commit: fd272dcd7335 - Linux 5.3.9
The results of these automated tests are provided below.
Overall result: PASSED
Merge: OK
Compile: OK
Tests: OK
All kernel binaries, config files, and logs are available for download here:
https://artifacts.cki-project.org/pipelines/268032
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
`-'
______________________________________________________________________________
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:
Host 1:
✅ Boot test
✅ xfstests: ext4
✅ xfstests: xfs
✅ selinux-policy: serge-testsuite
✅ lvm thinp sanity
✅ storage: software RAID testing
🚧 ✅ Storage blktests
Host 2:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ Loopdev Sanity
✅ jvm test suite
✅ Memory function: memfd_create
✅ Memory function: kaslr
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ Networking bridge: sanity
✅ Ethernet drivers sanity
✅ Networking MACsec: sanity
✅ Networking socket: fuzz
✅ Networking sctp-auth: sockopts test
✅ Networking: igmp conformance test
✅ Networking route: pmtu
✅ Networking route_func: local
✅ Networking route_func: forward
✅ Networking TCP: keepalive test
✅ Networking UDP: socket
✅ Networking tunnel: geneve basic test
✅ Networking tunnel: gre basic
✅ L2TP basic test
✅ Networking tunnel: vxlan basic
✅ Networking ipsec: basic netns transport
✅ Networking ipsec: basic netns tunnel
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
✅ ALSA PCM loopback test
✅ ALSA Control (mixer) Userspace Element test
✅ Usex - version 1.9-29
✅ storage: SCSI VPD
✅ trace: ftrace/tracer
🚧 ✅ CIFS Connectathon
🚧 ✅ POSIX pjd-fstest suites
🚧 ✅ Networking vnic: ipvlan/basic
🚧 ✅ storage: dm/common
ppc64le:
⚡ 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.
x86_64:
Host 1:
✅ Boot test
🚧 ✅ IPMI driver test
🚧 ✅ IPMItool loop stress test
Host 2:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ Loopdev Sanity
✅ jvm test suite
✅ Memory function: memfd_create
✅ Memory function: kaslr
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ Networking bridge: sanity
✅ Ethernet drivers sanity
✅ Networking MACsec: sanity
✅ Networking socket: fuzz
✅ Networking sctp-auth: sockopts test
✅ Networking: igmp conformance test
✅ Networking route: pmtu
✅ Networking route_func: local
✅ Networking route_func: forward
✅ Networking TCP: keepalive test
✅ Networking UDP: socket
✅ Networking tunnel: geneve basic test
✅ Networking tunnel: gre basic
✅ L2TP basic test
✅ Networking tunnel: vxlan basic
✅ Networking ipsec: basic netns transport
✅ Networking ipsec: basic netns tunnel
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
✅ pciutils: sanity smoke test
✅ ALSA PCM loopback test
✅ ALSA Control (mixer) Userspace Element test
✅ Usex - version 1.9-29
✅ storage: SCSI VPD
✅ stress: stress-ng
✅ trace: ftrace/tracer
🚧 ✅ CIFS Connectathon
🚧 ✅ POSIX pjd-fstest suites
🚧 ✅ Networking vnic: ipvlan/basic
🚧 ✅ storage: dm/common
Host 3:
✅ Boot test
✅ xfstests: ext4
✅ xfstests: xfs
✅ selinux-policy: serge-testsuite
✅ lvm thinp sanity
✅ storage: software RAID testing
🚧 ✅ IOMMU boot test
🚧 ✅ Storage blktests
Test sources: https://github.com/CKI-project/tests-beaker
💚 Pull requests are welcome for new tests or improvements to existing tests!
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.
Testing timeout
---------------
We aim to provide a report within reasonable timeframe. Tests that haven't
finished running are marked with ⏱. Reports for non-upstream kernels have
a Beaker recipe linked to next to each host.
From: Jason Gerecke <killertofu(a)gmail.com>
The HID descriptors for most Wacom devices oddly declare the serial
number and other related fields as signed integers. When these numbers
are ingested by the HID subsystem, they are automatically sign-extended
into 32-bit integers. We treat the fields as unsigned elsewhere in the
kernel and userspace, however, so this sign-extension causes problems.
In particular, the sign-extended tool ID sent to userspace as ABS_MISC
does not properly match unsigned IDs used by xf86-input-wacom and libwacom.
We introduce a function 'wacom_s32tou' that can undo the automatic sign
extension performed by 'hid_snto32'. We call this function when processing
the serial number and related fields to ensure that we are dealing with
and reporting the unsigned form. We opt to use this method rather than
adding a descriptor fixup in 'wacom_hid_usage_quirk' since it should be
more robust in the face of future devices.
Ref: https://github.com/linuxwacom/input-wacom/issues/134
Fixes: f85c9dc678 ("HID: wacom: generic: Support tool ID and additional tool types")
CC: <stable(a)vger.kernel.org> # v4.10+
Signed-off-by: Jason Gerecke <jason.gerecke(a)wacom.com>
Reviewed-by: Aaron Armstrong Skomra <aaron.skomra(a)wacom.com>
---
drivers/hid/wacom.h | 15 +++++++++++++++
drivers/hid/wacom_wac.c | 10 ++++++----
2 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/drivers/hid/wacom.h b/drivers/hid/wacom.h
index 4a7f8d363220..203d27d198b8 100644
--- a/drivers/hid/wacom.h
+++ b/drivers/hid/wacom.h
@@ -202,6 +202,21 @@ static inline void wacom_schedule_work(struct wacom_wac *wacom_wac,
}
}
+/*
+ * Convert a signed 32-bit integer to an unsigned n-bit integer. Undoes
+ * the normally-helpful work of 'hid_snto32' for fields that use signed
+ * ranges for questionable reasons.
+ */
+static inline __u32 wacom_s32tou(s32 value, __u8 n)
+{
+ switch (n) {
+ case 8: return ((__u8)value);
+ case 16: return ((__u16)value);
+ case 32: return ((__u32)value);
+ }
+ return value & (1 << (n - 1)) ? value & (~(~0U << n)) : value;
+}
+
extern const struct hid_device_id wacom_ids[];
void wacom_wac_irq(struct wacom_wac *wacom_wac, size_t len);
diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
index 2b0a5b8ca6e6..ccb74529bc78 100644
--- a/drivers/hid/wacom_wac.c
+++ b/drivers/hid/wacom_wac.c
@@ -2303,7 +2303,7 @@ static void wacom_wac_pen_event(struct hid_device *hdev, struct hid_field *field
case HID_DG_TOOLSERIALNUMBER:
if (value) {
wacom_wac->serial[0] = (wacom_wac->serial[0] & ~0xFFFFFFFFULL);
- wacom_wac->serial[0] |= (__u32)value;
+ wacom_wac->serial[0] |= wacom_s32tou(value, field->report_size);
}
return;
case HID_DG_TWIST:
@@ -2319,15 +2319,17 @@ static void wacom_wac_pen_event(struct hid_device *hdev, struct hid_field *field
return;
case WACOM_HID_WD_SERIALHI:
if (value) {
+ __u32 raw_value = wacom_s32tou(value, field->report_size);
+
wacom_wac->serial[0] = (wacom_wac->serial[0] & 0xFFFFFFFF);
- wacom_wac->serial[0] |= ((__u64)value) << 32;
+ wacom_wac->serial[0] |= ((__u64)raw_value) << 32;
/*
* Non-USI EMR devices may contain additional tool type
* information here. See WACOM_HID_WD_TOOLTYPE case for
* more details.
*/
if (value >> 20 == 1) {
- wacom_wac->id[0] |= value & 0xFFFFF;
+ wacom_wac->id[0] |= raw_value & 0xFFFFF;
}
}
return;
@@ -2339,7 +2341,7 @@ static void wacom_wac_pen_event(struct hid_device *hdev, struct hid_field *field
* bitwise OR so the complete value can be built
* up over time :(
*/
- wacom_wac->id[0] |= value;
+ wacom_wac->id[0] |= wacom_s32tou(value, field->report_size);
return;
case WACOM_HID_WD_OFFSETLEFT:
if (features->offset_left && value != features->offset_left)
--
2.23.0
The do_video_ioctl() compat handler converts the compat command
codes into the native ones before processing further, but this
causes problems for 32-bit user applications that pass a command
code that matches a 64-bit native number, which will then be
handled the same way.
Specifically, this breaks VIDIOC_DQEVENT_TIME from user space
applications with 64-bit time_t, as the structure layout is
the same as the native 64-bit layout on many architectures
(x86 being the notable exception).
Change the handler to use the converted command code only for
passing into the native ioctl handler, not for deciding on the
conversion, in order to make the compat behavior match the
native behavior.
Actual support for the 64-bit time_t version of VIDIOC_DQEVENT_TIME
and other commands still needs to be added in a separate patch.
Cc: stable(a)vger.kernel.org
Signed-off-by: Arnd Bergmann <arnd(a)arndb.de>
---
drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 148 +++++++++---------
1 file changed, 75 insertions(+), 73 deletions(-)
diff --git a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
index e1eaf1135c7f..7ad6db8dd9f6 100644
--- a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
+++ b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
@@ -1183,36 +1183,38 @@ static long do_video_ioctl(struct file *file, unsigned int cmd, unsigned long ar
u32 aux_space;
int compatible_arg = 1;
long err = 0;
+ unsigned int ncmd;
/*
* 1. When struct size is different, converts the command.
*/
switch (cmd) {
- case VIDIOC_G_FMT32: cmd = VIDIOC_G_FMT; break;
- case VIDIOC_S_FMT32: cmd = VIDIOC_S_FMT; break;
- case VIDIOC_QUERYBUF32: cmd = VIDIOC_QUERYBUF; break;
- case VIDIOC_G_FBUF32: cmd = VIDIOC_G_FBUF; break;
- case VIDIOC_S_FBUF32: cmd = VIDIOC_S_FBUF; break;
- case VIDIOC_QBUF32: cmd = VIDIOC_QBUF; break;
- case VIDIOC_DQBUF32: cmd = VIDIOC_DQBUF; break;
- case VIDIOC_ENUMSTD32: cmd = VIDIOC_ENUMSTD; break;
- case VIDIOC_ENUMINPUT32: cmd = VIDIOC_ENUMINPUT; break;
- case VIDIOC_TRY_FMT32: cmd = VIDIOC_TRY_FMT; break;
- case VIDIOC_G_EXT_CTRLS32: cmd = VIDIOC_G_EXT_CTRLS; break;
- case VIDIOC_S_EXT_CTRLS32: cmd = VIDIOC_S_EXT_CTRLS; break;
- case VIDIOC_TRY_EXT_CTRLS32: cmd = VIDIOC_TRY_EXT_CTRLS; break;
- case VIDIOC_DQEVENT32: cmd = VIDIOC_DQEVENT; break;
- case VIDIOC_OVERLAY32: cmd = VIDIOC_OVERLAY; break;
- case VIDIOC_STREAMON32: cmd = VIDIOC_STREAMON; break;
- case VIDIOC_STREAMOFF32: cmd = VIDIOC_STREAMOFF; break;
- case VIDIOC_G_INPUT32: cmd = VIDIOC_G_INPUT; break;
- case VIDIOC_S_INPUT32: cmd = VIDIOC_S_INPUT; break;
- case VIDIOC_G_OUTPUT32: cmd = VIDIOC_G_OUTPUT; break;
- case VIDIOC_S_OUTPUT32: cmd = VIDIOC_S_OUTPUT; break;
- case VIDIOC_CREATE_BUFS32: cmd = VIDIOC_CREATE_BUFS; break;
- case VIDIOC_PREPARE_BUF32: cmd = VIDIOC_PREPARE_BUF; break;
- case VIDIOC_G_EDID32: cmd = VIDIOC_G_EDID; break;
- case VIDIOC_S_EDID32: cmd = VIDIOC_S_EDID; break;
+ case VIDIOC_G_FMT32: ncmd = VIDIOC_G_FMT; break;
+ case VIDIOC_S_FMT32: ncmd = VIDIOC_S_FMT; break;
+ case VIDIOC_QUERYBUF32: ncmd = VIDIOC_QUERYBUF; break;
+ case VIDIOC_G_FBUF32: ncmd = VIDIOC_G_FBUF; break;
+ case VIDIOC_S_FBUF32: ncmd = VIDIOC_S_FBUF; break;
+ case VIDIOC_QBUF32: ncmd = VIDIOC_QBUF; break;
+ case VIDIOC_DQBUF32: ncmd = VIDIOC_DQBUF; break;
+ case VIDIOC_ENUMSTD32: ncmd = VIDIOC_ENUMSTD; break;
+ case VIDIOC_ENUMINPUT32: ncmd = VIDIOC_ENUMINPUT; break;
+ case VIDIOC_TRY_FMT32: ncmd = VIDIOC_TRY_FMT; break;
+ case VIDIOC_G_EXT_CTRLS32: ncmd = VIDIOC_G_EXT_CTRLS; break;
+ case VIDIOC_S_EXT_CTRLS32: ncmd = VIDIOC_S_EXT_CTRLS; break;
+ case VIDIOC_TRY_EXT_CTRLS32: ncmd = VIDIOC_TRY_EXT_CTRLS; break;
+ case VIDIOC_DQEVENT32: ncmd = VIDIOC_DQEVENT; break;
+ case VIDIOC_OVERLAY32: ncmd = VIDIOC_OVERLAY; break;
+ case VIDIOC_STREAMON32: ncmd = VIDIOC_STREAMON; break;
+ case VIDIOC_STREAMOFF32: ncmd = VIDIOC_STREAMOFF; break;
+ case VIDIOC_G_INPUT32: ncmd = VIDIOC_G_INPUT; break;
+ case VIDIOC_S_INPUT32: ncmd = VIDIOC_S_INPUT; break;
+ case VIDIOC_G_OUTPUT32: ncmd = VIDIOC_G_OUTPUT; break;
+ case VIDIOC_S_OUTPUT32: ncmd = VIDIOC_S_OUTPUT; break;
+ case VIDIOC_CREATE_BUFS32: ncmd = VIDIOC_CREATE_BUFS; break;
+ case VIDIOC_PREPARE_BUF32: ncmd = VIDIOC_PREPARE_BUF; break;
+ case VIDIOC_G_EDID32: ncmd = VIDIOC_G_EDID; break;
+ case VIDIOC_S_EDID32: ncmd = VIDIOC_S_EDID; break;
+ default: ncmd = cmd; break;
}
/*
@@ -1221,11 +1223,11 @@ static long do_video_ioctl(struct file *file, unsigned int cmd, unsigned long ar
* argument into it.
*/
switch (cmd) {
- case VIDIOC_OVERLAY:
- case VIDIOC_STREAMON:
- case VIDIOC_STREAMOFF:
- case VIDIOC_S_INPUT:
- case VIDIOC_S_OUTPUT:
+ case VIDIOC_OVERLAY32:
+ case VIDIOC_STREAMON32:
+ case VIDIOC_STREAMOFF32:
+ case VIDIOC_S_INPUT32:
+ case VIDIOC_S_OUTPUT32:
err = alloc_userspace(sizeof(unsigned int), 0, &new_p64);
if (!err && assign_in_user((unsigned int __user *)new_p64,
(compat_uint_t __user *)p32))
@@ -1233,23 +1235,23 @@ static long do_video_ioctl(struct file *file, unsigned int cmd, unsigned long ar
compatible_arg = 0;
break;
- case VIDIOC_G_INPUT:
- case VIDIOC_G_OUTPUT:
+ case VIDIOC_G_INPUT32:
+ case VIDIOC_G_OUTPUT32:
err = alloc_userspace(sizeof(unsigned int), 0, &new_p64);
compatible_arg = 0;
break;
- case VIDIOC_G_EDID:
- case VIDIOC_S_EDID:
+ case VIDIOC_G_EDID32:
+ case VIDIOC_S_EDID32:
err = alloc_userspace(sizeof(struct v4l2_edid), 0, &new_p64);
if (!err)
err = get_v4l2_edid32(new_p64, p32);
compatible_arg = 0;
break;
- case VIDIOC_G_FMT:
- case VIDIOC_S_FMT:
- case VIDIOC_TRY_FMT:
+ case VIDIOC_G_FMT32:
+ case VIDIOC_S_FMT32:
+ case VIDIOC_TRY_FMT32:
err = bufsize_v4l2_format(p32, &aux_space);
if (!err)
err = alloc_userspace(sizeof(struct v4l2_format),
@@ -1262,7 +1264,7 @@ static long do_video_ioctl(struct file *file, unsigned int cmd, unsigned long ar
compatible_arg = 0;
break;
- case VIDIOC_CREATE_BUFS:
+ case VIDIOC_CREATE_BUFS32:
err = bufsize_v4l2_create(p32, &aux_space);
if (!err)
err = alloc_userspace(sizeof(struct v4l2_create_buffers),
@@ -1275,10 +1277,10 @@ static long do_video_ioctl(struct file *file, unsigned int cmd, unsigned long ar
compatible_arg = 0;
break;
- case VIDIOC_PREPARE_BUF:
- case VIDIOC_QUERYBUF:
- case VIDIOC_QBUF:
- case VIDIOC_DQBUF:
+ case VIDIOC_PREPARE_BUF32:
+ case VIDIOC_QUERYBUF32:
+ case VIDIOC_QBUF32:
+ case VIDIOC_DQBUF32:
err = bufsize_v4l2_buffer(p32, &aux_space);
if (!err)
err = alloc_userspace(sizeof(struct v4l2_buffer),
@@ -1291,7 +1293,7 @@ static long do_video_ioctl(struct file *file, unsigned int cmd, unsigned long ar
compatible_arg = 0;
break;
- case VIDIOC_S_FBUF:
+ case VIDIOC_S_FBUF32:
err = alloc_userspace(sizeof(struct v4l2_framebuffer), 0,
&new_p64);
if (!err)
@@ -1299,13 +1301,13 @@ static long do_video_ioctl(struct file *file, unsigned int cmd, unsigned long ar
compatible_arg = 0;
break;
- case VIDIOC_G_FBUF:
+ case VIDIOC_G_FBUF32:
err = alloc_userspace(sizeof(struct v4l2_framebuffer), 0,
&new_p64);
compatible_arg = 0;
break;
- case VIDIOC_ENUMSTD:
+ case VIDIOC_ENUMSTD32:
err = alloc_userspace(sizeof(struct v4l2_standard), 0,
&new_p64);
if (!err)
@@ -1313,16 +1315,16 @@ static long do_video_ioctl(struct file *file, unsigned int cmd, unsigned long ar
compatible_arg = 0;
break;
- case VIDIOC_ENUMINPUT:
+ case VIDIOC_ENUMINPUT32:
err = alloc_userspace(sizeof(struct v4l2_input), 0, &new_p64);
if (!err)
err = get_v4l2_input32(new_p64, p32);
compatible_arg = 0;
break;
- case VIDIOC_G_EXT_CTRLS:
- case VIDIOC_S_EXT_CTRLS:
- case VIDIOC_TRY_EXT_CTRLS:
+ case VIDIOC_G_EXT_CTRLS32:
+ case VIDIOC_S_EXT_CTRLS32:
+ case VIDIOC_TRY_EXT_CTRLS32:
err = bufsize_v4l2_ext_controls(p32, &aux_space);
if (!err)
err = alloc_userspace(sizeof(struct v4l2_ext_controls),
@@ -1334,7 +1336,7 @@ static long do_video_ioctl(struct file *file, unsigned int cmd, unsigned long ar
}
compatible_arg = 0;
break;
- case VIDIOC_DQEVENT:
+ case VIDIOC_DQEVENT32:
err = alloc_userspace(sizeof(struct v4l2_event), 0, &new_p64);
compatible_arg = 0;
break;
@@ -1352,9 +1354,9 @@ static long do_video_ioctl(struct file *file, unsigned int cmd, unsigned long ar
* Otherwise, it will pass the newly allocated @new_p64 argument.
*/
if (compatible_arg)
- err = native_ioctl(file, cmd, (unsigned long)p32);
+ err = native_ioctl(file, ncmd, (unsigned long)p32);
else
- err = native_ioctl(file, cmd, (unsigned long)new_p64);
+ err = native_ioctl(file, ncmd, (unsigned long)new_p64);
if (err == -ENOTTY)
return err;
@@ -1370,13 +1372,13 @@ static long do_video_ioctl(struct file *file, unsigned int cmd, unsigned long ar
* the blocks to maximum allowed value.
*/
switch (cmd) {
- case VIDIOC_G_EXT_CTRLS:
- case VIDIOC_S_EXT_CTRLS:
- case VIDIOC_TRY_EXT_CTRLS:
+ case VIDIOC_G_EXT_CTRLS32:
+ case VIDIOC_S_EXT_CTRLS32:
+ case VIDIOC_TRY_EXT_CTRLS32:
if (put_v4l2_ext_controls32(file, new_p64, p32))
err = -EFAULT;
break;
- case VIDIOC_S_EDID:
+ case VIDIOC_S_EDID32:
if (put_v4l2_edid32(new_p64, p32))
err = -EFAULT;
break;
@@ -1389,49 +1391,49 @@ static long do_video_ioctl(struct file *file, unsigned int cmd, unsigned long ar
* the original 32 bits structure.
*/
switch (cmd) {
- case VIDIOC_S_INPUT:
- case VIDIOC_S_OUTPUT:
- case VIDIOC_G_INPUT:
- case VIDIOC_G_OUTPUT:
+ case VIDIOC_S_INPUT32:
+ case VIDIOC_S_OUTPUT32:
+ case VIDIOC_G_INPUT32:
+ case VIDIOC_G_OUTPUT32:
if (assign_in_user((compat_uint_t __user *)p32,
((unsigned int __user *)new_p64)))
err = -EFAULT;
break;
- case VIDIOC_G_FBUF:
+ case VIDIOC_G_FBUF32:
err = put_v4l2_framebuffer32(new_p64, p32);
break;
- case VIDIOC_DQEVENT:
+ case VIDIOC_DQEVENT32:
err = put_v4l2_event32(new_p64, p32);
break;
- case VIDIOC_G_EDID:
+ case VIDIOC_G_EDID32:
err = put_v4l2_edid32(new_p64, p32);
break;
- case VIDIOC_G_FMT:
- case VIDIOC_S_FMT:
- case VIDIOC_TRY_FMT:
+ case VIDIOC_G_FMT32:
+ case VIDIOC_S_FMT32:
+ case VIDIOC_TRY_FMT32:
err = put_v4l2_format32(new_p64, p32);
break;
- case VIDIOC_CREATE_BUFS:
+ case VIDIOC_CREATE_BUFS32:
err = put_v4l2_create32(new_p64, p32);
break;
- case VIDIOC_PREPARE_BUF:
- case VIDIOC_QUERYBUF:
- case VIDIOC_QBUF:
- case VIDIOC_DQBUF:
+ case VIDIOC_PREPARE_BUF32:
+ case VIDIOC_QUERYBUF32:
+ case VIDIOC_QBUF32:
+ case VIDIOC_DQBUF32:
err = put_v4l2_buffer32(new_p64, p32);
break;
- case VIDIOC_ENUMSTD:
+ case VIDIOC_ENUMSTD32:
err = put_v4l2_standard32(new_p64, p32);
break;
- case VIDIOC_ENUMINPUT:
+ case VIDIOC_ENUMINPUT32:
err = put_v4l2_input32(new_p64, p32);
break;
}
--
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: 37b4d0c37c0b - Linux 5.3.9
The results of these automated tests are provided below.
Overall result: PASSED
Merge: OK
Compile: OK
Tests: OK
All kernel binaries, config files, and logs are available for download here:
https://artifacts.cki-project.org/pipelines/268099
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: 37b4d0c37c0b - Linux 5.3.9
We grabbed the 39e18e74c57b commit of the stable queue repository.
We then merged the patchset with `git am`:
regulator-of-fix-suspend-min-max-voltage-parsing.patch
asoc-samsung-arndale-add-missing-of-node-dereferenci.patch
asoc-wm8994-do-not-register-inapplicable-controls-fo.patch
regulator-da9062-fix-suspend_enable-disable-preparat.patch
asoc-topology-fix-a-signedness-bug-in-soc_tplg_dapm_.patch
arm64-dts-allwinner-a64-pine64-plus-add-phy-regulato.patch
arm64-dts-allwinner-a64-drop-pmu-node.patch
arm64-dts-allwinner-a64-sopine-baseboard-add-phy-reg.patch
arm64-dts-fix-gpio-to-pinmux-mapping.patch
regulator-ti-abb-fix-timeout-in-ti_abb_wait_txdone-t.patch
pinctrl-intel-allocate-irq-chip-dynamic.patch
asoc-sof-loader-fix-kernel-oops-on-firmware-boot-fai.patch
asoc-sof-topology-fix-parse-fail-issue-for-byte-bool.patch
asoc-sof-intel-hda-fix-warnings-during-fw-load.patch
asoc-sof-intel-initialise-and-verify-fw-crash-dump-d.patch
asoc-sof-intel-hda-disable-dmi-l1-entry-during-captu.patch
asoc-rt5682-add-null-handler-to-set_jack-function.patch
asoc-intel-sof_rt5682-add-remove-function-to-disable.patch
asoc-intel-bytcr_rt5651-add-null-check-to-support_bu.patch
regulator-pfuze100-regulator-variable-val-in-pfuze10.patch
asoc-wm_adsp-don-t-generate-kcontrols-without-read-f.patch
asoc-rockchip-i2s-fix-rpm-imbalance.patch
arm64-dts-rockchip-fix-rockpro64-rk808-interrupt-lin.patch
arm-dts-logicpd-torpedo-som-remove-twl_keypad.patch
arm64-dts-rockchip-fix-rockpro64-vdd-log-regulator-s.patch
arm64-dts-rockchip-fix-rockpro64-sdhci-settings.patch
pinctrl-ns2-fix-off-by-one-bugs-in-ns2_pinmux_enable.patch
pinctrl-stmfx-fix-null-pointer-on-remove.patch
arm64-dts-zii-ultra-fix-arm-regulator-states.patch
arm-dts-am3874-iceboard-fix-i2c-mux-idle-disconnect-.patch
asoc-msm8916-wcd-digital-add-missing-mix2-path-for-r.patch
asoc-simple_card_utils.h-fix-potential-multiple-rede.patch
arm-dts-use-level-interrupt-for-omap4-5-wlcore.patch
arm-mm-fix-alignment-handler-faults-under-memory-pre.patch
scsi-qla2xxx-fix-a-potential-null-pointer-dereferenc.patch
scsi-scsi_dh_alua-handle-rtpg-sense-code-correctly-d.patch
scsi-sni_53c710-fix-compilation-error.patch
scsi-fix-kconfig-dependency-warning-related-to-53c70.patch
arm-8908-1-add-__always_inline-to-functions-called-f.patch
arm-8914-1-nommu-fix-exc_ret-for-xip.patch
arm64-dts-rockchip-fix-rockpro64-sdmmc-settings.patch
arm64-dts-rockchip-fix-usb-c-on-hugsun-x99-tv-box.patch
arm64-dts-lx2160a-correct-cpu-core-idle-state-name.patch
arm-dts-imx6q-logicpd-re-enable-snvs-power-key.patch
arm-dts-vf610-zii-scu4-aib-specify-i2c-mux-idle-disc.patch
arm-dts-imx7s-correct-gpt-s-ipg-clock-source.patch
arm64-dts-imx8mq-use-correct-clock-for-usdhc-s-ipg-c.patch
arm64-dts-imx8mm-use-correct-clock-for-usdhc-s-ipg-c.patch
perf-tools-fix-resource-leak-of-closedir-on-the-erro.patch
perf-c2c-fix-memory-leak-in-build_cl_output.patch
8250-men-mcb-fix-error-checking-when-get_num_ports-r.patch
perf-kmem-fix-memory-leak-in-compact_gfp_flags.patch
arm-davinci-dm365-fix-mcbsp-dma_slave_map-entry.patch
drm-amdgpu-fix-potential-vm-faults.patch
drm-amdgpu-fix-error-handling-in-amdgpu_bo_list_crea.patch
scsi-target-core-do-not-overwrite-cdb-byte-1.patch
scsi-hpsa-add-missing-hunks-in-reset-patch.patch
asoc-intel-sof-rt5682-add-a-check-for-devm_clk_get.patch
asoc-sof-control-return-true-when-kcontrol-values-ch.patch
tracing-fix-gfp_t-format-for-synthetic-events.patch
arm-dts-bcm2837-rpi-cm3-avoid-leds-gpio-probing-issu.patch
i2c-aspeed-fix-master-pending-state-handling.patch
drm-komeda-don-t-flush-inactive-pipes.patch
arm-8926-1-v7m-remove-register-save-to-stack-before-.patch
selftests-kvm-vmx_set_nested_state_test-don-t-check-.patch
selftests-kvm-fix-sync_regs_test-with-newer-gccs.patch
alsa-hda-add-tigerlake-jasperlake-pci-id.patch
of-unittest-fix-memory-leak-in-unittest_data_add.patch
mips-bmips-mark-exception-vectors-as-char-arrays.patch
irqchip-gic-v3-its-use-the-exact-itslist-for-vmovp.patch
i2c-mt65xx-fix-null-ptr-dereference.patch
i2c-stm32f7-fix-first-byte-to-send-in-slave-mode.patch
i2c-stm32f7-fix-a-race-in-slave-mode-with-arbitratio.patch
i2c-stm32f7-remove-warning-when-compiling-with-w-1.patch
cifs-fix-cifsinodeinfo-lock_sem-deadlock-when-reconn.patch
irqchip-sifive-plic-skip-contexts-except-supervisor-.patch
nbd-protect-cmd-status-with-cmd-lock.patch
nbd-handle-racing-with-error-ed-out-commands.patch
ata-libahci_platform-fix-regulator_get_optional-misu.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:
Host 1:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ Loopdev Sanity
✅ jvm test suite
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
✅ ALSA PCM loopback test
✅ ALSA Control (mixer) Userspace Element test
✅ Usex - version 1.9-29
✅ storage: SCSI VPD
✅ stress: stress-ng
✅ trace: ftrace/tracer
🚧 ✅ CIFS Connectathon
🚧 ✅ POSIX pjd-fstest suites
Host 2:
✅ Boot test
✅ selinux-policy: serge-testsuite
🚧 ✅ Storage blktests
ppc64le:
Host 1:
✅ Boot test
✅ selinux-policy: serge-testsuite
🚧 ✅ Storage blktests
Host 2:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ Loopdev Sanity
✅ jvm test suite
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
✅ ALSA PCM loopback test
✅ ALSA Control (mixer) Userspace Element test
✅ Usex - version 1.9-29
✅ trace: ftrace/tracer
🚧 ✅ CIFS Connectathon
🚧 ✅ POSIX pjd-fstest suites
x86_64:
Host 1:
✅ Boot test
✅ selinux-policy: serge-testsuite
🚧 ✅ Storage blktests
Host 2:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ Loopdev Sanity
✅ jvm test suite
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
✅ pciutils: sanity smoke test
✅ ALSA PCM loopback test
✅ ALSA Control (mixer) Userspace Element test
✅ Usex - version 1.9-29
✅ storage: SCSI VPD
✅ stress: stress-ng
✅ trace: ftrace/tracer
🚧 ✅ CIFS Connectathon
🚧 ✅ POSIX pjd-fstest suites
Test sources: https://github.com/CKI-project/tests-beaker
💚 Pull requests are welcome for new tests or improvements to existing tests!
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.
Testing timeout
---------------
We aim to provide a report within reasonable timeframe. Tests that haven't
finished running are marked with ⏱. Reports for non-upstream kernels have
a Beaker recipe linked to next to each host.
The following commit has been merged into the perf/urgent branch of tip:
Commit-ID: 722ddfde366fd46205456a9c5ff9b3359dc9a75e
Gitweb: https://git.kernel.org/tip/722ddfde366fd46205456a9c5ff9b3359dc9a75e
Author: Jiri Olsa <jolsa(a)kernel.org>
AuthorDate: Tue, 05 Nov 2019 00:27:11 +01:00
Committer: Arnaldo Carvalho de Melo <acme(a)redhat.com>
CommitterDate: Tue, 05 Nov 2019 08:49:14 -03:00
perf tools: Fix time sorting
The final sort might get confused when the comparison is done over
bigger numbers than int like for -s time.
Check the following report for longer workloads:
$ perf report -s time -F time,overhead --stdio
Fix hist_entry__sort() to properly return int64_t and not possible cut
int.
Fixes: 043ca389a318 ("perf tools: Use hpp formats to sort final output")
Signed-off-by: Jiri Olsa <jolsa(a)kernel.org>
Reviewed-by: Andi Kleen <ak(a)linux.intel.com>
Cc: Alexander Shishkin <alexander.shishkin(a)linux.intel.com>
Cc: Michael Petlan <mpetlan(a)redhat.com>
Cc: Namhyung Kim <namhyung(a)kernel.org>
Cc: Peter Zijlstra <peterz(a)infradead.org>
Cc: stable(a)vger.kernel.org # v3.16+
Link: http://lore.kernel.org/lkml/20191104232711.16055-1-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme(a)redhat.com>
---
tools/perf/util/hist.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 679a1d7..7b6eaf5 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -1625,7 +1625,7 @@ int hists__collapse_resort(struct hists *hists, struct ui_progress *prog)
return 0;
}
-static int hist_entry__sort(struct hist_entry *a, struct hist_entry *b)
+static int64_t hist_entry__sort(struct hist_entry *a, struct hist_entry *b)
{
struct hists *hists = a->hists;
struct perf_hpp_fmt *fmt;
From: Ville Syrjälä <ville.syrjala(a)linux.intel.com>
Make sure we have a crtc before probing its primary plane's
max stride. Initially I thought we can't get this far without
crtcs, but looks like we can via the dumb_create ioctl.
Not sure if we shouldn't disable dumb buffer support entirely
when we have no crtcs, but that would require some amount of work
as the only thing currently being checked is dev->driver->dumb_create
which we'd have to convert to some device specific dynamic thing.
Cc: stable(a)vger.kernel.org
Reported-by: Mika Kuoppala <mika.kuoppala(a)linux.intel.com>
Fixes: aa5ca8b7421c ("drm/i915: Align dumb buffer stride to 4k to allow for gtt remapping")
Signed-off-by: Ville Syrjälä <ville.syrjala(a)linux.intel.com>
---
drivers/gpu/drm/i915/display/intel_display.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 1f93860fb897..331030765ca9 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -2543,6 +2543,9 @@ u32 intel_plane_fb_max_stride(struct drm_i915_private *dev_priv,
* the highest stride limits of them all.
*/
crtc = intel_get_crtc_for_pipe(dev_priv, PIPE_A);
+ if (!crtc)
+ return 0;
+
plane = to_intel_plane(crtc->base.primary);
return plane->max_stride(plane, pixel_format, modifier,
--
2.23.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: 95180e47e77a - Linux 5.3.8
The results of these automated tests are provided below.
Overall result: PASSED
Merge: OK
Compile: OK
Tests: OK
All kernel binaries, config files, and logs are available for download here:
https://artifacts.cki-project.org/pipelines/267171
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: 95180e47e77a - Linux 5.3.8
We grabbed the 5d3fac209a5d commit of the stable queue repository.
We then merged the patchset with `git am`:
io_uring-fix-up-o_nonblock-handling-for-sockets.patch
dm-snapshot-introduce-account_start_copy-and-account.patch
dm-snapshot-rework-cow-throttling-to-fix-deadlock.patch
btrfs-fix-inode-cache-block-reserve-leak-on-failure-.patch
btrfs-qgroup-always-free-prealloc-meta-reserve-in-bt.patch
iio-adc-meson_saradc-fix-memory-allocation-order.patch
iio-fix-center-temperature-of-bmc150-accel-core.patch
libsubcmd-make-_fortify_source-defines-dependent-on-.patch
perf-tests-avoid-raising-segv-using-an-obvious-null-.patch
perf-map-fix-overlapped-map-handling.patch
perf-script-brstackinsn-fix-recovery-from-lbr-binary.patch
perf-jevents-fix-period-for-intel-fixed-counters.patch
perf-tools-propagate-get_cpuid-error.patch
perf-annotate-propagate-perf_env__arch-error.patch
perf-annotate-fix-the-signedness-of-failure-returns.patch
perf-annotate-propagate-the-symbol__annotate-error-r.patch
perf-annotate-fix-arch-specific-init-failure-errors.patch
perf-annotate-return-appropriate-error-code-for-allo.patch
perf-annotate-don-t-return-1-for-error-when-doing-bp.patch
staging-rtl8188eu-fix-null-dereference-when-kzalloc-.patch
rdma-siw-fix-serialization-issue-in-write_space.patch
rdma-hfi1-prevent-memory-leak-in-sdma_init.patch
rdma-iw_cxgb4-fix-srq-access-from-dump_qp.patch
rdma-iwcm-fix-a-lock-inversion-issue.patch
hid-hyperv-use-in-place-iterator-api-in-the-channel-.patch
kselftest-exclude-failed-targets-from-runlist.patch
selftests-kselftest-runner.sh-add-45-second-timeout-.patch
nfs-fix-nfsi-nrequests-count-error-on-nfs_inode_remo.patch
arm64-cpufeature-effectively-expose-frint-capability.patch
arm64-fix-incorrect-irqflag-restore-for-priority-mas.patch
arm64-ftrace-ensure-synchronisation-in-plt-setup-for.patch
tty-serial-owl-fix-the-link-time-qualifier-of-owl_ua.patch
tty-serial-rda-fix-the-link-time-qualifier-of-rda_ua.patch
serial-sifive-select-serial_earlycon.patch
tty-n_hdlc-fix-build-on-sparc.patch
misc-fastrpc-prevent-memory-leak-in-fastrpc_dma_buf_.patch
rdma-core-fix-an-error-handling-path-in-res_get_comm.patch
rdma-cm-fix-memory-leak-in-cm_add-remove_one.patch
rdma-nldev-reshuffle-the-code-to-avoid-need-to-rebin.patch
rdma-mlx5-do-not-allow-rereg-of-a-odp-mr.patch
rdma-mlx5-order-num_pending_prefetch-properly-with-s.patch
rdma-mlx5-add-missing-synchronize_srcu-for-mw-cases.patch
gpio-max77620-use-correct-unit-for-debounce-times.patch
fs-cifs-mute-wunused-const-variable-message.patch
arm64-vdso32-fix-broken-compat-vdso-build-warnings.patch
arm64-vdso32-detect-binutils-support-for-dmb-ishld.patch
serial-mctrl_gpio-check-for-null-pointer.patch
serial-8250_omap-fix-gpio-check-for-auto-rts-cts.patch
arm64-default-to-building-compat-vdso-with-clang-whe.patch
arm64-vdso32-don-t-use-kbuild_cppflags-unconditional.patch
efi-cper-fix-endianness-of-pcie-class-code.patch
efi-x86-do-not-clean-dummy-variable-in-kexec-path.patch
mips-include-mark-__cmpxchg-as-__always_inline.patch
riscv-avoid-kernel-hangs-when-trapped-in-bug.patch
riscv-avoid-sending-a-sigtrap-to-a-user-thread-trapp.patch
riscv-correct-the-handling-of-unexpected-ebreak-in-d.patch
x86-xen-return-from-panic-notifier.patch
ocfs2-clear-zero-in-unaligned-direct-io.patch
fs-ocfs2-fix-possible-null-pointer-dereferences-in-o.patch
fs-ocfs2-fix-a-possible-null-pointer-dereference-in-.patch
fs-ocfs2-fix-a-possible-null-pointer-dereference-in-.patch
btrfs-silence-maybe-uninitialized-warning-in-clone_r.patch
arm64-armv8_deprecated-checking-return-value-for-mem.patch
x86-cpu-add-comet-lake-to-the-intel-cpu-models-heade.patch
sched-fair-scale-bandwidth-quota-and-period-without-.patch
sched-vtime-fix-guest-system-mis-accounting-on-task-.patch
perf-core-rework-memory-accounting-in-perf_mmap.patch
perf-core-fix-corner-case-in-perf_rotate_context.patch
perf-x86-amd-change-fix-nmi-latency-mitigation-to-us.patch
drm-amdgpu-fix-memory-leak.patch
iio-imu-adis16400-release-allocated-memory-on-failur.patch
iio-imu-adis16400-fix-memory-leak.patch
iio-imu-st_lsm6dsx-fix-waitime-for-st_lsm6dsx-i2c-co.patch
mips-include-mark-__xchg-as-__always_inline.patch
mips-fw-sni-fix-out-of-bounds-init-of-o32-stack.patch
s390-cio-fix-virtio-ccw-dma-without-pv.patch
virt-vbox-fix-memory-leak-in-hgcm_call_preprocess_li.patch
nbd-fix-possible-sysfs-duplicate-warning.patch
nfsv4-fix-leak-of-clp-cl_acceptor-string.patch
sunrpc-fix-race-to-sk_err-after-xs_error_report.patch
s390-uaccess-avoid-false-positive-compiler-warnings.patch
tracing-initialize-iter-seq-after-zeroing-in-tracing.patch
perf-annotate-fix-multiple-memory-and-file-descripto.patch
perf-aux-fix-tracking-of-auxiliary-trace-buffer-allo.patch
usb-legousbtower-fix-a-signedness-bug-in-tower_probe.patch
nbd-verify-socket-is-supported-during-setup.patch
arm64-dts-qcom-add-lenovo-miix-630.patch
arm64-dts-qcom-add-hp-envy-x2.patch
arm64-dts-qcom-add-asus-novago-tp370ql.patch
rtw88-fix-misuse-of-genmask-macro.patch
s390-pci-fix-msi-message-data.patch
thunderbolt-correct-path-indices-for-pcie-tunnel.patch
thunderbolt-use-32-bit-writes-when-writing-ring-prod.patch
ath6kl-fix-a-null-ptr-deref-bug-in-ath6kl_usb_alloc_.patch
fuse-flush-dirty-data-metadata-before-non-truncate-setattr.patch
fuse-truncate-pending-writes-on-o_trunc.patch
alsa-bebob-fix-prototype-of-helper-function-to-return-negative-value.patch
alsa-timer-fix-mutex-deadlock-at-releasing-card.patch
alsa-hda-realtek-fix-2-front-mics-of-codec-0x623.patch
alsa-hda-realtek-add-support-for-alc623.patch
ath10k-fix-latency-issue-for-qca988x.patch
uas-revert-commit-3ae62a42090f-uas-fix-alignment-of-scatter-gather-segments.patch
nl80211-fix-validation-of-mesh-path-nexthop.patch
usb-gadget-reject-endpoints-with-0-maxpacket-value.patch
usb-storage-revert-commit-747668dbc061-usb-storage-set-virt_boundary_mask-to-avoid-sg-overflows.patch
usb-ldusb-fix-ring-buffer-locking.patch
usb-ldusb-fix-control-message-timeout.patch
usb-xhci-fix-immediate-data-transfer-endianness.patch
usb-xhci-fix-__le32-__le64-accessors-in-debugfs-code.patch
usb-serial-whiteheat-fix-potential-slab-corruption.patch
usb-serial-whiteheat-fix-line-speed-endianness.patch
xhci-fix-use-after-free-regression-in-xhci-clear-hub-tt-implementation.patch
scsi-qla2xxx-fix-partial-flash-write-of-mbi.patch
scsi-target-cxgbit-fix-cxgbit_fw4_ack.patch
hid-i2c-hid-add-trekstor-primebook-c11b-to-descriptor-override.patch
hid-fix-assumption-that-devices-have-inputs.patch
hid-fix-error-message-in-hid_open_report.patch
hid-logitech-hidpp-split-g920_get_config.patch
hid-logitech-hidpp-rework-device-validation.patch
hid-logitech-hidpp-do-all-ff-cleanup-in-hidpp_ff_destroy.patch
um-ubd-entrust-re-queue-to-the-upper-layers.patch
s390-unwind-fix-mixing-regs-and-sp.patch
s390-cmm-fix-information-leak-in-cmm_timeout_handler.patch
s390-idle-fix-cpu-idle-time-calculation.patch
arc-perf-accommodate-big-endian-cpu.patch
ib-hfi1-avoid-excessive-retry-for-tid-rdma-read-request.patch
arm64-ensure-vm_write-vm_shared-ptes-are-clean-by-default.patch
arm64-cpufeature-enable-qualcomm-falkor-kryo-errata-1003.patch
virtio_ring-fix-stalls-for-packed-rings.patch
rtlwifi-rtl_pci-fix-problem-of-too-small-skb-len.patch
rtlwifi-fix-potential-overflow-on-p2p-code.patch
kvm-vmx-svm-always-run-with-efer.nxe-1-when-shadow-paging-is-active.patch
dmaengine-qcom-bam_dma-fix-resource-leak.patch
dmaengine-tegra210-adma-fix-transfer-failure.patch
dmaengine-imx-sdma-fix-size-check-for-sdma-script_number.patch
dmaengine-cppi41-fix-cppi41_dma_prep_slave_sg-when-idle.patch
drm-amdgpu-gmc10-properly-set-bank_select-and-fragment_size.patch
drm-i915-fix-pch-reference-clock-for-fdi-on-hsw-bdw.patch
drm-amdgpu-gfx10-update-gfx-golden-settings.patch
drm-amdgpu-powerplay-vega10-allow-undervolting-in-p7.patch
drm-amdgpu-fix-sdma-hang-when-performing-vkexample-test.patch
nfs-fix-an-rcu-lock-leak-in-nfs4_refresh_delegation_stateid.patch
io_uring-ensure-we-clear-io_kiocb-result-before-each-issue.patch
iommu-vt-d-fix-panic-after-kexec-p-for-kdump.patch
batman-adv-avoid-free-alloc-race-when-handling-ogm-buffer.patch
llc-fix-sk_buff-leak-in-llc_sap_state_process.patch
llc-fix-sk_buff-leak-in-llc_conn_service.patch
rxrpc-fix-call-ref-leak.patch
rxrpc-rxrpc_peer-needs-to-hold-a-ref-on-the-rxrpc_local-record.patch
rxrpc-fix-trace-after-put-looking-at-the-put-peer-record.patch
nfc-pn533-fix-use-after-free-and-memleaks.patch
bonding-fix-potential-null-deref-in-bond_update_slave_arr.patch
netfilter-conntrack-avoid-possible-false-sharing.patch
net-usb-sr9800-fix-uninitialized-local-variable.patch
sch_netem-fix-rcu-splat-in-netem_enqueue.patch
net-sched-sch_sfb-don-t-call-qdisc_put-while-holding-tree-lock.patch
iwlwifi-exclude-geo-sar-support-for-3168.patch
sched-fair-fix-low-cpu-usage-with-high-throttling-by-removing-expiration-of-cpu-local-slices.patch
alsa-usb-audio-dsd-auto-detection-for-playback-desig.patch
alsa-usb-audio-update-dsd-support-quirks-for-oppo-an.patch
alsa-usb-audio-add-dsd-support-for-gustard-u16-x26-u.patch
rdma-mlx5-use-irq-xarray-locking-for-mkey_table.patch
sched-fair-fix-wunused-but-set-variable-warnings.patch
powerpc-powernv-fix-cpu-idle-to-be-called-with-irqs-.patch
revert-nvme-allow-64-bit-results-in-passthru-command.patch
revert-alsa-hda-flush-interrupts-on-disabling.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:
Host 1:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ Loopdev Sanity
✅ jvm test suite
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ Ethernet drivers sanity
✅ Networking socket: fuzz
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
✅ ALSA PCM loopback test
✅ ALSA Control (mixer) Userspace Element test
✅ Usex - version 1.9-29
✅ storage: SCSI VPD
✅ stress: stress-ng
✅ trace: ftrace/tracer
🚧 ✅ CIFS Connectathon
🚧 ✅ POSIX pjd-fstest suites
🚧 ✅ storage: dm/common
Host 2:
✅ Boot test
✅ xfstests: xfs
✅ selinux-policy: serge-testsuite
✅ storage: software RAID testing
🚧 ✅ Storage blktests
ppc64le:
Host 1:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ Loopdev Sanity
✅ jvm test suite
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ Ethernet drivers sanity
✅ Networking socket: fuzz
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
✅ ALSA PCM loopback test
✅ ALSA Control (mixer) Userspace Element test
✅ Usex - version 1.9-29
✅ trace: ftrace/tracer
🚧 ✅ CIFS Connectathon
🚧 ✅ POSIX pjd-fstest suites
🚧 ✅ storage: dm/common
Host 2:
✅ Boot test
✅ xfstests: xfs
✅ selinux-policy: serge-testsuite
✅ storage: software RAID testing
🚧 ✅ Storage blktests
x86_64:
Host 1:
✅ Boot test
✅ xfstests: xfs
✅ selinux-policy: serge-testsuite
✅ storage: software RAID testing
🚧 ✅ IOMMU boot test
🚧 ✅ Storage blktests
Host 2:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ Loopdev Sanity
✅ jvm test suite
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ Ethernet drivers sanity
✅ Networking socket: fuzz
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
✅ pciutils: sanity smoke test
✅ ALSA PCM loopback test
✅ ALSA Control (mixer) Userspace Element test
✅ Usex - version 1.9-29
✅ storage: SCSI VPD
✅ stress: stress-ng
✅ trace: ftrace/tracer
🚧 ✅ CIFS Connectathon
🚧 ✅ POSIX pjd-fstest suites
🚧 ✅ storage: dm/common
Host 3:
⚡ 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.
✅ Boot test
🚧 ⚡⚡⚡ /kernel/infiniband/env_setup
🚧 ⚡⚡⚡ /kernel/infiniband/sanity
Host 4:
⚡ 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.
✅ Boot test
🚧 ⚡⚡⚡ /kernel/infiniband/env_setup
🚧 ⚡⚡⚡ /kernel/infiniband/sanity
Host 5:
⚡ 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.
✅ Boot test
🚧 ⚡⚡⚡ /kernel/infiniband/env_setup
🚧 ⚡⚡⚡ /kernel/infiniband/sanity
Host 6:
⚡ 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.
✅ Boot test
🚧 ⚡⚡⚡ /kernel/infiniband/env_setup
🚧 ⚡⚡⚡ /kernel/infiniband/sanity
Test sources: https://github.com/CKI-project/tests-beaker
💚 Pull requests are welcome for new tests or improvements to existing tests!
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.
Testing timeout
---------------
We aim to provide a report within reasonable timeframe. Tests that haven't
finished running are marked with ⏱. Reports for non-upstream kernels have
a Beaker recipe linked to next to each host.
The x86 version of get_user_pages_fast() relies on disabled interrupts to
synchronize gup_pte_range() between gup_get_pte(ptep); and get_page() against
a parallel munmap. The munmap side nulls the pte, then flushes TLBs, then
releases the page. As TLB flush is done synchronously via IPI disabling
interrupts blocks the page release, and get_page(), which assumes existing
reference on page, is thus safe.
However when TLB flush is done by a hypercall, e.g. in a Xen PV guest, there is
no blocking thanks to disabled interrupts, and get_page() can succeed on a page
that was already freed or even reused.
We have recently seen this happen with our 4.4 and 4.12 based kernels, with
userspace (java) that exits a thread, where mm_release() performs a futex_wake()
on tsk->clear_child_tid, and another thread in parallel unmaps the page where
tsk->clear_child_tid points to. The spurious get_page() succeeds, but futex code
immediately releases the page again, while it's already on a freelist. Symptoms
include a bad page state warning, general protection faults acessing a poisoned
list prev/next pointer in the freelist, or free page pcplists of two cpus joined
together in a single list. Oscar has also reproduced this scenario, with a
patch inserting delays before the get_page() to make the race window larger.
Fix this by removing the dependency on TLB flush interrupts the same way as the
generic get_user_pages_fast() code by using page_cache_add_speculative() and
revalidating the PTE contents after pinning the page. Mainline is safe since
4.13 where the x86 gup code was removed in favor of the common code. Accessing
the page table itself safely also relies on disabled interrupts and TLB flush
IPIs that don't happen with hypercalls, which was acknowledged in commit
9e52fc2b50de ("x86/mm: Enable RCU based page table freeing
(CONFIG_HAVE_RCU_TABLE_FREE=y)"). That commit with follups should also be
backported for full safety, although our reproducer didn't hit a problem
without that backport.
Reproduced-by: Oscar Salvador <osalvador(a)suse.de>
Signed-off-by: Vlastimil Babka <vbabka(a)suse.cz>
Cc: Thomas Gleixner <tglx(a)linutronix.de>
Cc: Ingo Molnar <mingo(a)redhat.com>
Cc: Peter Zijlstra <peterz(a)infradead.org>
Cc: Juergen Gross <jgross(a)suse.com>
Cc: Kirill A. Shutemov <kirill.shutemov(a)linux.intel.com>
Cc: Vitaly Kuznetsov <vkuznets(a)redhat.com>
Cc: Linus Torvalds <torvalds(a)linux-foundation.org>
Cc: Borislav Petkov <bp(a)alien8.de>
Cc: Dave Hansen <dave.hansen(a)linux.intel.com>
Cc: Andy Lutomirski <luto(a)kernel.org>
---
Hi, I'm sending this stable-only patch for consideration because it's probably
unrealistic to backport the 4.13 switch to generic GUP. I can look at 4.4 and
3.16 if accepted. The RCU page table freeing could be also considered.
Note the patch also includes page refcount protection. I found out that
8fde12ca79af ("mm: prevent get_user_pages() from overflowing page refcount")
backport to 4.9 missed the arch-specific gup implementations:
https://lore.kernel.org/lkml/6650323f-dbc9-f069-000b-f6b0f941a065@suse.cz/
arch/x86/mm/gup.c | 32 ++++++++++++++++++++++++++++++--
1 file changed, 30 insertions(+), 2 deletions(-)
diff --git a/arch/x86/mm/gup.c b/arch/x86/mm/gup.c
index 1680768d392c..d7db45bdfb3b 100644
--- a/arch/x86/mm/gup.c
+++ b/arch/x86/mm/gup.c
@@ -97,6 +97,20 @@ static inline int pte_allows_gup(unsigned long pteval, int write)
return 1;
}
+/*
+ * Return the compund head page with ref appropriately incremented,
+ * or NULL if that failed.
+ */
+static inline struct page *try_get_compound_head(struct page *page, int refs)
+{
+ struct page *head = compound_head(page);
+ if (WARN_ON_ONCE(page_ref_count(head) < 0))
+ return NULL;
+ if (unlikely(!page_cache_add_speculative(head, refs)))
+ return NULL;
+ return head;
+}
+
/*
* The performance critical leaf functions are made noinline otherwise gcc
* inlines everything into a single function which results in too much
@@ -112,7 +126,7 @@ static noinline int gup_pte_range(pmd_t pmd, unsigned long addr,
ptep = pte_offset_map(&pmd, addr);
do {
pte_t pte = gup_get_pte(ptep);
- struct page *page;
+ struct page *head, *page;
/* Similar to the PMD case, NUMA hinting must take slow path */
if (pte_protnone(pte)) {
@@ -138,7 +152,21 @@ static noinline int gup_pte_range(pmd_t pmd, unsigned long addr,
}
VM_BUG_ON(!pfn_valid(pte_pfn(pte)));
page = pte_page(pte);
- get_page(page);
+
+ head = try_get_compound_head(page, 1);
+ if (!head) {
+ put_dev_pagemap(pgmap);
+ pte_unmap(ptep);
+ return 0;
+ }
+
+ if (unlikely(pte_val(pte) != pte_val(*ptep))) {
+ put_page(head);
+ put_dev_pagemap(pgmap);
+ pte_unmap(ptep);
+ return 0;
+ }
+
put_dev_pagemap(pgmap);
SetPageReferenced(page);
pages[*nr] = page;
--
2.22.0
This is a note to let you know that I've just added the patch titled
tty: serial: fsl_lpuart: use the sg count from dma_map_sg
to my tty git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git
in the tty-next branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release
during the merge window.
If you have any questions about this process, please let me know.
>From 487ee861de176090b055eba5b252b56a3b9973d6 Mon Sep 17 00:00:00 2001
From: Peng Fan <peng.fan(a)nxp.com>
Date: Tue, 5 Nov 2019 05:51:10 +0000
Subject: tty: serial: fsl_lpuart: use the sg count from dma_map_sg
The dmaengine_prep_slave_sg needs to use sg count returned
by dma_map_sg, not use sport->dma_tx_nents, because the return
value of dma_map_sg is not always same with "nents".
When enabling iommu for lpuart + edma, iommu framework may concatenate
two sgs into one.
Fixes: 6250cc30c4c4e ("tty: serial: fsl_lpuart: Use scatter/gather DMA for Tx")
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Peng Fan <peng.fan(a)nxp.com>
Link: https://lore.kernel.org/r/1572932977-17866-1-git-send-email-peng.fan@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/tty/serial/fsl_lpuart.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
index 22df5f8f48b6..4e128d19e0ad 100644
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -437,8 +437,8 @@ static void lpuart_dma_tx(struct lpuart_port *sport)
}
sport->dma_tx_desc = dmaengine_prep_slave_sg(sport->dma_tx_chan, sgl,
- sport->dma_tx_nents,
- DMA_MEM_TO_DEV, DMA_PREP_INTERRUPT);
+ ret, DMA_MEM_TO_DEV,
+ DMA_PREP_INTERRUPT);
if (!sport->dma_tx_desc) {
dma_unmap_sg(dev, sgl, sport->dma_tx_nents, DMA_TO_DEVICE);
dev_err(dev, "Cannot prepare TX slave DMA!\n");
--
2.23.0
This is a note to let you know that I've just added the patch titled
mei: bus: prefix device names on bus with the bus name
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-next branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release
during the merge window.
If you have any questions about this process, please let me know.
>From 7a2b9e6ec84588b0be65cc0ae45a65bac431496b Mon Sep 17 00:00:00 2001
From: Alexander Usyskin <alexander.usyskin(a)intel.com>
Date: Tue, 5 Nov 2019 17:05:13 +0200
Subject: mei: bus: prefix device names on bus with the bus name
Add parent device name to the name of devices on bus to avoid
device names collisions for same client UUID available
from different MEI heads. Namely this prevents sysfs collision under
/sys/bus/mei/device/
In the device part leave just UUID other parameters that are
required for device matching are not required here and are
just bloating the name.
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Alexander Usyskin <alexander.usyskin(a)intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler(a)intel.com>
Link: https://lore.kernel.org/r/20191105150514.14010-1-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/misc/mei/bus.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c
index 985bd4fd3328..53bb394ccba6 100644
--- a/drivers/misc/mei/bus.c
+++ b/drivers/misc/mei/bus.c
@@ -873,15 +873,16 @@ static const struct device_type mei_cl_device_type = {
/**
* mei_cl_bus_set_name - set device name for me client device
+ * <controller>-<client device>
+ * Example: 0000:00:16.0-55213584-9a29-4916-badf-0fb7ed682aeb
*
* @cldev: me client device
*/
static inline void mei_cl_bus_set_name(struct mei_cl_device *cldev)
{
- dev_set_name(&cldev->dev, "mei:%s:%pUl:%02X",
- cldev->name,
- mei_me_cl_uuid(cldev->me_cl),
- mei_me_cl_ver(cldev->me_cl));
+ dev_set_name(&cldev->dev, "%s-%pUl",
+ dev_name(cldev->bus->dev),
+ mei_me_cl_uuid(cldev->me_cl));
}
/**
--
2.23.0
This is a note to let you know that I've just added the patch titled
mei: me: add comet point V device id
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-next branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release
during the merge window.
If you have any questions about this process, please let me know.
>From 82b29b9f72afdccb40ea5f3c13c6a3cb65a597bc Mon Sep 17 00:00:00 2001
From: Alexander Usyskin <alexander.usyskin(a)intel.com>
Date: Tue, 5 Nov 2019 17:05:14 +0200
Subject: mei: me: add comet point V device id
Comet Point (Comet Lake) V device id.
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Alexander Usyskin <alexander.usyskin(a)intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler(a)intel.com>
Link: https://lore.kernel.org/r/20191105150514.14010-2-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/misc/mei/hw-me-regs.h | 1 +
drivers/misc/mei/pci-me.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/misc/mei/hw-me-regs.h b/drivers/misc/mei/hw-me-regs.h
index c09f8bb49495..b359f06f05e7 100644
--- a/drivers/misc/mei/hw-me-regs.h
+++ b/drivers/misc/mei/hw-me-regs.h
@@ -81,6 +81,7 @@
#define MEI_DEV_ID_CMP_LP 0x02e0 /* Comet Point LP */
#define MEI_DEV_ID_CMP_LP_3 0x02e4 /* Comet Point LP 3 (iTouch) */
+#define MEI_DEV_ID_CMP_V 0xA3BA /* Comet Point Lake V */
#define MEI_DEV_ID_ICP_LP 0x34E0 /* Ice Lake Point LP */
diff --git a/drivers/misc/mei/pci-me.c b/drivers/misc/mei/pci-me.c
index 3dca63eddaa0..ce43415a536c 100644
--- a/drivers/misc/mei/pci-me.c
+++ b/drivers/misc/mei/pci-me.c
@@ -98,6 +98,7 @@ static const struct pci_device_id mei_me_pci_tbl[] = {
{MEI_PCI_DEVICE(MEI_DEV_ID_CMP_LP, MEI_ME_PCH12_CFG)},
{MEI_PCI_DEVICE(MEI_DEV_ID_CMP_LP_3, MEI_ME_PCH8_CFG)},
+ {MEI_PCI_DEVICE(MEI_DEV_ID_CMP_V, MEI_ME_PCH12_CFG)},
{MEI_PCI_DEVICE(MEI_DEV_ID_ICP_LP, MEI_ME_PCH12_CFG)},
--
2.23.0
On Wed, Nov 06, 2019 at 06:43:37AM -0800, Doug Berger wrote:
> Please do not apply this patch to the stable trees. It has been superceded
> by a recent patch set and reverted upstream.
So drop this and keep the one after this? That would be 25382b991d25
("net: bcmgenet: reset 40nm EPHY on energy detect")
thanks,
greg k-h