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=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_IN_DEF_DKIM_WL autolearn=ham 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 A2BE9C56201 for ; Thu, 12 Nov 2020 15:16:44 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 00EBE216C4 for ; Thu, 12 Nov 2020 15:16:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="iDTiyouP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 00EBE216C4 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 49B506B006C; Thu, 12 Nov 2020 10:16:43 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 473DE6B006E; Thu, 12 Nov 2020 10:16:43 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 33B0A6B0070; Thu, 12 Nov 2020 10:16:43 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0171.hostedemail.com [216.40.44.171]) by kanga.kvack.org (Postfix) with ESMTP id 05C4D6B006C for ; Thu, 12 Nov 2020 10:16:42 -0500 (EST) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 97E3734A3 for ; Thu, 12 Nov 2020 15:16:42 +0000 (UTC) X-FDA: 77476118244.14.part87_3b0af7927307 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin14.hostedemail.com (Postfix) with ESMTP id 77C8E1822987A for ; Thu, 12 Nov 2020 15:16:42 +0000 (UTC) X-HE-Tag: part87_3b0af7927307 X-Filterd-Recvd-Size: 6195 Received: from mail-qt1-f193.google.com (mail-qt1-f193.google.com [209.85.160.193]) by imf03.hostedemail.com (Postfix) with ESMTP for ; Thu, 12 Nov 2020 15:16:41 +0000 (UTC) Received: by mail-qt1-f193.google.com with SMTP id t5so4191788qtp.2 for ; Thu, 12 Nov 2020 07:16:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=TM7ug66yDX2zb6iHncrZGyoO9ARI1hTYVm8tRUTfYcA=; b=iDTiyouPcBFCJvdym2UzoWLGPR1UVGzGYChq9OHZt15+4jZNmVArIjG+fP1HTRIR0n lx3dgmlEebUKOhBgyk+rYwPlBk4njq6v8uJ+nGUuxHbWlLZCu00zVq6y1wHHiDJSyCHR xtWf7Sj7xiSIUOMr1I7x+PFSwJQQtd9MqVO2QmGJ49fn2AG8J7eNXN9nkzCej3R9Z4t4 T3+rNllQbu79MIU6DOZpf2UwsVbj98A58k3CAQIDqZiIQwbBNRJxp8e5Yl8w1lCfumG/ GyeWrtxugHjXZQVbMooNVaw1OYNVoKTF4N57Yczf0IiyuNvyz61sssR6FvXQH7GlcrbD h0vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=TM7ug66yDX2zb6iHncrZGyoO9ARI1hTYVm8tRUTfYcA=; b=kB2iwUWt1mOcI7CnG/5cC8SOIJCJfGVGodj8DrFIWoFMm1VAl+8YjRZBv+R9JmB5GW 3CvU0QWK4yOUZh7Z0udUnPTepchrOPQgL2gO5NRO8S7bDgnHKSsM/pW6pycDUQ+P9tXH 8N+opAjAL3I0fW20osvW+NJppCSWMocSp/Kr0UtMejmdkuy3u9FFi4NhtqhHapMCzR87 3jcmNTm2PzFGoj+pjlIbX/2bFi28Hg+7JJ88r+ZQVMcqRU/O3In0VlCH8607O6Ar6K0d q9vK2Fq0wx7NgsImjs5Hiw3boi12KpTg5ROE33hYKwKcASMrctybiw7O0l6rAxRkKiSF dXAg== X-Gm-Message-State: AOAM532wDaCarJoA1LZsYCB4JJnWK1UGrGOc/VvwAUhm2thWH+IFxaKf SSpwSebiSb/qOd1JUMPb3OHivkvFm/4YqNc9BJEyag== X-Google-Smtp-Source: ABdhPJwsxso5pDSVeOq855FGuC4+//eRTgtFe6Ovvsk3SbMJr42aSSZxmbM9kKwfPuebC8Sz79SRt8vEEdevxhd3DY8= X-Received: by 2002:ac8:5c85:: with SMTP id r5mr24292471qta.8.1605194200855; Thu, 12 Nov 2020 07:16:40 -0800 (PST) MIME-Version: 1.0 References: <49f7f2c12b0d5805f9a7b7092b986bbc2dd077a1.1605046192.git.andreyknvl@google.com> In-Reply-To: From: Alexander Potapenko Date: Thu, 12 Nov 2020 16:16:29 +0100 Message-ID: Subject: Re: [PATCH v9 21/44] kasan: kasan_non_canonical_hook only for software modes To: Andrey Konovalov Cc: Catalin Marinas , Will Deacon , Vincenzo Frascino , Dmitry Vyukov , Andrey Ryabinin , Marco Elver , Evgenii Stepanov , Branislav Rankov , Kevin Brodsky , Andrew Morton , kasan-dev , Linux ARM , Linux Memory Management List , LKML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Nov 11, 2020 at 7:52 PM 'Andrey Konovalov' via kasan-dev wrote: > > On Wed, Nov 11, 2020 at 4:09 PM Alexander Potapenko w= rote: > > > > On Tue, Nov 10, 2020 at 11:11 PM Andrey Konovalov wrote: > > > > > > This is a preparatory commit for the upcoming addition of a new hardw= are > > > tag-based (MTE-based) KASAN mode. > > > > > > kasan_non_canonical_hook() is only applicable to KASAN modes that use > > > shadow memory, and won't be needed for hardware tag-based KASAN. > > > > > > No functional changes for software modes. > > > > > > Signed-off-by: Andrey Konovalov > > > Signed-off-by: Vincenzo Frascino > > > Reviewed-by: Marco Elver > > > --- > > > Change-Id: Icc9f5ef100a2e86f3a4214a0c3131a68266181b2 > > > --- > > > mm/kasan/report.c | 3 ++- > > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > > > diff --git a/mm/kasan/report.c b/mm/kasan/report.c > > > index 5d5733831ad7..594bad2a3a5e 100644 > > > --- a/mm/kasan/report.c > > > +++ b/mm/kasan/report.c > > > @@ -403,7 +403,8 @@ bool kasan_report(unsigned long addr, size_t size= , bool is_write, > > > return ret; > > > } > > > > > > -#ifdef CONFIG_KASAN_INLINE > > > +#if (defined(CONFIG_KASAN_GENERIC) || defined(CONFIG_KASAN_SW_TAGS))= && \ > > > + defined(CONFIG_KASAN_INLINE) > > > /* > > > * With CONFIG_KASAN_INLINE, accesses to bogus pointers (outside the= high > > > * canonical half of the address space) cause out-of-bounds shadow m= emory reads > > > > Perhaps this comment also needs to be updated. > > In what way? Ok, maybe not. I thought you were restricting the set of configs under which this hook is used, so this should've been explained. But as far as I understand, CONFIG_KASAN_INLINE already implies "defined(CONFIG_KASAN_GENERIC) || defined(CONFIG_KASAN_SW_TAGS)", doesn't it? Maybe this change is not needed at all then? > > -- > 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/msgi= d/kasan-dev/CAAeHK%2BwX%2BJPyZm2A5mDdGFCqnH6kdSBLyOZ2TnWfZnZuq_V0Bw%40mail.= gmail.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, Halimah DeLaine Prado Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg