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:	Mon, 8 Apr 2013 16:15:57 +0200
From:	Borislav Petkov <bp@...en8.de>
To:	Stefan Bader <stefan.bader@...onical.com>
Cc:	Ingo Molnar <mingo@...nel.org>,
	Andrea Arcangeli <aarcange@...hat.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Andy Whitcroft <apw@...onical.com>,
	Mel Gorman <mgorman@...e.de>
Subject: Re: x86/mm/pageattr: Code without effect?

On Mon, Apr 08, 2013 at 03:10:00PM +0200, Stefan Bader wrote:
>          * that we limited the number of possible pages already to
>          * the number of pages in the large page.
>          */
>         if (address == (address & pmask) && cpa->numpages == (psize >>
> PAGE_SHIFT)) {
>                 /*
>                  * The address is aligned and the number of pages
>                  * covers the full page.
>                  */
>                 new_pte = pfn_pte(pte_pfn(old_pte), new_prot);
>                                                      ^
> 
> This one. The first patch changed
> 
> -               new_pte = pfn_pte(pte_pfn(old_pte), canon_pgprot(new_prot));
> +               new_pte = pfn_pte(pte_pfn(old_pte), new_prot);
> 
> The fixup patch drops new_prot completely from being initialized and only works
> on req_prot. Probably it would be best to also drop the definition of new_prot.
> I think it then completely unused.

Actually, we do need and initialize new_prot at line 495:

	pfn = pte_pfn(old_pte) + ((address & (psize - 1)) >> PAGE_SHIFT);
	cpa->pfn = pfn;

	new_prot = static_protections(req_prot, address, pfn);		<---

and we need it for the subsequent loop where we go over the 512 PTEs to
decide whether to split or not.

So it is needed after all, AFAICT.

-- 
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