lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+G9fYs3NLZgorPT33vu6XQ3HA6BpN_hL6GZWbfnirGYt1tNaQ@mail.gmail.com>
Date:   Mon, 21 Nov 2022 12:58:42 +0530
From:   Naresh Kamboju <naresh.kamboju@...aro.org>
To:     Dave Hansen <dave.hansen@...el.com>
Cc:     Marco Elver <elver@...gle.com>,
        Peter Zijlstra <peterz@...radead.org>,
        kasan-dev <kasan-dev@...glegroups.com>, X86 ML <x86@...nel.org>,
        open list <linux-kernel@...r.kernel.org>,
        linux-mm <linux-mm@...ck.org>, regressions@...ts.linux.dev,
        lkft-triage@...ts.linaro.org,
        Andrew Morton <akpm@...ux-foundation.org>,
        Alexander Potapenko <glider@...gle.com>
Subject: Re: WARNING: CPU: 0 PID: 0 at arch/x86/include/asm/kfence.h:46 kfence_protect

Hi Dave,

On Fri, 18 Nov 2022 at 05:24, Dave Hansen <dave.hansen@...el.com> wrote:
>
> On 11/17/22 15:23, Marco Elver wrote:
> > Yes - it's the 'level != PG_LEVEL_4K'.
>
> That plus the bisect made it pretty easy to find, thanks for the effort!
>
> Could you double-check that the attached patch fixes it?  It seemed to
> for me.

I have applied the attached patch on Linux next 20221118 and tested [1].
The reported issue has been fixed now.

Reported-by: Linux Kernel Functional Testing <lkft@...aro.org>
Tested-by: Linux Kernel Functional Testing <lkft@...aro.org>
Tested-by: Naresh Kamboju <naresh.kamboju@...aro.org>

OTOH,
I request you to walk through the boot and test log [1] (new see few failures).
 not ok 7 - test_double_free
 not ok 9 - test_invalid_addr_free
 not ok 11 - test_corruption
 not ok 18 - test_kmalloc_aligned_oob_write
 # kfence: pass:19 fail:4 skip:2 total:25
 # Totals: pass:19 fail:4 skip:2 total:25
 not ok 6 - kfence

> The issue was that the new "No changes, easy!" check in the suspect
> commit didn't check the cpa->force_split option.  It didn't split down
> to 4k and then all hell broke loose.
>
> Oh, and I totally misread the kfence ability to tolerate partial TLB
> flushes.  Sorry for the noise there!

[1] https://lkft.validation.linaro.org/scheduler/job/5866612#L621
[2] https://tuxmake.org/
[3] https://qa-reports.linaro.org/lkft/

Steps to reproduce by tuxmake
---

# To install tuxmake on your system globally:
# sudo pip3 install -U tuxmake
#
# See https://docs.tuxmake.org/ for complete documentation.
# Original tuxmake command with fragments listed below.
# tuxmake --runtime podman --target-arch x86_64 --toolchain gcc-11
--kconfig defconfig --kconfig-add
https://raw.githubusercontent.com/Linaro/meta-lkft/kirkstone/meta/recipes-kernel/linux/files/lkft.config
--kconfig-add https://raw.githubusercontent.com/Linaro/meta-lkft/kirkstone/meta/recipes-kernel/linux/files/lkft-crypto.config
--kconfig-add https://raw.githubusercontent.com/Linaro/meta-lkft/kirkstone/meta/recipes-kernel/linux/files/distro-overrides.config
--kconfig-add https://raw.githubusercontent.com/Linaro/meta-lkft/kirkstone/meta/recipes-kernel/linux/files/systemd.config
--kconfig-add https://raw.githubusercontent.com/Linaro/meta-lkft/kirkstone/meta/recipes-kernel/linux/files/virtio.config
--kconfig-add CONFIG_IGB=y --kconfig-add
CONFIG_UNWINDER_FRAME_POINTER=y --kconfig-add CONFIG_KASAN=y
--kconfig-add CONFIG_KUNIT=y --kconfig-add CONFIG_KUNIT_ALL_TESTS=y


echo 'Patch series used in this build is available from
https://builds.tuxbuild.com/2HqQsi6ygbnwoCIENR9NB1zm80E/people.linaro.org/~naresh.kamboju-0001-kfence-fixing-kunit-testing.patch'
echo '[WARNING] Build starting with assumption that the required
patches are already applied.'
echo 'Press any key to continue or Ctrl+C to abort.'
read var_name

tuxmake --runtime podman --target-arch x86_64 --toolchain gcc-11
--kconfig https://builds.tuxbuild.com/2HqQsi6ygbnwoCIENR9NB1zm80E/config

- Naresh

Download attachment "kfence.patch" of type "application/x-patch" (505 bytes)

View attachment "kfence-kunit-boot-test-log-on-qemu-x86-linux-next.log" of type "text/x-log" (490417 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ