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] [day] [month] [year] [list]
Message-ID: <1429753587.16357.9.camel@freescale.com>
Date:	Wed, 22 Apr 2015 20:46:27 -0500
From:	Scott Wood <scottwood@...escale.com>
To:	Christophe Leroy <christophe.leroy@....fr>
CC:	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Paul Mackerras <paulus@...ba.org>,
	Michael Ellerman <mpe@...erman.id.au>,
	<linux-kernel@...r.kernel.org>, <linuxppc-dev@...ts.ozlabs.org>,
	"Joakim Tjernlund" <joakim.tjernlund@...nsmode.se>
Subject: Re: [PATCH 3/3] powerpc/8xx: Implementation of PAGE_EXEC

On Wed, 2015-04-22 at 12:06 +0200, Christophe Leroy wrote:
> diff --git a/arch/powerpc/include/asm/mmu-8xx.h b/arch/powerpc/include/asm/mmu-8xx.h
> index d41200c..1407034 100644
> --- a/arch/powerpc/include/asm/mmu-8xx.h
> +++ b/arch/powerpc/include/asm/mmu-8xx.h
> @@ -27,6 +27,19 @@
>  #define MI_Ks		0x80000000	/* Should not be set */
>  #define MI_Kp		0x40000000	/* Should always be set */
>  
> +/*
> + * All pages PP exec bits are set to 000, which means Execute for Supervisor
> + * and no Execute for User.
> + * Then we use the APG to say whether accesses are according to Page rules,
> + * "all Supervisor" rules (Exec for all) and "all User" rules (Exec for noone)
> + * Therefore, we define 4 APG groups. msb is _PAGE_EXEC, lsb is _PAGE_USER
> + * 0 (00) => Not User, no exec => 11 (all accesses performed as user)
> + * 1 (01) => User but no exec => 11 (all accesses performed as user)
> + * 2 (10) => Not User, exec => 01 (rights according to page definition)
> + * 3 (11) => User, exec => 00 (all accesses performed as supervisor)
> + */
> +#define MI_APG_INIT	0xf4ffffff
> +
>  /* The effective page number register.  When read, contains the information
>   * about the last instruction TLB miss.  When MI_RPN is written, bits in
>   * this register are used to create the TLB entry.
> @@ -87,6 +100,19 @@
>  #define MD_Ks		0x80000000	/* Should not be set */
>  #define MD_Kp		0x40000000	/* Should always be set */
>  
> +/*
> + * All pages PP exec bits are set to either 000 or 011, which means respectively
> + * RW for Supervisor and no access for User, or RO for Supervisor and no access
> + * for user.
> + * Then we use the APG to say whether accesses are according to Page rules or
> + * "all Supervisor" rules (Access to all)
> + * Therefore, we define 2 APG groups. lsb is _PAGE_USER
> + * 0 => No user => 01 (all accesses performed according to page definition)
> + * 1 => User => 00 (all accesses performed as supervisor
> + *                                 according to page definition)
> + */
> +#define MD_APG_INIT	0x4fffffff

"exec" bits or data?

-Scott


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