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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A5198C433FE for ; Wed, 2 Mar 2022 17:28:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3ABBE8D0003; Wed, 2 Mar 2022 12:28:21 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 35B628D0001; Wed, 2 Mar 2022 12:28:21 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 24B418D0003; Wed, 2 Mar 2022 12:28:21 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0078.hostedemail.com [216.40.44.78]) by kanga.kvack.org (Postfix) with ESMTP id 15E558D0001 for ; Wed, 2 Mar 2022 12:28:21 -0500 (EST) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id C7E1B8249980 for ; Wed, 2 Mar 2022 17:28:20 +0000 (UTC) X-FDA: 79200129960.27.CB51CF1 Received: from mail-qt1-f176.google.com (mail-qt1-f176.google.com [209.85.160.176]) by imf03.hostedemail.com (Postfix) with ESMTP id 2FB7420013 for ; Wed, 2 Mar 2022 17:28:19 +0000 (UTC) Received: by mail-qt1-f176.google.com with SMTP id n11so2270084qtk.8 for ; Wed, 02 Mar 2022 09:28:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=CZBNWFrU7HDZpRYaR09tiEFzTh6W8mr+GbWCgbi5qlE=; b=nc1cufbQ1Okn2pvxuMIdNT03SGWQa6KFegpm9ZHz5o9CZ7MJLSvXr3PLPV6EetZO5n alSm6ep+SPI6UVSnBpnDgRXcIGbzX9BKSd4sJOUAl1FJgtPYyiBJw73Cahg7MFivIo3L ue9VsIgPesJi/Qn5AXKEnw+0AVyInz49TZrz2Iehx27OEQ/7WR6rRRhmzCRDHTowxFuP 1GNAK7yVwHt518XqvLjweHMMBdVtltw97vZetOGxiKjWpNDRoQPA8bNw/zhUsT+p63oY 5nsEzoOsFxB94d5Rfeb+C+m+gwrDweOtoBCS1Yi+Rr+fSH43HNXDwGy90hw0pO4kw8JL wkDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CZBNWFrU7HDZpRYaR09tiEFzTh6W8mr+GbWCgbi5qlE=; b=l837w+jcB14x/xr5hvx8hNhRgsEsVkroNyuWzH6ec18CO4kZUXVSGtW4xeA57WCOnj CmskzQlOgzy2a6gX1Fwk9IuI2lsMtWT0zkkt1RbUSSCwJhIL22i29liXVtNtD1h9oMu1 Ubi/tKWJ44gPkud4TRkL9hC02OkfzF/36fNhS+CSjAc+e7gMMLGHmrFtdwLhscB+j3NV 1h7HDaxzDpyRxYKEhGjSDL9dvgoh8Pmy8MAdnjgzOmfXDoVEvkXa0yyPEhNLjjlhPuUi OIFsjey/sfPUs0fLH0DVB5IbktPAryApjuZl48K+0g53y519olgELvIRXXfvQMxqAxPB GWaA== X-Gm-Message-State: AOAM530rjCOz7U6lLgY1kOlRQR55IrcHhPu00jElGMEnSjQNNaIspbC+ Ix1ST3Mk/SUS7ucGIi+mP3LD4dOiKiJtvFzRmmXjRA== X-Google-Smtp-Source: ABdhPJyIDjjEswxM4XrOR3Os3bcJiFg5Tx//iRZJ4qfqnUVqIrem/2Hics9fwC7pW67o0ZW5LFnihJE1wkjBU3XJVdI= X-Received: by 2002:ac8:5e4b:0:b0:2dd:dc99:d22b with SMTP id i11-20020ac85e4b000000b002dddc99d22bmr24535352qtx.165.1646242098973; Wed, 02 Mar 2022 09:28:18 -0800 (PST) MIME-Version: 1.0 References: <761f8e5a6ee040d665934d916a90afe9f322f745.1646237226.git.andreyknvl@google.com> In-Reply-To: <761f8e5a6ee040d665934d916a90afe9f322f745.1646237226.git.andreyknvl@google.com> From: Alexander Potapenko Date: Wed, 2 Mar 2022 18:27:42 +0100 Message-ID: Subject: Re: [PATCH mm 01/22] kasan: drop addr check from describe_object_addr To: andrey.konovalov@linux.dev Cc: Marco Elver , Andrey Konovalov , Dmitry Vyukov , Andrey Ryabinin , kasan-dev , Andrew Morton , Linux Memory Management List , LKML , Andrey Konovalov Content-Type: multipart/alternative; boundary="00000000000086a27405d93f9bdf" X-Rspamd-Server: rspam10 X-Rspam-User: X-Stat-Signature: m3mb43yppxj38ibeef7jmwqxbdywbe6d Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=nc1cufbQ; spf=pass (imf03.hostedemail.com: domain of glider@google.com designates 209.85.160.176 as permitted sender) smtp.mailfrom=glider@google.com; dmarc=pass (policy=reject) header.from=google.com X-Rspamd-Queue-Id: 2FB7420013 X-HE-Tag: 1646242099-278272 X-Bogosity: Ham, tests=bogofilter, spamicity=0.010475, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: --00000000000086a27405d93f9bdf Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Mar 2, 2022 at 5:36 PM wrote: > 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 > Reviewed-by: Alexander Potapenko > --- > 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 =3D "to the left"; > rel_bytes =3D object_addr - access_addr; > -- > 2.25.1 > > -- > You received this message because you are subscribed to the Google Groups > "kasan-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to kasan-dev+unsubscribe@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/kasan-dev/761f8e5a6ee040d665934d916a90a= fe9f322f745.1646237226.git.andreyknvl%40google.com > . > --=20 Alexander Potapenko Software Engineer Google Germany GmbH Erika-Mann-Stra=C3=9Fe, 33 80636 M=C3=BCnchen Gesch=C3=A4ftsf=C3=BChrer: Paul Manicle, Liana Sebastian Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Diese E-Mail ist vertraulich. Falls Sie diese f=C3=A4lschlicherweise erhalt= en haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, l=C3=B6schen Sie alle Kopien und Anh=C3=A4nge davon und lassen Sie mich bit= te wissen, dass die E-Mail an die falsche Person gesendet wurde. This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person. --00000000000086a27405d93f9bdf Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Wed, Mar 2, 2022 at 5:36 PM <andrey.konovalov@linux.dev&= gt; wrote:
From:= Andrey Konovalov <andreyknvl@google.com>

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 <andreyknvl@google.com>
Revi= ewed-by: Alexander Potapenko <glide= r@google.com>=C2=A0
---
=C2=A0mm/kasan/report.c | 3 ---
=C2=A01 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 *cac= he, void *object,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0" which belongs= to the cache %s of size %d\n",
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 object, cache->n= ame, cache->object_size);

-=C2=A0 =C2=A0 =C2=A0 =C2=A0if (!addr)
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return;
-
=C2=A0 =C2=A0 =C2=A0 =C2=A0 if (access_addr < object_addr) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 rel_type =3D "= to the left";
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 rel_bytes =3D objec= t_addr - access_addr;
--
2.25.1

--
You received this message because you are subscribed to the Google Groups &= quot;kasan-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to kasan-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://gro= ups.google.com/d/msgid/kasan-dev/761f8e5a6ee040d665934d916a90afe9f322f745.1= 646237226.git.andreyknvl%40google.com.


--
Alexander Potapenko
Software= Engineer

Google Germany GmbH
Erika-Mann-Stra=C3=9Fe, 33
80636= M=C3=BCnchen

Gesch=C3=A4ftsf=C3=BChrer: Paul Manicle, Liana Sebasti= an
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellsch= aft: Hamburg

Diese E-Mail ist vertraulich. Falls Sie diese f=C3=A4ls= chlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jeman= d anderes weiter, l=C3=B6schen Sie alle Kopien und Anh=C3=A4nge davon und l= assen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet= wurde.

=C2=A0 =C2=A0 =C2=A0

This e-mail is confidential. If= you received this communication by mistake, please don't forward it to= anyone else, please erase all copies and attachments, and please let me kn= ow that it has gone to the wrong person.
--00000000000086a27405d93f9bdf--