在 星期一, 2020-12-07 19:24:10 Dominique Martinet 撰写
> Chengguang Xu wrote on Mon, Dec 07, 2020:
> > > , VM_MAYWRITE is set anytime we have a shared map where file has
> > > been opened read-write, which seems to be what you want with regards to
> > > protecting from mprotect calls.
Chengguang Xu wrote on Mon, Dec 07, 2020:
> > , VM_MAYWRITE is set anytime we have a shared map where file has
> > been opened read-write, which seems to be what you want with regards to
> > protecting from mprotect calls.
> >
> > How about simply changing check from WRITE to MAYWRITE?
>
> I
在 星期一, 2020-12-07 04:53:18 Dominique Martinet 撰写
> Dominique Martinet wrote on Sun, Dec 06, 2020:
> > Chengguang Xu wrote on Sat, Dec 05, 2020:
> > > If vma is shared and the file was opened for writing,
> > > we should also create writeback fid because vma may be
> > > mprotected
Dominique Martinet wrote on Sun, Dec 06, 2020:
> Chengguang Xu wrote on Sat, Dec 05, 2020:
> > If vma is shared and the file was opened for writing,
> > we should also create writeback fid because vma may be
> > mprotected writable even if now readonly.
>
> Hm, I guess it makes sense.
I had a sec
Chengguang Xu wrote on Sat, Dec 05, 2020:
> If vma is shared and the file was opened for writing,
> we should also create writeback fid because vma may be
> mprotected writable even if now readonly.
Hm, I guess it makes sense.
> Signed-off-by: Chengguang Xu
> ---
> Caveat: Only compile tested.
If vma is shared and the file was opened for writing,
we should also create writeback fid because vma may be
mprotected writable even if now readonly.
Signed-off-by: Chengguang Xu
---
Caveat: Only compile tested.
fs/9p/vfs_file.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --g
6 matches
Mail list logo