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: <CAGXu5j+PZ8yX1=btQTwt58maQKTRWWuqnmMNhwzG7Y1fuRJ9qA@mail.gmail.com>
Date:	Sat, 22 Mar 2014 12:56:03 -0600
From:	Kees Cook <keescook@...omium.org>
To:	Rob Herring <robherring2@...il.com>
Cc:	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	Laura Abbott <lauraa@...eaurora.org>,
	Catalin Marinas <catalin.marinas@....com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Olof Johansson <olof@...om.net>,
	Russell King <linux@....linux.org.uk>,
	Steve Capper <steve.capper@...aro.org>
Subject: Re: [PATCH v3] ARM: mm: fix reporting of read-only PMD bits

On Sat, Mar 22, 2014 at 10:45 AM, Rob Herring <robherring2@...il.com> wrote:
> On Sat, Mar 22, 2014 at 10:16 AM, Kees Cook <keescook@...omium.org> wrote:
>> On non-LPAE ARMv6+, read-only PMD bits are defined with the combination
>> "PMD_SECT_APX | PMD_SECT_AP_WRITE". Adjusted the bit masks to correctly
>> report this.
>>
>> Signed-off-by: Kees Cook <keescook@...omium.org>
>> ---
>> v3:
>>  - check for pre-v6 CPUs on the page table report.
>> v2:
>>  - reorder bits, suggested by Olof.
>> ---
>>  arch/arm/mm/dump.c |   31 +++++++++++++++++++++++++------
>>  1 file changed, 25 insertions(+), 6 deletions(-)
>>
>> diff --git a/arch/arm/mm/dump.c b/arch/arm/mm/dump.c
>> index ef69152f9b52..c1122d266c45 100644
>> --- a/arch/arm/mm/dump.c
>> +++ b/arch/arm/mm/dump.c
>> @@ -121,23 +121,42 @@ static const struct prot_bits pte_bits[] = {
>>
>>  static const struct prot_bits section_bits[] = {
>>  #ifndef CONFIG_ARM_LPAE
>> -       /* These are approximate */
>> +# if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) || defined(CONFIG_CPU_V7)
>
> You can simplify the ifdef logic like this:
>
> #ifdef CONFIG_ARM_LPAE /* Implies v7 */
>
> #elif __LINUX_ARM_ARCH__ >= 6
>
> #else
> /* v4/v5 */
> #endif

Ah! Perfect, thanks! I'll resend it this way.

-Kees

-- 
Kees Cook
Chrome OS Security
--
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