Synchronization is recommended before disabling the trace registers
to prevent any start or stop points being speculative at the point
of disabling the unit (section 7.3.77 of ARM IHI 0064D).
Synchronization is also recommended after programming the trace
registers to ensure all updates are committed prior to normal code
resuming (section 4.3.7 of ARM IHI 0064D).
Let's ensure these syncronization points are present in the code
and clearly commented.
Note that we could rely on the barriers in CS_LOCK and
coresight_disclaim_device_unlocked or the context switch to user
space - however coresight may be of use in the kernel.
Signed-off-by: Andrew Murray <andrew.murray(a)arm.com>
CC: stable(a)vger.kernel.org
---
drivers/hwtracing/coresight/coresight-etm4x.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c b/drivers/hwtracing/coresight/coresight-etm4x.c
index c89190d464ab..68e8e3954cef 100644
--- a/drivers/hwtracing/coresight/coresight-etm4x.c
+++ b/drivers/hwtracing/coresight/coresight-etm4x.c
@@ -188,6 +188,10 @@ static int etm4_enable_hw(struct etmv4_drvdata *drvdata)
dev_err(etm_dev,
"timeout while waiting for Idle Trace Status\n");
+ /* As recommended by 4.3.7 of ARM IHI 0064D */
+ dsb(sy);
+ isb();
+
done:
CS_LOCK(drvdata->base);
@@ -454,7 +458,8 @@ static void etm4_disable_hw(void *info)
control &= ~0x1;
/* make sure everything completes before disabling */
- mb();
+ /* As recommended by 7.3.77 of ARM IHI 0064D */
+ dsb(sy);
isb();
writel_relaxed(control, drvdata->base + TRCPRGCTLR);
--
2.21.0
We write to know if you authorized Mr. Todd Hartley to claim your
funds of $9.6 Million Dollars from us?
However, we shall proceed to issue all payments details to the
said Mr. Todd Hartley, if we do not hear from you within the next
two working days from today.
Regards,
Cynthia Miller
Hi Greg,
This patchset includes a few backported fixes for the 4.19 stable tree.
I would appreciate if you could kindly consider including them in the
next release.
Thank you!
Regards,
Srivatsa
---
Gen Zhang (3):
efi/x86/Add missing error handling to old_memmap 1:1 mapping code
ip_sockglue: Fix missing-check bug in ip_ra_control()
ipv6_sockglue: Fix a missing-check bug in ip6_ra_control()
arch/x86/platform/efi/efi.c | 2 ++
arch/x86/platform/efi/efi_64.c | 9 ++++++---
net/ipv4/ip_sockglue.c | 2 ++
net/ipv6/ipv6_sockglue.c | 2 ++
4 files changed, 12 insertions(+), 3 deletions(-)
System gets checkstop if RxFIFO overruns with more requests than the
maximum possible number of CRBs in FIFO at the same time. The max number
of requests per window is controlled by window credits. So find max
CRBs from FIFO size and set it to receive window credits.
Fixes: b0d6c9bab5e4 ("crypto/nx: Add P9 NX support for 842 compression engine")
CC: stable(a)vger.kernel.org # v4.14+
Signed-off-by:Haren Myneni <haren(a)us.ibm.com>
diff --git a/drivers/crypto/nx/nx-842-powernv.c b/drivers/crypto/nx/nx-842-powernv.c
index 4acbc47..e78ff5c 100644
--- a/drivers/crypto/nx/nx-842-powernv.c
+++ b/drivers/crypto/nx/nx-842-powernv.c
@@ -27,8 +27,6 @@
#define WORKMEM_ALIGN (CRB_ALIGN)
#define CSB_WAIT_MAX (5000) /* ms */
#define VAS_RETRIES (10)
-/* # of requests allowed per RxFIFO at a time. 0 for unlimited */
-#define MAX_CREDITS_PER_RXFIFO (1024)
struct nx842_workmem {
/* Below fields must be properly aligned */
@@ -812,7 +810,11 @@ static int __init vas_cfg_coproc_info(struct device_node *dn, int chip_id,
rxattr.lnotify_lpid = lpid;
rxattr.lnotify_pid = pid;
rxattr.lnotify_tid = tid;
- rxattr.wcreds_max = MAX_CREDITS_PER_RXFIFO;
+ /*
+ * Maximum RX window credits can not be more than #CRBs in
+ * RxFIFO. Otherwise, can get checkstop if RxFIFO overruns.
+ */
+ rxattr.wcreds_max = fifo_size / CRB_SIZE;
/*
* Open a VAS receice window which is used to configure RxFIFO
Hello,
We ran automated tests on a patchset that was proposed for merging into this
kernel tree. The patches were applied to:
Kernel repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Commit: aec3002d07fd - Linux 4.19.56
The results of these automated tests are provided below.
Overall result: PASSED
Merge: OK
Compile: OK
Tests: OK
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: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Commit: aec3002d07fd - Linux 4.19.56
We grabbed the f0317bbbba39 commit of the stable queue repository.
We then merged the patchset with `git am`:
perf-ui-helpline-use-strlcpy-as-a-shorter-form-of-strncpy-explicit-set-nul.patch
perf-help-remove-needless-use-of-strncpy.patch
perf-header-fix-unchecked-usage-of-strncpy.patch
arm64-don-t-unconditionally-add-wno-psabi-to-kbuild_cflags.patch
revert-x86-uaccess-ftrace-fix-ftrace_likely_update-v.patch
ib-hfi1-close-psm-sdma_progress-sleep-window.patch
9p-xen-fix-check-for-xenbus_read-error-in-front_prob.patch
9p-use-a-slab-for-allocating-requests.patch
9p-embed-fcall-in-req-to-round-down-buffer-allocs.patch
9p-add-a-per-client-fcall-kmem_cache.patch
9p-rename-p9_free_req-function.patch
9p-add-refcount-to-p9_req_t.patch
9p-rdma-do-not-disconnect-on-down_interruptible-eaga.patch
9p-rename-req-to-rreq-in-trans_fd.patch
9p-acl-fix-uninitialized-iattr-access.patch
9p-rdma-remove-useless-check-in-cm_event_handler.patch
9p-p9dirent_read-check-network-provided-name-length.patch
9p-potential-null-dereference.patch
9p-trans_fd-abort-p9_read_work-if-req-status-changed.patch
9p-trans_fd-put-worker-reqs-on-destroy.patch
net-9p-include-trans_common.h-to-fix-missing-prototy.patch
qmi_wwan-fix-out-of-bounds-read.patch
revert-usb-dwc3-gadget-clear-req-needs_extra_trb-fla.patch
usb-dwc3-gadget-combine-unaligned-and-zero-flags.patch
usb-dwc3-gadget-track-number-of-trbs-per-request.patch
usb-dwc3-gadget-use-num_trbs-when-skipping-trbs-on-d.patch
usb-dwc3-gadget-extract-dwc3_gadget_ep_skip_trbs.patch
usb-dwc3-gadget-introduce-cancelled_list.patch
usb-dwc3-gadget-move-requests-to-cancelled_list.patch
usb-dwc3-gadget-remove-wait_end_transfer.patch
usb-dwc3-gadget-clear-req-needs_extra_trb-flag-on-cl.patch
Compile testing
---------------
We compiled the kernel for 4 architectures:
aarch64:
build options: -j20 INSTALL_MOD_STRIP=1 targz-pkg
configuration: https://artifacts.cki-project.org/builds/aarch64/kernel-stable_queue_4.19-a…
kernel build: https://artifacts.cki-project.org/builds/aarch64/kernel-stable_queue_4.19-a…
ppc64le:
build options: -j20 INSTALL_MOD_STRIP=1 targz-pkg
configuration: https://artifacts.cki-project.org/builds/ppc64le/kernel-stable_queue_4.19-p…
kernel build: https://artifacts.cki-project.org/builds/ppc64le/kernel-stable_queue_4.19-p…
s390x:
build options: -j20 INSTALL_MOD_STRIP=1 targz-pkg
configuration: https://artifacts.cki-project.org/builds/s390x/kernel-stable_queue_4.19-s39…
kernel build: https://artifacts.cki-project.org/builds/s390x/kernel-stable_queue_4.19-s39…
x86_64:
build options: -j20 INSTALL_MOD_STRIP=1 targz-pkg
configuration: https://artifacts.cki-project.org/builds/x86_64/kernel-stable_queue_4.19-x8…
kernel build: https://artifacts.cki-project.org/builds/x86_64/kernel-stable_queue_4.19-x8…
Hardware testing
----------------
We booted each kernel and ran the following tests:
aarch64:
Host 1:
✅ Boot test [0]
✅ selinux-policy: serge-testsuite [1]
Host 2:
✅ Boot test [0]
✅ LTP lite [2]
✅ Loopdev Sanity [3]
✅ AMTU (Abstract Machine Test Utility) [4]
✅ LTP: openposix test suite [5]
✅ audit: audit testsuite test [6]
✅ httpd: mod_ssl smoke sanity [7]
✅ iotop: sanity [8]
✅ Usex - version 1.9-29 [9]
🚧 ✅ Networking socket: fuzz [10]
🚧 ✅ tuned: tune-processes-through-perf [11]
ppc64le:
Host 1:
✅ Boot test [0]
✅ LTP lite [2]
✅ Loopdev Sanity [3]
✅ AMTU (Abstract Machine Test Utility) [4]
✅ LTP: openposix test suite [5]
✅ audit: audit testsuite test [6]
✅ httpd: mod_ssl smoke sanity [7]
✅ iotop: sanity [8]
✅ Usex - version 1.9-29 [9]
🚧 ✅ Networking socket: fuzz [10]
🚧 ✅ tuned: tune-processes-through-perf [11]
Host 2:
✅ Boot test [0]
✅ selinux-policy: serge-testsuite [1]
s390x:
Host 1:
✅ Boot test [0]
✅ LTP lite [2]
✅ Loopdev Sanity [3]
✅ LTP: openposix test suite [5]
✅ audit: audit testsuite test [6]
✅ httpd: mod_ssl smoke sanity [7]
✅ iotop: sanity [8]
🚧 ✅ Networking socket: fuzz [10]
🚧 ✅ tuned: tune-processes-through-perf [11]
Host 2:
✅ Boot test [0]
✅ selinux-policy: serge-testsuite [1]
x86_64:
Host 1:
✅ Boot test [0]
✅ LTP lite [2]
✅ Loopdev Sanity [3]
✅ AMTU (Abstract Machine Test Utility) [4]
✅ LTP: openposix test suite [5]
✅ audit: audit testsuite test [6]
✅ httpd: mod_ssl smoke sanity [7]
✅ iotop: sanity [8]
✅ Usex - version 1.9-29 [9]
🚧 ✅ Networking socket: fuzz [10]
🚧 ✅ tuned: tune-processes-through-perf [11]
Host 2:
✅ Boot test [0]
✅ selinux-policy: serge-testsuite [1]
Test source:
💚 Pull requests are welcome for new tests or improvements to existing tests!
[0]: https://github.com/CKI-project/tests-beaker/archive/master.zip#distribution…
[1]: https://github.com/CKI-project/tests-beaker/archive/master.zip#/packages/se…
[2]: https://github.com/CKI-project/tests-beaker/archive/master.zip#distribution…
[3]: https://github.com/CKI-project/tests-beaker/archive/master.zip#filesystems/…
[4]: https://github.com/CKI-project/tests-beaker/archive/master.zip#misc/amtu
[5]: https://github.com/CKI-project/tests-beaker/archive/master.zip#distribution…
[6]: https://github.com/CKI-project/tests-beaker/archive/master.zip#packages/aud…
[7]: https://github.com/CKI-project/tests-beaker/archive/master.zip#packages/htt…
[8]: https://github.com/CKI-project/tests-beaker/archive/master.zip#packages/iot…
[9]: https://github.com/CKI-project/tests-beaker/archive/master.zip#standards/us…
[10]: https://github.com/CKI-project/tests-beaker/archive/master.zip#/networking/…
[11]: https://github.com/CKI-project/tests-beaker/archive/master.zip#packages/tun…
Waived tests (marked with 🚧)
-----------------------------
This test run included waived tests. 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.
In megasas_get_target_prop(), driver is incorrectly calculating the
target ID for devices with channel 1 and 3.
Due to this, firmware will either fail the command (if there is no
device with the target id sent from driver) or could return the
properties for a target which was not intended.
Devices could end up with the wrong queue depth due to this.
Fix target id calculation for channel 1 and 3.
Fixes: 96188a89cc6d ("scsi: megaraid_sas: NVME interface target prop added")
Cc: stable(a)vger.kernel.org
Signed-off-by: Shivasharan S <shivasharan.srikanteshwara(a)broadcom.com>
---
drivers/scsi/megaraid/megaraid_sas_base.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index b4c0bbc..9321878 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -6558,7 +6558,8 @@ megasas_get_target_prop(struct megasas_instance *instance,
int ret;
struct megasas_cmd *cmd;
struct megasas_dcmd_frame *dcmd;
- u16 targetId = (sdev->channel % 2) + sdev->id;
+ u16 targetId = ((sdev->channel % 2) * MEGASAS_MAX_DEV_PER_CHANNEL) +
+ sdev->id;
cmd = megasas_get_cmd(instance);
--
2.9.5
drm_gem_shmem_create_with_handle() returns a GEM object and attach a
handle to it. When the user closes the DRM FD, the core releases all
GEM handles along with their backing GEM objs, which can lead to a
double-free issue if panfrost_ioctl_create_bo() failed and went
through the err_free path where drm_gem_object_put_unlocked() is
called without deleting the associate handle.
Replace this drm_gem_object_put_unlocked() call by a
drm_gem_handle_delete() one to fix that.
Fixes: f3ba91228e8e ("drm/panfrost: Add initial panfrost driver")
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Boris Brezillon <boris.brezillon(a)collabora.com>
---
Reproduced for real when BO mapping fails because we ran out of
memory.
---
drivers/gpu/drm/panfrost/panfrost_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c
index 07b01eb3d136..cb43ff4ebf4a 100644
--- a/drivers/gpu/drm/panfrost/panfrost_drv.c
+++ b/drivers/gpu/drm/panfrost/panfrost_drv.c
@@ -67,7 +67,7 @@ static int panfrost_ioctl_create_bo(struct drm_device *dev, void *data,
return 0;
err_free:
- drm_gem_object_put_unlocked(&shmem->base);
+ drm_gem_handle_delete(file, args->handle);
return ret;
}
--
2.21.0
Old versions of gcc cannot compile 4.14 since 4.14.113:
./include/asm-generic/fixmap.h:37: error: implicit declaration of function ‘__builtin_unreachable’
The stable commit that caused the problem is 82017e26e515 ("compiler.h:
update definition of unreachable()") (upstream commit fe0640eb30b7).
Reverting the commit fixes the problem.
Kernel 4.17 dropped support for older versions of gcc in upstream commit
cafa0010cd51 ("Raise the minimum required gcc version to 4.6"). This
was not backported to 4.14 since that would go against the stable kernel
rules.
Upstream commit 815f0ddb346c ("include/linux/compiler*.h: make
compiler-*.h mutually exclusive") was a fix for cafa0010cd51. This was
not backported to 4.14.
Upstream commit fe0640eb30b7 ("compiler.h: update definition of
unreachable()") was a fix for 815f0ddb346c. This is the commit that was
backported to 4.14. But it only fixed a problem introduced in the other
commits, and without those commits, it ends up introducing a problem
instead of fixing one. So I recommend reverting that patch in 4.14,
which will enable old gcc to compile 4.14 again. If I understand
correctly, I believe that clang will still be able to compile 4.14 with
the patch reverted, although I haven't tried to compile with clang.
The problematic commit is not present in 4.9.x, 4.4.x, 3.18.x, or 3.16.x.
Tony Battersby
Cybernetics