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: <1547148671.83374.54.camel@acm.org>
Date:   Thu, 10 Jan 2019 11:31:11 -0800
From:   Bart Van Assche <bvanassche@....org>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     mingo@...hat.com, tj@...nel.org, longman@...hat.com,
        johannes.berg@...el.com, linux-kernel@...r.kernel.org,
        Johannes Berg <johannes@...solutions.net>
Subject: Re: [PATCH v5 07/15] locking/lockdep: Free lock classes that are no
 longer in use

On Thu, 2019-01-10 at 16:28 +0100, Peter Zijlstra wrote:
> On Mon, Dec 17, 2018 at 01:29:54PM -0800, Bart Van Assche wrote:
> > +static bool inside_selftest(void)
> > +{
> > +	return current == lockdep_selftest_task_struct;
> > +}
> > +void lockdep_free_key_range(void *start, unsigned long size)
> > +{
> > +	init_data_structures_once();
> > +
> > +	if (inside_selftest())
> > +		lockdep_free_key_range_imm(start, size);
> > +	else
> > +		lockdep_free_key_range_reg(start, size);
> >  }
> 
> That is .... unfortunate. The whole reason that whole immediate thing
> works at all is because there is no concurrency what so ever that early,
> right?
> 
> Should we maybe key off of: 'system_state == SYSTEM_BOOTING' instead?

Hi Peter,

I agree that it is unfortunate that the selftests require a different code
path. I have not been able to find any way to avoid this. Using the test
system_state == SYSTEM_BOOTING should work and will allow to remove the
lockdep_selftest_task_struct variable. Do you want me to make that change?

Bart.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ