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: <e948ccc6bdba4a789efecb73070d0bf2@AcuMS.aculab.com>
Date:   Mon, 10 Aug 2020 12:05:38 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     "'peterz@...radead.org'" <peterz@...radead.org>,
        Steven Rostedt <rostedt@...dmis.org>
CC:     "tglx@...utronix.de" <tglx@...utronix.de>,
        "mingo@...nel.org" <mingo@...nel.org>,
        "will@...nel.org" <will@...nel.org>,
        "x86@...nel.org" <x86@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "elver@...gle.com" <elver@...gle.com>,
        "paulmck@...nel.org" <paulmck@...nel.org>,
        "rjw@...ysocki.net" <rjw@...ysocki.net>
Subject: RE: [RFC][PATCH 2/3] locking,entry: #PF vs TRACE_IRQFLAGS

From: peterz@...radead.org
> Sent: 10 August 2020 12:58
> 
...
> > > --- a/include/linux/entry-common.h
> > > +++ b/include/linux/entry-common.h
> > > @@ -310,6 +310,7 @@ void irqentry_exit_to_user_mode(struct p
> > >  #ifndef irqentry_state
> > >  typedef struct irqentry_state {
> > >  	bool	exit_rcu;
> > > +	bool	irqs_enabled;
> >
> > Instead of passing a structure around, should we look at converting
> > "irqentry_state" into a flags field?
> 
> Probably, on x86_64-linux sizeof(_Bool) == 1, so it's two bytes and that
> fits perfectly fine in a normal return value, but yeah, this is common
> code now and we can't rely on sizeof(_Bool) being sane.

I'd check the arm ABI(s).
IIRC 'sizeof bool' changed - but I can't remember which way :-)

There are probably other ABI where a 'struct' return value
is always implemented as a 'pass by reference' parameter
(Probably M68k?).

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ