Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp326665pxm; Wed, 2 Mar 2022 16:28:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJzn4HN5+1VAU6eQThAGRbx5LAVI9tHbPbx+usVpGqCvGPqQbp/kuWazCIVt0+jyJGkLd/Y6 X-Received: by 2002:a63:5f47:0:b0:373:cf6c:c9d2 with SMTP id t68-20020a635f47000000b00373cf6cc9d2mr27623337pgb.85.1646267283112; Wed, 02 Mar 2022 16:28:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646267283; cv=none; d=google.com; s=arc-20160816; b=hdBtMDF1D89gyNdVVImMrs5WAB/szUKsJA5pvUDsDXxNEoMVNS/KxvmDGY+ifhE43R lXiwHIUgcMYDeRWS76EKGqrCavMvrfliU1VzTaXJzvNgq6HzYm4Em0LP3FBAIXPBw/Wy mFblQ8xl1bkcxdWyuZhY2pNqza37NIrdFH0eBiiYcWjoCwggScdq0K4/pIS7cCn3Fmrb MNv+O5ApdpnVfF2jpKTkFmSoRrvU/qDrl4I0sLO8lEHvnFZgbkqkXEg6L7XBwMWY8VMC NZKMCiCIJzQpkWQkPlcANNTB8MrXETnSXR/3hSEgyGxkOg4emlxKSqI7GTIlmphCjXMJ UPjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=yCGVn7r00QMuSI8V6gqxIK+E2Lf9e3kHr+j6afAS6Vw=; b=c5YiGdtqaFjOh8LMWHVCYs/5SytK0X+tGvJ9/Awoj+ZsICYKnXF9DFVRpkuDIposOp uSio0kXmp+l4B9TguH+tM9nTX1fol8Ze+IzWf58mJOTFADYLINbyB5eU3wT491WAWdeh mtbGo8a9iM9mLJytKvL/2zZPkITESUUZHiqXLOYJ4GpieTVjr8ruWIwawE67g7k4Vlhl qYRqsm3AEKb1rQsGF9Ig4BcbSGUhEFHxxefckyCecAvS6fTbuh1b0xCnE+VIiljCQ4D5 qQksTajlcI68W9NoblPvLow1YZi/TsCd+eVWuuGoOFO9R+kF8Bpdcu1rIHVVNprMU6v9 Gy0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=Pw56LxQw; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id e15-20020a170902ef4f00b0014f09199faesi517067plx.453.2022.03.02.16.28.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 16:28:03 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=Pw56LxQw; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9450620D531; Wed, 2 Mar 2022 15:39:50 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242813AbiCBQhe (ORCPT + 99 others); Wed, 2 Mar 2022 11:37:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238232AbiCBQhc (ORCPT ); Wed, 2 Mar 2022 11:37:32 -0500 Received: from out1.migadu.com (out1.migadu.com [IPv6:2001:41d0:2:863f::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C6ADCEA00 for ; Wed, 2 Mar 2022 08:36:48 -0800 (PST) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1646239006; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yCGVn7r00QMuSI8V6gqxIK+E2Lf9e3kHr+j6afAS6Vw=; b=Pw56LxQwUnnzUUyfCn+zD5iB/Yufs+PrCWRQWBChTqj0u6vbtBk7Wc9jO7UAE4YBh8z0eS HfHWdWM4GHiM0xaVGb4TNNniiNsPmCmhkLMtubL6WsogGoHsPqlpRc8dVNQ+Cts8WtGSAZ hOte/7TwHHWIjycI/tHU9kP6pOdlcPA= From: andrey.konovalov@linux.dev To: Marco Elver , Alexander Potapenko Cc: Andrey Konovalov , Dmitry Vyukov , Andrey Ryabinin , kasan-dev@googlegroups.com, Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov Subject: [PATCH mm 01/22] kasan: drop addr check from describe_object_addr Date: Wed, 2 Mar 2022 17:36:21 +0100 Message-Id: <761f8e5a6ee040d665934d916a90afe9f322f745.1646237226.git.andreyknvl@google.com> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andrey Konovalov describe_object_addr() used to be called with NULL addr in the early days of KASAN. This no longer happens, so drop the check. Signed-off-by: Andrey Konovalov --- mm/kasan/report.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/mm/kasan/report.c b/mm/kasan/report.c index f64352008bb8..607a8c2e4674 100644 --- a/mm/kasan/report.c +++ b/mm/kasan/report.c @@ -162,9 +162,6 @@ static void describe_object_addr(struct kmem_cache *cache, void *object, " which belongs to the cache %s of size %d\n", object, cache->name, cache->object_size); - if (!addr) - return; - if (access_addr < object_addr) { rel_type = "to the left"; rel_bytes = object_addr - access_addr; -- 2.25.1