diff mbox series

[2/2] powerpc/{32,book3e}: kcsan: Extend KCSAN Support

Message ID 20230216050938.2188488-2-rmclure@linux.ibm.com (mailing list archive)
State Changes Requested
Headers show
Series [1/2] kcsan: xtensa: Add atomic builtin stubs for 32-bit systems | expand

Commit Message

Rohan McLure Feb. 16, 2023, 5:09 a.m. UTC
Enable HAVE_ARCH_KCSAN on all powerpc platforms, permitting use of the
kernel concurrency sanitiser through the CONFIG_KCSAN_* kconfig options.

Boots and passes selftests on 32-bit and 64-bit platforms. See
documentation in Documentation/dev-tools/kcsan.rst for more information.

Signed-off-by: Rohan McLure <rmclure@linux.ibm.com>
---
New patch
---
 arch/powerpc/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Christophe Leroy Feb. 16, 2023, 7:14 a.m. UTC | #1
Le 16/02/2023 à 06:09, Rohan McLure a écrit :
> Enable HAVE_ARCH_KCSAN on all powerpc platforms, permitting use of the
> kernel concurrency sanitiser through the CONFIG_KCSAN_* kconfig options.
> 
> Boots and passes selftests on 32-bit and 64-bit platforms. See
> documentation in Documentation/dev-tools/kcsan.rst for more information.
> 
> Signed-off-by: Rohan McLure <rmclure@linux.ibm.com>
> ---
> New patch
> ---
>   arch/powerpc/Kconfig | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
> index 2c9cdf1d8761..45771448d47a 100644
> --- a/arch/powerpc/Kconfig
> +++ b/arch/powerpc/Kconfig
> @@ -197,7 +197,7 @@ config PPC
>   	select HAVE_ARCH_KASAN			if PPC_RADIX_MMU
>   	select HAVE_ARCH_KASAN			if PPC_BOOK3E_64
>   	select HAVE_ARCH_KASAN_VMALLOC		if HAVE_ARCH_KASAN
> -	select HAVE_ARCH_KCSAN            	if PPC_BOOK3S_64
> +	select HAVE_ARCH_KCSAN

So that's a followup of a not yet posted version v5 of the other series ?
Why not just add patch 1 in that series and have KCSAN for all powerpc 
at once ?

>   	select HAVE_ARCH_KFENCE			if ARCH_SUPPORTS_DEBUG_PAGEALLOC
>   	select HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET
>   	select HAVE_ARCH_KGDB
Rohan McLure Feb. 16, 2023, 11:23 p.m. UTC | #2
> On 16 Feb 2023, at 6:14 pm, Christophe Leroy <christophe.leroy@csgroup.eu> wrote:
> 
> 
> 
> Le 16/02/2023 à 06:09, Rohan McLure a écrit :
>> Enable HAVE_ARCH_KCSAN on all powerpc platforms, permitting use of the
>> kernel concurrency sanitiser through the CONFIG_KCSAN_* kconfig options.
>> 
>> Boots and passes selftests on 32-bit and 64-bit platforms. See
>> documentation in Documentation/dev-tools/kcsan.rst for more information.
>> 
>> Signed-off-by: Rohan McLure <rmclure@linux.ibm.com>
>> ---
>> New patch
>> ---
>>  arch/powerpc/Kconfig | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
>> index 2c9cdf1d8761..45771448d47a 100644
>> --- a/arch/powerpc/Kconfig
>> +++ b/arch/powerpc/Kconfig
>> @@ -197,7 +197,7 @@ config PPC
>>   select HAVE_ARCH_KASAN if PPC_RADIX_MMU
>>   select HAVE_ARCH_KASAN if PPC_BOOK3E_64
>>   select HAVE_ARCH_KASAN_VMALLOC if HAVE_ARCH_KASAN
>> - select HAVE_ARCH_KCSAN             if PPC_BOOK3S_64
>> + select HAVE_ARCH_KCSAN
> 
> So that's a followup of a not yet posted version v5 of the other series ?
> Why not just add patch 1 in that series and have KCSAN for all powerpc 
> at once ?

So the v3 was accepted upstream, likely to appear in 6.3. This patch series is
just to extend support to other platforms, once kcsan supports us.

Link: https://patchwork.ozlabs.org/project/linuxppc-dev/cover/20230206021801.105268-1-rmclure@linux.ibm.com/

> 
>>   select HAVE_ARCH_KFENCE if ARCH_SUPPORTS_DEBUG_PAGEALLOC
>>   select HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET
>>   select HAVE_ARCH_KGDB
Christophe Leroy Feb. 17, 2023, 6:36 a.m. UTC | #3
Le 17/02/2023 à 00:23, Rohan McLure a écrit :
>> On 16 Feb 2023, at 6:14 pm, Christophe Leroy <christophe.leroy@csgroup.eu> wrote:
>>
>>
>>
>> Le 16/02/2023 à 06:09, Rohan McLure a écrit :
>>> Enable HAVE_ARCH_KCSAN on all powerpc platforms, permitting use of the
>>> kernel concurrency sanitiser through the CONFIG_KCSAN_* kconfig options.
>>>
>>> Boots and passes selftests on 32-bit and 64-bit platforms. See
>>> documentation in Documentation/dev-tools/kcsan.rst for more information.
>>>
>>> Signed-off-by: Rohan McLure <rmclure@linux.ibm.com>
>>> ---
>>> New patch
>>> ---
>>>   arch/powerpc/Kconfig | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
>>> index 2c9cdf1d8761..45771448d47a 100644
>>> --- a/arch/powerpc/Kconfig
>>> +++ b/arch/powerpc/Kconfig
>>> @@ -197,7 +197,7 @@ config PPC
>>>    select HAVE_ARCH_KASAN if PPC_RADIX_MMU
>>>    select HAVE_ARCH_KASAN if PPC_BOOK3E_64
>>>    select HAVE_ARCH_KASAN_VMALLOC if HAVE_ARCH_KASAN
>>> - select HAVE_ARCH_KCSAN             if PPC_BOOK3S_64
>>> + select HAVE_ARCH_KCSAN
>>
>> So that's a followup of a not yet posted version v5 of the other series ?
>> Why not just add patch 1 in that series and have KCSAN for all powerpc
>> at once ?
> 
> So the v3 was accepted upstream, likely to appear in 6.3. This patch series is
> just to extend support to other platforms, once kcsan supports us.

Hum ... Ok.

I checked in checkpatch before writting that mail and saw that v4 was 
flagged "changes requested", so I didn't notice v3 was accepted.



> 
> Link: https://patchwork.ozlabs.org/project/linuxppc-dev/cover/20230206021801.105268-1-rmclure@linux.ibm.com/
> 
>>
>>>    select HAVE_ARCH_KFENCE if ARCH_SUPPORTS_DEBUG_PAGEALLOC
>>>    select HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET
>>>    select HAVE_ARCH_KGDB
> 
>
Michael Ellerman Feb. 20, 2023, 6:10 a.m. UTC | #4
Christophe Leroy <christophe.leroy@csgroup.eu> writes:
> Le 17/02/2023 à 00:23, Rohan McLure a écrit :
>>> On 16 Feb 2023, at 6:14 pm, Christophe Leroy <christophe.leroy@csgroup.eu> wrote:
>>> Le 16/02/2023 à 06:09, Rohan McLure a écrit :
>>>> Enable HAVE_ARCH_KCSAN on all powerpc platforms, permitting use of the
>>>> kernel concurrency sanitiser through the CONFIG_KCSAN_* kconfig options.
>>>>
>>>> Boots and passes selftests on 32-bit and 64-bit platforms. See
>>>> documentation in Documentation/dev-tools/kcsan.rst for more information.
>>>>
>>>> Signed-off-by: Rohan McLure <rmclure@linux.ibm.com>
>>>> ---
>>>> New patch
>>>> ---
>>>>   arch/powerpc/Kconfig | 2 +-
>>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
>>>> index 2c9cdf1d8761..45771448d47a 100644
>>>> --- a/arch/powerpc/Kconfig
>>>> +++ b/arch/powerpc/Kconfig
>>>> @@ -197,7 +197,7 @@ config PPC
>>>>    select HAVE_ARCH_KASAN if PPC_RADIX_MMU
>>>>    select HAVE_ARCH_KASAN if PPC_BOOK3E_64
>>>>    select HAVE_ARCH_KASAN_VMALLOC if HAVE_ARCH_KASAN
>>>> - select HAVE_ARCH_KCSAN             if PPC_BOOK3S_64
>>>> + select HAVE_ARCH_KCSAN
>>>
>>> So that's a followup of a not yet posted version v5 of the other series ?
>>> Why not just add patch 1 in that series and have KCSAN for all powerpc
>>> at once ?
>> 
>> So the v3 was accepted upstream, likely to appear in 6.3. This patch series is
>> just to extend support to other platforms, once kcsan supports us.
>
> Hum ... Ok.
>
> I checked in checkpatch before writting that mail and saw that v4 was 
> flagged "changes requested", so I didn't notice v3 was accepted.

Sorry that's my fault. I talked to Rohan on chat and decided that taking
v3 was the best way to get something in before the merge window closed.

cheers
diff mbox series

Patch

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 2c9cdf1d8761..45771448d47a 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -197,7 +197,7 @@  config PPC
 	select HAVE_ARCH_KASAN			if PPC_RADIX_MMU
 	select HAVE_ARCH_KASAN			if PPC_BOOK3E_64
 	select HAVE_ARCH_KASAN_VMALLOC		if HAVE_ARCH_KASAN
-	select HAVE_ARCH_KCSAN            	if PPC_BOOK3S_64
+	select HAVE_ARCH_KCSAN
 	select HAVE_ARCH_KFENCE			if ARCH_SUPPORTS_DEBUG_PAGEALLOC
 	select HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET
 	select HAVE_ARCH_KGDB