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: <alpine.DEB.2.21.1911071038190.4256@nanos.tec.linutronix.de>
Date:   Thu, 7 Nov 2019 10:38:38 +0100 (CET)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Peter Zijlstra <peterz@...radead.org>
cc:     LKML <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Darren Hart <darren@...art.com>,
        Yi Wang <wang.yi59@....com.cn>,
        Yang Tao <yang.tao172@....com.cn>,
        Oleg Nesterov <oleg@...hat.com>,
        Florian Weimer <fweimer@...hat.com>,
        Carlos O'Donell <carlos@...hat.com>,
        Alexander Viro <viro@...iv.linux.org.uk>
Subject: Re: [patch 02/12] futex: Move futex exit handling into futex code

On Thu, 7 Nov 2019, Peter Zijlstra wrote:
> On Wed, Nov 06, 2019 at 10:55:36PM +0100, Thomas Gleixner wrote:
> 
> > -#ifdef CONFIG_FUTEX
> > -	if (unlikely(tsk->robust_list)) {
> > -		exit_robust_list(tsk);
> > -		tsk->robust_list = NULL;
> > -	}
> > -#ifdef CONFIG_COMPAT
> > -	if (unlikely(tsk->compat_robust_list)) {
> > -		compat_exit_robust_list(tsk);
> > -		tsk->compat_robust_list = NULL;
> > -	}
> > -#endif
> > -	if (unlikely(!list_empty(&tsk->pi_state_list)))
> > -		exit_pi_state_list(tsk);
> > -#endif
> 
> > +void futex_mm_release(struct task_struct *tsk)
> > +{
> > +	if (unlikely(tsk->robust_list)) {
> > +		exit_robust_list(tsk);
> > +		tsk->robust_list = NULL;
> > +	}
> > +
> > +	if (IS_ENABLED(CONFIG_COMPAT)) {
> > +		if (unlikely(tsk->compat_robust_list)) {
> > +			compat_exit_robust_list(tsk);
> > +			tsk->compat_robust_list = NULL;
> > +		}
> > +	}
> 
> I suppose it is this substitution that causes the compile error mingo
> found. The problem with IS_ENABLED() is that the whole block still needs
> to compile (before it can be thrown out), and in this case
> tsk->compat_robust_list doesn't exist.

Yeah. Tried to be overly smart :)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ