Re: [PATCH v4 5/7] mm/x86: arch_check_zapped_pud()

2024-08-08 Thread David Hildenbrand
+void arch_check_zapped_pud(struct vm_area_struct *vma, pud_t pud) +{ + /* See note in arch_check_zapped_pte() */ + VM_WARN_ON_ONCE(!(vma->vm_flags & VM_SHADOW_STACK) && + pud_shstk(pud)); Please get rid of the line break. You have 100 characters. Coding-style

Re: [PATCH v4 5/7] mm/x86: arch_check_zapped_pud()

2024-08-08 Thread Peter Xu
On Thu, Aug 08, 2024 at 12:28:47AM +0200, Thomas Gleixner wrote: > On Wed, Aug 07 2024 at 15:48, Peter Xu wrote: > > > Subject: mm/x86: arch_check_zapped_pud() > > Is not a proper subject line. It clearly lacks a verb. > > Subject: mm/x86: Implement arch_check_zapped_pud() > > > > Introduce

Re: [PATCH v4 5/7] mm/x86: arch_check_zapped_pud()

2024-08-07 Thread Thomas Gleixner
On Wed, Aug 07 2024 at 15:48, Peter Xu wrote: > Subject: mm/x86: arch_check_zapped_pud() Is not a proper subject line. It clearly lacks a verb. Subject: mm/x86: Implement arch_check_zapped_pud() > Introduce arch_check_zapped_pud() to sanity check shadow stack on PUD zaps. > It has the same l

[PATCH v4 5/7] mm/x86: arch_check_zapped_pud()

2024-08-07 Thread Peter Xu
Introduce arch_check_zapped_pud() to sanity check shadow stack on PUD zaps. It has the same logic of the PMD helper. One thing to mention is, it might be a good idea to use page_table_check in the future for trapping wrong setups of shadow stack pgtable entries [1]. That is left for the future as