Re: [V9fs-developer] [RFC PATCH] 9p: create writeback fid on shared mmap

2020-12-07 Thread Chengguang Xu
在 星期一, 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.

Re: [V9fs-developer] [RFC PATCH] 9p: create writeback fid on shared mmap

2020-12-07 Thread 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. > > > > How about simply changing check from WRITE to MAYWRITE? > > I

Re: [V9fs-developer] [RFC PATCH] 9p: create writeback fid on shared mmap

2020-12-06 Thread Chengguang Xu
在 星期一, 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

Re: [V9fs-developer] [RFC PATCH] 9p: create writeback fid on shared mmap

2020-12-06 Thread 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 writable even if now readonly. > > Hm, I guess it makes sense. I had a sec