Patch "powerpc/kcsan: Exclude udelay to prevent recursive instrumentation" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    powerpc/kcsan: Exclude udelay to prevent recursive instrumentation

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     powerpc-kcsan-exclude-udelay-to-prevent-recursive-in.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 99decb028cfa60e2278956529dbdaa91fad26383
Author: Rohan McLure <rmclure@xxxxxxxxxxxxx>
Date:   Mon Feb 6 13:17:58 2023 +1100

    powerpc/kcsan: Exclude udelay to prevent recursive instrumentation
    
    [ Upstream commit 2a7ce82dc46c591c9244057d89a6591c9639b9b9 ]
    
    In order for KCSAN to increase its likelihood of observing a data race,
    it sets a watchpoint on memory accesses and stalls, allowing for
    detection of conflicting accesses by other kernel threads or interrupts.
    
    Stalls are implemented by injecting a call to udelay in instrumented code.
    To prevent recursive instrumentation, exclude udelay from being instrumented.
    
    Signed-off-by: Rohan McLure <rmclure@xxxxxxxxxxxxx>
    Signed-off-by: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230206021801.105268-3-rmclure@xxxxxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 934d8ae66cc63..4406d7a89558b 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -450,7 +450,7 @@ void vtime_flush(struct task_struct *tsk)
 #define calc_cputime_factors()
 #endif
 
-void __delay(unsigned long loops)
+void __no_kcsan __delay(unsigned long loops)
 {
 	unsigned long start;
 
@@ -471,7 +471,7 @@ void __delay(unsigned long loops)
 }
 EXPORT_SYMBOL(__delay);
 
-void udelay(unsigned long usecs)
+void __no_kcsan udelay(unsigned long usecs)
 {
 	__delay(tb_ticks_per_usec * usecs);
 }



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux