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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141209124845.GB3990@pd.tnic>
Date:	Tue, 9 Dec 2014 13:48:46 +0100
From:	Borislav Petkov <bp@...en8.de>
To:	Ard Biesheuvel <ard.biesheuvel@...aro.org>
Cc:	linux-efi <linux-efi@...r.kernel.org>,
	Laszlo Ersek <lersek@...hat.com>,
	Matt Fleming <matt.fleming@...el.com>,
	Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>,
	lkml <linux-kernel@...r.kernel.org>
Subject: Re: Shorten efi regions output

On Tue, Dec 09, 2014 at 01:42:44PM +0100, Ard Biesheuvel wrote:
> The |] thing is easily fixed, though.
> 
> [...]
> > diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
> > index 8590099ac148..6734072980ee 100644
> > --- a/drivers/firmware/efi/efi.c
> > +++ b/drivers/firmware/efi/efi.c
> [...]
> > @@ -490,15 +490,15 @@ char * __init efi_md_typeattr_format(char *buf, size_t size,
> >                 snprintf(pos, size, "|attr=0x%016llx]",
> >                          (unsigned long long)attr);
> >         else
> > -               snprintf(pos, size, "|%3s|%2s|%2s|%2s|%3s|%2s|%2s|%2s|%2s]",
> > -                        attr & EFI_MEMORY_RUNTIME ? "RUN" : "",
> > -                        attr & EFI_MEMORY_XP      ? "XP"  : "",
> > -                        attr & EFI_MEMORY_RP      ? "RP"  : "",
> > -                        attr & EFI_MEMORY_WP      ? "WP"  : "",
> > -                        attr & EFI_MEMORY_UCE     ? "UCE" : "",
> > -                        attr & EFI_MEMORY_WB      ? "WB"  : "",
> > -                        attr & EFI_MEMORY_WT      ? "WT"  : "",
> > -                        attr & EFI_MEMORY_WC      ? "WC"  : "",
> > -                        attr & EFI_MEMORY_UC      ? "UC"  : "");
> > +               snprintf(pos, size, "|%s%s%s%s%s%s%s%s%s]",
> 
> Drop the leading | here
> 
> > +                        attr & EFI_MEMORY_RUNTIME ? "RT|"  : "",
> > +                        attr & EFI_MEMORY_XP      ? "XP|"  : "",
> > +                        attr & EFI_MEMORY_RP      ? "RP|"  : "",
> > +                        attr & EFI_MEMORY_WP      ? "WP|"  : "",
> > +                        attr & EFI_MEMORY_UCE     ? "UCE|" : "",
> > +                        attr & EFI_MEMORY_WB      ? "WB|"  : "",
> > +                        attr & EFI_MEMORY_WT      ? "WT|"  : "",
> > +                        attr & EFI_MEMORY_WC      ? "WC|"  : "",
> > +                        attr & EFI_MEMORY_UC      ? "UC"   : "");
> 
> and move all the | to the beginning of the string here, including "UC"

Haha, of course! :-)

/me slaps forehead.

Thanks!

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ