Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1535027pxb; Wed, 4 Nov 2020 11:32:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJySNPIDMONSPiMfavoUpfQW1K6u+Ty+z2vtFSSVy6Pp8W3c5b+cI0IKDB1ui8u87ovVlyzb X-Received: by 2002:a17:906:580e:: with SMTP id m14mr25601904ejq.237.1604518360760; Wed, 04 Nov 2020 11:32:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604518360; cv=none; d=google.com; s=arc-20160816; b=W+s/UbfW90cB3RrdTuoZPAYYcW5YbkOYLAdqmVKk/o09nxLT1sA4Jr7oJJjNoQ3IMg 3LyKdiBgy2mUn16rGi+ll/74uXYno9L4hEmJAk+PMxhKLE8ZFsRlC/SEd87/W+XFGxBY 5aZUaFuj93D8K+67FsPud70ZWMj04/BGzh/Ut6Aadv3JvOaS/N+/sUSkcbVyXyfPePOS 72nguwbcAuHzyJ3eCSJW/JfbgO+VfMpK9j2ovSWz3yOvVQifEzP2cw4N0nubrfIySZyk a14AJErkXMEYXvlhlPPM89iHT9QF4zXYirECbcjnHb649wWNaTlpDSX6nr/cTxU1e78C IMNQ== 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=DqOTob3AwioDey1KiiTHJajU7QOQhnFPsLrIyrA03QM=; b=PeD/4MHL6l3beObfvLo+IAxBK00iQe1UvTqoyzwI4ct9h7UbCQEpd6B0fPZDR+xt0D /jHO/MtcKOye5dyimawza+ZCwVmUSjSmEmJZdC/Q8IF4JPu6IdLwINTOJXpgvzZ3ahWr Q93FyIkGrAz4JqpHMkJ8f7QUQZTAB8uWpOrVc+aVwRmCvmnhYy/1X4TN8gn+EFgzfzaJ GL/lxXR56WJSj8Y8RqeLUvDJ10x0nVk3ccM7kqQ05xtpSW7Q0W+Onr9ou2LTLwKc9PNh dpeE6x1cegsq/GTW37fuxsAs3ybnbOLvHLGkHf9x+3jWD+wAepY3FWzSdIPQnBcs+qX3 mj1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=RvC4Qqbr; 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o11si1930171edt.474.2020.11.04.11.32.18; Wed, 04 Nov 2020 11:32:40 -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=@ibm.com header.s=pp1 header.b=RvC4Qqbr; 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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731281AbgKDTLV (ORCPT + 99 others); Wed, 4 Nov 2020 14:11:21 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:11782 "EHLO mx0b-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731243AbgKDTLU (ORCPT ); Wed, 4 Nov 2020 14:11:20 -0500 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0A4J1IjH073873; Wed, 4 Nov 2020 14:11:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=pp1; bh=DqOTob3AwioDey1KiiTHJajU7QOQhnFPsLrIyrA03QM=; b=RvC4QqbrScz4QENf1PHdPxBcKDU5n2FIBj2ssUmQuBrpucJrF/EC6f+gqJ0IqWwiTzF+ IYjQ6oT18g5PmH3TPwAFGr3sSrJgToDdYoVtBa+uzfSj5lK1S0Ln9hLJOTI58ExrpG4c 0jyOLIMdcy91tw1nPiUREjZno2/YNUZNJDhWo6SxPOiImv916k1wcthWEjBraK3U5saF OxMxMBtUZ5E/IdVHrsIc9eiSSneD7vg3nb3Vy26wZaQE25LpYesJn8EGo+6xM3SiIsx5 /6IgeYntkwPvKFhOggYS5epVszKViInzMUOr0qDrnHFANLd6r+jBzftbtQFRNld6R/WJ 2g== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 34kga5sp22-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 04 Nov 2020 14:11:13 -0500 Received: from m0098421.ppops.net (m0098421.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 0A4J1daw075836; Wed, 4 Nov 2020 14:11:13 -0500 Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com with ESMTP id 34kga5sp14-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 04 Nov 2020 14:11:12 -0500 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 0A4J7FfV021411; Wed, 4 Nov 2020 19:11:10 GMT Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by ppma06ams.nl.ibm.com with ESMTP id 34h0fcvn3v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 04 Nov 2020 19:11:10 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0A4JB8vK7209622 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 4 Nov 2020 19:11:08 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3B5764C044; Wed, 4 Nov 2020 19:11:08 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 17A034C040; Wed, 4 Nov 2020 19:11:07 +0000 (GMT) Received: from localhost (unknown [9.145.163.252]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Wed, 4 Nov 2020 19:11:06 +0000 (GMT) Date: Wed, 4 Nov 2020 20:11:05 +0100 From: Vasily Gorbik To: Andrey Konovalov Cc: Catalin Marinas , Will Deacon , Vincenzo Frascino , kasan-dev@googlegroups.com, Dmitry Vyukov , Andrey Ryabinin , Alexander Potapenko , Marco Elver , Evgenii Stepanov , Elena Petrova , Branislav Rankov , Kevin Brodsky , Andrew Morton , linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v7 16/41] kasan: rename KASAN_SHADOW_* to KASAN_GRANULE_* Message-ID: References: <4dee872cf377e011290bbe2e90c7e7fd24e789dd.1604333009.git.andreyknvl@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4dee872cf377e011290bbe2e90c7e7fd24e789dd.1604333009.git.andreyknvl@google.com> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312,18.0.737 definitions=2020-11-04_12:2020-11-04,2020-11-04 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 mlxscore=0 malwarescore=0 clxscore=1011 impostorscore=0 mlxlogscore=999 adultscore=0 bulkscore=0 priorityscore=1501 suspectscore=1 phishscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011040135 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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)