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:   Wed, 22 Feb 2017 01:12:42 +0000
From:   Russell King - ARM Linux <linux@...linux.org.uk>
To:     James Morse <james.morse@....com>
Cc:     Tyler Baicar <tbaicar@...eaurora.org>, christoffer.dall@...aro.org,
        marc.zyngier@....com, pbonzini@...hat.com, rkrcmar@...hat.com,
        catalin.marinas@....com, will.deacon@....com, rjw@...ysocki.net,
        lenb@...nel.org, matt@...eblueprint.co.uk, robert.moore@...el.com,
        lv.zheng@...el.com, nkaje@...eaurora.org, zjzhang@...eaurora.org,
        mark.rutland@....com, akpm@...ux-foundation.org,
        eun.taik.lee@...sung.com, sandeepa.s.prabhu@...il.com,
        labbott@...hat.com, shijie.huang@....com, rruigrok@...eaurora.org,
        paul.gortmaker@...driver.com, tn@...ihalf.com, fu.wei@...aro.org,
        rostedt@...dmis.org, bristot@...hat.com,
        linux-arm-kernel@...ts.infradead.org, kvmarm@...ts.cs.columbia.edu,
        kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-acpi@...r.kernel.org, linux-efi@...r.kernel.org,
        devel@...ica.org, Suzuki.Poulose@....com, punit.agrawal@....com,
        astone@...hat.com, harba@...eaurora.org, hanjun.guo@...aro.org,
        john.garry@...wei.com, shiju.jose@...wei.com
Subject: Re: [PATCH V10 07/10] efi: print unrecognized CPER section

On Tue, Feb 21, 2017 at 07:10:11PM +0000, James Morse wrote:
> Hi Tyler,
> 
> On 15/02/17 19:51, Tyler Baicar wrote:
> > +	} else {
> > +		const void *unknown_err;
> > +
> > +		unknown_err = acpi_hest_generic_data_payload(gdata);
> > +		printk("%ssection type: %pUl\n", newpfx, sec_type);
> > +		printk("%ssection length: %d\n", newpfx,
> 
> Nit: please use the "%s""section... that this file consistently uses. This means
> this code will still work as expected when someone adds '%ss' support to printk!

No.  That is wrong:

"%s""section" is stored in memory as bytes containing:

'%' 's' 's' 'e' 'c' 't' 'i' 'o' 'n'

whereas "%ssection" is stored in memory as bytes containing:

'%' 's' 's' 'e' 'c' 't' 'i' 'o' 'n'

They're exactly the same, so when printk() comes to parse the string, it
sees exactly the same byte sequence.  So, the only thing that's happening
is code obfuscation for no good reason what so ever.

If you don't believe me, run some build tests and look at the resulting
strings... also look at the C standard.  "Adjacent string literal tokens
are concatenated."

Please get rid of this obfuscation.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ