lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202106021051.0AF942F9@keescook>
Date:   Wed, 2 Jun 2021 10:53:08 -0700
From:   Kees Cook <keescook@...omium.org>
To:     Yejune Deng <yejune.deng@...il.com>
Cc:     tglx@...utronix.de, peterz@...radead.org, frederic@...nel.org,
        mingo@...nel.org, dave@...olabs.net, linux-kernel@...r.kernel.org,
        Yejune Deng <yejunedeng@...il.com>
Subject: Re: [PATCH] softirq: Remove the unnecessary CONFIG_TRACE_IRQFLAGS

On Wed, Jun 02, 2021 at 03:34:42PM +0800, Yejune Deng wrote:
> The local_irq_enable() and local_irq_disable() had two definitions that
> include CONFIG_TRACE_IRQFLAGS or not.

Hm, this has a behavioral change. Current code only does tracing and
raw_local_irq_disable/enable when CONFIG_TRACE_IRQFLAGS. This change
causes it to always do raw_local_irq_disable/enable. Which is the right
behavior?

-Kees

> 
> Signed-off-by: Yejune Deng <yejunedeng@...il.com>
> ---
>  kernel/softirq.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/kernel/softirq.c b/kernel/softirq.c
> index 4992853..a81d804 100644
> --- a/kernel/softirq.c
> +++ b/kernel/softirq.c
> @@ -362,9 +362,7 @@ void __local_bh_enable_ip(unsigned long ip, unsigned int cnt)
>  {
>  	WARN_ON_ONCE(in_irq());
>  	lockdep_assert_irqs_enabled();
> -#ifdef CONFIG_TRACE_IRQFLAGS
>  	local_irq_disable();
> -#endif
>  	/*
>  	 * Are softirqs going to be turned on now:
>  	 */
> @@ -385,9 +383,7 @@ void __local_bh_enable_ip(unsigned long ip, unsigned int cnt)
>  	}
>  
>  	preempt_count_dec();
> -#ifdef CONFIG_TRACE_IRQFLAGS
>  	local_irq_enable();
> -#endif
>  	preempt_check_resched();
>  }
>  EXPORT_SYMBOL(__local_bh_enable_ip);
> -- 
> 2.7.4
> 

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ