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] [day] [month] [year] [list]
Message-ID: <20210806142643.GU1583@gate.crashing.org>
Date:   Fri, 6 Aug 2021 09:26:43 -0500
From:   Segher Boessenkool <segher@...nel.crashing.org>
To:     Michael Ellerman <mpe@...erman.id.au>
Cc:     sxwjean@...com, linuxppc-dev@...ts.ozlabs.org,
        ravi.bangoria@...ux.ibm.com, Xiongwei Song <sxwjean@...il.com>,
        oleg@...hat.com, npiggin@...il.com, linux-kernel@...r.kernel.org,
        efremov@...ux.com, paulus@...ba.org, aneesh.kumar@...ux.ibm.com,
        peterx@...hat.com, akpm@...ux-foundation.org,
        sandipan@...ux.ibm.com
Subject: Re: [RFC PATCH 1/4] powerpc: Optimize register usage for esr register

On Fri, Aug 06, 2021 at 04:53:14PM +1000, Michael Ellerman wrote:
> But I'm not sure about the use of anonymous unions in UAPI headers. Old
> compilers don't support them, so there's a risk of breakage.

More precisely, it exists only since C11, so even with all not-so-ancient
compilers it will not work if the user uses (say) -std=c99, which still
is popular.

> I'd rather we didn't touch the uapi version.

Yeah.

> > -	err = ___do_page_fault(regs, regs->dar, regs->dsisr);
> > +	if (IS_ENABLED(CONFIG_4xx) || IS_ENABLED(CONFIG_BOOKE))
> > +		err = ___do_page_fault(regs, regs->dar, regs->esr);
> > +	else
> > +		err = ___do_page_fault(regs, regs->dar, regs->dsisr);
> 
> As Christophe said, I don't thinks this is an improvement.
> 
> It makes the code less readable. If anyone is confused about what is
> passed to ___do_page_fault() they can either read the comment above it,
> or look at the definition of pt_regs to see that esr and dsisr share
> storage.

Esp. since the affected platforms are legacy, yup.


Segher

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ