* Re: [OE-core] [PATCH V3 1/3] u-boot: support merging .cfg files for UBOOT_CONFIG
From: Denys Dmytriyenko @ 2020-05-29 20:09 UTC (permalink / raw)
To: Ming Liu; +Cc: openembedded-core, stefan.agner, max.krummenacher, denys,
Ming Liu
In-Reply-To: <20200528124129.15100-2-liu.ming50@gmail.com>
Is this change really required for UBOOT_INITIAL_ENV? I think you are merging
several patch series together?
On Thu, May 28, 2020 at 02:41:27PM +0200, Ming Liu wrote:
> From: Ming Liu <ming.liu@toradex.com>
>
> U-boot recipe supports .cfg files in SRC_URI, but they would be merged
> to .config during do_configure only when UBOOT_MACHINE is set, we
> should also support merging .cfg files for UBOOT_CONFIG.
>
> Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
> Signed-off-by: Ming Liu <ming.liu@toradex.com>
> ---
> meta/recipes-bsp/u-boot/u-boot.inc | 21 +++++++++++++++++----
> 1 file changed, 17 insertions(+), 4 deletions(-)
>
> diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc
> index 80f828df52..8cfd25020c 100644
> --- a/meta/recipes-bsp/u-boot/u-boot.inc
> +++ b/meta/recipes-bsp/u-boot/u-boot.inc
> @@ -77,7 +77,23 @@ def find_cfgs(d):
> return sources_list
>
> do_configure () {
> - if [ -z "${UBOOT_CONFIG}" ]; then
> + if [ -n "${UBOOT_CONFIG}" ]; then
> + unset i j
> + for config in ${UBOOT_MACHINE}; do
> + i=$(expr $i + 1);
> + for type in ${UBOOT_CONFIG}; do
> + j=$(expr $j + 1);
> + if [ $j -eq $i ]; then
> + oe_runmake -C ${S} O=${B}/${config} ${config}
> + merge_config.sh -m -O ${B}/${config} ${B}/${config}/.config ${@" ".join(find_cfgs(d))}
> + oe_runmake -C ${S} O=${B}/${config} oldconfig
> + fi
> + done
> + unset j
> + done
> + unset i
> + DEVTOOL_DISABLE_MENUCONFIG=true
> + else
> if [ -n "${UBOOT_MACHINE}" ]; then
> oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE}
> else
> @@ -85,8 +101,6 @@ do_configure () {
> fi
> merge_config.sh -m .config ${@" ".join(find_cfgs(d))}
> cml1_do_configure
> - else
> - DEVTOOL_DISABLE_MENUCONFIG=true
> fi
> }
>
> @@ -114,7 +128,6 @@ do_compile () {
> j=$(expr $j + 1);
> if [ $j -eq $i ]
> then
> - oe_runmake -C ${S} O=${B}/${config} ${config}
> oe_runmake -C ${S} O=${B}/${config} ${UBOOT_MAKE_TARGET}
> for binary in ${UBOOT_BINARIES}; do
> k=$(expr $k + 1);
> --
> 2.26.2
>
>
^ permalink raw reply
* Re: [PATCH v8 30/62] target/riscv: Update fp_status when float rounding mode changes
From: Alistair Francis @ 2020-05-29 19:59 UTC (permalink / raw)
To: LIU Zhiwei
Cc: open list:RISC-V, Richard Henderson,
qemu-devel@nongnu.org Developers, wxy194768, wenmeng_zhang,
Alistair Francis, Palmer Dabbelt
In-Reply-To: <20200521094413.10425-31-zhiwei_liu@c-sky.com>
On Thu, May 21, 2020 at 3:45 AM LIU Zhiwei <zhiwei_liu@c-sky.com> wrote:
>
> For scalar float instruction, round mode is encoded in instruction,
> so fp_status is updating dynamiclly.
>
> For vector float instruction, round mode is always frm, so
> update fp_status when frm changes is enough.
>
> Signed-off-by: LIU Zhiwei <zhiwei_liu@c-sky.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Alistair
> ---
> target/riscv/csr.c | 7 +++++++
> target/riscv/fpu_helper.c | 19 ++++++++++++++-----
> target/riscv/internals.h | 3 +++
> 3 files changed, 24 insertions(+), 5 deletions(-)
>
> diff --git a/target/riscv/csr.c b/target/riscv/csr.c
> index d71c49dfff..438093152b 100644
> --- a/target/riscv/csr.c
> +++ b/target/riscv/csr.c
> @@ -22,6 +22,7 @@
> #include "cpu.h"
> #include "qemu/main-loop.h"
> #include "exec/exec-all.h"
> +#include "internals.h"
>
> /* CSR function table */
> static riscv_csr_operations csr_ops[];
> @@ -174,6 +175,9 @@ static int write_frm(CPURISCVState *env, int csrno, target_ulong val)
> env->mstatus |= MSTATUS_FS;
> #endif
> env->frm = val & (FSR_RD >> FSR_RD_SHIFT);
> + if (!riscv_cpu_set_rounding_mode(env, env->frm)) {
> + return -1;
> + }
> return 0;
> }
>
> @@ -207,6 +211,9 @@ static int write_fcsr(CPURISCVState *env, int csrno, target_ulong val)
> env->vxsat = (val & FSR_VXSAT) >> FSR_VXSAT_SHIFT;
> }
> riscv_cpu_set_fflags(env, (val & FSR_AEXC) >> FSR_AEXC_SHIFT);
> + if (!riscv_cpu_set_rounding_mode(env, env->frm)) {
> + return -1;
> + }
> return 0;
> }
>
> diff --git a/target/riscv/fpu_helper.c b/target/riscv/fpu_helper.c
> index 0b79562a69..262610e837 100644
> --- a/target/riscv/fpu_helper.c
> +++ b/target/riscv/fpu_helper.c
> @@ -50,13 +50,10 @@ void riscv_cpu_set_fflags(CPURISCVState *env, target_ulong hard)
> set_float_exception_flags(soft, &env->fp_status);
> }
>
> -void helper_set_rounding_mode(CPURISCVState *env, uint32_t rm)
> +bool riscv_cpu_set_rounding_mode(CPURISCVState *env, uint32_t rm)
> {
> int softrm;
>
> - if (rm == 7) {
> - rm = env->frm;
> - }
> switch (rm) {
> case 0:
> softrm = float_round_nearest_even;
> @@ -74,10 +71,22 @@ void helper_set_rounding_mode(CPURISCVState *env, uint32_t rm)
> softrm = float_round_ties_away;
> break;
> default:
> - riscv_raise_exception(env, RISCV_EXCP_ILLEGAL_INST, GETPC());
> + return false;
> }
>
> set_float_rounding_mode(softrm, &env->fp_status);
> + return true;
> +}
> +
> +void helper_set_rounding_mode(CPURISCVState *env, uint32_t rm)
> +{
> + if (rm == 7) {
> + rm = env->frm;
> + }
> +
> + if (!riscv_cpu_set_rounding_mode(env, rm)) {
> + riscv_raise_exception(env, RISCV_EXCP_ILLEGAL_INST, GETPC());
> + }
> }
>
> uint64_t helper_fmadd_s(CPURISCVState *env, uint64_t frs1, uint64_t frs2,
> diff --git a/target/riscv/internals.h b/target/riscv/internals.h
> index f699d80c41..52f6af2513 100644
> --- a/target/riscv/internals.h
> +++ b/target/riscv/internals.h
> @@ -27,4 +27,7 @@ FIELD(VDATA, VM, 8, 1)
> FIELD(VDATA, LMUL, 9, 2)
> FIELD(VDATA, NF, 11, 4)
> FIELD(VDATA, WD, 11, 1)
> +
> +/* set float rounding mode */
> +bool riscv_cpu_set_rounding_mode(CPURISCVState *env, uint32_t rm);
> #endif
> --
> 2.23.0
>
>
^ permalink raw reply
* Re: [PATCH] net: udp: remove the redundant assignment
From: David Miller @ 2020-05-29 20:08 UTC (permalink / raw)
To: wangli8850; +Cc: netdev, wangli09
In-Reply-To: <20200529112321.18606-1-wangli09@kuaishou.com>
From: Wang Li <wangli8850@gmail.com>
Date: Fri, 29 May 2020 19:23:21 +0800
> Signed-off-by: Wang Li <wangli09@kuaishou.com>
uh->check is read by the lco_csum() call, this assignment is not
redundant at all.
Please put more care into your changes.
Thank you.
^ permalink raw reply
* + mm-gup-documentation-fix-for-pin_user_pages-apis.patch added to -mm tree
From: akpm @ 2020-05-29 20:08 UTC (permalink / raw)
To: dan.carpenter, david, jack, jhubbard, mm-commits, vbabka
The patch titled
Subject: mm/gup: documentation fix for pin_user_pages*() APIs
has been added to the -mm tree. Its filename is
mm-gup-documentation-fix-for-pin_user_pages-apis.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/mm-gup-documentation-fix-for-pin_user_pages-apis.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/mm-gup-documentation-fix-for-pin_user_pages-apis.patch
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: John Hubbard <jhubbard@nvidia.com>
Subject: mm/gup: documentation fix for pin_user_pages*() APIs
All of the pin_user_pages*() API calls will cause pages to be dma-pinned.
As such, they are all suitable for either DMA, RDMA, and/or Direct IO.
The documentation should say so, but it was instead saying that three of
the API calls were only suitable for Direct IO. This was discovered when
a reviewer wondered why an API call that specifically recommended against
Case 2 (DMA/RDMA) was being used in a DMA situation [1].
Fix this by simply deleting those claims. The gup.c comments already
refer to the more extensive Documentation/core-api/pin_user_pages.rst,
which does have the correct guidance. So let's just write it once, there.
[1] https://lore.kernel.org/r/20200529074658.GM30374@kadam
Link: http://lkml.kernel.org/r/20200529084515.46259-1-jhubbard@nvidia.com
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/gup.c | 9 ---------
1 file changed, 9 deletions(-)
--- a/mm/gup.c~mm-gup-documentation-fix-for-pin_user_pages-apis
+++ a/mm/gup.c
@@ -2876,9 +2876,6 @@ EXPORT_SYMBOL_GPL(get_user_pages_fast);
*
* FOLL_PIN means that the pages must be released via unpin_user_page(). Please
* see Documentation/core-api/pin_user_pages.rst for further details.
- *
- * This is intended for Case 1 (DIO) in Documentation/core-api/pin_user_pages.rst. It
- * is NOT intended for Case 2 (RDMA: long-term pins).
*/
int pin_user_pages_fast(unsigned long start, int nr_pages,
unsigned int gup_flags, struct page **pages)
@@ -2952,9 +2949,6 @@ EXPORT_SYMBOL_GPL(pin_user_pages_fast_on
*
* FOLL_PIN means that the pages must be released via unpin_user_page(). Please
* see Documentation/core-api/pin_user_pages.rst for details.
- *
- * This is intended for Case 1 (DIO) in Documentation/core-api/pin_user_pages.rst. It
- * is NOT intended for Case 2 (RDMA: long-term pins).
*/
long pin_user_pages_remote(struct task_struct *tsk, struct mm_struct *mm,
unsigned long start, unsigned long nr_pages,
@@ -2988,9 +2982,6 @@ EXPORT_SYMBOL(pin_user_pages_remote);
*
* FOLL_PIN means that the pages must be released via unpin_user_page(). Please
* see Documentation/core-api/pin_user_pages.rst for details.
- *
- * This is intended for Case 1 (DIO) in Documentation/core-api/pin_user_pages.rst. It
- * is NOT intended for Case 2 (RDMA: long-term pins).
*/
long pin_user_pages(unsigned long start, unsigned long nr_pages,
unsigned int gup_flags, struct page **pages,
_
Patches currently in -mm which might be from jhubbard@nvidia.com are
mm-gup-introduce-pin_user_pages_unlocked.patch
ivtv-convert-get_user_pages-pin_user_pages.patch
mm-gup-move-__get_user_pages_fast-down-a-few-lines-in-gupc.patch
mm-gup-refactor-and-de-duplicate-gup_fast-code.patch
mm-gup-refactor-and-de-duplicate-gup_fast-code-fix.patch
mm-gup-introduce-pin_user_pages_fast_only.patch
drm-i915-convert-get_user_pages-pin_user_pages.patch
mm-gup-might_lock_readmmap_sem-in-get_user_pages_fast.patch
khugepaged-add-self-test-fix-3.patch
rapidio-convert-get_user_pages-pin_user_pages.patch
mm-gup-update-pin_user_pagesrst-for-case-3-mmu-notifiers.patch
mm-gup-introduce-pin_user_pages_locked.patch
mm-gup-frame_vector-convert-get_user_pages-pin_user_pages.patch
mm-gup-documentation-fix-for-pin_user_pages-apis.patch
^ permalink raw reply
* Re: [PATCH v8 30/62] target/riscv: Update fp_status when float rounding mode changes
From: Alistair Francis @ 2020-05-29 19:59 UTC (permalink / raw)
To: LIU Zhiwei
Cc: qemu-devel@nongnu.org Developers, open list:RISC-V,
Richard Henderson, wxy194768, wenmeng_zhang, Alistair Francis,
Palmer Dabbelt
In-Reply-To: <20200521094413.10425-31-zhiwei_liu@c-sky.com>
On Thu, May 21, 2020 at 3:45 AM LIU Zhiwei <zhiwei_liu@c-sky.com> wrote:
>
> For scalar float instruction, round mode is encoded in instruction,
> so fp_status is updating dynamiclly.
>
> For vector float instruction, round mode is always frm, so
> update fp_status when frm changes is enough.
>
> Signed-off-by: LIU Zhiwei <zhiwei_liu@c-sky.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Alistair
> ---
> target/riscv/csr.c | 7 +++++++
> target/riscv/fpu_helper.c | 19 ++++++++++++++-----
> target/riscv/internals.h | 3 +++
> 3 files changed, 24 insertions(+), 5 deletions(-)
>
> diff --git a/target/riscv/csr.c b/target/riscv/csr.c
> index d71c49dfff..438093152b 100644
> --- a/target/riscv/csr.c
> +++ b/target/riscv/csr.c
> @@ -22,6 +22,7 @@
> #include "cpu.h"
> #include "qemu/main-loop.h"
> #include "exec/exec-all.h"
> +#include "internals.h"
>
> /* CSR function table */
> static riscv_csr_operations csr_ops[];
> @@ -174,6 +175,9 @@ static int write_frm(CPURISCVState *env, int csrno, target_ulong val)
> env->mstatus |= MSTATUS_FS;
> #endif
> env->frm = val & (FSR_RD >> FSR_RD_SHIFT);
> + if (!riscv_cpu_set_rounding_mode(env, env->frm)) {
> + return -1;
> + }
> return 0;
> }
>
> @@ -207,6 +211,9 @@ static int write_fcsr(CPURISCVState *env, int csrno, target_ulong val)
> env->vxsat = (val & FSR_VXSAT) >> FSR_VXSAT_SHIFT;
> }
> riscv_cpu_set_fflags(env, (val & FSR_AEXC) >> FSR_AEXC_SHIFT);
> + if (!riscv_cpu_set_rounding_mode(env, env->frm)) {
> + return -1;
> + }
> return 0;
> }
>
> diff --git a/target/riscv/fpu_helper.c b/target/riscv/fpu_helper.c
> index 0b79562a69..262610e837 100644
> --- a/target/riscv/fpu_helper.c
> +++ b/target/riscv/fpu_helper.c
> @@ -50,13 +50,10 @@ void riscv_cpu_set_fflags(CPURISCVState *env, target_ulong hard)
> set_float_exception_flags(soft, &env->fp_status);
> }
>
> -void helper_set_rounding_mode(CPURISCVState *env, uint32_t rm)
> +bool riscv_cpu_set_rounding_mode(CPURISCVState *env, uint32_t rm)
> {
> int softrm;
>
> - if (rm == 7) {
> - rm = env->frm;
> - }
> switch (rm) {
> case 0:
> softrm = float_round_nearest_even;
> @@ -74,10 +71,22 @@ void helper_set_rounding_mode(CPURISCVState *env, uint32_t rm)
> softrm = float_round_ties_away;
> break;
> default:
> - riscv_raise_exception(env, RISCV_EXCP_ILLEGAL_INST, GETPC());
> + return false;
> }
>
> set_float_rounding_mode(softrm, &env->fp_status);
> + return true;
> +}
> +
> +void helper_set_rounding_mode(CPURISCVState *env, uint32_t rm)
> +{
> + if (rm == 7) {
> + rm = env->frm;
> + }
> +
> + if (!riscv_cpu_set_rounding_mode(env, rm)) {
> + riscv_raise_exception(env, RISCV_EXCP_ILLEGAL_INST, GETPC());
> + }
> }
>
> uint64_t helper_fmadd_s(CPURISCVState *env, uint64_t frs1, uint64_t frs2,
> diff --git a/target/riscv/internals.h b/target/riscv/internals.h
> index f699d80c41..52f6af2513 100644
> --- a/target/riscv/internals.h
> +++ b/target/riscv/internals.h
> @@ -27,4 +27,7 @@ FIELD(VDATA, VM, 8, 1)
> FIELD(VDATA, LMUL, 9, 2)
> FIELD(VDATA, NF, 11, 4)
> FIELD(VDATA, WD, 11, 1)
> +
> +/* set float rounding mode */
> +bool riscv_cpu_set_rounding_mode(CPURISCVState *env, uint32_t rm);
> #endif
> --
> 2.23.0
>
>
^ permalink raw reply
* [Intel-gfx] ✓ Fi.CI.IGT: success for series starting with [1/2] drm/i915: Add a few asserts around handling of i915_request_is_active() (rev6)
From: Patchwork @ 2020-05-29 20:07 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
In-Reply-To: <20200529085809.23691-1-chris@chris-wilson.co.uk>
== Series Details ==
Series: series starting with [1/2] drm/i915: Add a few asserts around handling of i915_request_is_active() (rev6)
URL : https://patchwork.freedesktop.org/series/77781/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_8554_full -> Patchwork_17820_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Known issues
------------
Here are the changes found in Patchwork_17820_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_vm_create@isolation:
- shard-apl: [PASS][1] -> [TIMEOUT][2] ([i915#1635]) +3 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8554/shard-apl1/igt@gem_vm_create@isolation.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17820/shard-apl8/igt@gem_vm_create@isolation.html
* igt@i915_suspend@fence-restore-untiled:
- shard-kbl: [PASS][3] -> [DMESG-WARN][4] ([i915#180] / [i915#93] / [i915#95])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8554/shard-kbl4/igt@i915_suspend@fence-restore-untiled.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17820/shard-kbl6/igt@i915_suspend@fence-restore-untiled.html
* igt@i915_suspend@forcewake:
- shard-kbl: [PASS][5] -> [INCOMPLETE][6] ([i915#155])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8554/shard-kbl7/igt@i915_suspend@forcewake.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17820/shard-kbl4/igt@i915_suspend@forcewake.html
* igt@kms_big_fb@x-tiled-64bpp-rotate-0:
- shard-glk: [PASS][7] -> [FAIL][8] ([i915#1119] / [i915#118] / [i915#95]) +1 similar issue
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8554/shard-glk5/igt@kms_big_fb@x-tiled-64bpp-rotate-0.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17820/shard-glk8/igt@kms_big_fb@x-tiled-64bpp-rotate-0.html
* igt@kms_color@pipe-a-ctm-blue-to-red:
- shard-skl: [PASS][9] -> [FAIL][10] ([i915#129])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8554/shard-skl4/igt@kms_color@pipe-a-ctm-blue-to-red.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17820/shard-skl6/igt@kms_color@pipe-a-ctm-blue-to-red.html
* igt@kms_cursor_crc@pipe-b-cursor-256x85-sliding:
- shard-kbl: [PASS][11] -> [FAIL][12] ([i915#54])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8554/shard-kbl1/igt@kms_cursor_crc@pipe-b-cursor-256x85-sliding.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17820/shard-kbl3/igt@kms_cursor_crc@pipe-b-cursor-256x85-sliding.html
- shard-skl: [PASS][13] -> [FAIL][14] ([i915#54])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8554/shard-skl9/igt@kms_cursor_crc@pipe-b-cursor-256x85-sliding.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17820/shard-skl8/igt@kms_cursor_crc@pipe-b-cursor-256x85-sliding.html
- shard-apl: [PASS][15] -> [FAIL][16] ([i915#54])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8554/shard-apl8/igt@kms_cursor_crc@pipe-b-cursor-256x85-sliding.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17820/shard-apl2/igt@kms_cursor_crc@pipe-b-cursor-256x85-sliding.html
* igt@kms_cursor_crc@pipe-c-cursor-suspend:
- shard-apl: [PASS][17] -> [DMESG-WARN][18] ([i915#180]) +2 similar issues
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8554/shard-apl7/igt@kms_cursor_crc@pipe-c-cursor-suspend.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17820/shard-apl1/igt@kms_cursor_crc@pipe-c-cursor-suspend.html
* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes:
- shard-kbl: [PASS][19] -> [DMESG-WARN][20] ([i915#180]) +1 similar issue
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8554/shard-kbl7/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17820/shard-kbl4/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html
* igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
- shard-skl: [PASS][21] -> [FAIL][22] ([fdo#108145] / [i915#265]) +1 similar issue
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8554/shard-skl8/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17820/shard-skl10/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html
* igt@kms_psr@psr2_no_drrs:
- shard-iclb: [PASS][23] -> [SKIP][24] ([fdo#109441])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8554/shard-iclb2/igt@kms_psr@psr2_no_drrs.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17820/shard-iclb6/igt@kms_psr@psr2_no_drrs.html
#### Possible fixes ####
* {igt@gem_exec_balancer@bonded-dual}:
- shard-tglb: [FAIL][25] -> [PASS][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8554/shard-tglb2/igt@gem_exec_balancer@bonded-dual.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17820/shard-tglb8/igt@gem_exec_balancer@bonded-dual.html
* {igt@gem_exec_balancer@bonded-pair}:
- shard-kbl: [FAIL][27] -> [PASS][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8554/shard-kbl6/igt@gem_exec_balancer@bonded-pair.html
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17820/shard-kbl7/igt@gem_exec_balancer@bonded-pair.html
- shard-iclb: [FAIL][29] -> [PASS][30]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8554/shard-iclb4/igt@gem_exec_balancer@bonded-pair.html
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17820/shard-iclb1/igt@gem_exec_balancer@bonded-pair.html
* {igt@gem_exec_reloc@basic-concurrent0}:
- shard-apl: [FAIL][31] ([i915#1930]) -> [PASS][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8554/shard-apl2/igt@gem_exec_reloc@basic-concurrent0.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17820/shard-apl6/igt@gem_exec_reloc@basic-concurrent0.html
* {igt@gem_exec_reloc@basic-concurrent16}:
- shard-snb: [FAIL][33] ([i915#1930]) -> [PASS][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8554/shard-snb1/igt@gem_exec_reloc@basic-concurrent16.html
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17820/shard-snb5/igt@gem_exec_reloc@basic-concurrent16.html
* igt@gem_mmap_wc@read-write-distinct:
- shard-hsw: [DMESG-WARN][35] ([i915#1927]) -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8554/shard-hsw7/igt@gem_mmap_wc@read-write-distinct.html
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17820/shard-hsw7/igt@gem_mmap_wc@read-write-distinct.html
* igt@i915_suspend@forcewake:
- shard-skl: [INCOMPLETE][37] ([i915#636] / [i915#69]) -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8554/shard-skl1/igt@i915_suspend@forcewake.html
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17820/shard-skl8/igt@i915_suspend@forcewake.html
* igt@kms_big_fb@y-tiled-64bpp-rotate-0:
- shard-glk: [FAIL][39] ([i915#1119] / [i915#118] / [i915#95]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8554/shard-glk8/igt@kms_big_fb@y-tiled-64bpp-rotate-0.html
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17820/shard-glk2/igt@kms_big_fb@y-tiled-64bpp-rotate-0.html
* igt@kms_cursor_crc@pipe-b-cursor-suspend:
- shard-apl: [DMESG-WARN][41] ([i915#180]) -> [PASS][42] +1 similar issue
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8554/shard-apl2/igt@kms_cursor_crc@pipe-b-cursor-suspend.html
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17820/shard-apl6/igt@kms_cursor_crc@pipe-b-cursor-suspend.html
* {igt@kms_flip@flip-vs-suspend-interruptible@a-edp1}:
- shard-skl: [INCOMPLETE][43] ([i915#198]) -> [PASS][44]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8554/shard-skl3/igt@kms_flip@flip-vs-suspend-interruptible@a-edp1.html
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17820/shard-skl5/igt@kms_flip@flip-vs-suspend-interruptible@a-edp1.html
* {igt@kms_flip@flip-vs-suspend-interruptible@c-hdmi-a1}:
- shard-hsw: [INCOMPLETE][45] ([i915#61]) -> [PASS][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8554/shard-hsw4/igt@kms_flip@flip-vs-suspend-interruptible@c-hdmi-a1.html
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17820/shard-hsw8/igt@kms_flip@flip-vs-suspend-interruptible@c-hdmi-a1.html
* {igt@kms_flip@flip-vs-suspend@a-dp1}:
- shard-kbl: [DMESG-WARN][47] ([i915#180]) -> [PASS][48] +3 similar issues
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8554/shard-kbl2/igt@kms_flip@flip-vs-suspend@a-dp1.html
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17820/shard-kbl1/igt@kms_flip@flip-vs-suspend@a-dp1.html
* igt@kms_hdr@bpc-switch-suspend:
- shard-skl: [FAIL][49] ([i915#1188]) -> [PASS][50] +1 similar issue
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8554/shard-skl2/igt@kms_hdr@bpc-switch-suspend.html
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17820/shard-skl7/igt@kms_hdr@bpc-switch-suspend.html
* igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min:
- shard-skl: [FAIL][51] ([fdo#108145] / [i915#265]) -> [PASS][52] +1 similar issue
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8554/shard-skl1/igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min.html
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17820/shard-skl9/igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min.html
* igt@kms_psr@psr2_cursor_plane_move:
- shard-iclb: [SKIP][53] ([fdo#109441]) -> [PASS][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8554/shard-iclb4/igt@kms_psr@psr2_cursor_plane_move.html
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17820/shard-iclb2/igt@kms_psr@psr2_cursor_plane_move.html
#### Warnings ####
* igt@i915_pm_dc@dc6-psr:
- shard-tglb: [FAIL][55] ([i915#1899]) -> [SKIP][56] ([i915#468])
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8554/shard-tglb5/igt@i915_pm_dc@dc6-psr.html
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17820/shard-tglb2/igt@i915_pm_dc@dc6-psr.html
* igt@i915_pm_rc6_residency@rc6-idle:
- shard-iclb: [FAIL][57] ([i915#1515]) -> [WARN][58] ([i915#1515])
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8554/shard-iclb8/igt@i915_pm_rc6_residency@rc6-idle.html
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17820/shard-iclb8/igt@i915_pm_rc6_residency@rc6-idle.html
* igt@kms_content_protection@srm:
- shard-apl: [FAIL][59] ([fdo#110321]) -> [TIMEOUT][60] ([i915#1319] / [i915#1635])
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8554/shard-apl7/igt@kms_content_protection@srm.html
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17820/shard-apl2/igt@kms_content_protection@srm.html
* igt@kms_content_protection@uevent:
- shard-kbl: [FAIL][61] ([i915#357]) -> [FAIL][62] ([i915#357] / [i915#93] / [i915#95])
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8554/shard-kbl6/igt@kms_content_protection@uevent.html
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17820/shard-kbl7/igt@kms_content_protection@uevent.html
- shard-apl: [FAIL][63] ([i915#357]) -> [FAIL][64] ([i915#357] / [i915#95])
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8554/shard-apl4/igt@kms_content_protection@uevent.html
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17820/shard-apl3/igt@kms_content_protection@uevent.html
* igt@kms_cursor_legacy@cursora-vs-flipb-toggle:
- shard-glk: [DMESG-WARN][65] ([i915#1926]) -> [DMESG-FAIL][66] ([i915#1925] / [i915#1926])
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8554/shard-glk4/igt@kms_cursor_legacy@cursora-vs-flipb-toggle.html
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17820/shard-glk6/igt@kms_cursor_legacy@cursora-vs-flipb-toggle.html
* igt@kms_frontbuffer_tracking@psr-2p-scndscrn-pri-shrfb-draw-mmap-gtt:
- shard-apl: [SKIP][67] ([fdo#109271]) -> [TIMEOUT][68] ([i915#1635])
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8554/shard-apl1/igt@kms_frontbuffer_tracking@psr-2p-scndscrn-pri-shrfb-draw-mmap-gtt.html
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17820/shard-apl8/igt@kms_frontbuffer_tracking@psr-2p-scndscrn-pri-shrfb-draw-mmap-gtt.html
* igt@kms_plane_alpha_blend@pipe-c-alpha-basic:
- shard-apl: [FAIL][69] ([fdo#108145] / [i915#265] / [i915#95]) -> [FAIL][70] ([fdo#108145] / [i915#265])
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8554/shard-apl7/igt@kms_plane_alpha_blend@pipe-c-alpha-basic.html
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17820/shard-apl2/igt@kms_plane_alpha_blend@pipe-c-alpha-basic.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#110321]: https://bugs.freedesktop.org/show_bug.cgi?id=110321
[i915#1119]: https://gitlab.freedesktop.org/drm/intel/issues/1119
[i915#118]: https://gitlab.freedesktop.org/drm/intel/issues/118
[i915#1188]: https://gitlab.freedesktop.org/drm/intel/issues/1188
[i915#129]: https://gitlab.freedesktop.org/drm/intel/issues/129
[i915#1319]: https://gitlab.freedesktop.org/drm/intel/issues/1319
[i915#1515]: https://gitlab.freedesktop.org/drm/intel/issues/1515
[i915#1542]: https://gitlab.freedesktop.org/drm/intel/issues/1542
[i915#155]: https://gitlab.freedesktop.org/drm/intel/issues/155
[i915#1635]: https://gitlab.freedesktop.org/drm/intel/issues/1635
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#1899]: https://gitlab.freedesktop.org/drm/intel/issues/1899
[i915#1925]: https://gitlab.freedesktop.org/drm/intel/issues/1925
[i915#1926]: https://gitlab.freedesktop.org/drm/intel/issues/1926
[i915#1927]: https://gitlab.freedesktop.org/drm/intel/issues/1927
[i915#1930]: https://gitlab.freedesktop.org/drm/intel/issues/1930
[i915#198]: https://gitlab.freedesktop.org/drm/intel/issues/198
[i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
[i915#357]: https://gitlab.freedesktop.org/drm/intel/issues/357
[i915#468]: https://gitlab.freedesktop.org/drm/intel/issues/468
[i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
[i915#61]: https://gitlab.freedesktop.org/drm/intel/issues/61
[i915#636]: https://gitlab.freedesktop.org/drm/intel/issues/636
[i915#69]: https://gitlab.freedesktop.org/drm/intel/issues/69
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
[i915#93]: https://gitlab.freedesktop.org/drm/intel/issues/93
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95
Participating hosts (11 -> 11)
------------------------------
No changes in participating hosts
Build changes
-------------
* Linux: CI_DRM_8554 -> Patchwork_17820
CI-20190529: 20190529
CI_DRM_8554: ac5c0538eb79074e97a7a5c03c285f339290d961 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5684: bd399f5eb8263bb4a84ae6a5bb1a13d329e0515d @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_17820: 319babfa21e7433aad375377305d5ad092615dfa @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17820/index.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply
* [Buildroot] [PATCH 1/1] package/mp4v2: security bump to version 4.1.3
From: Peter Korsgaard @ 2020-05-29 20:07 UTC (permalink / raw)
To: buildroot
In-Reply-To: <20200515211327.15078-1-fontaine.fabrice@gmail.com>
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:
> - Switch site to an active fork
> - Send patch upstream
> - Update indentation in hash file (two spaces)
> - Fix the following CVEs:
> - CVE-2018-14054: A double free exists in the MP4StringProperty class
> in mp4property.cpp in MP4v2 2.0.0. A dangling pointer is freed again
> in the destructor once an exception is triggered.
> Fixed by
> https://github.com/TechSmith/mp4v2/commit/f09cceeee5bd7f783fd31f10e8b3c440ccf4c743
> - CVE-2018-14325: In MP4v2 2.0.0, there is an integer underflow (with
> resultant memory corruption) when parsing MP4Atom in mp4atom.cpp.
> Fixed by
> https://github.com/TechSmith/mp4v2/commit/e475013c6ef78093055a02b0d035eda0f9f01451
> - CVE-2018-14326: In MP4v2 2.0.0, there is an integer overflow (with
> resultant memory corruption) when resizing MP4Array for the ftyp
> atom in mp4array.h.
> Fixed by
> https://github.com/TechSmith/mp4v2/commit/70d823ccd8e2d7d0ed9e62fb7e8983d21e6acbeb
> - CVE-2018-14379: MP4Atom::factory in mp4atom.cpp in MP4v2 2.0.0
> incorrectly uses the MP4ItemAtom data type in a certain case where
> MP4DataAtom is required, which allows remote attackers to cause a
> denial of service (memory corruption) or possibly have unspecified
> other impact via a crafted MP4 file, because access to the data
> structure has different expectations about layout as a result of
> this type confusion.
> Fixed by
> https://github.com/TechSmith/mp4v2/commit/73f38b4296aeb38617fa3923018bb78671c3b833
> - CVE-2018-14403: MP4NameFirstMatches in mp4util.cpp in MP4v2 2.0.0
> mishandles substrings of atom names, leading to use of an
> inappropriate data type for associated atoms. The resulting type
> confusion can cause out-of-bounds memory access.
> Fixed by
> https://github.com/TechSmith/mp4v2/commit/51cb6b36f6c8edf9f195d5858eac9ba18b334a16
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply
* [PATCH RESEND v8 2/2] PCI: hip: Add handling of HiSilicon HIP PCIe controller errors
From: Shiju Jose @ 2020-05-29 20:04 UTC (permalink / raw)
To: linux-acpi, linux-pci, linux-kernel, rjw, bp, james.morse,
helgaas, lenb, tony.luck, dan.carpenter, gregkh, zhangliguang,
tglx
Cc: Yicong Yang, linuxarm, Shiju Jose
From: Yicong Yang <yangyicong@hisilicon.com>
The HiSilicon HIP PCIe controller is capable of handling errors
on root port and perform port reset separately at each root port.
This patch add error handling driver for HIP PCIe controller to log
and report recoverable errors. Perform root port reset and restore
link status after the recovery.
Following are some of the PCIe controller's recoverable errors
1. completion transmission timeout error.
2. CRS retry counter over the threshold error.
3. ECC 2 bit errors
4. AXI bresponse/rresponse errors etc.
The driver placed in the drivers/pci/controller/ because the
HIP PCIe controller does not use DWC ip.
Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
Signed-off-by: Shiju Jose <shiju.jose@huawei.com>
--
drivers/pci/controller/Kconfig | 8 +
drivers/pci/controller/Makefile | 1 +
drivers/pci/controller/pcie-hisi-error.c | 336 +++++++++++++++++++++++++++++++
3 files changed, 345 insertions(+)
create mode 100644 drivers/pci/controller/pcie-hisi-error.c
---
drivers/pci/controller/Kconfig | 8 +
drivers/pci/controller/Makefile | 1 +
drivers/pci/controller/pcie-hisi-error.c | 321 +++++++++++++++++++++++
3 files changed, 330 insertions(+)
create mode 100644 drivers/pci/controller/pcie-hisi-error.c
diff --git a/drivers/pci/controller/Kconfig b/drivers/pci/controller/Kconfig
index 91bfdb784829..7ba4b94f8604 100644
--- a/drivers/pci/controller/Kconfig
+++ b/drivers/pci/controller/Kconfig
@@ -258,6 +258,14 @@ config PCI_HYPERV_INTERFACE
The Hyper-V PCI Interface is a helper driver allows other drivers to
have a common interface with the Hyper-V PCI frontend driver.
+config PCIE_HISI_ERR
+ depends on ARM64 || COMPILE_TEST
+ depends on ACPI
+ bool "HiSilicon HIP PCIe controller error handling driver"
+ help
+ Say Y here if you want error handling support
+ for the PCIe controller's errors on HiSilicon HIP SoCs
+
source "drivers/pci/controller/dwc/Kconfig"
source "drivers/pci/controller/mobiveil/Kconfig"
source "drivers/pci/controller/cadence/Kconfig"
diff --git a/drivers/pci/controller/Makefile b/drivers/pci/controller/Makefile
index 158c59771824..ab3a528bf988 100644
--- a/drivers/pci/controller/Makefile
+++ b/drivers/pci/controller/Makefile
@@ -28,6 +28,7 @@ obj-$(CONFIG_PCIE_MEDIATEK) += pcie-mediatek.o
obj-$(CONFIG_PCIE_TANGO_SMP8759) += pcie-tango.o
obj-$(CONFIG_VMD) += vmd.o
obj-$(CONFIG_PCIE_BRCMSTB) += pcie-brcmstb.o
+obj-$(CONFIG_PCIE_HISI_ERR) += pcie-hisi-error.o
# pcie-hisi.o quirks are needed even without CONFIG_PCIE_DW
obj-y += dwc/
obj-y += mobiveil/
diff --git a/drivers/pci/controller/pcie-hisi-error.c b/drivers/pci/controller/pcie-hisi-error.c
new file mode 100644
index 000000000000..7886df01fd8a
--- /dev/null
+++ b/drivers/pci/controller/pcie-hisi-error.c
@@ -0,0 +1,321 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Driver for handling the PCIe controller errors on
+ * HiSilicon HIP SoCs.
+ *
+ * Copyright (c) 2018-2019 HiSilicon Limited.
+ */
+
+#include <linux/acpi.h>
+#include <acpi/ghes.h>
+#include <linux/delay.h>
+#include <linux/pci.h>
+#include <linux/platform_device.h>
+#include <linux/kfifo.h>
+#include <linux/spinlock.h>
+
+#define HISI_PCIE_ERR_INFO_SIZE 1024
+
+/* HISI PCIe controller error definitions */
+#define HISI_PCIE_ERR_MISC_REGS 33
+
+#define HISI_PCIE_SUB_MODULE_ID_AP 0
+#define HISI_PCIE_SUB_MODULE_ID_TL 1
+#define HISI_PCIE_SUB_MODULE_ID_MAC 2
+#define HISI_PCIE_SUB_MODULE_ID_DL 3
+#define HISI_PCIE_SUB_MODULE_ID_SDI 4
+
+#define HISI_PCIE_LOCAL_VALID_VERSION BIT(0)
+#define HISI_PCIE_LOCAL_VALID_SOC_ID BIT(1)
+#define HISI_PCIE_LOCAL_VALID_SOCKET_ID BIT(2)
+#define HISI_PCIE_LOCAL_VALID_NIMBUS_ID BIT(3)
+#define HISI_PCIE_LOCAL_VALID_SUB_MODULE_ID BIT(4)
+#define HISI_PCIE_LOCAL_VALID_CORE_ID BIT(5)
+#define HISI_PCIE_LOCAL_VALID_PORT_ID BIT(6)
+#define HISI_PCIE_LOCAL_VALID_ERR_TYPE BIT(7)
+#define HISI_PCIE_LOCAL_VALID_ERR_SEVERITY BIT(8)
+#define HISI_PCIE_LOCAL_VALID_ERR_MISC 9
+
+#define HISI_ERR_SEV_RECOVERABLE 0
+#define HISI_ERR_SEV_FATAL 1
+#define HISI_ERR_SEV_CORRECTED 2
+#define HISI_ERR_SEV_NONE 3
+
+static guid_t hisi_pcie_sec_type = GUID_INIT(0xB2889FC9, 0xE7D7, 0x4F9D,
+ 0xA8, 0x67, 0xAF, 0x42, 0xE9, 0x8B, 0xE7, 0x72);
+
+#define HISI_PCIE_CORE_ID(v) ((v) >> 3)
+#define HISI_PCIE_PORT_ID(core, v) (((v) >> 1) + ((core) << 3))
+#define HISI_PCIE_CORE_PORT_ID(v) (((v) % 8) << 1)
+
+struct hisi_pcie_error_data {
+ u64 val_bits;
+ u8 version;
+ u8 soc_id;
+ u8 socket_id;
+ u8 nimbus_id;
+ u8 sub_module_id;
+ u8 core_id;
+ u8 port_id;
+ u8 err_severity;
+ u16 err_type;
+ u8 reserv[2];
+ u32 err_misc[HISI_PCIE_ERR_MISC_REGS];
+};
+
+struct hisi_pcie_error_private {
+ struct notifier_block nb;
+ struct platform_device *pdev;
+};
+
+static char *hisi_pcie_sub_module_name(u8 id)
+{
+ switch (id) {
+ case HISI_PCIE_SUB_MODULE_ID_AP: return "AP Layer";
+ case HISI_PCIE_SUB_MODULE_ID_TL: return "TL Layer";
+ case HISI_PCIE_SUB_MODULE_ID_MAC: return "MAC Layer";
+ case HISI_PCIE_SUB_MODULE_ID_DL: return "DL Layer";
+ case HISI_PCIE_SUB_MODULE_ID_SDI: return "SDI Layer";
+ }
+
+ return "unknown";
+}
+
+static char *hisi_pcie_error_severity(u8 err_sev)
+{
+ switch (err_sev) {
+ case HISI_ERR_SEV_RECOVERABLE: return "recoverable";
+ case HISI_ERR_SEV_FATAL: return "fatal";
+ case HISI_ERR_SEV_CORRECTED: return "corrected";
+ case HISI_ERR_SEV_NONE: return "none";
+ }
+
+ return "unknown";
+}
+
+static int hisi_pcie_port_reset(struct platform_device *pdev,
+ u32 chip_id, u32 port_id)
+{
+ struct device *dev = &pdev->dev;
+ acpi_handle handle = ACPI_HANDLE(dev);
+ union acpi_object arg[3];
+ struct acpi_object_list arg_list;
+ acpi_status s;
+ unsigned long long data = 0;
+
+ arg[0].type = ACPI_TYPE_INTEGER;
+ arg[0].integer.value = chip_id;
+ arg[1].type = ACPI_TYPE_INTEGER;
+ arg[1].integer.value = HISI_PCIE_CORE_ID(port_id);
+ arg[2].type = ACPI_TYPE_INTEGER;
+ arg[2].integer.value = HISI_PCIE_CORE_PORT_ID(port_id);
+
+ arg_list.count = 3;
+ arg_list.pointer = arg;
+
+ s = acpi_evaluate_integer(handle, "RST", &arg_list, &data);
+ if (ACPI_FAILURE(s)) {
+ dev_err(dev, "No RST method\n");
+ return -EIO;
+ }
+
+ if (data) {
+ dev_err(dev, "Failed to Reset\n");
+ return -EIO;
+ }
+
+ return 0;
+}
+
+static int hisi_pcie_port_do_recovery(struct platform_device *dev,
+ u32 chip_id, u32 port_id)
+{
+ acpi_status s;
+ struct device *device = &dev->dev;
+ acpi_handle root_handle = ACPI_HANDLE(device);
+ struct acpi_pci_root *pci_root;
+ struct pci_bus *root_bus;
+ struct pci_dev *pdev;
+ u32 domain, busnr, devfn;
+
+ s = acpi_get_parent(root_handle, &root_handle);
+ if (ACPI_FAILURE(s))
+ return -ENODEV;
+ pci_root = acpi_pci_find_root(root_handle);
+ if (!pci_root)
+ return -ENODEV;
+ root_bus = pci_root->bus;
+ domain = pci_root->segment;
+
+ busnr = root_bus->number;
+ devfn = PCI_DEVFN(port_id, 0);
+ pdev = pci_get_domain_bus_and_slot(domain, busnr, devfn);
+ if (!pdev) {
+ dev_info(device, "Fail to get root port %04x:%02x:%02x.%d device\n",
+ domain, busnr, PCI_SLOT(devfn), PCI_FUNC(devfn));
+ return -ENODEV;
+ }
+
+ pci_stop_and_remove_bus_device_locked(pdev);
+ pci_dev_put(pdev);
+
+ if (hisi_pcie_port_reset(dev, chip_id, port_id))
+ return -EIO;
+
+ /*
+ * The initialization time of subordinate devices after
+ * hot reset is no more than 1s, which is required by
+ * the PCI spec v5.0 sec 6.6.1. The time will shorten
+ * if Readiness Notifications mechanisms are used. But
+ * wait 1s here to adapt any conditions.
+ */
+ ssleep(1UL);
+
+ /* add root port and downstream devices */
+ pci_lock_rescan_remove();
+ pci_rescan_bus(root_bus);
+ pci_unlock_rescan_remove();
+
+ return 0;
+}
+
+static void hisi_pcie_handle_error(const struct hisi_pcie_error_data *error,
+ struct platform_device *pdev)
+{
+ char buf[HISI_PCIE_ERR_INFO_SIZE];
+ char *p = buf, *end = buf + sizeof(buf);
+ struct device *dev = &pdev->dev;
+ u32 i;
+ int rc;
+
+ if (error->val_bits == 0) {
+ dev_warn(dev, "%s: no valid error information\n", __func__);
+ return;
+ }
+
+ /* Logging */
+ p += snprintf(p, end - p, "[ Table version=%d ", error->version);
+ if (error->val_bits & HISI_PCIE_LOCAL_VALID_SOC_ID)
+ p += snprintf(p, end - p, "SOC ID=%d ", error->soc_id);
+
+ if (error->val_bits & HISI_PCIE_LOCAL_VALID_SOCKET_ID)
+ p += snprintf(p, end - p, "socket ID=%d ", error->socket_id);
+
+ if (error->val_bits & HISI_PCIE_LOCAL_VALID_NIMBUS_ID)
+ p += snprintf(p, end - p, "nimbus ID=%d ", error->nimbus_id);
+
+ if (error->val_bits & HISI_PCIE_LOCAL_VALID_SUB_MODULE_ID)
+ p += snprintf(p, end - p, "sub module=%s ",
+ hisi_pcie_sub_module_name(error->sub_module_id));
+
+ if (error->val_bits & HISI_PCIE_LOCAL_VALID_CORE_ID)
+ p += snprintf(p, end - p, "core ID=core%d ", error->core_id);
+
+ if (error->val_bits & HISI_PCIE_LOCAL_VALID_PORT_ID)
+ p += snprintf(p, end - p, "port ID=port%d ", error->port_id);
+
+ if (error->val_bits & HISI_PCIE_LOCAL_VALID_ERR_SEVERITY)
+ p += snprintf(p, end - p, "error severity=%s ",
+ hisi_pcie_error_severity(error->err_severity));
+
+ if (error->val_bits & HISI_PCIE_LOCAL_VALID_ERR_TYPE)
+ p += snprintf(p, end - p, "error type=0x%x ", error->err_type);
+
+ p += snprintf(p, end - p, "]\n");
+ dev_info(dev, "\nHISI : HIP : PCIe controller error\n");
+ dev_info(dev, "%s\n", buf);
+
+ dev_info(dev, "Reg Dump:\n");
+ for (i = 0; i < HISI_PCIE_ERR_MISC_REGS; i++) {
+ if (error->val_bits &
+ BIT_ULL(HISI_PCIE_LOCAL_VALID_ERR_MISC + i))
+ dev_info(dev,
+ "ERR_MISC_%d=0x%x\n", i, error->err_misc[i]);
+ }
+
+ /* Recovery for the PCIe controller errors */
+ if (error->err_severity == HISI_ERR_SEV_RECOVERABLE) {
+ /* try reset PCI port for the error recovery */
+ rc = hisi_pcie_port_do_recovery(pdev, error->socket_id,
+ HISI_PCIE_PORT_ID(error->core_id, error->port_id));
+ if (rc) {
+ dev_info(dev, "fail to do hisi pcie port reset\n");
+ return;
+ }
+ }
+}
+
+static int hisi_pcie_notify_error(struct notifier_block *nb,
+ unsigned long event, void *data)
+{
+ struct acpi_hest_generic_data *gdata = data;
+ const struct hisi_pcie_error_data *error_data =
+ acpi_hest_get_payload(gdata);
+ struct hisi_pcie_error_private *priv =
+ container_of(nb, struct hisi_pcie_error_private, nb);
+ struct platform_device *pdev = priv->pdev;
+ struct device *dev = &pdev->dev;
+ u8 socket;
+
+ if (device_property_read_u8(dev, "socket", &socket))
+ return NOTIFY_DONE;
+
+ if (!guid_equal((guid_t *)gdata->section_type, &hisi_pcie_sec_type) ||
+ error_data->socket_id != socket)
+ return NOTIFY_DONE;
+
+ hisi_pcie_handle_error(error_data, pdev);
+
+ return NOTIFY_OK;
+}
+
+static int hisi_pcie_error_handler_probe(struct platform_device *pdev)
+{
+ struct hisi_pcie_error_private *priv;
+ int ret;
+
+ priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
+ if (!priv)
+ return -ENOMEM;
+
+ priv->nb.notifier_call = hisi_pcie_notify_error;
+ priv->pdev = pdev;
+ ret = ghes_register_event_notifier(&priv->nb);
+ if (ret) {
+ dev_err(&pdev->dev, "%s : ghes_register_event_notifier fail\n",
+ __func__);
+ return ret;
+ }
+
+ platform_set_drvdata(pdev, priv);
+
+ return 0;
+}
+
+static int hisi_pcie_error_handler_remove(struct platform_device *pdev)
+{
+ struct hisi_pcie_error_private *priv = platform_get_drvdata(pdev);
+
+ ghes_unregister_event_notifier(&priv->nb);
+ kfree(priv);
+
+ return 0;
+}
+
+static const struct acpi_device_id hisi_pcie_acpi_match[] = {
+ { "HISI0361", 0 },
+ { }
+};
+
+static struct platform_driver hisi_pcie_error_handler_driver = {
+ .driver = {
+ .name = "hisi-pcie-error-handler",
+ .acpi_match_table = hisi_pcie_acpi_match,
+ },
+ .probe = hisi_pcie_error_handler_probe,
+ .remove = hisi_pcie_error_handler_remove,
+};
+module_platform_driver(hisi_pcie_error_handler_driver);
+
+MODULE_DESCRIPTION("HiSilicon HIP PCIe controller error handling driver");
+MODULE_LICENSE("GPL v2");
--
2.17.1
^ permalink raw reply related
* [PATCH RESEND v8 1/2] ACPI / APEI: Add support to notify the vendor specific HW errors
From: Shiju Jose @ 2020-05-29 20:04 UTC (permalink / raw)
To: linux-acpi, linux-pci, linux-kernel, rjw, bp, james.morse,
helgaas, lenb, tony.luck, dan.carpenter, gregkh, zhangliguang,
tglx
Cc: Shiju Jose, linuxarm, yangyicong
Add support to report the vendor specific non-fatal HW errors
to the drivers for the error recovery.
Signed-off-by: Shiju Jose <shiju.jose@huawei.com>
---
drivers/acpi/apei/ghes.c | 130 ++++++++++++++++++++++++++++++++++++++-
include/acpi/ghes.h | 28 +++++++++
2 files changed, 157 insertions(+), 1 deletion(-)
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index 24c9642e8fc7..2d10709b2eb5 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -33,6 +33,7 @@
#include <linux/irq_work.h>
#include <linux/llist.h>
#include <linux/genalloc.h>
+#include <linux/kfifo.h>
#include <linux/pci.h>
#include <linux/pfn.h>
#include <linux/aer.h>
@@ -63,6 +64,11 @@
#define GHES_ESTATUS_CACHES_SIZE 4
#define GHES_ESTATUS_IN_CACHE_MAX_NSEC 10000000000ULL
+
+#define GHES_EVENT_RING_SIZE 256
+#define GHES_GDATA_POOL_MIN_ALLOC_ORDER 3
+#define GHES_GDATA_POOL_MIN_SIZE 65536
+
/* Prevent too many caches are allocated because of RCU */
#define GHES_ESTATUS_CACHE_ALLOCED_MAX (GHES_ESTATUS_CACHES_SIZE * 3 / 2)
@@ -122,6 +128,19 @@ static DEFINE_MUTEX(ghes_list_mutex);
*/
static DEFINE_SPINLOCK(ghes_notify_lock_irq);
+struct ghes_event_entry {
+ struct acpi_hest_generic_data *gdata;
+ int error_severity;
+};
+
+static DEFINE_KFIFO(ghes_event_ring, struct ghes_event_entry,
+ GHES_EVENT_RING_SIZE);
+
+static DEFINE_SPINLOCK(ghes_event_ring_lock);
+
+static struct gen_pool *ghes_gdata_pool;
+static unsigned long ghes_gdata_pool_size_request;
+
static struct gen_pool *ghes_estatus_pool;
static unsigned long ghes_estatus_pool_size_request;
@@ -188,6 +207,40 @@ int ghes_estatus_pool_init(int num_ghes)
return -ENOMEM;
}
+int ghes_gdata_pool_init(void)
+{
+ unsigned long addr, len;
+ int rc;
+
+ ghes_gdata_pool = gen_pool_create(GHES_GDATA_POOL_MIN_ALLOC_ORDER, -1);
+ if (!ghes_gdata_pool)
+ return -ENOMEM;
+
+ if (ghes_gdata_pool_size_request < GHES_GDATA_POOL_MIN_SIZE)
+ ghes_gdata_pool_size_request = GHES_GDATA_POOL_MIN_SIZE;
+
+ len = ghes_gdata_pool_size_request;
+ addr = (unsigned long)vmalloc(PAGE_ALIGN(len));
+ if (!addr)
+ goto err_pool_alloc;
+
+ vmalloc_sync_mappings();
+
+ rc = gen_pool_add(ghes_gdata_pool, addr, PAGE_ALIGN(len), -1);
+ if (rc)
+ goto err_pool_add;
+
+ return 0;
+
+err_pool_add:
+ vfree((void *)addr);
+
+err_pool_alloc:
+ gen_pool_destroy(ghes_gdata_pool);
+
+ return -ENOMEM;
+}
+
static int map_gen_v2(struct ghes *ghes)
{
return apei_map_generic_address(&ghes->generic_v2->read_ack_register);
@@ -247,6 +300,10 @@ static struct ghes *ghes_new(struct acpi_hest_generic *generic)
goto err_unmap_status_addr;
}
+ ghes_gdata_pool_size_request += generic->records_to_preallocate *
+ generic->max_sections_per_record *
+ generic->max_raw_data_length;
+
return ghes;
err_unmap_status_addr:
@@ -490,6 +547,68 @@ static void ghes_handle_aer(struct acpi_hest_generic_data *gdata)
#endif
}
+static BLOCKING_NOTIFIER_HEAD(ghes_event_notify_list);
+
+/**
+ * ghes_register_event_notifier - register an event notifier
+ * for the non-fatal HW errors.
+ * @nb: pointer to the notifier_block structure of the event handler.
+ *
+ * return 0 : SUCCESS, non-zero : FAIL
+ */
+int ghes_register_event_notifier(struct notifier_block *nb)
+{
+ return blocking_notifier_chain_register(&ghes_event_notify_list, nb);
+}
+EXPORT_SYMBOL_GPL(ghes_register_event_notifier);
+
+/**
+ * ghes_unregister_event_notifier - unregister the previously
+ * registered event notifier.
+ * @nb: pointer to the notifier_block structure of the event handler.
+ */
+void ghes_unregister_event_notifier(struct notifier_block *nb)
+{
+ blocking_notifier_chain_unregister(&ghes_event_notify_list, nb);
+}
+EXPORT_SYMBOL_GPL(ghes_unregister_event_notifier);
+
+static void ghes_event_work_func(struct work_struct *work)
+{
+ struct ghes_event_entry entry;
+ u32 len;
+
+ while (kfifo_get(&ghes_event_ring, &entry)) {
+ blocking_notifier_call_chain(&ghes_event_notify_list,
+ entry.error_severity,
+ entry.gdata);
+ len = acpi_hest_get_record_size(entry.gdata);
+ gen_pool_free(ghes_gdata_pool, (unsigned long)entry.gdata, len);
+ }
+}
+
+static DECLARE_WORK(ghes_event_work, ghes_event_work_func);
+
+static void ghes_handle_non_standard_event(struct acpi_hest_generic_data *gdata,
+ int sev)
+{
+ u32 len;
+ struct ghes_event_entry event_entry;
+
+ len = acpi_hest_get_record_size(gdata);
+ event_entry.gdata = (void *)gen_pool_alloc(ghes_gdata_pool, len);
+ if (event_entry.gdata) {
+ memcpy(event_entry.gdata, gdata, len);
+ event_entry.error_severity = sev;
+
+ if (kfifo_in_spinlocked(&ghes_event_ring, &event_entry, 1,
+ &ghes_event_ring_lock))
+ schedule_work(&ghes_event_work);
+ else
+ pr_warn(GHES_PFX "ghes event queue full\n");
+ }
+}
+
static void ghes_do_proc(struct ghes *ghes,
const struct acpi_hest_generic_status *estatus)
{
@@ -527,6 +646,7 @@ static void ghes_do_proc(struct ghes *ghes,
} else {
void *err = acpi_hest_get_payload(gdata);
+ ghes_handle_non_standard_event(gdata, sev);
log_non_standard_event(sec_type, fru_id, fru_text,
sec_sev, err,
gdata->error_data_length);
@@ -1334,7 +1454,7 @@ static int __init ghes_init(void)
rc = platform_driver_register(&ghes_platform_driver);
if (rc)
- goto err;
+ goto exit;
rc = apei_osc_setup();
if (rc == 0 && osc_sb_apei_support_acked)
@@ -1346,8 +1466,16 @@ static int __init ghes_init(void)
else
pr_info(GHES_PFX "Failed to enable APEI firmware first mode.\n");
+ rc = ghes_gdata_pool_init();
+ if (rc) {
+ pr_warn(GHES_PFX "ghes_gdata_pool_init failed\n");
+ goto err;
+ }
+
return 0;
err:
+ platform_driver_unregister(&ghes_platform_driver);
+exit:
return rc;
}
device_initcall(ghes_init);
diff --git a/include/acpi/ghes.h b/include/acpi/ghes.h
index e3f1cddb4ac8..a3dd82069069 100644
--- a/include/acpi/ghes.h
+++ b/include/acpi/ghes.h
@@ -50,6 +50,34 @@ enum {
GHES_SEV_PANIC = 0x3,
};
+
+#ifdef CONFIG_ACPI_APEI_GHES
+/**
+ * ghes_register_event_notifier - register an event notifier
+ * for the non-fatal HW errors.
+ * @nb: pointer to the notifier_block structure of the event notifier.
+ *
+ * Return : 0 - SUCCESS, non-zero - FAIL.
+ */
+int ghes_register_event_notifier(struct notifier_block *nb);
+
+/**
+ * ghes_unregister_event_notifier - unregister the previously
+ * registered event notifier.
+ * @nb: pointer to the notifier_block structure of the event notifier.
+ */
+void ghes_unregister_event_notifier(struct notifier_block *nb);
+#else
+static inline int ghes_register_event_notifier(struct notifier_block *nb)
+{
+ return -ENODEV;
+}
+
+static inline void ghes_unregister_event_notifier(struct notifier_block *nb)
+{
+}
+#endif
+
int ghes_estatus_pool_init(int num_ghes);
/* From drivers/edac/ghes_edac.c */
--
2.17.1
^ permalink raw reply related
* [PATCH RESEND v8 0/2] ACPI / APEI: Add support to notify the vendor specific HW errors
From: Shiju Jose @ 2020-05-29 20:04 UTC (permalink / raw)
To: linux-acpi, linux-pci, linux-kernel, rjw, bp, james.morse,
helgaas, lenb, tony.luck, dan.carpenter, gregkh, zhangliguang,
tglx
Cc: Shiju Jose, linuxarm, yangyicong
Presently the vendor drivers are unable to do the recovery for the
vendor specific recoverable HW errors because APEI driver does not
support reporting the error to the vendor drivers.
patch set
1. add new interface to the APEI driver for reporting the
vendor specific non-fatal HW errors to the drivers.
2. add driver to handle HiSilicon hip PCIe controller's errors.
V8:
1. Removed reporting the standard errors through the interface
because of the conflict with the recent patches in the
memory error handling path.
2. Fix comments by Dan Carpenter.
V7:
1. Add changes in the APEI driver suggested by Borislav Petkov, for
queuing up all the non-fatal HW errors to the work queue and
notify the registered kernel drivers from the bottom half using
blocking notifier, common interface for both standard and
vendor-spcific errors.
2. Fix for further feedbacks in v5 HIP PCIe error handler driver
by Bjorn Helgaas.
V6:
1. Fix few changes in the patch subject line suggested by Bjorn Helgaas.
V5:
1. Fix comments from James Morse.
1.1 Changed the notification method to use the atomic_notifier_chain.
1.2 Add the error handled status for the user space.
V4:
1. Fix for the following smatch warning in the PCIe error driver,
reported by kbuild test robot<lkp@intel.com>:
warn: should '((((1))) << (9 + i))' be a 64 bit type?
if (err->val_bits & BIT(HISI_PCIE_LOCAL_VALID_ERR_MISC + i))
^^^ This should be BIT_ULL() because it goes up to 9 + 32.
V3:
1. Fix the comments from Bjorn Helgaas.
V2:
1. Changes in the HiSilicon PCIe controller's error handling driver
for the comments from Bjorn Helgaas.
2. Changes in the APEI interface to support reporting the vendor error
for module with multiple devices, but use the same section type.
In the error handler will use socket id/sub module id etc to distinguish
the device.
V1:
1. Fix comments from James Morse.
2. add driver to handle HiSilicon hip08 PCIe controller's errors,
which is an application of the above interface.
Shiju Jose (1):
ACPI / APEI: Add support to notify the vendor specific HW errors To:
linux-acpi@vger.kernel.org,linux-pci@vger.kernel.org,linux-kernel@vger.kernel.org,rjw@rjwysocki.net,bp@alien8.de,james.morse@arm.com,helgaas@kernel.org,lenb@kernel.org,tony.luck@intel.com,dan.carpenter@oracle.com,gregkh@linuxfoundation.org,zhangliguang@linux.alibaba.com,tglx@linutronix.de
Cc: linuxarm@huawei.com,yangyicong@hisilicon.com
Yicong Yang (1):
PCI: hip: Add handling of HiSilicon HIP PCIe controller errors
drivers/acpi/apei/ghes.c | 130 ++++++++-
drivers/pci/controller/Kconfig | 8 +
drivers/pci/controller/Makefile | 1 +
drivers/pci/controller/pcie-hisi-error.c | 321 +++++++++++++++++++++++
include/acpi/ghes.h | 28 ++
5 files changed, 487 insertions(+), 1 deletion(-)
create mode 100644 drivers/pci/controller/pcie-hisi-error.c
--
2.17.1
^ permalink raw reply
* Re: pull request (net): ipsec 2020-05-29
From: David Miller @ 2020-05-29 20:06 UTC (permalink / raw)
To: steffen.klassert; +Cc: herbert, netdev
In-Reply-To: <20200529110408.6349-1-steffen.klassert@secunet.com>
From: Steffen Klassert <steffen.klassert@secunet.com>
Date: Fri, 29 May 2020 13:03:53 +0200
> 1) Several fixes for ESP gro/gso in transport and beet mode when
> IPv6 extension headers are present. From Xin Long.
>
> 2) Fix a wrong comment on XFRMA_OFFLOAD_DEV.
> From Antony Antony.
>
> 3) Fix sk_destruct callback handling on ESP in TCP encapsulation.
> From Sabrina Dubroca.
>
> 4) Fix a use after free in xfrm_output_gso when used with vxlan.
> From Xin Long.
>
> 5) Fix secpath handling of VTI when used wiuth IPCOMP.
> From Xin Long.
>
> 6) Fix an oops when deleting a x-netns xfrm interface.
> From Nicolas Dichtel.
>
> 7) Fix a possible warning on policy updates. We had a case where it was
> possible to add two policies with the same lookup keys.
> From Xin Long.
>
> Please pull or let me know if there are problems.
Applied, thanks Steffen.
^ permalink raw reply
* [PATCH] ASoC: SOF: Intel: byt: fix unused-function warnings
From: Arnd Bergmann @ 2020-05-29 20:04 UTC (permalink / raw)
To: Pierre-Louis Bossart, Liam Girdwood, Ranjani Sridharan,
Kai Vehmanen, Daniel Baluta, Mark Brown
Cc: alsa-devel, Arnd Bergmann, Keyon Jie, YueHaibing, Takashi Iwai,
linux-kernel, sound-open-firmware
Several functions in this driver are only referenced for baytrail-class
configurations and building configurations with only merrifield enabled
causes a warning:
sound/soc/sof/intel/byt.c:447:12: error: unused function 'byt_suspend' [-Werror,-Wunused-function]
static int byt_suspend(struct snd_sof_dev *sdev, u32 target_state)
^
sound/soc/sof/intel/byt.c:454:12: error: unused function 'byt_resume' [-Werror,-Wunused-function]
static int byt_resume(struct snd_sof_dev *sdev)
^
sound/soc/sof/intel/byt.c:464:12: error: unused function 'byt_remove' [-Werror,-Wunused-function]
static int byt_remove(struct snd_sof_dev *sdev)
Move these into a corresponding #ifdef section.
Fixes: c691f0c6e267 ("ASoC: SOF: Intel: BYT: add .remove op")
Fixes: ddcccd543f5d ("ASoC: SOF: Intel: byt: Add PM callbacks")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
sound/soc/sof/intel/byt.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/sof/intel/byt.c b/sound/soc/sof/intel/byt.c
index e6ba8382b1de..6ae62a8a9daf 100644
--- a/sound/soc/sof/intel/byt.c
+++ b/sound/soc/sof/intel/byt.c
@@ -432,6 +432,7 @@ static void byt_set_mach_params(const struct snd_soc_acpi_mach *mach,
mach_params->platform = dev_name(dev);
}
+#if IS_ENABLED(CONFIG_SND_SOC_SOF_BAYTRAIL)
static void byt_reset_dsp_disable_int(struct snd_sof_dev *sdev)
{
/* Disable Interrupt from both sides */
@@ -467,6 +468,7 @@ static int byt_remove(struct snd_sof_dev *sdev)
return 0;
}
+#endif
/* Baytrail DAIs */
static struct snd_soc_dai_driver byt_dai[] = {
--
2.26.2
^ permalink raw reply related
* [Buildroot] [git commit] package/mp4v2: security bump to version 4.1.3
From: Peter Korsgaard @ 2020-05-29 20:05 UTC (permalink / raw)
To: buildroot
commit: https://git.buildroot.net/buildroot/commit/?id=0a860f21e1b8004ee937c20d54d29a5e66f96651
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master
- Switch site to an active fork
- Send patch upstream
- Update indentation in hash file (two spaces)
- Fix the following CVEs:
- CVE-2018-14054: A double free exists in the MP4StringProperty class
in mp4property.cpp in MP4v2 2.0.0. A dangling pointer is freed again
in the destructor once an exception is triggered.
Fixed by
https://github.com/TechSmith/mp4v2/commit/f09cceeee5bd7f783fd31f10e8b3c440ccf4c743
- CVE-2018-14325: In MP4v2 2.0.0, there is an integer underflow (with
resultant memory corruption) when parsing MP4Atom in mp4atom.cpp.
Fixed by
https://github.com/TechSmith/mp4v2/commit/e475013c6ef78093055a02b0d035eda0f9f01451
- CVE-2018-14326: In MP4v2 2.0.0, there is an integer overflow (with
resultant memory corruption) when resizing MP4Array for the ftyp
atom in mp4array.h.
Fixed by
https://github.com/TechSmith/mp4v2/commit/70d823ccd8e2d7d0ed9e62fb7e8983d21e6acbeb
- CVE-2018-14379: MP4Atom::factory in mp4atom.cpp in MP4v2 2.0.0
incorrectly uses the MP4ItemAtom data type in a certain case where
MP4DataAtom is required, which allows remote attackers to cause a
denial of service (memory corruption) or possibly have unspecified
other impact via a crafted MP4 file, because access to the data
structure has different expectations about layout as a result of
this type confusion.
Fixed by
https://github.com/TechSmith/mp4v2/commit/73f38b4296aeb38617fa3923018bb78671c3b833
- CVE-2018-14403: MP4NameFirstMatches in mp4util.cpp in MP4v2 2.0.0
mishandles substrings of atom names, leading to use of an
inappropriate data type for associated atoms. The resulting type
confusion can cause out-of-bounds memory access.
Fixed by
https://github.com/TechSmith/mp4v2/commit/51cb6b36f6c8edf9f195d5858eac9ba18b334a16
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
package/mp4v2/0001-Fix-GCC7-build.patch | 1 +
package/mp4v2/Config.in | 2 +-
package/mp4v2/mp4v2.hash | 3 +--
package/mp4v2/mp4v2.mk | 6 +++---
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/package/mp4v2/0001-Fix-GCC7-build.patch b/package/mp4v2/0001-Fix-GCC7-build.patch
index 90222c10ae..4e39be4a79 100644
--- a/package/mp4v2/0001-Fix-GCC7-build.patch
+++ b/package/mp4v2/0001-Fix-GCC7-build.patch
@@ -10,6 +10,7 @@ no encoding parameters ppEncodingParams will be returned as a pointer to
an empty string rather than as a null pointer
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
+[Upstream status: https://github.com/TechSmith/mp4v2/pull/36]
---
src/rtphint.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/mp4v2/Config.in b/package/mp4v2/Config.in
index 490ebac9fd..172d1baabe 100644
--- a/package/mp4v2/Config.in
+++ b/package/mp4v2/Config.in
@@ -5,7 +5,7 @@ config BR2_PACKAGE_MP4V2
The MP4v2 library provides functions to read, create, and
modify mp4 files.
- https://code.google.com/archive/p/mp4v2/
+ https://github.com/TechSmith/mp4v2/
if BR2_PACKAGE_MP4V2
diff --git a/package/mp4v2/mp4v2.hash b/package/mp4v2/mp4v2.hash
index d75c1994d9..85fce49384 100644
--- a/package/mp4v2/mp4v2.hash
+++ b/package/mp4v2/mp4v2.hash
@@ -1,4 +1,3 @@
-# From https://code.google.com/p/mp4v2/downloads/detail?name=mp4v2-2.0.0.tar.bz2
-sha1 193260cfb7201e6ec250137bcca1468d4d20e2f0 mp4v2-2.0.0.tar.bz2
# Locally computed
+sha256 e3ad6c2dc451b0875dbe34bfe7f51f4fe278b391434c886083e6d3ecd5fa08c2 mp4v2-4.1.3.tar.gz
sha256 15e38684c940176e2fc76331a2299d2ab5115ac997078f768ef31b896af69fc5 COPYING
diff --git a/package/mp4v2/mp4v2.mk b/package/mp4v2/mp4v2.mk
index b6b7d9ae5e..478d10d472 100644
--- a/package/mp4v2/mp4v2.mk
+++ b/package/mp4v2/mp4v2.mk
@@ -4,9 +4,9 @@
#
################################################################################
-MP4V2_VERSION = 2.0.0
-MP4V2_SOURCE = mp4v2-$(MP4V2_VERSION).tar.bz2
-MP4V2_SITE = https://mp4v2.googlecode.com/files
+MP4V2_VERSION = 4.1.3
+MP4V2_SITE = \
+ $(call github,TechSmith,mp4v2,Release-ThirdParty-MP4v2-$(MP4V2_VERSION))
MP4V2_INSTALL_STAGING = YES
MP4V2_LICENSE = MPL-1.1
MP4V2_LICENSE_FILES = COPYING
^ permalink raw reply related
* [PATCH] cpuidle/firmware: qcom: fix smcc dependencies
From: Arnd Bergmann @ 2020-05-29 20:04 UTC (permalink / raw)
To: Rafael J. Wysocki, Daniel Lezcano, Stephan Gerhold, Lina Iyer,
Ulf Hansson, Bjorn Andersson
Cc: Arnd Bergmann, Rafael J. Wysocki, Lorenzo Pieralisi,
Krzysztof Kozlowski, Dmitry Osipenko, linux-pm, linux-kernel
Selecting QCOM_SCM for compile-tests is broken when the smcc firmware
is not provided:
drivers/firmware/qcom_scm-smc.o: in function `scm_smc_call':
qcom_scm-smc.c:(.text+0x110): undefined reference to `__arm_smccc_smc'
drivers/firmware/qcom_scm-legacy.o: in function `scm_legacy_call':
qcom_scm-smc.c:(.text+0x1bc): undefined reference to `__arm_smccc_smc'
Add a Kconfig dependency for the QCOM_SCM to make it easier to catch
this, and fix the dependency for the newly added ARM_QCOM_SPM_CPUIDLE
symbol that triggered it this time.
Fixes: a871be6b8eee ("cpuidle: Convert Qualcomm SPM driver to a generic CPUidle driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
As the bug is currently only present in the cpuidle tree, can we
merge it through that?
---
drivers/cpuidle/Kconfig.arm | 3 ++-
drivers/firmware/Kconfig | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/cpuidle/Kconfig.arm b/drivers/cpuidle/Kconfig.arm
index 51a7e89085c0..6cdcf5698c4c 100644
--- a/drivers/cpuidle/Kconfig.arm
+++ b/drivers/cpuidle/Kconfig.arm
@@ -97,7 +97,8 @@ config ARM_TEGRA_CPUIDLE
config ARM_QCOM_SPM_CPUIDLE
bool "CPU Idle Driver for Qualcomm Subsystem Power Manager (SPM)"
- depends on (ARCH_QCOM || COMPILE_TEST) && !ARM64
+ depends on ARCH_QCOM || (COMPILE_TEST && HAVE_ARM_SMCCC)
+ depends on ARM
select ARM_CPU_SUSPEND
select CPU_IDLE_MULTIPLE_DRIVERS
select DT_IDLE_STATES
diff --git a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig
index fbd785dd0513..297bed30a632 100644
--- a/drivers/firmware/Kconfig
+++ b/drivers/firmware/Kconfig
@@ -238,6 +238,7 @@ config INTEL_STRATIX10_RSU
config QCOM_SCM
bool
depends on ARM || ARM64
+ depends on HAVE_ARM_SMCCC
select RESET_CONTROLLER
config QCOM_SCM_DOWNLOAD_MODE_DEFAULT
--
2.26.2
^ permalink raw reply related
* [PATCH] ASoC: SOF: Intel: byt: fix unused-function warnings
From: Arnd Bergmann @ 2020-05-29 20:04 UTC (permalink / raw)
To: Pierre-Louis Bossart, Liam Girdwood, Ranjani Sridharan,
Kai Vehmanen, Daniel Baluta, Mark Brown
Cc: Arnd Bergmann, Jaroslav Kysela, Takashi Iwai, Keyon Jie,
YueHaibing, sound-open-firmware, alsa-devel, linux-kernel
Several functions in this driver are only referenced for baytrail-class
configurations and building configurations with only merrifield enabled
causes a warning:
sound/soc/sof/intel/byt.c:447:12: error: unused function 'byt_suspend' [-Werror,-Wunused-function]
static int byt_suspend(struct snd_sof_dev *sdev, u32 target_state)
^
sound/soc/sof/intel/byt.c:454:12: error: unused function 'byt_resume' [-Werror,-Wunused-function]
static int byt_resume(struct snd_sof_dev *sdev)
^
sound/soc/sof/intel/byt.c:464:12: error: unused function 'byt_remove' [-Werror,-Wunused-function]
static int byt_remove(struct snd_sof_dev *sdev)
Move these into a corresponding #ifdef section.
Fixes: c691f0c6e267 ("ASoC: SOF: Intel: BYT: add .remove op")
Fixes: ddcccd543f5d ("ASoC: SOF: Intel: byt: Add PM callbacks")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
sound/soc/sof/intel/byt.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/sof/intel/byt.c b/sound/soc/sof/intel/byt.c
index e6ba8382b1de..6ae62a8a9daf 100644
--- a/sound/soc/sof/intel/byt.c
+++ b/sound/soc/sof/intel/byt.c
@@ -432,6 +432,7 @@ static void byt_set_mach_params(const struct snd_soc_acpi_mach *mach,
mach_params->platform = dev_name(dev);
}
+#if IS_ENABLED(CONFIG_SND_SOC_SOF_BAYTRAIL)
static void byt_reset_dsp_disable_int(struct snd_sof_dev *sdev)
{
/* Disable Interrupt from both sides */
@@ -467,6 +468,7 @@ static int byt_remove(struct snd_sof_dev *sdev)
return 0;
}
+#endif
/* Baytrail DAIs */
static struct snd_soc_dai_driver byt_dai[] = {
--
2.26.2
^ permalink raw reply related
* RE: [PATCH v8 0/2] ACPI / APEI: Add support to notify the vendor specific HW errors
From: Shiju Jose @ 2020-05-29 20:05 UTC (permalink / raw)
To: linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org, rjw@rjwysocki.net, bp@alien8.de,
james.morse@arm.com, helgaas@kernel.org, lenb@kernel.org,
tony.luck@intel.com, dan.carpenter@oracle.com,
gregkh@linuxfoundation.org, zhangliguang@linux.alibaba.com,
tglx@linutronix.de
Cc: Linuxarm, yangyicong
In-Reply-To: <20200529173854.2521-1-shiju.jose@huawei.com>
Please ignore this patch set. Resending soon.
Thanks,
Shiju
>-----Original Message-----
>From: Shiju Jose
>Sent: 29 May 2020 18:39
>To: linux-acpi@vger.kernel.org; linux-pci@vger.kernel.org; linux-
>kernel@vger.kernel.org; rjw@rjwysocki.net; bp@alien8.de;
>james.morse@arm.com; helgaas@kernel.org; lenb@kernel.org;
>tony.luck@intel.com; dan.carpenter@oracle.com;
>gregkh@linuxfoundation.org; zhangliguang@linux.alibaba.com;
>tglx@linutronix.de
>Cc: Shiju Jose <shiju.jose@huawei.com>; Linuxarm <linuxarm@huawei.com>;
>yangyicong <yangyicong@huawei.com>
>Subject: [PATCH v8 0/2] ACPI / APEI: Add support to notify the vendor
>specific HW errors
>
>Presently the vendor drivers are unable to do the recovery for the vendor
>specific recoverable HW errors because APEI driver does not support
>reporting the error to the vendor drivers.
>
>patch set
>1. add new interface to the APEI driver for reporting the
> vendor specific non-fatal HW errors to the drivers.
>
>2. add driver to handle HiSilicon hip PCIe controller's errors.
>
>V8:
>1. Removed reporting the standard errors through the interface
> because of the conflict with the changes in the
> memory error handling path.
>2. Fix comments by Dan Carpenter.
>
>V7:
>1. Add changes in the APEI driver suggested by Borislav Petkov, for
> queuing up all the non-fatal HW errors to the work queue and
> notify the registered kernel drivers from the bottom half using
> blocking notifier, common interface for both standard and
> vendor-spcific errors.
>2. Fix for further feedbacks in v5 HIP PCIe error handler driver
> by Bjorn Helgaas.
>
>V6:
>1. Fix few changes in the patch subject line suggested by Bjorn Helgaas.
>
>V5:
>1. Fix comments from James Morse.
>1.1 Changed the notification method to use the atomic_notifier_chain.
>1.2 Add the error handled status for the user space.
>
>V4:
>1. Fix for the following smatch warning in the PCIe error driver,
> reported by kbuild test robot<lkp@intel.com>:
> warn: should '((((1))) << (9 + i))' be a 64 bit type?
> if (err->val_bits & BIT(HISI_PCIE_LOCAL_VALID_ERR_MISC + i))
> ^^^ This should be BIT_ULL() because it goes up to 9 + 32.
>
>V3:
>1. Fix the comments from Bjorn Helgaas.
>
>V2:
>1. Changes in the HiSilicon PCIe controller's error handling driver
> for the comments from Bjorn Helgaas.
>
>2. Changes in the APEI interface to support reporting the vendor error
> for module with multiple devices, but use the same section type.
> In the error handler will use socket id/sub module id etc to distinguish
> the device.
>
>V1:
>1. Fix comments from James Morse.
>
>2. add driver to handle HiSilicon hip08 PCIe controller's errors,
> which is an application of the above interface.
>
>Shiju Jose (1):
> ACPI / APEI: Add support to notify the vendor specific HW errors
>
>Yicong Yang (1):
> PCI: hip: Add handling of HiSilicon HIP PCIe controller errors
>
> drivers/acpi/apei/ghes.c | 126 ++++++++-
> drivers/pci/controller/Kconfig | 8 +
> drivers/pci/controller/Makefile | 1 +
> drivers/pci/controller/pcie-hisi-error.c | 321 +++++++++++++++++++++++
> include/acpi/ghes.h | 28 ++
> 5 files changed, 483 insertions(+), 1 deletion(-) create mode 100644
>drivers/pci/controller/pcie-hisi-error.c
>
>--
>2.17.1
>
^ permalink raw reply
* [MPTCP] Re: Crashers on netnext with apache-benchmark
From: Paolo Abeni @ 2020-05-29 20:04 UTC (permalink / raw)
To: mptcp
[-- Attachment #1: Type: text/plain, Size: 4433 bytes --]
On Tue, 2020-05-26 at 17:28 -0700, Christoph Paasch wrote:
> And another one:
>
> [ 62.586401] ==================================================================
> [ 62.588813] BUG: KASAN: use-after-free in inet_twsk_bind_unhash+0x5f/0xe0
> [ 62.589975] Write of size 8 at addr ffff88810f155a20 by task ksoftirqd/2/21
> [ 62.591194]
> [ 62.591485] CPU: 2 PID: 21 Comm: ksoftirqd/2 Kdump: loaded Not tainted 5.7.0-rc6.mptcp #36
> [ 62.593067] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014
> [ 62.595268] Call Trace:
> [ 62.595775] dump_stack+0x76/0xa0
> [ 62.596448] print_address_description.constprop.0+0x3a/0x60
> [ 62.600581] __kasan_report.cold+0x20/0x3b
> [ 62.602968] kasan_report+0x38/0x50
> [ 62.603561] inet_twsk_bind_unhash+0x5f/0xe0
> [ 62.604282] inet_twsk_kill+0x195/0x200
> [ 62.604945] inet_twsk_deschedule_put+0x25/0x30
> [ 62.605731] tcp_v4_rcv+0xa79/0x15e0
> [ 62.607139] ip_protocol_deliver_rcu+0x37/0x270
> [ 62.607980] ip_local_deliver_finish+0xb0/0xd0
> [ 62.608758] ip_local_deliver+0x1c9/0x1e0
> [ 62.611162] ip_sublist_rcv_finish+0x84/0xa0
> [ 62.611894] ip_sublist_rcv+0x22c/0x320
> [ 62.616143] ip_list_rcv+0x1e4/0x225
> [ 62.619427] __netif_receive_skb_list_core+0x439/0x460
> [ 62.622771] netif_receive_skb_list_internal+0x3ea/0x570
> [ 62.625320] gro_normal_list.part.0+0x14/0x50
> [ 62.626088] napi_gro_receive+0x6a/0xb0
> [ 62.626787] receive_buf+0x371/0x1d50
> [ 62.632092] virtnet_poll+0x2be/0x5b0
> [ 62.634099] net_rx_action+0x1ec/0x4c0
> [ 62.636132] __do_softirq+0xfc/0x29c
> [ 62.638180] run_ksoftirqd+0x15/0x30
> [ 62.638787] smpboot_thread_fn+0x1fc/0x380
> [ 62.642009] kthread+0x1f1/0x210
> [ 62.643478] ret_from_fork+0x35/0x40
> [ 62.644094]
> [ 62.644371] Allocated by task 1355:
> [ 62.644980] save_stack+0x1b/0x40
> [ 62.645539] __kasan_kmalloc.constprop.0+0xc2/0xd0
> [ 62.646347] kmem_cache_alloc+0xb8/0x190
> [ 62.647006] getname_flags+0x6b/0x2b0
> [ 62.647627] user_path_at_empty+0x1b/0x40
> [ 62.648306] vfs_statx+0xba/0x140
> [ 62.648875] __do_sys_newstat+0x8c/0xf0
> [ 62.649518] do_syscall_64+0xbc/0x790
> [ 62.650199] entry_SYSCALL_64_after_hwframe+0x44/0xa9
> [ 62.651091]
> [ 62.651360] Freed by task 1355:
> [ 62.651903] save_stack+0x1b/0x40
> [ 62.652460] __kasan_slab_free+0x12f/0x180
> [ 62.653147] kmem_cache_free+0x87/0x240
> [ 62.653795] filename_lookup+0x183/0x250
> [ 62.654447] vfs_statx+0xba/0x140
> [ 62.655001] __do_sys_newstat+0x8c/0xf0
> [ 62.655640] do_syscall_64+0xbc/0x790
> [ 62.656246] entry_SYSCALL_64_after_hwframe+0x44/0xa9
> [ 62.657089]
> [ 62.657351] The buggy address belongs to the object at ffff88810f155500
> which belongs to the cache names_cache of size 4096
> [ 62.659420] The buggy address is located 1312 bytes inside of
> 4096-byte region [ffff88810f155500, ffff88810f156500)
> [ 62.661358] The buggy address belongs to the page:
> [ 62.662175] page:ffffea00043c5400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 head:ffffea00043c5400 order:3 compound_mapcount:0 compound_pincount:0
> [ 62.664523] flags: 0x8000000000010200(slab|head)
> [ 62.665342] raw: 8000000000010200 0000000000000000 0000000400000001 ffff88811ac772c0
> [ 62.666713] raw: 0000000000000000 0000000000070007 00000001ffffffff 0000000000000000
> [ 62.667984] page dumped because: kasan: bad access detected
> [ 62.668904]
> [ 62.669171] Memory state around the buggy address:
> [ 62.669975] ffff88810f155900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
> [ 62.671163] ffff88810f155980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
> [ 62.672363] >ffff88810f155a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
> [ 62.673559] ^
> [ 62.674349] ffff88810f155a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
> [ 62.675531] ffff88810f155b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
> [ 62.676723] ==================================================================
Could you please try booting with "slab_nomerge" on the kernel command
line?
Possibly kasan could track better the really relevant UAF cycle that
way.
Thanks!
Paolo
^ permalink raw reply
* Re: [PATCH 1/9] staging: media: atomisp: fix incorrect NULL pointer check
From: Nick Desaulniers @ 2020-05-29 20:04 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Mauro Carvalho Chehab, Sakari Ailus, linux-media, devel, LKML,
clang-built-linux, Nathan Chancellor
In-Reply-To: <20200529200031.4117841-1-arnd@arndb.de>
See also Nathan's 7 patch series.
https://lore.kernel.org/lkml/20200527071150.3381228-1-natechancellor@gmail.com/
Might be some overlap between series?
On Fri, May 29, 2020 at 1:00 PM Arnd Bergmann <arnd@arndb.de> wrote:
>
> Checking the pointer to a member of a struct against NULL
> is pointless as clang points out:
>
> drivers/staging/media/atomisp/pci/atomisp_cmd.c:4278:17: error: address of 'config->info' will always evaluate to 'true'
>
> Check the original pointer instead, which may also be
> unnecessary here, but makes a little more sense.
>
> Fixes: 9d4fa1a16b28 ("media: atomisp: cleanup directory hierarchy")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/staging/media/atomisp/pci/atomisp_cmd.c | 2 +-
> drivers/staging/media/atomisp/pci/sh_css.c | 4 ++--
> drivers/staging/media/atomisp/pci/sh_css_sp.c | 4 ++--
> 3 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/staging/media/atomisp/pci/atomisp_cmd.c b/drivers/staging/media/atomisp/pci/atomisp_cmd.c
> index 5be690f876c1..342fc3b34fe0 100644
> --- a/drivers/staging/media/atomisp/pci/atomisp_cmd.c
> +++ b/drivers/staging/media/atomisp/pci/atomisp_cmd.c
> @@ -4275,7 +4275,7 @@ int atomisp_param(struct atomisp_sub_device *asd, int flag,
> atomisp_css_get_dvs_grid_info(
> &asd->params.curr_grid_info);
>
> - if (!&config->info) {
> + if (!config) {
> dev_err(isp->dev, "ERROR: NULL pointer in grid_info\n");
> return -EINVAL;
> }
> diff --git a/drivers/staging/media/atomisp/pci/sh_css.c b/drivers/staging/media/atomisp/pci/sh_css.c
> index d77432254a2c..e91c6029c651 100644
> --- a/drivers/staging/media/atomisp/pci/sh_css.c
> +++ b/drivers/staging/media/atomisp/pci/sh_css.c
> @@ -8534,7 +8534,7 @@ ia_css_pipe_load_extension(struct ia_css_pipe *pipe,
>
> if (firmware->info.isp.type == IA_CSS_ACC_OUTPUT)
> {
> - if (&pipe->output_stage)
> + if (pipe)
> append_firmware(&pipe->output_stage, firmware);
> else {
> IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INTERNAL_ERROR);
> @@ -8542,7 +8542,7 @@ ia_css_pipe_load_extension(struct ia_css_pipe *pipe,
> }
> } else if (firmware->info.isp.type == IA_CSS_ACC_VIEWFINDER)
> {
> - if (&pipe->vf_stage)
> + if (pipe)
> append_firmware(&pipe->vf_stage, firmware);
> else {
> IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INTERNAL_ERROR);
> diff --git a/drivers/staging/media/atomisp/pci/sh_css_sp.c b/drivers/staging/media/atomisp/pci/sh_css_sp.c
> index e574396ad0f4..c0e579c1705f 100644
> --- a/drivers/staging/media/atomisp/pci/sh_css_sp.c
> +++ b/drivers/staging/media/atomisp/pci/sh_css_sp.c
> @@ -1022,7 +1022,7 @@ sh_css_sp_init_stage(struct ia_css_binary *binary,
> if (!pipe)
> return IA_CSS_ERR_INTERNAL_ERROR;
> ia_css_get_crop_offsets(pipe, &args->in_frame->info);
> - } else if (&binary->in_frame_info)
> + } else if (binary)
> {
> pipe = find_pipe_by_num(sh_css_sp_group.pipe[thread_id].pipe_num);
> if (!pipe)
> @@ -1036,7 +1036,7 @@ sh_css_sp_init_stage(struct ia_css_binary *binary,
> if (!pipe)
> return IA_CSS_ERR_INTERNAL_ERROR;
> ia_css_get_crop_offsets(pipe, &args->in_frame->info);
> - } else if (&binary->in_frame_info) {
> + } else if (binary) {
> pipe = find_pipe_by_num(sh_css_sp_group.pipe[thread_id].pipe_num);
> if (!pipe)
> return IA_CSS_ERR_INTERNAL_ERROR;
> --
> 2.26.2
>
> --
> You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/20200529200031.4117841-1-arnd%40arndb.de.
--
Thanks,
~Nick Desaulniers
^ permalink raw reply
* [PATCH 4/4] lkdtm: Make arch-specific tests always available
From: Kees Cook @ 2020-05-29 20:03 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Kees Cook, Prasad Sodagudi, Sami Tolvanen, Amit Daniel Kachhap,
linux-kselftest, clang-built-linux, linux-kernel
In-Reply-To: <20200529200347.2464284-1-keescook@chromium.org>
I'd like arch-specific tests to XFAIL when on a mismatched architecture
so that we can more easily compare test coverage across all systems.
Lacking kernel configs or CPU features count as a FAIL, not an XFAIL.
Signed-off-by: Kees Cook <keescook@chromium.org>
---
drivers/misc/lkdtm/bugs.c | 34 ++++++++++++++-----------
drivers/misc/lkdtm/lkdtm.h | 2 --
tools/testing/selftests/lkdtm/tests.txt | 1 +
3 files changed, 20 insertions(+), 17 deletions(-)
diff --git a/drivers/misc/lkdtm/bugs.c b/drivers/misc/lkdtm/bugs.c
index e1b43f615549..f3fde0759f2c 100644
--- a/drivers/misc/lkdtm/bugs.c
+++ b/drivers/misc/lkdtm/bugs.c
@@ -453,38 +453,42 @@ void lkdtm_DOUBLE_FAULT(void)
#endif
}
-#ifdef CONFIG_ARM64_PTR_AUTH
+#ifdef CONFIG_ARM64
static noinline void change_pac_parameters(void)
{
- /* Reset the keys of current task */
- ptrauth_thread_init_kernel(current);
- ptrauth_thread_switch_kernel(current);
+ if (IS_ENABLED(CONFIG_ARM64_PTR_AUTH)) {
+ /* Reset the keys of current task */
+ ptrauth_thread_init_kernel(current);
+ ptrauth_thread_switch_kernel(current);
+ }
}
+#endif
-#define CORRUPT_PAC_ITERATE 10
noinline void lkdtm_CORRUPT_PAC(void)
{
+#ifdef CONFIG_ARM64
+#define CORRUPT_PAC_ITERATE 10
int i;
+ if (!IS_ENABLED(CONFIG_ARM64_PTR_AUTH))
+ pr_err("FAIL: kernel not built with CONFIG_ARM64_PTR_AUTH\n");
+
if (!system_supports_address_auth()) {
- pr_err("FAIL: arm64 pointer authentication feature not present\n");
+ pr_err("FAIL: CPU lacks pointer authentication feature\n");
return;
}
- pr_info("Change the PAC parameters to force function return failure\n");
+ pr_info("changing PAC parameters to force function return failure...\n");
/*
- * Pac is a hash value computed from input keys, return address and
+ * PAC is a hash value computed from input keys, return address and
* stack pointer. As pac has fewer bits so there is a chance of
* collision, so iterate few times to reduce the collision probability.
*/
for (i = 0; i < CORRUPT_PAC_ITERATE; i++)
change_pac_parameters();
- pr_err("FAIL: %s test failed. Kernel may be unstable from here\n", __func__);
-}
-#else /* !CONFIG_ARM64_PTR_AUTH */
-noinline void lkdtm_CORRUPT_PAC(void)
-{
- pr_err("FAIL: arm64 pointer authentication config disabled\n");
-}
+ pr_err("FAIL: survived PAC changes! Kernel may be unstable from here\n");
+#else
+ pr_err("XFAIL: this test is arm64-only\n");
#endif
+}
diff --git a/drivers/misc/lkdtm/lkdtm.h b/drivers/misc/lkdtm/lkdtm.h
index 601a2156a0d4..8878538b2c13 100644
--- a/drivers/misc/lkdtm/lkdtm.h
+++ b/drivers/misc/lkdtm/lkdtm.h
@@ -31,9 +31,7 @@ void lkdtm_CORRUPT_USER_DS(void);
void lkdtm_STACK_GUARD_PAGE_LEADING(void);
void lkdtm_STACK_GUARD_PAGE_TRAILING(void);
void lkdtm_UNSET_SMEP(void);
-#ifdef CONFIG_X86_32
void lkdtm_DOUBLE_FAULT(void);
-#endif
void lkdtm_CORRUPT_PAC(void);
/* lkdtm_heap.c */
diff --git a/tools/testing/selftests/lkdtm/tests.txt b/tools/testing/selftests/lkdtm/tests.txt
index 92ca32143ae5..9d266e79c6a2 100644
--- a/tools/testing/selftests/lkdtm/tests.txt
+++ b/tools/testing/selftests/lkdtm/tests.txt
@@ -14,6 +14,7 @@ STACK_GUARD_PAGE_LEADING
STACK_GUARD_PAGE_TRAILING
UNSET_SMEP CR4 bits went missing
DOUBLE_FAULT
+CORRUPT_PAC
UNALIGNED_LOAD_STORE_WRITE
#OVERWRITE_ALLOCATION Corrupts memory on failure
#WRITE_AFTER_FREE Corrupts memory on failure
--
2.25.1
^ permalink raw reply related
* [PATCH 2/4] lkdtm/heap: Avoid edge and middle of slabs
From: Kees Cook @ 2020-05-29 20:03 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Kees Cook, stable, Prasad Sodagudi, Sami Tolvanen,
Amit Daniel Kachhap, linux-kselftest, clang-built-linux,
linux-kernel
In-Reply-To: <20200529200347.2464284-1-keescook@chromium.org>
Har har, after I moved the slab freelist pointer into the middle of the
slab, now it looks like the contents are getting poisoned. Adjust the
test to avoid the freelist pointer again.
Fixes: 3202fa62fb43 ("slub: relocate freelist pointer to middle of object")
Cc: stable@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
---
drivers/misc/lkdtm/heap.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/misc/lkdtm/heap.c b/drivers/misc/lkdtm/heap.c
index 3c5cec85edce..1323bc16f113 100644
--- a/drivers/misc/lkdtm/heap.c
+++ b/drivers/misc/lkdtm/heap.c
@@ -58,11 +58,12 @@ void lkdtm_READ_AFTER_FREE(void)
int *base, *val, saw;
size_t len = 1024;
/*
- * The slub allocator uses the first word to store the free
- * pointer in some configurations. Use the middle of the
- * allocation to avoid running into the freelist
+ * The slub allocator will use the either the first word or
+ * the middle of the allocation to store the free pointer,
+ * depending on configurations. Store in the second word to
+ * avoid running into the freelist.
*/
- size_t offset = (len / sizeof(*base)) / 2;
+ size_t offset = sizeof(*base);
base = kmalloc(len, GFP_KERNEL);
if (!base) {
--
2.25.1
^ permalink raw reply related
* Re: [PATCH 08/30] KVM: nSVM: move map argument out of enter_svm_guest_mode
From: Krish Sadhukhan @ 2020-05-29 20:02 UTC (permalink / raw)
To: Paolo Bonzini, linux-kernel, kvm
In-Reply-To: <5fa0a52e-3b67-b545-d74a-7e4050e64559@redhat.com>
On 5/29/20 12:04 PM, Paolo Bonzini wrote:
> On 29/05/20 20:10, Krish Sadhukhan wrote:
>>> Unmapping the nested VMCB in enter_svm_guest_mode is a bit of a wart,
>>> since the map is not used elsewhere in the function. There are
>>> just two calls, so move it there.
>> The last sentence sounds bit incomplete.
> Good point---more precisely, "calls" should be "callers". "It" refers
> to "unmapping".
>
>> Also, does it make sense to mention the reason why unmapping is not
>> required before we enter guest mode ?
> Unmapping is a host operation and is not visible by the guest; is this
> what you mean?
Yes, I was thinking if we could mention it in the commit message...
-Krish
>
> Paolo
>
^ permalink raw reply
* [PATCH drivers/misc 0/4] lkdtm: Various clean ups
From: Kees Cook @ 2020-05-29 20:03 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Kees Cook, Prasad Sodagudi, Sami Tolvanen, Amit Daniel Kachhap,
linux-kselftest, clang-built-linux, linux-kernel
Hi Greg,
Can you please apply these patches to your drivers/misc tree for LKDTM?
It's mostly a collection of fixes and improvements and tweaks to the
selftest integration.
Thanks!
-Kees
Kees Cook (4):
lkdtm: Avoid more compiler optimizations for bad writes
lkdtm/heap: Avoid edge and middle of slabs
selftests/lkdtm: Reset WARN_ONCE to avoid false negatives
lkdtm: Make arch-specific tests always available
drivers/misc/lkdtm/bugs.c | 45 +++++++++++++------------
drivers/misc/lkdtm/heap.c | 9 ++---
drivers/misc/lkdtm/lkdtm.h | 2 --
drivers/misc/lkdtm/perms.c | 22 ++++++++----
drivers/misc/lkdtm/usercopy.c | 7 ++--
tools/testing/selftests/lkdtm/run.sh | 6 ++++
tools/testing/selftests/lkdtm/tests.txt | 1 +
7 files changed, 56 insertions(+), 36 deletions(-)
--
2.25.1
^ permalink raw reply
* [PATCH 1/4] lkdtm: Avoid more compiler optimizations for bad writes
From: Kees Cook @ 2020-05-29 20:03 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Kees Cook, Prasad Sodagudi, Sami Tolvanen, Amit Daniel Kachhap,
linux-kselftest, clang-built-linux, linux-kernel
In-Reply-To: <20200529200347.2464284-1-keescook@chromium.org>
It seems at least Clang is able to throw away writes it knows are
destined for read-only memory, which makes things like the WRITE_RO test
fail, as the write gets elided. Instead, force the variable to be
volatile, and make similar changes through-out other tests in an effort
to avoid needing to repeat fixing these kinds of problems. Also includes
pr_err() calls in failure paths so that kernel logs are more clear in
the failure case.
Reported-by: Prasad Sodagudi <psodagud@codeaurora.org>
Suggested-by: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
---
drivers/misc/lkdtm/bugs.c | 11 +++++------
drivers/misc/lkdtm/perms.c | 22 +++++++++++++++-------
drivers/misc/lkdtm/usercopy.c | 7 +++++--
3 files changed, 25 insertions(+), 15 deletions(-)
diff --git a/drivers/misc/lkdtm/bugs.c b/drivers/misc/lkdtm/bugs.c
index 886459e0ddd9..e1b43f615549 100644
--- a/drivers/misc/lkdtm/bugs.c
+++ b/drivers/misc/lkdtm/bugs.c
@@ -118,9 +118,8 @@ noinline void lkdtm_CORRUPT_STACK(void)
/* Use default char array length that triggers stack protection. */
char data[8] __aligned(sizeof(void *));
- __lkdtm_CORRUPT_STACK(&data);
-
- pr_info("Corrupted stack containing char array ...\n");
+ pr_info("Corrupting stack containing char array ...\n");
+ __lkdtm_CORRUPT_STACK((void *)&data);
}
/* Same as above but will only get a canary with -fstack-protector-strong */
@@ -131,9 +130,8 @@ noinline void lkdtm_CORRUPT_STACK_STRONG(void)
unsigned long *ptr;
} data __aligned(sizeof(void *));
- __lkdtm_CORRUPT_STACK(&data);
-
- pr_info("Corrupted stack containing union ...\n");
+ pr_info("Corrupting stack containing union ...\n");
+ __lkdtm_CORRUPT_STACK((void *)&data);
}
void lkdtm_UNALIGNED_LOAD_STORE_WRITE(void)
@@ -248,6 +246,7 @@ void lkdtm_ARRAY_BOUNDS(void)
kfree(not_checked);
kfree(checked);
+ pr_err("FAIL: survived array bounds overflow!\n");
}
void lkdtm_CORRUPT_LIST_ADD(void)
diff --git a/drivers/misc/lkdtm/perms.c b/drivers/misc/lkdtm/perms.c
index 62f76d506f04..2dede2ef658f 100644
--- a/drivers/misc/lkdtm/perms.c
+++ b/drivers/misc/lkdtm/perms.c
@@ -57,6 +57,7 @@ static noinline void execute_location(void *dst, bool write)
}
pr_info("attempting bad execution at %px\n", func);
func();
+ pr_err("FAIL: func returned\n");
}
static void execute_user_location(void *dst)
@@ -75,20 +76,22 @@ static void execute_user_location(void *dst)
return;
pr_info("attempting bad execution at %px\n", func);
func();
+ pr_err("FAIL: func returned\n");
}
void lkdtm_WRITE_RO(void)
{
- /* Explicitly cast away "const" for the test. */
- unsigned long *ptr = (unsigned long *)&rodata;
+ /* Explicitly cast away "const" for the test and make volatile. */
+ volatile unsigned long *ptr = (unsigned long *)&rodata;
pr_info("attempting bad rodata write at %px\n", ptr);
*ptr ^= 0xabcd1234;
+ pr_err("FAIL: survived bad write\n");
}
void lkdtm_WRITE_RO_AFTER_INIT(void)
{
- unsigned long *ptr = &ro_after_init;
+ volatile unsigned long *ptr = &ro_after_init;
/*
* Verify we were written to during init. Since an Oops
@@ -102,19 +105,21 @@ void lkdtm_WRITE_RO_AFTER_INIT(void)
pr_info("attempting bad ro_after_init write at %px\n", ptr);
*ptr ^= 0xabcd1234;
+ pr_err("FAIL: survived bad write\n");
}
void lkdtm_WRITE_KERN(void)
{
size_t size;
- unsigned char *ptr;
+ volatile unsigned char *ptr;
size = (unsigned long)do_overwritten - (unsigned long)do_nothing;
ptr = (unsigned char *)do_overwritten;
pr_info("attempting bad %zu byte write at %px\n", size, ptr);
- memcpy(ptr, (unsigned char *)do_nothing, size);
+ memcpy((void *)ptr, (unsigned char *)do_nothing, size);
flush_icache_range((unsigned long)ptr, (unsigned long)(ptr + size));
+ pr_err("FAIL: survived bad write\n");
do_overwritten();
}
@@ -193,9 +198,11 @@ void lkdtm_ACCESS_USERSPACE(void)
pr_info("attempting bad read at %px\n", ptr);
tmp = *ptr;
tmp += 0xc0dec0de;
+ pr_err("FAIL: survived bad read\n");
pr_info("attempting bad write at %px\n", ptr);
*ptr = tmp;
+ pr_err("FAIL: survived bad write\n");
vm_munmap(user_addr, PAGE_SIZE);
}
@@ -203,19 +210,20 @@ void lkdtm_ACCESS_USERSPACE(void)
void lkdtm_ACCESS_NULL(void)
{
unsigned long tmp;
- unsigned long *ptr = (unsigned long *)NULL;
+ volatile unsigned long *ptr = (unsigned long *)NULL;
pr_info("attempting bad read at %px\n", ptr);
tmp = *ptr;
tmp += 0xc0dec0de;
+ pr_err("FAIL: survived bad read\n");
pr_info("attempting bad write at %px\n", ptr);
*ptr = tmp;
+ pr_err("FAIL: survived bad write\n");
}
void __init lkdtm_perms_init(void)
{
/* Make sure we can write to __ro_after_init values during __init */
ro_after_init |= 0xAA;
-
}
diff --git a/drivers/misc/lkdtm/usercopy.c b/drivers/misc/lkdtm/usercopy.c
index e172719dd86d..b833367a45d0 100644
--- a/drivers/misc/lkdtm/usercopy.c
+++ b/drivers/misc/lkdtm/usercopy.c
@@ -304,19 +304,22 @@ void lkdtm_USERCOPY_KERNEL(void)
return;
}
- pr_info("attempting good copy_to_user from kernel rodata\n");
+ pr_info("attempting good copy_to_user from kernel rodata: %px\n",
+ test_text);
if (copy_to_user((void __user *)user_addr, test_text,
unconst + sizeof(test_text))) {
pr_warn("copy_to_user failed unexpectedly?!\n");
goto free_user;
}
- pr_info("attempting bad copy_to_user from kernel text\n");
+ pr_info("attempting bad copy_to_user from kernel text: %px\n",
+ vm_mmap);
if (copy_to_user((void __user *)user_addr, vm_mmap,
unconst + PAGE_SIZE)) {
pr_warn("copy_to_user failed, but lacked Oops\n");
goto free_user;
}
+ pr_err("FAIL: survived bad copy_to_user()\n");
free_user:
vm_munmap(user_addr, PAGE_SIZE);
--
2.25.1
^ permalink raw reply related
* [PSIGN drivers/misc X/4] lkdtm: Various clean ups
From: devnull @ 2020-05-29 20:03 UTC (permalink / raw)
To: signatures
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
2e851bd8-7a546255-42c01d5d:
i: 2e851bd89dd70c7ca084c3e8590b12493cd5adf54ea8179b887fa86d4c5eff12
m: 7a5462556c60ad1d285c85f7d754b5804402b572099c012a73f0795dbcbded0d
p: 42c01d5d1b48af02d42f4a53f505b2919d4361e9dbdb31b9581de082cea530db
a0909ddf-0fe03a5e-25560099:
i: a0909ddf2920120147bfdd89788072c95644a2405ba5d0e0aea94bd90b524745
m: 0fe03a5eb4310413fdb5b5ee19e03bd32a7b97ea11296b7f258c4c7bc0b2ba65
p: 25560099a20c500ecd8412e3e493510e171a6dad39e5077ac6760d6ec1fdbf16
fedad0d6-8bb0bf67-7556181a:
i: fedad0d62a5e5014a1e84c17e7ec2621a920f7b04479dd1b20ed4fa255f1ec9d
m: 8bb0bf67d25d5bdb3ecde09672be89fb738813a539e9da41d181741a90abf437
p: 7556181a8edcf787234f48cff8d94ca6e16610914ab73275a0b1056495d892e8
a837506a-ca1ca3e0-3149ced1:
i: a837506ae739ce63a4db31cb4b80cb5033b0ba6e1aac04fd0333798d298d994e
m: ca1ca3e092639084faa9e128dfd0188f31a460a0923f557108d7f4ea532996e2
p: 3149ced1093b7f680b505708626c8a1dbc78c2c4105a67547a2d97cd52913889
-----BEGIN PGP SIGNATURE-----
Comment: att-fmt-ver: 0.1
Comment: att-hash: sha256
iQIzBAEBCgAdFiEEpcP2jyKd1g9yPm4TiXL039xtwCYFAl7Raq0ACgkQiXL039xt
wCZWJRAAmWlIJ2ik5XbznnphxTEVQTPlG09jAC0VTHiuCZ5hfJsQ1jgBbaCZNANd
4T1B+wpN2/B/V201LIkUp3d1xvycqkkN5qF3SEB3+kOdjWuGGlg4frTl5CcsZUMs
/w5W+9Xt7HkR2FYYMqIyQwaT+U3a02NyBMxveEq2zNF1mUh33J85XlkEe7r5MbqG
vnQuqmSZZC62pu3MFVVE0w4+S7AAUfhzyXf+z3IYUPd9b2ZGcazsQbGtFyauwva7
U9fvovPUh3e8sfitSZubTUZEP1wkEFj0eMGtCYk4QvEGGwYfSDNc/BlIg/BaSTHB
lFu2ydX22pAeMfDkyYXW5i5jfxuuQdksDDK/ksVXAuTDu/ph/zlvhb7Y5F0bxZ3g
CAAPfmeITNbM8ZrZB+3pJcyi9A8P4jaL6eb3LnJ3cGWy0i/icYF5s5J33GIjnFab
4EPSuTg1oyaRDvy8QkdYlhNW+8qfYvWaTMqoYsAk7g9nvvsnNkVQ6lhnzNPHNntf
/N/z+FYR9wUINu8n4MRoYYW20zRXdBNfRUDA1NhTy5yOa/jsM/CEHtr61hysOcql
tqjKuenR00gAPfMyrDqbGbRCdOhhMKF9pVos5TnOnflKsXjeACl7vUqpWcsKxosp
8jVUpbYXHnvBPakO3SF7fGGNXcKsYI215UeUaTEBYz23IfzDy6E=
=ykWo
-----END PGP SIGNATURE-----
^ permalink raw reply
* [PATCH 3/4] selftests/lkdtm: Reset WARN_ONCE to avoid false negatives
From: Kees Cook @ 2020-05-29 20:03 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Kees Cook, Prasad Sodagudi, Sami Tolvanen, Amit Daniel Kachhap,
linux-kselftest, clang-built-linux, linux-kernel
In-Reply-To: <20200529200347.2464284-1-keescook@chromium.org>
Since we expect to see warnings every time for many tests, just reset
the WARN_ONCE flags each time the script runs.
Signed-off-by: Kees Cook <keescook@chromium.org>
---
tools/testing/selftests/lkdtm/run.sh | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tools/testing/selftests/lkdtm/run.sh b/tools/testing/selftests/lkdtm/run.sh
index ee64ff8df8f4..8383eb89d88a 100755
--- a/tools/testing/selftests/lkdtm/run.sh
+++ b/tools/testing/selftests/lkdtm/run.sh
@@ -8,6 +8,7 @@
#
set -e
TRIGGER=/sys/kernel/debug/provoke-crash/DIRECT
+CLEAR_ONCE=/sys/kernel/debug/clear_warn_once
KSELFTEST_SKIP_TEST=4
# Verify we have LKDTM available in the kernel.
@@ -67,6 +68,11 @@ cleanup() {
}
trap cleanup EXIT
+# Reset WARN_ONCE counters so we trip it each time this runs.
+if [ -w $CLEAR_ONCE ] ; then
+ echo 1 > $CLEAR_ONCE
+fi
+
# Save existing dmesg so we can detect new content below
dmesg > "$DMESG"
--
2.25.1
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.