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]
Date:	Thu, 30 Apr 2015 14:32:26 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	linux-rt-users <linux-rt-users@...r.kernel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
	Clark Williams <williams@...hat.com>,
	Dave Chinner <david@...morbit.com>
Subject: Re: [PATCH][RT] xfs: Disable preemption when grabbing all icsb
 counter locks

On Thu, 30 Apr 2015 20:07:21 +0200
Peter Zijlstra <peterz@...radead.org> wrote:

> On Thu, Apr 30, 2015 at 12:33:03PM -0400, Steven Rostedt wrote:
> > diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
> > index 51435dbce9c4..dbaa1ce3f308 100644
> > --- a/fs/xfs/xfs_mount.c
> > +++ b/fs/xfs/xfs_mount.c
> > @@ -1660,6 +1660,12 @@ xfs_icsb_lock_all_counters(
> >  	xfs_icsb_cnts_t *cntp;
> >  	int		i;
> >  
> > +	/*
> > +	 * In PREEMPT_RT, preemption is not disabled here, and it
> > +	 * must be to take the xfs_icsb_lock_cntr.
> > +	 */
> > +	preempt_disable_rt();
> > +
> >  	for_each_online_cpu(i) {
> >  		cntp = (xfs_icsb_cnts_t *)per_cpu_ptr(mp->m_sb_cnts, i);
> >  		xfs_icsb_lock_cntr(cntp);
> > @@ -1677,6 +1683,8 @@ xfs_icsb_unlock_all_counters(
> >  		cntp = (xfs_icsb_cnts_t *)per_cpu_ptr(mp->m_sb_cnts, i);
> >  		xfs_icsb_unlock_cntr(cntp);
> >  	}
> > +
> > +	preempt_enable_rt();
> >  }
> 
> The irony, this is distinctly non deterministic code you're putting
> under a RT specific preempt_disable ;-)

I know :-(

Unfortunately, a RT behaving fix would be much more invasive and would
probably require the help of the xfs folks. For now, this just prevents
a live lock that can happen and halt the system, where it becomes
deterministic catastrophe.

-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ