Re: [PATCH v2 2/4] mm: internal: fix inconsistent in folio_pte_batch_flags() for shadow stack

From: Yeoreum Yun

Date: Fri Nov 06 2026 - 04:33:11 EST


> On 11/2/26 15:07, Yeoreum Yun wrote:
> >>>
> >>> Sorry. But I couldn't follow. If we accumalate with any_unwritable
> >>> and check it out of loop once only, we couldn't properly nr value or
> >>> Am I missing something?
> >>
> >> Ah. The idea was to simply reject the batch entirely if that happens. It would
> >> only matter if some folio PTEs are writable while others are not ... well, ok,
> >> there are some cases where that can happen, but it's not really the common case.
> >>
> >> I think we should simply disallow ever getting large folios into shadow stack
> >> VMAs for now. So I'd prefer the fix below.
> >>
> >> Thoughts?
> >
> > That's my preference too and we've discussed :)
> > I'll repost with below unless anyone has any strong comment.
>
> Yes, best to wait a couple of days for people to catch up.

If there is no comments for prohibiting to set VM_HUGEPAGE for
shadow stack as David's suggestion, I'll post with this on early next
week.

Thanks!

--
Sincerely,
Yeoreum Yun