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:   Thu, 14 Dec 2017 15:12:03 +0100 (CET)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Juergen Gross <jgross@...e.com>
cc:     Jan Beulich <JBeulich@...e.com>, mingo@...e.hu, hpa@...or.com,
        xen-devel <xen-devel@...ts.xenproject.org>,
        Boris Ostrovsky <boris.ostrovsky@...cle.com>,
        sds@...ho.nsa.gov, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] x86: consider effective protection attributes in
 W+X check

On Thu, 14 Dec 2017, Juergen Gross wrote:
> On 12/12/17 11:31, Jan Beulich wrote:
> >  	for (i = 0; i < PTRS_PER_PMD; i++) {
> >  		st->current_address = normalize_addr(P + i * PMD_LEVEL_MULT);
> >  		if (!pmd_none(*start)) {
> > +			prot = pmd_flags(*start);
> > +			eff = effective_prot(eff_in, prot);
> >  			if (pmd_large(*start) || !pmd_present(*start)) {
> > -				prot = pmd_flags(*start);
> > -				note_page(m, st, __pgprot(prot), 4);
> > +				note_page(m, st, __pgprot(prot), eff, 4);
> >  			} else if (!kasan_page_table(m, st, pmd_start)) {
> > -				walk_pte_level(m, st, *start,
> > +				walk_pte_level(m, st, *start, eff,
> >  					       P + i * PMD_LEVEL_MULT);
> >  			}
> 
> You can drop the braces for both cases. Applies to similar
> constructs below, too.

No. See: https://marc.info/?l=linux-kernel&m=148467980905537

This is the same issue:

	if (foo)
		bla();
	else
		blurb(somestuff, morestuff, evenmorestuff,
		      crap);
vs.

	if (foo) {
		bla();
	} else {
		blurb(somestuff, morestuff, evenmorestuff,
		      crap);
	}

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ