Re: [PATCH 12/12] ARM: 8109/1: mm: Modify pte_write and pmd_write

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 11, 2014 at 11:31:39AM +0000, Hou Pengyang wrote:
> From: Steven Capper <steve.capper@xxxxxxxxxx>
> 
> commit ded9477984690d026e46dd75e8157392cea3f13f upstream.
> 
> For LPAE, we have the following means for encoding writable or dirty
> ptes:
>                                 L_PTE_DIRTY       L_PTE_RDONLY
>     !pte_dirty && !pte_write        0               1
>     !pte_dirty && pte_write         0               1
>     pte_dirty && !pte_write         1               1
>     pte_dirty && pte_write          1               0
> 
> So we can't distinguish between writeable clean ptes and read only
> ptes. This can cause problems with ptes being incorrectly flagged as
> read only when they are writeable but not dirty.
> 
> This patch renumbers L_PTE_RDONLY from AP[2] to a software bit #58,
> and adds additional logic to set AP[2] whenever the pte is read only
> or not dirty. That way we can distinguish between clean writeable ptes
> and read only ptes.
> 
> HugeTLB pages will use this new logic automatically.
> 
> We need to add some logic to Transparent HugePages to ensure that they
> correctly interpret the revised pgprot permissions (L_PTE_RDONLY has
> moved and no longer matches PMD_SECT_AP2). In the process of revising
> THP, the names of the PMD software bits have been prefixed with L_ to
> make them easier to distinguish from their hardware bit counterparts.
> 
> Signed-off-by: Steve Capper <steve.capper@xxxxxxxxxx>
> Reviewed-by: Will Deacon <will.deacon@xxxxxxx>
> Signed-off-by: Russell King <rmk+kernel@xxxxxxxxxxxxxxxx>
> [hpy: Backported to 3.10
>  - adjust the context
>  - ignore change related to pmd, because 3.10 does not support HugePage ]
> Signed-off-by: Hou Pengyang <houpengyang@xxxxxxxxxx>
> ---
>  arch/arm/include/asm/pgtable-3level-hwdef.h | 1 +
>  arch/arm/include/asm/pgtable-3level.h       | 6 +++---
>  arch/arm/mm/proc-v7-3level.S                | 9 +++++++--
>  3 files changed, 11 insertions(+), 5 deletions(-)

Can you also provide a backport to 3.14 for this patch?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]