Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp6336773pxb; Wed, 17 Feb 2021 01:32:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJzg2f0zoR6dhgghgiH5eAI3ukIDTpdT8x+iscrGQQkMy9uAdFt4Ufv9fjlgnvqzRuhdliD0 X-Received: by 2002:a17:906:7d4f:: with SMTP id l15mr23998997ejp.95.1613554344333; Wed, 17 Feb 2021 01:32:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613554344; cv=none; d=google.com; s=arc-20160816; b=CwmFfXbjEq97YJjZIeUrfaGLQKsEUBC2LhaV54rEnbQelfHrhMuUscWFWnazYW64Cg 3NR4JgeVOfmwLIOo+IFbigOgD5uTP8LZP4Sfh4Ft6LndONq5wD0slW5xnWbFw53MoCJf Gkoysrklie6NlrlqseomhNeFHe8qFEx2vDbhLSApe5JyD5wiF7byArgXT7JQIXf+1LPT +CLAX3yPPOhZj4g5H/sxLsJFsnh7MOJir97nZOf+e3lmWRz2OIqqQWwAWlX819Os6T7L aklUveWYAmxeIgVNOpnyv8AIPVOiPUkvDFoRePrzr61AD8hYwlWTLssTMY9IZkStdn6X QcPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ds+CzlyyoTcPdger4OPUGo+yGQLatFoHUhpjINWB84g=; b=OqBxF5a3Ysdc0PbufpcyXI8dawblXD4X3T1qpCYzWkGdkRLM75osjJBBaG9PeMmFBw yUM+7K5tLPO6RWOS7ztPmEgOjErgcQVzXAYExDOba+0MGUCq+fWRbBZKqrVV+pU48L4v boty1hXlxPta7D4TflgEk9wWsWLYf+aBHNjRbS3ORCp9BZzUFFuod+7UugM2J4n+zEe+ rPJYGEnEphW/cXXKaCAvy9sjfJG2JqRXe9B8aDnIB/R5pS/GhIbULigNlanZy3lvdBYm CpNqrCMD9cFGDIgIrGgKE0vPVquGCFswX6OVhRXsz5m/dkmbyOaSPFYVUbAI34WrOXdn 87QQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QvcLhgdc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q20si965505edr.33.2021.02.17.01.32.01; Wed, 17 Feb 2021 01:32:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QvcLhgdc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231667AbhBQJ1D (ORCPT + 99 others); Wed, 17 Feb 2021 04:27:03 -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