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=-5.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 A5BB2C433E0 for ; Wed, 17 Feb 2021 09:27:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5309164E57 for ; Wed, 17 Feb 2021 09:27:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231868AbhBQJ1F (ORCPT ); Wed, 17 Feb 2021 04:27:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:52430 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230045AbhBQJ1C (ORCPT ); Wed, 17 Feb 2021 04:27:02 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id A395A64E33; Wed, 17 Feb 2021 09:26:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1613553981; bh=fAcVKDtKPT44X9xFpYrvNyyM8U32OFphf2W8r+3sh20=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QvcLhgdcV7Kwxbg3HAmaaj8A0U0F2FumuzjmojGddG06REnmnlCAaU7J2kNY2KwEZ 8CzIiSJzbXVYozGJ6Ehy1foB0ETZM850CGcXDIg6ZBbiRERbN0VFjVEAoQbYuj76Fv hjG6m6PfiprgGk1R7+SntYzH009FXvqCR6ZcBuaE= Date: Wed, 17 Feb 2021 10:26:18 +0100 From: Greg Kroah-Hartman To: Pavel Machek Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Vincenzo Frascino , Andrey Konovalov , Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Leon Romanovsky , Catalin Marinas , Will Deacon , Mark Rutland , "Paul E . McKenney" , Naresh Kamboju , Andrew Morton , Linus Torvalds , Sasha Levin Subject: Re: [PATCH 5.10 043/104] kasan: add explicit preconditions to kasan_report() Message-ID: References: <20210215152719.459796636@linuxfoundation.org> <20210215152720.867409732@linuxfoundation.org> <20210216115029.GA25795@amd> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210216115029.GA25795@amd> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 16, 2021 at 12:50:29PM +0100, Pavel Machek wrote: > Hi! > > > From: Vincenzo Frascino > > > > [ Upstream commit 49c6631d3b4f61a7b5bb0453a885a12bfa06ffd8 ] > > > > Patch series "kasan: Fix metadata detection for KASAN_HW_TAGS", v5. > > > > With the introduction of KASAN_HW_TAGS, kasan_report() currently assumes > > that every location in memory has valid metadata associated. This is > > due to the fact that addr_has_metadata() returns always true. > > > > As a consequence of this, an invalid address (e.g. NULL pointer > > address) passed to kasan_report() when KASAN_HW_TAGS is enabled, leads > > to a kernel panic. > ... > > This patch (of 2): > > > > With the introduction of KASAN_HW_TAGS, kasan_report() accesses the > > metadata only when addr_has_metadata() succeeds. > > > > Add a comment to make sure that the preconditions to the function are > > explicitly clarified. > > As the other patch from the series is not applied, I don't believe we > need this in stable. Changelog does not make any sense with just > comment change cherry-picked... Good point, now dropped, the AUTOBOT triggered off of the changelog text which is nice and scary :) greg k-h