]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Don't select ARCH_WANTS_NO_INSTR
authorMichael Ellerman <mpe@ellerman.id.au>
Thu, 2 Feb 2023 10:27:35 +0000 (21:27 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Mar 2023 10:52:21 +0000 (11:52 +0100)
commit8f723e96c330aa692781d73c2d3150e20efbdf63
tree80d82fabf2d259f86af7646d60b01260707e26ec
parente1147ea9ec2a94e781d274c0b9002044036e3ccf
powerpc: Don't select ARCH_WANTS_NO_INSTR

[ Upstream commit 316f27c2b2af1ad946c3e42ddfd36699259abcf1 ]

Commit face7150f53c ("powerpc: Book3S 64-bit outline-only KASAN
support") added a select of ARCH_WANTS_NO_INSTR, because it also added
some uses of noinstr. However noinstr is always defined, regardless of
ARCH_WANTS_NO_INSTR, so there's no need to select it just for that.

As PeterZ says [1]:
  Note that by selecting ARCH_WANTS_NO_INSTR you effectively state to
  abide by its rules.

As of now the powerpc code does not abide by those rules, and trips some
new warnings added by Peter in linux-next.

So until the code can be fixed to avoid those warnings, disable
ARCH_WANTS_NO_INSTR.

Note that ARCH_WANTS_NO_INSTR is also used to gate building KCOV and
parts of KCSAN. However none of the noinstr annotations in powerpc were
added for KCOV or KCSAN, instead instrumentation is blocked at the file
level using KCOV_INSTRUMENT_foo.o := n.

[1]: https://lore.kernel.org/linuxppc-dev/Y9t6yoafrO5YqVgM@hirez.programming.kicks-ass.net

Reported-by: Sachin Sant <sachinp@linux.ibm.com>
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/Kconfig