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:	Tue, 16 Nov 2010 09:57:57 +0000
From:	Catalin Marinas <catalin.marinas@....com>
To:	Russell King - ARM Linux <linux@....linux.org.uk>
Cc:	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 06/20] ARM: LPAE: Introduce the 3-level page table
 format definitions

On 15 November 2010 18:34, Russell King - ARM Linux
<linux@....linux.org.uk> wrote:
> On Fri, Nov 12, 2010 at 06:00:26PM +0000, Catalin Marinas wrote:
>> +#define PMD_TYPE_MASK                (_AT(pmd_t, 3) << 0)
>> +#define PMD_TYPE_FAULT               (_AT(pmd_t, 0) << 0)
>> +#define PMD_TYPE_TABLE               (_AT(pmd_t, 3) << 0)
>> +#define PMD_TYPE_SECT                (_AT(pmd_t, 1) << 0)
>> +#define PMD_BIT4             (_AT(pmd_t, 0))
>> +#define PMD_DOMAIN(x)                (_AT(pmd_t, 0))
>
> It is really not correct to have these constants type'd as pmd_t.
> The idea behind pmd_t et.al. is to detect when normal arithmetic or
> logical operations are performed on page table entries when the
> accessors instead should be used.

OK, I can add pmdval_t (and pgdval_t) and use it for these definitions.

>> diff --git a/arch/arm/mm/mm.h b/arch/arm/mm/mm.h
>> index 6630620..a62f093 100644
>> --- a/arch/arm/mm/mm.h
>> +++ b/arch/arm/mm/mm.h
>> @@ -16,10 +16,10 @@ static inline pmd_t *pmd_off_k(unsigned long virt)
>>  }
>>
>>  struct mem_type {
>> -     unsigned int prot_pte;
>> -     unsigned int prot_l1;
>> -     unsigned int prot_sect;
>> -     unsigned int domain;
>> +     pgprot_t prot_pte;
>> +     pgprot_t prot_l1;
>> +     pgprot_t prot_sect;
>> +     pgprot_t domain;
>
> Again, this is wrong.  There's an accessor for pgprot_t typed data.  This
> causes code to violate it.

OK, I'll define pgprotval_t and accessors.

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