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, 7 Jul 2008 21:39:48 +1000
From:	Nick Piggin <nickpiggin@...oo.com.au>
To:	Hugh Dickins <hugh@...itas.com>,
	"Martin Schwidefsky" <schwidefsky@...glemail.com>
Cc:	benh@...nel.crashing.org, cotte@...ibm.com,
	Zan Lynx <zlynx@....org>, Ryan Hope <rmh3093@...il.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: Lockless/Get_User_Pages_Fast causes Xorg 1.4.99.* to lock

On Monday 07 July 2008 20:39, Hugh Dickins wrote:
> On Mon, 7 Jul 2008, Nick Piggin wrote:
> > I think we need a similar fix for s390 too. If so, then it really should
> > get into 2.6.26, but this late in the release, I hope an s390 maintainer
> > might be able to test and verify the fix?
>
> Wow, yes, I hadn't realized s390 is ahead of the game there: glad you're
> back to spot that.  But yes, we'd prefer maintainer to confirm and push.
>
>
> [PATCH]] s390: protect _PAGE_SPECIAL bit against mprotect
>
> Stop mprotect's pte_modify from wiping out the s390 pte_special bit, which
> caused oops thereafter when vm_normal_page thought X's abnormal was normal.
>
> Signed-off-by: Nick Piggin <npiggin@...e.de>
> Acked-by: Hugh Dickins <hugh@...itas.com>

Thanks, I feel silly to take the authorship of this before your x86
version gets in (and will likely not be credited if it is folded
before merging)

Martin, could you please credit Hugh for the debugging? :)

Thanks,

> ---
> Index: linux-2.6/include/asm-s390/pgtable.h
> ===================================================================
> --- linux-2.6.orig/include/asm-s390/pgtable.h
> +++ linux-2.6/include/asm-s390/pgtable.h
> @@ -223,6 +223,9 @@ extern char empty_zero_page[PAGE_SIZE];
>  #define _PAGE_SPECIAL	0x004		/* SW associated with special page */
>  #define __HAVE_ARCH_PTE_SPECIAL
>
> +/* Set of bits not changed in pte_modify */
> +#define _PAGE_CHG_MASK	(PAGE_MASK | _PAGE_SPECIAL)
> +
>  /* Six different types of pages. */
>  #define _PAGE_TYPE_EMPTY	0x400
>  #define _PAGE_TYPE_NONE		0x401
> @@ -681,7 +684,7 @@ static inline void pte_clear(struct mm_s
>   */
>  static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
>  {
> -	pte_val(pte) &= PAGE_MASK;
> +	pte_val(pte) &= _PAGE_CHG_MASK;
>  	pte_val(pte) |= pgprot_val(newprot);
>  	return pte;
>  }
--
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