Re: [PATCH 01/69] scsicam: Fix use of page cache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 03, 2022 at 07:35:41AM -0700, Christoph Hellwig wrote:
> On Fri, Apr 29, 2022 at 06:24:48PM +0100, Matthew Wilcox (Oracle) wrote:
> > Filesystems do not necessarily set PageError; instead they will leave
> > PageUptodate clear on errors.  We should also kmap() the page before
> > accessing it in case the page is allocated from HIGHMEM.
> 
> The PageError to PageUptodate change looks sane.  But block device
> page cache absolutely must not be in highmem, so I don't see a point
> in the kmap conversion here.

Huh, I didn't know that.  I think I've seen that some filesystems also
require non-highmem pages for directory or symlink inodes.

Coincidentally, I was in Ira's session earlier today where he was
talking about reusing/abusing kmap/kmap_local/kmap_atomic to implement
protection keys.  I'm not entirely sold on the concept, but something
like this might also be useful for a CHERI-style architecture.

I'm kind of inclined to say "We should always kmap() anything we get from
the page cache to support the unmapped-by-default case" because it's not
exactly expensive to call kmap() on a page which is permanently mapped.
I dunno.



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux