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: <20190904113038.GE2349@hirez.programming.kicks-ass.net>
Date:   Wed, 4 Sep 2019 13:30:38 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     Alessio Balsini <balsini@...roid.com>, mingo@...nel.org,
        juri.lelli@...hat.com, linux-kernel@...r.kernel.org,
        dietmar.eggemann@....com, luca.abeni@...tannapisa.it,
        bristot@...hat.com, dvyukov@...gle.com, tglx@...utronix.de,
        vpillai@...italocean.com, kernel-team@...roid.com
Subject: Re: [RFC][PATCH 01/13] sched/deadline: Impose global limits on
 sched_attr::sched_period

On Wed, Sep 04, 2019 at 06:16:16AM -0400, Steven Rostedt wrote:
> On Mon, 2 Sep 2019 11:16:23 +0200
> Peter Zijlstra <peterz@...radead.org> wrote:
> 
> > in sched_dl_period_handler(). And do:
> > 
> > +	preempt_disable();
> > 	max = (u64)READ_ONCE(sysctl_sched_dl_period_max) * NSEC_PER_USEC;
> > 	min = (u64)READ_ONCE(sysctl_sched_dl_period_min) * NSEC_PER_USEC;
> > +	preempt_enable();
> 
> Hmm, I'm curious. Doesn't the preempt_disable/enable() also add
> compiler barriers which would remove the need for the READ_ONCE()s here?

They do add compiler barriers; but they do not avoid the compiler
tearing stuff up.

So while Linus has declared that compilers should not be tearing shit
up, I'm hesitant to actually trust compilers much these days.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ