[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZeKrx8g3DSHaVWhv@gondor.apana.org.au>
Date: Sat, 2 Mar 2024 12:32:07 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Barry Song <21cnbao@...il.com>
Cc: viro@...iv.linux.org.uk, akpm@...ux-foundation.org,
linux-kernel@...r.kernel.org, Barry Song <v-songbaohua@...o.com>
Subject: Re: [PATCH] iov_iter: call kmap on each page even for lowmem if
CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP is enabled
On Sat, Mar 02, 2024 at 12:09:08PM +1300, Barry Song wrote:
> From: Barry Song <v-songbaohua@...o.com>
>
> copy_page_from_iter_atomic() has the assumption lowmem will only
> need one kmap to get start page_address() for all pages. This is
> wrong if the debug option CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP is
> enabled. This patch fixes it in the same way with skbuff.h by
> always applying kmap one by one even for lowmem,
>
> static inline bool skb_frag_must_loop(struct page *p)
> {
> #if defined(CONFIG_HIGHMEM)
> if (IS_ENABLED(CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP) || PageHighMem(p))
> return true;
> #endif
> return false;
> }
Thanks for the patch. Perhaps this could be moved into highmem.h
as a helper (kmap_is_highmem)?
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists