Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AD46DC05027 for ; Fri, 10 Feb 2023 21:59:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233701AbjBJV7H (ORCPT ); Fri, 10 Feb 2023 16:59:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233352AbjBJV7F (ORCPT ); Fri, 10 Feb 2023 16:59:05 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2406A7DD27 for ; Fri, 10 Feb 2023 13:59:04 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id ADBA061EB5 for ; Fri, 10 Feb 2023 21:59:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B181FC433D2; Fri, 10 Feb 2023 21:59:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1676066343; bh=hBUOtKkxtZPZmPyYXEVQpixGinkIw9aIXulO6Fx7MQc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=a/sXNPD9a81HkPyB/RyCbKWhLW0Fy1Fz5afMy+SsA/98bItYohut+acZATCA+Q3k7 DotIxmhiTBwcNnkFsDWVJFmurN5UgrqaePmY6kRDqktsgXYNLxvbEV8yMichonXHLP eJVmH8NILcJfNzsNi/L8F87JKzlWA8w/1hyY/fPI= Date: Fri, 10 Feb 2023 13:59:02 -0800 From: Andrew Morton To: Ira Weiny Cc: Sumit Garg , Al Viro , Christoph Hellwig , linux-kernel@vger.kernel.org, op-tee@lists.trustedfirmware.org, linux-mm@kvack.org, Jens Wiklander , "Fabio M. De Francesco" , John Hubbard , Matthew Wilcox , Thomas Gleixner Subject: Re: [PATCH v2 1/4] highmem: Enhance is_kmap_addr() to check kmap_local_page() mappings Message-Id: <20230210135902.343f6c40001f1f2e10cedd93@linux-foundation.org> In-Reply-To: <20230203-get_kernel_pages-v2-1-f1dc4af273f1@intel.com> References: <20230203-get_kernel_pages-v2-0-f1dc4af273f1@intel.com> <20230203-get_kernel_pages-v2-1-f1dc4af273f1@intel.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 03 Feb 2023 20:06:32 -0800 Ira Weiny wrote: > is_kmap_addr() is only looking at the kmap() address range which may > cause check_heap_object() to miss checking an overflow on a > kmap_local_page() page. > > Add a check for the kmap_local_page() address range to is_kmap_addr(). Acked-by: Andrew Morton