[Bug target/96260] [10/11 Regression] RISC-V: -fsanitize=kernel-address is not available after gcc10

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jul 23 07:48:22 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96260

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Kito Cheng <kito@gcc.gnu.org>:

https://gcc.gnu.org/g:83f1fbb9e7afaa77d52b200c7937788faa5f24d7

commit r10-8516-g83f1fbb9e7afaa77d52b200c7937788faa5f24d7
Author: Kito Cheng <kito.cheng@sifive.com>
Date:   Wed Jul 22 14:50:40 2020 +0800

    PR target/96260 - KASAN should work even back-end not porting anything.

     - Most KASAN function don't need any porting anything in back-end
       except asan stack protection.

     - However kernel will given shadow offset when enable asan stack
       protection, so eveything in KASAN can work if shadow offset is given.

     - Verified with x86 and risc-v.

     - Verified with RISC-V linux kernel.

    gcc/ChangeLog:

            PR target/96260
            * asan.c (asan_shadow_offset_set_p): New.
            * asan.h (asan_shadow_offset_set_p): Ditto.
            * toplev.c (process_options): Allow -fsanitize=kernel-address
            even TARGET_ASAN_SHADOW_OFFSET not implemented, only check when
            asan stack protection is enabled.

    gcc/testsuite/ChangeLog:

            PR target/96260
            * gcc.target/riscv/pr91441.c: Update warning message.
            * gcc.target/riscv/pr96260.c: New.

    (cherry picked from commit 2ca1b6d009b194286c3ec91f9c51cc6b0a475458)


More information about the Gcc-bugs mailing list