Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1537804pxb; Wed, 4 Nov 2020 11:35:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJwxvaee2RqKhDGpQEoRQMShyuwEtQwPwdvoFZE3JUSOAYCsBLIKfHEhbYDyp++RcuEV9Z9k X-Received: by 2002:a17:906:3958:: with SMTP id g24mr25854065eje.360.1604518554830; Wed, 04 Nov 2020 11:35:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604518554; cv=none; d=google.com; s=arc-20160816; b=pOVtq9BJMz3THoE3jCuuP8QOIZu1ISn1dDuH8JK8WBziUKqG/2bkcdtafElpeYJRSG FkswTH5wbHo0vEa5KQ8wsC3zTP897xHYJ5g1p+ZCUFesvMD8FwnzeBaRqTpNA8bKvpWw cj1hSYh9kl603AZQ9hiky62s0i4NbE5JkYz2JCpB4lRh0jXRoCuUHuTvX2Onr2gGxxy5 kc0Ua1EYtpoQiE3WyeifjCQe79+V+XOEB3QNfb3piZJz6cXqgY0aTXccZwu1Rts+Fbdi eLvfX6NovdDfCSxE5Y/ruS6/E6vx4HQrgKddU6mIOdqehCpS6TRZ4WA5V6aNL85PT+o0 kBNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Gp5b6Mr5Qne4OLUNKLGgmsC9HZETysD3ixRMlsHSDMc=; b=SuLy+FuCRxyyS+poI1bggkZ6JAGUW7ppBwP6t3hFh90YOx8OvWa+GTSHsS5WdidiYg yfZCk3hOHooiRexURfvka4nXYh0jRduQiVdOwYeaM1tDtDXlnRc0s73U1SF7D93JBxsP bFHekKi4YZMKi7AmWO3/QeFNS3EraxUgPLRyRw50HJO8XrfxnExcLyNl+hF3jZt8EVAC +9apf7rh39bs043hgr97Q3IOXyWuB10+wWcOgLGyT4D8QmcEBevbOkaIJYieBogKtsy5 NXGYm2LsZ2/EUe3z6J+jNCdiNAPsUE5f67BNUs1UnugXeY6tOP16arbBAWZc2GKsobn4 hH9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=N5iD+1F5; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h10si2185124eje.596.2020.11.04.11.35.32; Wed, 04 Nov 2020 11:35:54 -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=@google.com header.s=20161025 header.b=N5iD+1F5; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727013AbgKDTc6 (ORCPT + 99 others); Wed, 4 Nov 2020 14:32:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726626AbgKDTc5 (ORCPT ); Wed, 4 Nov 2020 14:32:57 -0500 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A636C0613D3 for ; Wed, 4 Nov 2020 11:32:56 -0800 (PST) Received: by mail-pl1-x642.google.com with SMTP id 1so10777407ple.2 for ; Wed, 04 Nov 2020 11:32:56 -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; bh=Gp5b6Mr5Qne4OLUNKLGgmsC9HZETysD3ixRMlsHSDMc=; b=N5iD+1F5uK/kOBzhFYBZ0IzKOpjBGNCgKj8530rROc8SKWuoKXrZ8aU5u/UtoSG0v0 I0Z0XWi4q4u2a1TlsnMy+FTFoqDv/Qn735BY6cMeepjbea79QsEFfDhzMV5PGaWNUmXH Uct41CfIYwD89j7Rg6tjcyQbRDYRz6nVcmhwwtKsWgVROXy8wg/LaI8Q7Bm9HPngYdy0 RIiczr/wo/E6Ber+by1Zrc9Pi4MrKiT55D8VHKRy1uBTFnu4gHWxAXVkmNZIgYCLYf1c pFQ7R9TOuotRJMZpsh3XmmiR5NrW4ryDKmBWYhukFQfk7t+vZogJPkIxC6ziTJbgFp9v yfFQ== 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; bh=Gp5b6Mr5Qne4OLUNKLGgmsC9HZETysD3ixRMlsHSDMc=; b=SuykD2CzxQ2eRUASXqYh10a1QhfbUYZCKADyH0WlS3Wy5XQKoH9vDtO1pOdtLc2ngf /Nkys6SSz5/Rpm3vVFHc9Nddgz1yxJOfBewJu7mKUBQ3dwnycVOCbRNHPYLk1weBOb6m SUykKoGpjnJoYp4ZBnB58lj6IL3w3NxVKx9nNT/Y6856I2p4H465Opcc2J+OcVqH4lhq c2HZZ9wOLkqTmkKf6AHkUMGPkM4NCMKNQu8vXvlF3tRjvSpv0f++oyL2DaPbRukKi/9e QyTegpjXfW2MDIERhHeM6wQv53mIBt8I4IQbPsseK34/jJ40vaVwCII0C8aSOBRhjdN3 qfyw== X-Gm-Message-State: AOAM530KwBGMf3UCX0+yDHaQl/F9+W3SuE+6+NUx3J/AmduENREsfIcF TDxciWjCRALpggFzsmbPmkBDmw8UM1ugKsZ0nOWx6A== X-Received: by 2002:a17:902:e993:b029:d6:41d8:9ca3 with SMTP id f19-20020a170902e993b02900d641d89ca3mr32168650plb.57.1604518375779; Wed, 04 Nov 2020 11:32:55 -0800 (PST) MIME-Version: 1.0 References: <4dee872cf377e011290bbe2e90c7e7fd24e789dd.1604333009.git.andreyknvl@google.com> In-Reply-To: From: Andrey Konovalov Date: Wed, 4 Nov 2020 20:32:44 +0100 Message-ID: Subject: Re: [PATCH v7 16/41] kasan: rename KASAN_SHADOW_* to KASAN_GRANULE_* To: Vasily Gorbik Cc: Catalin Marinas , Will Deacon , Vincenzo Frascino , kasan-dev , Dmitry Vyukov , Andrey Ryabinin , Alexander Potapenko , Marco Elver , Evgenii Stepanov , Elena Petrova , Branislav Rankov , Kevin Brodsky , Andrew Morton , Linux ARM , Linux Memory Management List , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 4, 2020 at 8:30 PM Vasily Gorbik wrote: > > On Wed, Nov 04, 2020 at 08:22:07PM +0100, Andrey Konovalov wrote: > > On Wed, Nov 4, 2020 at 8:11 PM Vasily Gorbik wrote: > > > > > > On Mon, Nov 02, 2020 at 05:03:56PM +0100, Andrey Konovalov wrote: > > > > This is a preparatory commit for the upcoming addition of a new hardware > > > > tag-based (MTE-based) KASAN mode. > > > > > > > > The new mode won't be using shadow memory, but will still use the concept > > > > of memory granules. Each memory granule maps to a single metadata entry: > > > > 8 bytes per one shadow byte for generic mode, 16 bytes per one shadow byte > > > > for software tag-based mode, and 16 bytes per one allocation tag for > > > > hardware tag-based mode. > > > > > > > > Rename KASAN_SHADOW_SCALE_SIZE to KASAN_GRANULE_SIZE, and KASAN_SHADOW_MASK > > > > to KASAN_GRANULE_MASK. > > > > > > > > Also use MASK when used as a mask, otherwise use SIZE. > > > > > > > > No functional changes. > > > > > > > > Signed-off-by: Andrey Konovalov > > > > Signed-off-by: Vincenzo Frascino > > > > Reviewed-by: Marco Elver > > > > --- > > > > Change-Id: Iac733e2248aa9d29f6fc425d8946ba07cca73ecf > > > > --- > > > > Documentation/dev-tools/kasan.rst | 2 +- > > > > lib/test_kasan.c | 2 +- > > > > mm/kasan/common.c | 39 ++++++++++++++++--------------- > > > > mm/kasan/generic.c | 14 +++++------ > > > > mm/kasan/generic_report.c | 8 +++---- > > > > mm/kasan/init.c | 8 +++---- > > > > mm/kasan/kasan.h | 4 ++-- > > > > mm/kasan/report.c | 10 ++++---- > > > > mm/kasan/tags_report.c | 2 +- > > > > 9 files changed, 45 insertions(+), 44 deletions(-) > > > > > > hm, this one got escaped somehow > > > > > > lib/test_kasan_module.c: > > > 18 #define OOB_TAG_OFF (IS_ENABLED(CONFIG_KASAN_GENERIC) ? 0 : KASAN_SHADOW_SCALE_SIZE) > > > > You mean it's not on the patch? It is, almost at the very top. > > lib/test_kasan_module.c != lib/test_kasan.c > > I fetched your branch. And I had to fix it up to build old good kasan > test module CONFIG_TEST_KASAN_MODULE=m Ah, right, it was just recently merged into mainline, that's why it's missing. Thanks for noticing!