All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2] mips: Enable KCSAN
@ 2022-02-11 16:21 Nemanja Rakovic
  2022-02-11 17:06 ` Marco Elver
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Nemanja Rakovic @ 2022-02-11 16:21 UTC (permalink / raw)
  Cc: Nemanja Rakovic, Thomas Bogendoerfer, linux-kernel,
	dragan.mladjenovic, elver

This patch enables KCSAN for the 64-bit version. Updated rules
for the incompatible compilation units (vdso, boot/compressed).

Signed-off-by: Nemanja Rakovic <nemanja.rakovic@syrmia.com>
---
 arch/mips/Kconfig                  | 1 +
 arch/mips/boot/compressed/Makefile | 1 +
 arch/mips/vdso/Makefile            | 3 +++
 3 files changed, 5 insertions(+)

Changes were tested on qemu (qemu-system-mips64el) with the
64r6el_defconfig configuration and KCSAN enabled.

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 058446f01487..651d4fe355da 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -101,6 +101,7 @@ config MIPS
 	select TRACE_IRQFLAGS_SUPPORT
 	select VIRT_TO_BUS
 	select ARCH_HAS_ELFCORE_COMPAT
+	select HAVE_ARCH_KCSAN if 64BIT
 
 config MIPS_FIXUP_BIGPHYS_ADDR
 	bool
diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile
index 5a15d51e8884..6cc28173bee8 100644
--- a/arch/mips/boot/compressed/Makefile
+++ b/arch/mips/boot/compressed/Makefile
@@ -38,6 +38,7 @@ KBUILD_AFLAGS := $(KBUILD_AFLAGS) -D__ASSEMBLY__ \
 KCOV_INSTRUMENT		:= n
 GCOV_PROFILE := n
 UBSAN_SANITIZE := n
+KCSAN_SANITIZE			:= n
 
 # decompressor objects (linked with vmlinuz)
 vmlinuzobjs-y := $(obj)/head.o $(obj)/decompress.o $(obj)/string.o $(obj)/bswapsi.o
diff --git a/arch/mips/vdso/Makefile b/arch/mips/vdso/Makefile
index d65f55f67e19..f72658b3a53f 100644
--- a/arch/mips/vdso/Makefile
+++ b/arch/mips/vdso/Makefile
@@ -1,6 +1,9 @@
 # SPDX-License-Identifier: GPL-2.0
 # Objects to go into the VDSO.
 
+# Sanitizer runtimes are unavailable and cannot be linked here.
+ KCSAN_SANITIZE			:= n
+
 # Absolute relocation type $(ARCH_REL_TYPE_ABS) needs to be defined before
 # the inclusion of generic Makefile.
 ARCH_REL_TYPE_ABS := R_MIPS_JUMP_SLOT|R_MIPS_GLOB_DAT
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH V2] mips: Enable KCSAN
  2022-02-11 16:21 [PATCH V2] mips: Enable KCSAN Nemanja Rakovic
@ 2022-02-11 17:06 ` Marco Elver
  2022-02-14 20:58 ` mips: Enable KCSAN: Build Failure MPTCP CI
  2022-02-15 20:52 ` [PATCH V2] mips: Enable KCSAN Thomas Bogendoerfer
  2 siblings, 0 replies; 5+ messages in thread
From: Marco Elver @ 2022-02-11 17:06 UTC (permalink / raw)
  To: Nemanja Rakovic; +Cc: Thomas Bogendoerfer, linux-kernel, dragan.mladjenovic

On Fri, 11 Feb 2022 at 17:22, Nemanja Rakovic
<nemanja.rakovic@syrmia.com> wrote:
>
> This patch enables KCSAN for the 64-bit version. Updated rules
> for the incompatible compilation units (vdso, boot/compressed).
>
> Signed-off-by: Nemanja Rakovic <nemanja.rakovic@syrmia.com>

Acked-by: Marco Elver <elver@google.com>


> ---
>  arch/mips/Kconfig                  | 1 +
>  arch/mips/boot/compressed/Makefile | 1 +
>  arch/mips/vdso/Makefile            | 3 +++
>  3 files changed, 5 insertions(+)
>
> Changes were tested on qemu (qemu-system-mips64el) with the
> 64r6el_defconfig configuration and KCSAN enabled.
>
> diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
> index 058446f01487..651d4fe355da 100644
> --- a/arch/mips/Kconfig
> +++ b/arch/mips/Kconfig
> @@ -101,6 +101,7 @@ config MIPS
>         select TRACE_IRQFLAGS_SUPPORT
>         select VIRT_TO_BUS
>         select ARCH_HAS_ELFCORE_COMPAT
> +       select HAVE_ARCH_KCSAN if 64BIT
>
>  config MIPS_FIXUP_BIGPHYS_ADDR
>         bool
> diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile
> index 5a15d51e8884..6cc28173bee8 100644
> --- a/arch/mips/boot/compressed/Makefile
> +++ b/arch/mips/boot/compressed/Makefile
> @@ -38,6 +38,7 @@ KBUILD_AFLAGS := $(KBUILD_AFLAGS) -D__ASSEMBLY__ \
>  KCOV_INSTRUMENT                := n
>  GCOV_PROFILE := n
>  UBSAN_SANITIZE := n
> +KCSAN_SANITIZE                 := n
>
>  # decompressor objects (linked with vmlinuz)
>  vmlinuzobjs-y := $(obj)/head.o $(obj)/decompress.o $(obj)/string.o $(obj)/bswapsi.o
> diff --git a/arch/mips/vdso/Makefile b/arch/mips/vdso/Makefile
> index d65f55f67e19..f72658b3a53f 100644
> --- a/arch/mips/vdso/Makefile
> +++ b/arch/mips/vdso/Makefile
> @@ -1,6 +1,9 @@
>  # SPDX-License-Identifier: GPL-2.0
>  # Objects to go into the VDSO.
>
> +# Sanitizer runtimes are unavailable and cannot be linked here.
> + KCSAN_SANITIZE                        := n
> +
>  # Absolute relocation type $(ARCH_REL_TYPE_ABS) needs to be defined before
>  # the inclusion of generic Makefile.
>  ARCH_REL_TYPE_ABS := R_MIPS_JUMP_SLOT|R_MIPS_GLOB_DAT
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mips: Enable KCSAN: Build Failure
  2022-02-11 16:21 [PATCH V2] mips: Enable KCSAN Nemanja Rakovic
  2022-02-11 17:06 ` Marco Elver
@ 2022-02-14 20:58 ` MPTCP CI
  2022-02-14 21:01   ` Mat Martineau
  2022-02-15 20:52 ` [PATCH V2] mips: Enable KCSAN Thomas Bogendoerfer
  2 siblings, 1 reply; 5+ messages in thread
From: MPTCP CI @ 2022-02-14 20:58 UTC (permalink / raw)
  To: Nemanja Rakovic; +Cc: mptcp

Hi Nemanja,

Thank you for your modifications, that's great!

But sadly, our CI spotted some issues with it when trying to build it.

You can find more details there:

  https://patchwork.kernel.org/project/mptcp/patch/20220211162142.2402-1-nemanja.rakovic@syrmia.com/
  https://github.com/multipath-tcp/mptcp_net-next/actions/runs/1843234131

Status: cancelled
Initiator: MPTCPimporter
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/6b8a96a1f02e

Feel free to reply to this email if you cannot access logs, if you need
some support to fix the error, if this doesn't seem to be caused by your
modifications or if the error is a false positive one.

Cheers,
MPTCP GH Action bot

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mips: Enable KCSAN: Build Failure
  2022-02-14 20:58 ` mips: Enable KCSAN: Build Failure MPTCP CI
@ 2022-02-14 21:01   ` Mat Martineau
  0 siblings, 0 replies; 5+ messages in thread
From: Mat Martineau @ 2022-02-14 21:01 UTC (permalink / raw)
  To: Nemanja Rakovic; +Cc: Matthieu Baerts, Davide Caratti, mptcp

On Mon, 14 Feb 2022, MPTCP CI wrote:

> Hi Nemanja,
>
> Thank you for your modifications, that's great!
>
> But sadly, our CI spotted some issues with it when trying to build it.
>
> You can find more details there:
>
>  https://patchwork.kernel.org/project/mptcp/patch/20220211162142.2402-1-nemanja.rakovic@syrmia.com/
>  https://github.com/multipath-tcp/mptcp_net-next/actions/runs/1843234131
>
> Status: cancelled
> Initiator: MPTCPimporter
> Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/6b8a96a1f02e
>

Nemanja,

Sorry about the unexpected email from our CI system. It appears there was
an issue with patchew.org that somehow applied and tagged your patch in
our github repo even though you didn't send to our mailing list.


--
Mat Martineau
Intel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH V2] mips: Enable KCSAN
  2022-02-11 16:21 [PATCH V2] mips: Enable KCSAN Nemanja Rakovic
  2022-02-11 17:06 ` Marco Elver
  2022-02-14 20:58 ` mips: Enable KCSAN: Build Failure MPTCP CI
@ 2022-02-15 20:52 ` Thomas Bogendoerfer
  2 siblings, 0 replies; 5+ messages in thread
From: Thomas Bogendoerfer @ 2022-02-15 20:52 UTC (permalink / raw)
  To: Nemanja Rakovic; +Cc: linux-kernel, dragan.mladjenovic, elver

On Fri, Feb 11, 2022 at 05:21:42PM +0100, Nemanja Rakovic wrote:
> This patch enables KCSAN for the 64-bit version. Updated rules
> for the incompatible compilation units (vdso, boot/compressed).

I've applied your first patch, please send a patch, which applies
to mips-next.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-02-15 20:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-11 16:21 [PATCH V2] mips: Enable KCSAN Nemanja Rakovic
2022-02-11 17:06 ` Marco Elver
2022-02-14 20:58 ` mips: Enable KCSAN: Build Failure MPTCP CI
2022-02-14 21:01   ` Mat Martineau
2022-02-15 20:52 ` [PATCH V2] mips: Enable KCSAN Thomas Bogendoerfer

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.