[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZnhCX-GMRn_uYDF8@x1n>
Date: Sun, 23 Jun 2024 11:42:23 -0400
From: Peter Xu <peterx@...hat.com>
To: Dave Hansen <dave.hansen@...el.com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org, x86@...nel.org,
Borislav Petkov <bp@...en8.de>, Dave Jiang <dave.jiang@...el.com>,
"Kirill A . Shutemov" <kirill@...temov.name>,
Ingo Molnar <mingo@...hat.com>, Oscar Salvador <osalvador@...e.de>,
Matthew Wilcox <willy@...radead.org>,
Vlastimil Babka <vbabka@...e.cz>,
Dan Williams <dan.j.williams@...el.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Hugh Dickins <hughd@...gle.com>,
Michael Ellerman <mpe@...erman.id.au>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Thomas Gleixner <tglx@...utronix.de>, linuxppc-dev@...ts.ozlabs.org,
Christophe Leroy <christophe.leroy@...roup.eu>,
Rik van Riel <riel@...riel.com>,
Mel Gorman <mgorman@...hsingularity.net>,
"Aneesh Kumar K . V" <aneesh.kumar@...ux.ibm.com>,
Nicholas Piggin <npiggin@...il.com>,
Huang Ying <ying.huang@...el.com>,
"Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
Subject: Re: [PATCH 6/7] mm/x86: Add missing pud helpers
On Fri, Jun 21, 2024 at 09:11:56AM -0700, Dave Hansen wrote:
> It's in the "Determination of Access Rights" section.
>
> A linear address is a shadow-stack address if the following are
> true of the translation of the linear address: (1) the R/W flag
> (bit 1) is 0 and the dirty flag (bit 6) is 1 in the paging-
> structure entry that maps the page containing the linear
> address; and (2) the R/W flag is 1 in every other paging-
> structure entry controlling the translation of the linear
> address.
Thanks. It'll be nice if this can be referenced in the pgtable definitions
too in some way.
[...]
> One big thing I did in this review was make sure that the PMD and PUD
> helpers were doing the same thing. Would you mind circling back and
> double-checking the same before you repost this?
Sure, I'll make sure I'll at least add a comment if it doesn't match and
explain why. I actually did it already e.g. in the _modify path for shadow
stack, but I failed this spot.
The page table check thing is really rare that I overlooked, could be
relevant to what I used to hit a bug but fixed around this area, so I
forgot to add it back, but I really can't remember. I'll keep an extra eye
on that.
Thanks,
--
Peter Xu
Powered by blists - more mailing lists