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=-6.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 65213C4742C for ; Wed, 4 Nov 2020 19:31:05 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A8B00205ED for ; Wed, 4 Nov 2020 19:31:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="axlsn2DR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A8B00205ED Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 18C1D6B006C; Wed, 4 Nov 2020 14:31:04 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 161AF6B007D; Wed, 4 Nov 2020 14:31:04 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 078F76B0083; Wed, 4 Nov 2020 14:31:04 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0070.hostedemail.com [216.40.44.70]) by kanga.kvack.org (Postfix) with ESMTP id CCB4E6B006C for ; Wed, 4 Nov 2020 14:31:03 -0500 (EST) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 673A1180AD80F for ; Wed, 4 Nov 2020 19:31:03 +0000 (UTC) X-FDA: 77447728806.28.boy62_2400037272c3 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin28.hostedemail.com (Postfix) with ESMTP id 3C0916C3E for ; Wed, 4 Nov 2020 19:31:03 +0000 (UTC) X-HE-Tag: boy62_2400037272c3 X-Filterd-Recvd-Size: 7001 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by imf04.hostedemail.com (Postfix) with ESMTP for ; Wed, 4 Nov 2020 19:31:02 +0000 (UTC) Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0A4J38xR010691; Wed, 4 Nov 2020 14:30:54 -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=kqKl/Fy8OlJQj/Gv88agH7/I5WU7KGmVdKg9ghw1xjE=; b=axlsn2DRWHDAS1wDGm5KQ2jnhCI2uU7k639SaPpAjB8Z+DVxulOkpAMQ1G/H5twIxT5e 9PRqMtQtX5M4rqSTIMf4U+Q+6c/JT/NjOBDbavk00Qie57PBy7U1zHmLj4cZpN+Ft2U4 nALH8GWZpYxVp4pFTLOx7zMROTMMUEH18i1y6p7XpS+m8O9SWD0UG0ENIeFoy0oDa0x6 xDuCD5bo1uJjojo5EpBeiCNMFVPdxV29En81C9QKwkGYZkWuqQHycGAGu47txBVnPT57 Qj7WIg5ZLz8mRYWytWSsGErDtthbiBPn5q5xt5zEG2TlbvhScOmiLNOslB/C0MX+8s3Q DQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 34m0qck9gv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 04 Nov 2020 14:30:54 -0500 Received: from m0187473.ppops.net (m0187473.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 0A4J3INU011124; Wed, 4 Nov 2020 14:30:53 -0500 Received: from ppma03fra.de.ibm.com (6b.4a.5195.ip4.static.sl-reverse.com [149.81.74.107]) by mx0a-001b2d01.pphosted.com with ESMTP id 34m0qck9ea-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 04 Nov 2020 14:30:53 -0500 Received: from pps.filterd (ppma03fra.de.ibm.com [127.0.0.1]) by ppma03fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 0A4JRnj4026068; Wed, 4 Nov 2020 19:30:48 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma03fra.de.ibm.com with ESMTP id 34j8rh9jk6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 04 Nov 2020 19:30:47 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0A4JUjQb60424536 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 4 Nov 2020 19:30:45 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 544FF4C04A; Wed, 4 Nov 2020 19:30:45 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4925A4C044; Wed, 4 Nov 2020 19:30:44 +0000 (GMT) Received: from localhost (unknown [9.145.163.252]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Wed, 4 Nov 2020 19:30:44 +0000 (GMT) Date: Wed, 4 Nov 2020 20:30:42 +0100 From: Vasily Gorbik To: Andrey Konovalov 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 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: 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 malwarescore=0 bulkscore=0 phishscore=0 lowpriorityscore=0 adultscore=0 priorityscore=1501 mlxscore=0 spamscore=0 clxscore=1015 mlxlogscore=999 impostorscore=0 suspectscore=1 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011040138 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 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