From: "Wentao Guan" <guanwentao@uniontech.com>
To: "Huacai Chen" <chenhuacai@kernel.org>
Cc: "WANG Xuerui" <kernel@xen0n.name>,
linux-kernel <linux-kernel@vger.kernel.org>,
loongarch <loongarch@lists.linux.dev>, 占俊 <zhanjun@uniontech.com>,
聂诚 <niecheng1@uniontech.com>
Subject: Re: [PATCH] LoongArch: mm: try VMA lock-based page fault handling first
Date: Sun, 28 Sep 2025 22:46:14 +0800 [thread overview]
Message-ID: <tencent_0699F58F055D10117355797A@qq.com> (raw)
In-Reply-To: <CAAhV-H5ny_e9G5qRUMYW-d5LqjXv8rvsGMz9BQPt6+npyPmCOA@mail.gmail.com>
Hello Huacai,
Thanks for your review, I will fixed in V2.
> > + if (write) {
> > + flags |= FAULT_FLAG_WRITE;
> > + if (!(vma->vm_flags & VM_WRITE)) {
> > + vma_end_read(vma);
> > + si_code = SEGV_ACCERR;
> Need count_vm_vma_lock_event(VMA_LOCK_SUCCESS) here.
Ok, I forget it.
> > + goto bad_area_nosemaphore;
> > + }
> > + } else {
> > + if (!(vma->vm_flags & VM_EXEC) && address == exception_era(regs)){
> > + vma_end_read(vma);
> > + si_code = SEGV_ACCERR;
> The same.
Ok.
> > + goto bad_area_nosemaphore;
> > + }
> > + if (!(vma->vm_flags & (VM_READ | VM_WRITE)) && address != exception_era(regs)){
> > + vma_end_read(vma);
> > + si_code = SEGV_ACCERR;
>The same.
Ok.
> >
> > mmap_read_unlock(mm);
> > +done:
> > We need error handling here.
Ok.
Best Regards
Wentao Guan
prev parent reply other threads:[~2025-09-28 14:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-25 9:29 Wentao Guan
2025-09-28 13:58 ` Huacai Chen
2025-09-28 14:46 ` Wentao Guan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tencent_0699F58F055D10117355797A@qq.com \
--to=guanwentao@uniontech.com \
--cc=chenhuacai@kernel.org \
--cc=kernel@xen0n.name \
--cc=linux-kernel@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
--cc=niecheng1@uniontech.com \
--cc=zhanjun@uniontech.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®