From: Jarkko Sakkinen <jarkko.sakkinen(a)linux.intel.com>
tpm_send() does not give anymore the result back to the caller. This
would require another memcpy(), which kind of tells that the whole
approach is somewhat broken. Instead, as Mimi suggested, this commit
just wraps the data to the tpm_buf, and thus the result will not go to
the garbage.
Obviously this assumes from the caller that it passes large enough
buffer, which makes the whole API somewhat broken because it could be
different size than @buflen but since trusted keys is the only module
using this API right now I think that this fix is sufficient for the
moment.
In the near future the plan is to replace the parameters with a tpm_buf
created by the caller.
Reported-by: Mimi Zohar <zohar(a)linux.ibm.com>
Suggested-by: Mimi Zohar <zohar(a)linux.ibm.com>
Cc: stable(a)vger.kernel.org
Fixes: 412eb585587a ("use tpm_buf in tpm_transmit_cmd() as the IO parameter")
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen(a)linux.intel.com>
Reviewed-by: Jerry Snitselaar <jsnitsel(a)redhat.com>
---
drivers/char/tpm/tpm-interface.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c
index 208e5ba40e6e..e268f7422427 100644
--- a/drivers/char/tpm/tpm-interface.c
+++ b/drivers/char/tpm/tpm-interface.c
@@ -354,14 +354,9 @@ int tpm_send(struct tpm_chip *chip, void *cmd, size_t buflen)
if (!chip)
return -ENODEV;
- rc = tpm_buf_init(&buf, 0, 0);
- if (rc)
- goto out;
-
- memcpy(buf.data, cmd, buflen);
+ buf.data = cmd;
rc = tpm_transmit_cmd(chip, &buf, 0, "attempting to a send a command");
- tpm_buf_destroy(&buf);
-out:
+
tpm_put_ops(chip);
return rc;
}
--
2.7.5
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: 6e282ba6ff6b - Linux 5.2.15
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/170447
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: 6e282ba6ff6b - Linux 5.2.15
We grabbed the 3b5734c567ce commit of the stable queue repository.
We then merged the patchset with `git am`:
bridge-mdb-remove-wrong-use-of-nlm_f_multi.patch
cdc_ether-fix-rndis-support-for-mediatek-based-smartphones.patch
ipv6-fix-the-link-time-qualifier-of-ping_v6_proc_exit_net.patch
isdn-capi-check-message-length-in-capi_write.patch
ixgbe-fix-secpath-usage-for-ipsec-tx-offload.patch
ixgbevf-fix-secpath-usage-for-ipsec-tx-offload.patch
net-fix-null-de-reference-of-device-refcount.patch
net-gso-fix-skb_segment-splat-when-splitting-gso_size-mangled-skb-having-linear-headed-frag_list.patch
net-phylink-fix-flow-control-resolution.patch
net-sched-fix-reordering-issues.patch
sch_hhf-ensure-quantum-and-hhf_non_hh_weight-are-non-zero.patch
sctp-fix-the-link-time-qualifier-of-sctp_ctrlsock_exit.patch
sctp-use-transport-pf_retrans-in-sctp_do_8_2_transport_strike.patch
tcp-fix-tcp_ecn_withdraw_cwr-to-clear-tcp_ecn_queue_cwr.patch
tipc-add-null-pointer-check-before-calling-kfree_rcu.patch
tun-fix-use-after-free-when-register-netdev-failed.patch
net-ipv6-fix-excessive-rtf_addrconf-flag-on-1-128-local-route-and-others.patch
ipv6-addrconf_f6i_alloc-fix-non-null-pointer-check-to-is_err.patch
net-fixed_phy-add-forward-declaration-for-struct-gpio_desc.patch
sctp-fix-the-missing-put_user-when-dumping-transport-thresholds.patch
net-sock_map-fix-missing-ulp-check-in-sock-hash-case.patch
gpiolib-acpi-add-gpiolib_acpi_run_edge_events_on_boot-option-and-blacklist.patch
gpio-mockup-add-missing-single_release.patch
gpio-fix-line-flag-validation-in-linehandle_create.patch
gpio-fix-line-flag-validation-in-lineevent_create.patch
btrfs-fix-assertion-failure-during-fsync-and-use-of-stale-transaction.patch
cgroup-freezer-fix-frozen-state-inheritance.patch
revert-mmc-bcm2835-terminate-timeout-work-synchronously.patch
revert-mmc-sdhci-remove-unneeded-quirk2-flag-of-o2-sd-host-controller.patch
mmc-tmio-fixup-runtime-pm-management-during-probe.patch
mmc-tmio-fixup-runtime-pm-management-during-remove.patch
drm-lima-fix-lima_gem_wait-return-value.patch
drm-i915-limit-mst-to-8bpc-once-again.patch
drm-i915-restore-relaxed-padding-ocl_oob_suppres_enable-for-skl.patch
ipc-fix-semtimedop-for-generic-32-bit-architectures.patch
ipc-fix-sparc64-ipc-wrapper.patch
ixgbe-fix-double-clean-of-tx-descriptors-with-xdp.patch
ixgbe-prevent-u8-wrapping-of-itr-value-to-something-less-than-10us.patch
revert-rt2800-enable-tx_pin_cfg_lna_pe_-bits-per-band.patch
mt76-mt76x0e-disable-5ghz-band-for-mt7630e.patch
genirq-prevent-null-pointer-dereference-in-resend_irqs.patch
regulator-twl-voltage-lists-for-vdd1-2-on-twl4030.patch
kvm-s390-kvm_s390_vm_start_migration-check-dirty_bitmap-before-using-it-as-target-for-memset.patch
kvm-s390-do-not-leak-kernel-stack-data-in-the-kvm_s390_interrupt-ioctl.patch
kvm-x86-work-around-leak-of-uninitialized-stack-contents.patch
kvm-x86-mmu-reintroduce-fast-invalidate-zap-for-flushing-memslot.patch
kvm-nvmx-handle-page-fault-in-vmread.patch
x86-purgatory-change-compiler-flags-from-mcmodel-kernel-to-mcmodel-large-to-fix-kexec-relocation-errors.patch
powerpc-add-barrier_nospec-to-raw_copy_in_user.patch
kernel-module-fix-mem-leak-in-module_add_modinfo_attrs.patch
x86-boot-use-efi_setup_data-for-searching-rsdp-on-kexec-ed-kernels.patch
x86-ima-check-efi-setupmode-too.patch
drm-meson-add-support-for-xbgr8888-abgr8888-formats.patch
clk-fix-debugfs-clk_possible_parents-for-clks-without-parent-string-names.patch
clk-simplify-debugfs-printing-and-add-a-newline.patch
mt76-fix-a-signedness-bug-in-mt7615_add_interface.patch
mt76-mt7615-use-after-free-in-mt7615_mcu_set_bcn.patch
clk-rockchip-don-t-yell-about-bad-mmc-phases-when-getting.patch
mtd-rawnand-mtk-fix-wrongly-assigned-oob-buffer-pointer-issue.patch
pci-always-allow-probing-with-driver_override.patch
ubifs-correctly-use-tnc_next-in-search_dh_cookie.patch
driver-core-fix-use-after-free-and-double-free-on-glue-directory.patch
Compile testing
---------------
We compiled the kernel for 4 architectures:
aarch64:
make options: -j30 INSTALL_MOD_STRIP=1 targz-pkg
ppc64le:
make options: -j30 INSTALL_MOD_STRIP=1 targz-pkg
s390x:
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 [0]
✅ Podman system integration test (as root) [1]
✅ Podman system integration test (as user) [1]
✅ Loopdev Sanity [2]
✅ jvm test suite [3]
✅ AMTU (Abstract Machine Test Utility) [4]
✅ LTP: openposix test suite [5]
✅ Ethernet drivers sanity [6]
✅ Networking socket: fuzz [7]
✅ Networking sctp-auth: sockopts test [8]
✅ Networking TCP: keepalive test [9]
✅ audit: audit testsuite test [10]
✅ httpd: mod_ssl smoke sanity [11]
✅ iotop: sanity [12]
✅ tuned: tune-processes-through-perf [13]
✅ Usex - version 1.9-29 [14]
✅ stress: stress-ng [15]
🚧 ✅ LTP lite [16]
🚧 ✅ Memory function: kaslr [17]
🚧 ✅ Networking bridge: sanity [18]
🚧 ✅ Networking route: pmtu [19]
🚧 ✅ Networking route_func: local [20]
🚧 ✅ Networking route_func: forward [20]
Host 2:
✅ Boot test [0]
✅ selinux-policy: serge-testsuite [21]
ppc64le:
Host 1:
✅ Boot test [0]
✅ selinux-policy: serge-testsuite [21]
Host 2:
✅ Boot test [0]
✅ Podman system integration test (as root) [1]
✅ Podman system integration test (as user) [1]
✅ Loopdev Sanity [2]
✅ jvm test suite [3]
✅ AMTU (Abstract Machine Test Utility) [4]
✅ LTP: openposix test suite [5]
✅ Ethernet drivers sanity [6]
✅ Networking socket: fuzz [7]
✅ Networking sctp-auth: sockopts test [8]
✅ Networking TCP: keepalive test [9]
✅ audit: audit testsuite test [10]
✅ httpd: mod_ssl smoke sanity [11]
✅ iotop: sanity [12]
✅ tuned: tune-processes-through-perf [13]
✅ Usex - version 1.9-29 [14]
🚧 ✅ LTP lite [16]
🚧 ✅ Memory function: kaslr [17]
🚧 ✅ Networking bridge: sanity [18]
🚧 ✅ Networking route: pmtu [19]
🚧 ✅ Networking route_func: local [20]
🚧 ✅ Networking route_func: forward [20]
s390x:
⚡ 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 [0]
✅ Podman system integration test (as root) [1]
✅ Podman system integration test (as user) [1]
✅ Loopdev Sanity [2]
✅ jvm test suite [3]
✅ AMTU (Abstract Machine Test Utility) [4]
✅ LTP: openposix test suite [5]
✅ Ethernet drivers sanity [6]
✅ Networking socket: fuzz [7]
✅ Networking sctp-auth: sockopts test [8]
✅ Networking TCP: keepalive test [9]
✅ audit: audit testsuite test [10]
✅ httpd: mod_ssl smoke sanity [11]
✅ iotop: sanity [12]
✅ tuned: tune-processes-through-perf [13]
✅ pciutils: sanity smoke test [22]
✅ Usex - version 1.9-29 [14]
✅ stress: stress-ng [15]
🚧 ✅ LTP lite [16]
🚧 ✅ Memory function: kaslr [17]
🚧 ✅ Networking bridge: sanity [18]
🚧 ✅ Networking route: pmtu [19]
🚧 ✅ Networking route_func: local [20]
🚧 ✅ Networking route_func: forward [20]
Host 2:
✅ Boot test [0]
✅ selinux-policy: serge-testsuite [21]
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#/container/p…
[2]: https://github.com/CKI-project/tests-beaker/archive/master.zip#filesystems/…
[3]: https://github.com/CKI-project/tests-beaker/archive/master.zip#/jvm
[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#/networking/…
[7]: https://github.com/CKI-project/tests-beaker/archive/master.zip#/networking/…
[8]: https://github.com/CKI-project/tests-beaker/archive/master.zip#networking/s…
[9]: https://github.com/CKI-project/tests-beaker/archive/master.zip#networking/t…
[10]: https://github.com/CKI-project/tests-beaker/archive/master.zip#packages/aud…
[11]: https://github.com/CKI-project/tests-beaker/archive/master.zip#packages/htt…
[12]: https://github.com/CKI-project/tests-beaker/archive/master.zip#packages/iot…
[13]: https://github.com/CKI-project/tests-beaker/archive/master.zip#packages/tun…
[14]: https://github.com/CKI-project/tests-beaker/archive/master.zip#standards/us…
[15]: https://github.com/CKI-project/tests-beaker/archive/master.zip#stress/stres…
[16]: https://github.com/CKI-project/tests-beaker/archive/master.zip#distribution…
[17]: https://github.com/CKI-project/tests-beaker/archive/master.zip#memory/funct…
[18]: https://github.com/CKI-project/tests-beaker/archive/master.zip#networking/b…
[19]: https://github.com/CKI-project/tests-beaker/archive/master.zip#/networking/…
[20]: https://github.com/CKI-project/tests-beaker/archive/master.zip#/networking/…
[21]: https://github.com/CKI-project/tests-beaker/archive/master.zip#/packages/se…
[22]: https://github.com/CKI-project/tests-beaker/archive/master.zip#pciutils/san…
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.
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: 6e282ba6ff6b - Linux 5.2.15
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/170508
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: 6e282ba6ff6b - Linux 5.2.15
We grabbed the 5f932ae10f6f commit of the stable queue repository.
We then merged the patchset with `git am`:
bridge-mdb-remove-wrong-use-of-nlm_f_multi.patch
cdc_ether-fix-rndis-support-for-mediatek-based-smartphones.patch
ipv6-fix-the-link-time-qualifier-of-ping_v6_proc_exit_net.patch
isdn-capi-check-message-length-in-capi_write.patch
ixgbe-fix-secpath-usage-for-ipsec-tx-offload.patch
ixgbevf-fix-secpath-usage-for-ipsec-tx-offload.patch
net-fix-null-de-reference-of-device-refcount.patch
net-gso-fix-skb_segment-splat-when-splitting-gso_size-mangled-skb-having-linear-headed-frag_list.patch
net-phylink-fix-flow-control-resolution.patch
net-sched-fix-reordering-issues.patch
sch_hhf-ensure-quantum-and-hhf_non_hh_weight-are-non-zero.patch
sctp-fix-the-link-time-qualifier-of-sctp_ctrlsock_exit.patch
sctp-use-transport-pf_retrans-in-sctp_do_8_2_transport_strike.patch
tcp-fix-tcp_ecn_withdraw_cwr-to-clear-tcp_ecn_queue_cwr.patch
tipc-add-null-pointer-check-before-calling-kfree_rcu.patch
tun-fix-use-after-free-when-register-netdev-failed.patch
net-ipv6-fix-excessive-rtf_addrconf-flag-on-1-128-local-route-and-others.patch
ipv6-addrconf_f6i_alloc-fix-non-null-pointer-check-to-is_err.patch
net-fixed_phy-add-forward-declaration-for-struct-gpio_desc.patch
sctp-fix-the-missing-put_user-when-dumping-transport-thresholds.patch
net-sock_map-fix-missing-ulp-check-in-sock-hash-case.patch
gpiolib-acpi-add-gpiolib_acpi_run_edge_events_on_boot-option-and-blacklist.patch
gpio-mockup-add-missing-single_release.patch
gpio-fix-line-flag-validation-in-linehandle_create.patch
gpio-fix-line-flag-validation-in-lineevent_create.patch
btrfs-fix-assertion-failure-during-fsync-and-use-of-stale-transaction.patch
cgroup-freezer-fix-frozen-state-inheritance.patch
revert-mmc-bcm2835-terminate-timeout-work-synchronously.patch
revert-mmc-sdhci-remove-unneeded-quirk2-flag-of-o2-sd-host-controller.patch
mmc-tmio-fixup-runtime-pm-management-during-probe.patch
mmc-tmio-fixup-runtime-pm-management-during-remove.patch
drm-lima-fix-lima_gem_wait-return-value.patch
drm-i915-limit-mst-to-8bpc-once-again.patch
drm-i915-restore-relaxed-padding-ocl_oob_suppres_enable-for-skl.patch
ipc-fix-semtimedop-for-generic-32-bit-architectures.patch
ipc-fix-sparc64-ipc-wrapper.patch
ixgbe-fix-double-clean-of-tx-descriptors-with-xdp.patch
ixgbe-prevent-u8-wrapping-of-itr-value-to-something-less-than-10us.patch
revert-rt2800-enable-tx_pin_cfg_lna_pe_-bits-per-band.patch
mt76-mt76x0e-disable-5ghz-band-for-mt7630e.patch
genirq-prevent-null-pointer-dereference-in-resend_irqs.patch
regulator-twl-voltage-lists-for-vdd1-2-on-twl4030.patch
kvm-s390-kvm_s390_vm_start_migration-check-dirty_bitmap-before-using-it-as-target-for-memset.patch
kvm-s390-do-not-leak-kernel-stack-data-in-the-kvm_s390_interrupt-ioctl.patch
kvm-x86-work-around-leak-of-uninitialized-stack-contents.patch
kvm-x86-mmu-reintroduce-fast-invalidate-zap-for-flushing-memslot.patch
kvm-nvmx-handle-page-fault-in-vmread.patch
x86-purgatory-change-compiler-flags-from-mcmodel-kernel-to-mcmodel-large-to-fix-kexec-relocation-errors.patch
powerpc-add-barrier_nospec-to-raw_copy_in_user.patch
kernel-module-fix-mem-leak-in-module_add_modinfo_attrs.patch
x86-boot-use-efi_setup_data-for-searching-rsdp-on-kexec-ed-kernels.patch
x86-ima-check-efi-setupmode-too.patch
drm-meson-add-support-for-xbgr8888-abgr8888-formats.patch
clk-fix-debugfs-clk_possible_parents-for-clks-without-parent-string-names.patch
clk-simplify-debugfs-printing-and-add-a-newline.patch
mt76-fix-a-signedness-bug-in-mt7615_add_interface.patch
mt76-mt7615-use-after-free-in-mt7615_mcu_set_bcn.patch
clk-rockchip-don-t-yell-about-bad-mmc-phases-when-getting.patch
mtd-rawnand-mtk-fix-wrongly-assigned-oob-buffer-pointer-issue.patch
pci-always-allow-probing-with-driver_override.patch
ubifs-correctly-use-tnc_next-in-search_dh_cookie.patch
driver-core-fix-use-after-free-and-double-free-on-glue-directory.patch
crypto-talitos-check-aes-key-size.patch
crypto-talitos-fix-ctr-alg-blocksize.patch
crypto-talitos-check-data-blocksize-in-ablkcipher.patch
crypto-talitos-fix-ecb-algs-ivsize.patch
crypto-talitos-do-not-modify-req-cryptlen-on-decryption.patch
crypto-talitos-hmac-snoop-no-afeu-mode-requires-sw-icv-checking.patch
firmware-ti_sci-always-request-response-from-firmware.patch
Compile testing
---------------
We compiled the kernel for 4 architectures:
aarch64:
make options: -j30 INSTALL_MOD_STRIP=1 targz-pkg
ppc64le:
make options: -j30 INSTALL_MOD_STRIP=1 targz-pkg
s390x:
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 [0]
✅ Podman system integration test (as root) [1]
✅ Podman system integration test (as user) [1]
✅ Loopdev Sanity [2]
✅ jvm test suite [3]
✅ AMTU (Abstract Machine Test Utility) [4]
✅ LTP: openposix test suite [5]
✅ Ethernet drivers sanity [6]
✅ Networking socket: fuzz [7]
✅ Networking sctp-auth: sockopts test [8]
✅ Networking TCP: keepalive test [9]
✅ audit: audit testsuite test [10]
✅ httpd: mod_ssl smoke sanity [11]
✅ iotop: sanity [12]
✅ tuned: tune-processes-through-perf [13]
✅ Usex - version 1.9-29 [14]
✅ stress: stress-ng [15]
🚧 ✅ LTP lite [16]
🚧 ✅ Memory function: kaslr [17]
🚧 ✅ Networking bridge: sanity [18]
🚧 ✅ Networking route: pmtu [19]
🚧 ✅ Networking route_func: local [20]
🚧 ✅ Networking route_func: forward [20]
Host 2:
✅ Boot test [0]
✅ selinux-policy: serge-testsuite [21]
ppc64le:
Host 1:
✅ Boot test [0]
✅ Podman system integration test (as root) [1]
✅ Podman system integration test (as user) [1]
✅ Loopdev Sanity [2]
✅ jvm test suite [3]
✅ AMTU (Abstract Machine Test Utility) [4]
✅ LTP: openposix test suite [5]
✅ Ethernet drivers sanity [6]
✅ Networking socket: fuzz [7]
✅ Networking sctp-auth: sockopts test [8]
✅ Networking TCP: keepalive test [9]
✅ audit: audit testsuite test [10]
✅ httpd: mod_ssl smoke sanity [11]
✅ iotop: sanity [12]
✅ tuned: tune-processes-through-perf [13]
✅ Usex - version 1.9-29 [14]
🚧 ✅ LTP lite [16]
🚧 ✅ Memory function: kaslr [17]
🚧 ✅ Networking bridge: sanity [18]
🚧 ✅ Networking route: pmtu [19]
🚧 ✅ Networking route_func: local [20]
🚧 ✅ Networking route_func: forward [20]
Host 2:
✅ Boot test [0]
✅ selinux-policy: serge-testsuite [21]
s390x:
⚡ 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:
⚡ 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 [0]
✅ Podman system integration test (as root) [1]
✅ Podman system integration test (as user) [1]
✅ Loopdev Sanity [2]
✅ jvm test suite [3]
✅ AMTU (Abstract Machine Test Utility) [4]
✅ LTP: openposix test suite [5]
✅ Ethernet drivers sanity [6]
✅ Networking socket: fuzz [7]
✅ Networking sctp-auth: sockopts test [8]
✅ Networking TCP: keepalive test [9]
✅ audit: audit testsuite test [10]
✅ httpd: mod_ssl smoke sanity [11]
✅ iotop: sanity [12]
✅ tuned: tune-processes-through-perf [13]
✅ pciutils: sanity smoke test [22]
✅ Usex - version 1.9-29 [14]
✅ stress: stress-ng [15]
🚧 ⚡⚡⚡ LTP lite [16]
🚧 ✅ Memory function: kaslr [17]
🚧 ✅ Networking bridge: sanity [18]
🚧 ✅ Networking route: pmtu [19]
🚧 ✅ Networking route_func: local [20]
🚧 ✅ Networking route_func: forward [20]
Host 2:
✅ Boot test [0]
✅ selinux-policy: serge-testsuite [21]
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#/container/p…
[2]: https://github.com/CKI-project/tests-beaker/archive/master.zip#filesystems/…
[3]: https://github.com/CKI-project/tests-beaker/archive/master.zip#/jvm
[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#/networking/…
[7]: https://github.com/CKI-project/tests-beaker/archive/master.zip#/networking/…
[8]: https://github.com/CKI-project/tests-beaker/archive/master.zip#networking/s…
[9]: https://github.com/CKI-project/tests-beaker/archive/master.zip#networking/t…
[10]: https://github.com/CKI-project/tests-beaker/archive/master.zip#packages/aud…
[11]: https://github.com/CKI-project/tests-beaker/archive/master.zip#packages/htt…
[12]: https://github.com/CKI-project/tests-beaker/archive/master.zip#packages/iot…
[13]: https://github.com/CKI-project/tests-beaker/archive/master.zip#packages/tun…
[14]: https://github.com/CKI-project/tests-beaker/archive/master.zip#standards/us…
[15]: https://github.com/CKI-project/tests-beaker/archive/master.zip#stress/stres…
[16]: https://github.com/CKI-project/tests-beaker/archive/master.zip#distribution…
[17]: https://github.com/CKI-project/tests-beaker/archive/master.zip#memory/funct…
[18]: https://github.com/CKI-project/tests-beaker/archive/master.zip#networking/b…
[19]: https://github.com/CKI-project/tests-beaker/archive/master.zip#/networking/…
[20]: https://github.com/CKI-project/tests-beaker/archive/master.zip#/networking/…
[21]: https://github.com/CKI-project/tests-beaker/archive/master.zip#/packages/se…
[22]: https://github.com/CKI-project/tests-beaker/archive/master.zip#pciutils/san…
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.
tpm_send() does not give anymore the result back to the caller. This
would require another memcpy(), which kind of tells that the whole
approach is somewhat broken. Instead, as Mimi suggested, this commit
just wraps the data to the tpm_buf, and thus the result will not go to
the garbage.
Obviously this assumes from the caller that it passes large enough
buffer, which makes the whole API somewhat broken because it could be
different size than @buflen but since trusted keys is the only module
using this API right now I think that this fix is sufficient for the
moment.
In the near future the plan is to replace the parameters with a tpm_buf
created by the caller.
Reported-by: Mimi Zohar <zohar(a)linux.ibm.com>
Suggested-by: Mimi Zohar <zohar(a)linux.ibm.com>
Cc: stable(a)vger.kernel.org
Fixes: 412eb585587a ("use tpm_buf in tpm_transmit_cmd() as the IO parameter")
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen(a)linux.intel.com>
---
drivers/char/tpm/tpm-interface.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c
index d9ace5480665..2459d36dd8cc 100644
--- a/drivers/char/tpm/tpm-interface.c
+++ b/drivers/char/tpm/tpm-interface.c
@@ -358,13 +358,9 @@ int tpm_send(struct tpm_chip *chip, void *cmd, size_t buflen)
if (!chip)
return -ENODEV;
- rc = tpm_buf_init(&buf, 0, 0);
- if (rc)
- goto out;
-
- memcpy(buf.data, cmd, buflen);
+ buf.data = cmd;
rc = tpm_transmit_cmd(chip, &buf, 0, "attempting to a send a command");
- tpm_buf_destroy(&buf);
+
out:
tpm_put_ops(chip);
return rc;
--
2.20.1
[ Upstream commit e70d8b287301eb6d7c7761c6171c56af62110ea3 ]
The compatibility "eeprom" attribute is currently root-only no
matter what the configuration says. The "nvmem" attribute does
respect the setting of the root_only configuration bit, so do the
same for "eeprom".
Signed-off-by: Jean Delvare <jdelvare(a)suse.de>
Fixes: b6c217ab9be6 ("nvmem: Add backwards compatibility support for older EEPROM drivers.")
Reviewed-by: Bartosz Golaszewski <bgolaszewski(a)baylibre.com>
Cc: Andrew Lunn <andrew(a)lunn.ch>
Cc: Srinivas Kandagatla <srinivas.kandagatla(a)linaro.org>
Cc: Arnd Bergmann <arnd(a)arndb.de>
Link: https://lore.kernel.org/r/20190728184255.563332e6@endymion
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
This is the backport of commit e70d8b287301 "nvmem: Use the same
permissions for eeprom as for nvmem" for stable kernel branches 4.19,
4.14 and 4.9. Thanks.
drivers/nvmem/core.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
--- linux-4.19.orig/drivers/nvmem/core.c 2019-09-17 11:34:16.250719885 +0200
+++ linux-4.19/drivers/nvmem/core.c 2019-09-17 16:09:45.146604199 +0200
@@ -415,10 +415,17 @@ static int nvmem_setup_compat(struct nvm
if (!config->base_dev)
return -EINVAL;
- if (nvmem->read_only)
- nvmem->eeprom = bin_attr_ro_root_nvmem;
- else
- nvmem->eeprom = bin_attr_rw_root_nvmem;
+ if (nvmem->read_only) {
+ if (config->root_only)
+ nvmem->eeprom = bin_attr_ro_root_nvmem;
+ else
+ nvmem->eeprom = bin_attr_ro_nvmem;
+ } else {
+ if (config->root_only)
+ nvmem->eeprom = bin_attr_rw_root_nvmem;
+ else
+ nvmem->eeprom = bin_attr_rw_nvmem;
+ }
nvmem->eeprom.attr.name = "eeprom";
nvmem->eeprom.size = nvmem->size;
#ifdef CONFIG_DEBUG_LOCK_ALLOC
--
Jean Delvare
SUSE L3 Support
As reported by the OpenWRT team, write requests sometimes fail on some
platforms.
Currently to check the state chip_ready() is used correctly as described by
the flash memory S29GL256P11TFI01 datasheet.
Also chip_good() is used to check if the write is succeeded and it was
implemented by the commit fb4a90bfcd6d8 ("[MTD] CFI-0002 - Improve error
checking").
But actually the write failure is caused on some platforms and also it can
be fixed by using chip_good() to check the state and retry instead.
Also it seems that it is caused after repeated about 1,000 times to retry
the write one word with the reset command.
By using chip_good() to check the state to be done it can be reduced the
retry with reset.
It is depended on the actual flash chip behavior so the root cause is
unknown.
Cc: Chris Packham <chris.packham(a)alliedtelesis.co.nz>
Cc: Joakim Tjernlund <Joakim.Tjernlund(a)infinera.com>
Cc: linux-mtd(a)lists.infradead.org
Cc: stable(a)vger.kernel.org
Reported-by: Fabio Bettoni <fbettoni(a)gmail.com>
Signed-off-by: Felix Fietkau <nbd(a)nbd.name>
Signed-off-by: Hauke Mehrtens <hauke(a)hauke-m.de>
Signed-off-by: Tokunori Ikegami <ikegami.t(a)gmail.com>
[vigneshr(a)ti.com: Fix a checkpatch warning]
Signed-off-by: Vignesh Raghavendra <vigneshr(a)ti.com>
---
drivers/mtd/chips/cfi_cmdset_0002.c | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
mode change 100644 => 100755 drivers/mtd/chips/cfi_cmdset_0002.c
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
old mode 100644
new mode 100755
index fb5a3052f144..7589d891b311
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -1626,29 +1626,35 @@ static int __xipram do_write_oneword(struct map_info *map, struct flchip *chip,
continue;
}
- if (time_after(jiffies, timeo) && !chip_ready(map, adr)){
+ /*
+ * We check "time_after" and "!chip_good" before checking
+ * "chip_good" to avoid the failure due to scheduling.
+ */
+ if (time_after(jiffies, timeo) && !chip_good(map, adr, datum)) {
xip_enable(map, chip, adr);
printk(KERN_WARNING "MTD %s(): software timeout\n", __func__);
xip_disable(map, chip, adr);
+ ret = -EIO;
break;
}
- if (chip_ready(map, adr))
+ if (chip_good(map, adr, datum))
break;
/* Latency issues. Drop the lock, wait a while and retry */
UDELAY(map, chip, adr, 1);
}
+
/* Did we succeed? */
- if (!chip_good(map, adr, datum)) {
+ if (ret) {
/* reset on all failures. */
map_write( map, CMD(0xF0), chip->start );
/* FIXME - should have reset delay before continuing */
- if (++retry_cnt <= MAX_RETRIES)
+ if (++retry_cnt <= MAX_RETRIES) {
+ ret = 0;
goto retry;
-
- ret = -EIO;
+ }
}
xip_enable(map, chip, adr);
op_done:
--
2.11.0
As reported by the OpenWRT team, write requests sometimes fail on some
platforms.
Currently to check the state chip_ready() is used correctly as described by
the flash memory S29GL256P11TFI01 datasheet.
Also chip_good() is used to check if the write is succeeded and it was
implemented by the commit fb4a90bfcd6d8 ("[MTD] CFI-0002 - Improve error
checking").
But actually the write failure is caused on some platforms and also it can
be fixed by using chip_good() to check the state and retry instead.
Also it seems that it is caused after repeated about 1,000 times to retry
the write one word with the reset command.
By using chip_good() to check the state to be done it can be reduced the
retry with reset.
It is depended on the actual flash chip behavior so the root cause is
unknown.
Cc: Chris Packham <chris.packham(a)alliedtelesis.co.nz>
Cc: Joakim Tjernlund <Joakim.Tjernlund(a)infinera.com>
Cc: linux-mtd(a)lists.infradead.org
Cc: stable(a)vger.kernel.org
Reported-by: Fabio Bettoni <fbettoni(a)gmail.com>
Signed-off-by: Felix Fietkau <nbd(a)nbd.name>
Signed-off-by: Hauke Mehrtens <hauke(a)hauke-m.de>
Signed-off-by: Tokunori Ikegami <ikegami.t(a)gmail.com>
[vigneshr(a)ti.com: Fix a checkpatch warning]
Signed-off-by: Vignesh Raghavendra <vigneshr(a)ti.com>
---
drivers/mtd/chips/cfi_cmdset_0002.c | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
mode change 100644 => 100755 drivers/mtd/chips/cfi_cmdset_0002.c
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
old mode 100644
new mode 100755
index de35a2a362f9..8725e406a9eb
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -1624,29 +1624,35 @@ static int __xipram do_write_oneword(struct map_info *map, struct flchip *chip,
continue;
}
- if (time_after(jiffies, timeo) && !chip_ready(map, adr)){
+ /*
+ * We check "time_after" and "!chip_good" before checking
+ * "chip_good" to avoid the failure due to scheduling.
+ */
+ if (time_after(jiffies, timeo) && !chip_good(map, adr, datum)) {
xip_enable(map, chip, adr);
printk(KERN_WARNING "MTD %s(): software timeout\n", __func__);
xip_disable(map, chip, adr);
+ ret = -EIO;
break;
}
- if (chip_ready(map, adr))
+ if (chip_good(map, adr, datum))
break;
/* Latency issues. Drop the lock, wait a while and retry */
UDELAY(map, chip, adr, 1);
}
+
/* Did we succeed? */
- if (!chip_good(map, adr, datum)) {
+ if (ret) {
/* reset on all failures. */
map_write( map, CMD(0xF0), chip->start );
/* FIXME - should have reset delay before continuing */
- if (++retry_cnt <= MAX_RETRIES)
+ if (++retry_cnt <= MAX_RETRIES) {
+ ret = 0;
goto retry;
-
- ret = -EIO;
+ }
}
xip_enable(map, chip, adr);
op_done:
--
2.11.0
As reported by the OpenWRT team, write requests sometimes fail on some
platforms.
Currently to check the state chip_ready() is used correctly as described by
the flash memory S29GL256P11TFI01 datasheet.
Also chip_good() is used to check if the write is succeeded and it was
implemented by the commit fb4a90bfcd6d8 ("[MTD] CFI-0002 - Improve error
checking").
But actually the write failure is caused on some platforms and also it can
be fixed by using chip_good() to check the state and retry instead.
Also it seems that it is caused after repeated about 1,000 times to retry
the write one word with the reset command.
By using chip_good() to check the state to be done it can be reduced the
retry with reset.
It is depended on the actual flash chip behavior so the root cause is
unknown.
Cc: Chris Packham <chris.packham(a)alliedtelesis.co.nz>
Cc: Joakim Tjernlund <Joakim.Tjernlund(a)infinera.com>
Cc: linux-mtd(a)lists.infradead.org
Cc: stable(a)vger.kernel.org
Reported-by: Fabio Bettoni <fbettoni(a)gmail.com>
Signed-off-by: Felix Fietkau <nbd(a)nbd.name>
Signed-off-by: Hauke Mehrtens <hauke(a)hauke-m.de>
Signed-off-by: Tokunori Ikegami <ikegami.t(a)gmail.com>
[vigneshr(a)ti.com: Fix a checkpatch warning]
Signed-off-by: Vignesh Raghavendra <vigneshr(a)ti.com>
---
drivers/mtd/chips/cfi_cmdset_0002.c | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
mode change 100644 => 100755 drivers/mtd/chips/cfi_cmdset_0002.c
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
old mode 100644
new mode 100755
index af3d207c9cc4..e773dc6fdd3c
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -1628,29 +1628,35 @@ static int __xipram do_write_oneword(struct map_info *map, struct flchip *chip,
continue;
}
- if (time_after(jiffies, timeo) && !chip_ready(map, adr)){
+ /*
+ * We check "time_after" and "!chip_good" before checking
+ * "chip_good" to avoid the failure due to scheduling.
+ */
+ if (time_after(jiffies, timeo) && !chip_good(map, adr, datum)) {
xip_enable(map, chip, adr);
printk(KERN_WARNING "MTD %s(): software timeout\n", __func__);
xip_disable(map, chip, adr);
+ ret = -EIO;
break;
}
- if (chip_ready(map, adr))
+ if (chip_good(map, adr, datum))
break;
/* Latency issues. Drop the lock, wait a while and retry */
UDELAY(map, chip, adr, 1);
}
+
/* Did we succeed? */
- if (!chip_good(map, adr, datum)) {
+ if (ret) {
/* reset on all failures. */
map_write( map, CMD(0xF0), chip->start );
/* FIXME - should have reset delay before continuing */
- if (++retry_cnt <= MAX_RETRIES)
+ if (++retry_cnt <= MAX_RETRIES) {
+ ret = 0;
goto retry;
-
- ret = -EIO;
+ }
}
xip_enable(map, chip, adr);
op_done:
--
2.11.0
As reported by the OpenWRT team, write requests sometimes fail on some
platforms.
Currently to check the state chip_ready() is used correctly as described by
the flash memory S29GL256P11TFI01 datasheet.
Also chip_good() is used to check if the write is succeeded and it was
implemented by the commit fb4a90bfcd6d8 ("[MTD] CFI-0002 - Improve error
checking").
But actually the write failure is caused on some platforms and also it can
be fixed by using chip_good() to check the state and retry instead.
Also it seems that it is caused after repeated about 1,000 times to retry
the write one word with the reset command.
By using chip_good() to check the state to be done it can be reduced the
retry with reset.
It is depended on the actual flash chip behavior so the root cause is
unknown.
Cc: Chris Packham <chris.packham(a)alliedtelesis.co.nz>
Cc: Joakim Tjernlund <Joakim.Tjernlund(a)infinera.com>
Cc: linux-mtd(a)lists.infradead.org
Cc: stable(a)vger.kernel.org
Reported-by: Fabio Bettoni <fbettoni(a)gmail.com>
Signed-off-by: Felix Fietkau <nbd(a)nbd.name>
Signed-off-by: Hauke Mehrtens <hauke(a)hauke-m.de>
Signed-off-by: Tokunori Ikegami <ikegami.t(a)gmail.com>
[vigneshr(a)ti.com: Fix a checkpatch warning]
Signed-off-by: Vignesh Raghavendra <vigneshr(a)ti.com>
---
drivers/mtd/chips/cfi_cmdset_0002.c | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
mode change 100644 => 100755 drivers/mtd/chips/cfi_cmdset_0002.c
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
old mode 100644
new mode 100755
index 72428b6bfc47..ba44ea6d497e
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -1627,29 +1627,35 @@ static int __xipram do_write_oneword(struct map_info *map, struct flchip *chip,
continue;
}
- if (time_after(jiffies, timeo) && !chip_ready(map, adr)){
+ /*
+ * We check "time_after" and "!chip_good" before checking
+ * "chip_good" to avoid the failure due to scheduling.
+ */
+ if (time_after(jiffies, timeo) && !chip_good(map, adr, datum)) {
xip_enable(map, chip, adr);
printk(KERN_WARNING "MTD %s(): software timeout\n", __func__);
xip_disable(map, chip, adr);
+ ret = -EIO;
break;
}
- if (chip_ready(map, adr))
+ if (chip_good(map, adr, datum))
break;
/* Latency issues. Drop the lock, wait a while and retry */
UDELAY(map, chip, adr, 1);
}
+
/* Did we succeed? */
- if (!chip_good(map, adr, datum)) {
+ if (ret) {
/* reset on all failures. */
map_write(map, CMD(0xF0), chip->start);
/* FIXME - should have reset delay before continuing */
- if (++retry_cnt <= MAX_RETRIES)
+ if (++retry_cnt <= MAX_RETRIES) {
+ ret = 0;
goto retry;
-
- ret = -EIO;
+ }
}
xip_enable(map, chip, adr);
op_done:
--
2.11.0
Commit c440eee1a7a1 ("Staging: fbtft: Switch to the gpio descriptor
interface") removed setting gpios via platform data. This means that
fbtft will now only work with Device Tree so set the dependency.
This also prevents a NULL pointer deref on non-DT platform because
fbtftops.request_gpios is not set in that case anymore.
Fixes: c440eee1a7a1 ("Staging: fbtft: Switch to the gpio descriptor interface")
Cc: stable <stable(a)vger.kernel.org>
Signed-off-by: Noralf Trønnes <noralf(a)tronnes.org>
---
drivers/staging/fbtft/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/fbtft/Kconfig b/drivers/staging/fbtft/Kconfig
index 8ec524a95ec8..4e5d860fd788 100644
--- a/drivers/staging/fbtft/Kconfig
+++ b/drivers/staging/fbtft/Kconfig
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
menuconfig FB_TFT
tristate "Support for small TFT LCD display modules"
- depends on FB && SPI
+ depends on FB && SPI && OF
depends on GPIOLIB || COMPILE_TEST
select FB_SYS_FILLRECT
select FB_SYS_COPYAREA
--
2.20.1