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: <20210804165751.ifppsn3eqjnvfgqs@linutronix.de>
Date:   Wed, 4 Aug 2021 18:57:51 +0200
From:   Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     Jens Axboe <axboe@...nel.dk>,
        Peter Zijlstra <peterz@...radead.org>,
        Daniel Wagner <wagi@...om.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        LKML <linux-kernel@...r.kernel.org>,
        linux-rt-users@...r.kernel.org
Subject: Re: [ANNOUNCE] v5.14-rc4-rt4

On 2021-08-04 12:47:55 [-0400], Steven Rostedt wrote:
> On Wed, 4 Aug 2021 18:31:19 +0200
> Sebastian Andrzej Siewior <bigeasy@...utronix.de> wrote:
> 
> > CPU-local wake-ups just set NEED_RESCHED and wait for preempt_enable()
> > to do the magic. Just because the code not perform wake_up() now does
> > not mean it will not do so in the future. Also it is here as an example
> > which might be copied somewhere else.
> 
> Does this mean all local_irq_disable/enable() is audited? What do you do for;
> 
> 	local_irq_disable();
> 	[..]
> 	wakeup_process(x); /* on local CPU */
> 	[..]
> 	local_irq_enable();

I hunted and fixed a few of those. I still have few
preempt_check_resched_rt() which I want fix other than what is in RT.

> And if local_irq_disable() is not used anymore, or seldom, what harm
> would it be to add a preemption check to that caller? And change
> local_irq_enable() that is used internally by other atom functions be
> called __local_irq_enable()?
> 
> Not to mention that we could just open code that too:
> 
> 	if (IS_ENABLED(CONFIG_PREEMPT_RT)) {
> 		local_irq_enable();
> 		preempt_check_resched();
> 	}
> 
> And make it ugly enough that nobody will want to copy it :-)

I remember that the amount of enthusiasm was quite low when it was
suggested that local_irq_enable() gets additionally the preempt-check.
Maybe was due to the people involved :)
But we managed to work around it for most callers. Therefore we I
wouldn't suggest local_irq_disable_rt(). We had it in -RT, we had a
bunch of users and all of them were fixed in a different way.

Same goes btw. for preempt_disable_rt() which has been reduced to vmstat
and had previously more users :)

> -- Steve

Sebastian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ