From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5FBA6C433E6 for ; Wed, 27 Jan 2021 13:13:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1505F207A3 for ; Wed, 27 Jan 2021 13:13:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343820AbhA0NNA (ORCPT ); Wed, 27 Jan 2021 08:13:00 -0500 Received: from mail.kernel.org ([198.145.29.99]:56460 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238049AbhA0NKi (ORCPT ); Wed, 27 Jan 2021 08:10:38 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id AA235207A3; Wed, 27 Jan 2021 13:09:56 +0000 (UTC) From: Catalin Marinas To: linux-kernel@vger.kernel.org, Vincenzo Frascino , linux-arm-kernel@lists.infradead.org, kasan-dev@googlegroups.com Cc: Will Deacon , stable@vger.kernel.org, Mark Rutland Subject: Re: [PATCH] arm64: Fix kernel address detection of __is_lm_address() Date: Wed, 27 Jan 2021 13:09:54 +0000 Message-Id: <161175296410.16506.3810718723675940477.b4-ty@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210126134056.45747-1-vincenzo.frascino@arm.com> References: <20210126134056.45747-1-vincenzo.frascino@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 26 Jan 2021 13:40:56 +0000, Vincenzo Frascino wrote: > Currently, the __is_lm_address() check just masks out the top 12 bits > of the address, but if they are 0, it still yields a true result. > This has as a side effect that virt_addr_valid() returns true even for > invalid virtual addresses (e.g. 0x0). > > Fix the detection checking that it's actually a kernel address starting > at PAGE_OFFSET. Applied to arm64 (for-next/fixes), thanks! [1/1] arm64: Fix kernel address detection of __is_lm_address() https://git.kernel.org/arm64/c/519ea6f1c82f -- Catalin