From patchwork Mon Dec 25 15:19:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: andrey.konovalov@linux.dev X-Patchwork-Id: 13504706 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 D2100C3DA6E for ; Mon, 25 Dec 2023 15:19:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0912F8D0002; Mon, 25 Dec 2023 10:19:36 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 019D38D0001; Mon, 25 Dec 2023 10:19:35 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DFD158D0002; Mon, 25 Dec 2023 10:19:35 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id CC0708D0001 for ; Mon, 25 Dec 2023 10:19:35 -0500 (EST) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 7EF7CA1A15 for ; Mon, 25 Dec 2023 15:19:35 +0000 (UTC) X-FDA: 81605699910.26.3D6A336 Received: from out-171.mta1.migadu.com (out-171.mta1.migadu.com [95.215.58.171]) by imf20.hostedemail.com (Postfix) with ESMTP id AF4001C001B for ; Mon, 25 Dec 2023 15:19:33 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=W5ZZFxgU; spf=pass (imf20.hostedemail.com: domain of andrey.konovalov@linux.dev designates 95.215.58.171 as permitted sender) smtp.mailfrom=andrey.konovalov@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1703517574; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=gtILRKJ0trYPt8tyQFLeNeQ04NHz6IkEJP80Wwo1cS0=; b=Eg4Ws5NnO9GxO0eptAkkfF52EikGtie9Et66jcjsHBRf+7EmVo5VdXmKguZN4WjNFhtAv3 28H+NQ28UchpffQ3eBvlqRgwII37zQO1TgryQF3TWoGU5LgPBfTWvHRjQoH9Cmk3kuW3gQ +6q3qjgLBQV2NuVtOOB+AgryFp31560= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1703517574; a=rsa-sha256; cv=none; b=sOqAqoPN4Qc0ApLEA/YwNGPhlNiG+5qSORhyGpNKSegM8UBNjl5+uKH0RTLqRNcyeuvavD gjVGhaT48ODvIiDkeOo05QW86/uKWDeInl/PnEuxkzHJAx9ItltGF1FoJeEXoMU8wjxfnr sU6jVa/tUnQAs1vUdzX7MyUfR/JAE3k= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=W5ZZFxgU; spf=pass (imf20.hostedemail.com: domain of andrey.konovalov@linux.dev designates 95.215.58.171 as permitted sender) smtp.mailfrom=andrey.konovalov@linux.dev; dmarc=pass (policy=none) header.from=linux.dev X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1703517571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=gtILRKJ0trYPt8tyQFLeNeQ04NHz6IkEJP80Wwo1cS0=; b=W5ZZFxgU6MSYmdopEzAXGGE5gDJPmo+ZGGRKS5J86ZPztZXzJAEQqPRhg4fyqL04jDMR/z IHOXw6OLflgQdNazumo25AwO9vVwiBAngimhVCkwhQQIUYOZ+IjO6LfImbya93vttgit5h CqIx/6co65o646yEzapsHxuwiZOyubE= From: andrey.konovalov@linux.dev To: Andrew Morton Cc: Andrey Konovalov , Marco Elver , Alexander Potapenko , Dmitry Vyukov , Andrey Ryabinin , kasan-dev@googlegroups.com, linux-mm@kvack.org, Chris Zankel , Max Filippov , linux-kernel@vger.kernel.org, Andrey Konovalov , kernel test robot Subject: [PATCH mm] xtensa, kasan: define KASAN_SHADOW_END Date: Mon, 25 Dec 2023 16:19:24 +0100 Message-Id: <20231225151924.5422-1-andrey.konovalov@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Stat-Signature: qxsg59zjeph394rthx9yyinhtu8ag5se X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: AF4001C001B X-Rspam-User: X-HE-Tag: 1703517573-281214 X-HE-Meta: U2FsdGVkX19reEVCymMi5rBoQ5hr/TkVZn6izxp0vMsU2VUZ1AbLM9at6eqi3ZM7SpS0I9TndC3/+i5Zr9sFJPe5HGESzkzeEwYATW5JY11DB2IK5n6Bg20ZxZmk+GyTCdCWqQhf3i86WBAQPsHafB50PuvrSjtXzZw3NV9nog6Dpe/npie4O2AQgeREufxYHfuAa8UEb9DXrp60aaq7pMNfPwa0oU5YHYoAwUpC8V/mPo7GcluNVDl0qdMSyElycrtTnaa5anzZT9e5ausOFK0cbd9ROmkgVWrtNznfO9uhxqflNz1RGoRtoo//7mnnyarisXEDhriA4vCEcQzeBIs63Dcil/e0fLZmsGnhJwE7S1V5HTO4tcXPso+tzwzEEdBCWLTfZaF13+XCynNvWEcUpgKLpYp+QDthRTbGzjxDBYVBwxxR28cx6Z2irD0sRJx2IrNSZhy+XH3NuxT9fggIWklz9qgPJv9IR15XJPGkmV9+eDroieKjIRefk8IvkRPZy9RSW5TzZ2RjEV3qS5YiQtKssNsIoMBYgJn1cgMmjRXPy5/T0dqLTPmY6b1syir8jWTkIKNRWWI4zMejDOxLLV9/CFZqbCjv7ArQ/fc8YhH1SfQ8qeDdpVLj3/4QbDpHQ3S7uNih5Fbrb6Sgz9MvZnKLtAqOMwxHOXTklYsu9YEUBEf5BCG8qScTSZed1Ua4ihChZ6joYvQiR0CCORkzM5MJOzG5j1tJgdL0ofvzTneL53ON+2tySLOZAq+HmICxoP6Od/AAJOxGJTVgMugegZOY3QP+prjqym9vi4VRKrEOHY1m17TwBDTi0GDyzeR7CJoz1s1xfLJJ4CA+YegcX3l3yhOM+HyRCIdKBlWH8duC4GxDloVWJcT4n8a99l9U9Ernd7SK5Id9XUpoalrHONKEFpXrOktlqF+uE3u9BZTrVvOjpLohZaTgwyVYRNbnDiKY4zTInzSHuaz z7+nC355 IhT2WpdoLHQYCDFxsmFDkjFUQYIGVIkwGo1PL3lPoCPLWR4VSHdVUJoYtNzYiD48aXk4YBcRJq5wR6l/SFGvCDiokQzPzqnH3PI4K3pgvNGr05D0ejsgnUfet7tsDxAe9S8+L59YWkQWkJ9hL+07hGXR+6An6qvg2dXYlIcXB1lyxrFKNi3er+NDYRWTBedu+skX9rjWtr79t2Z4MOA/9q8b5foiWrgkYUQ+TIHc95v8MeyvztjQ5IxhkGm7yraJ0p6lqVu9+HOxJnyh1h1BmmEdmOvmd2SKur7cZyQkhTql1weQ= 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: List-Subscribe: List-Unsubscribe: From: Andrey Konovalov Common KASAN code might rely on the definitions of the shadow mapping start, end, and size. Define KASAN_SHADOW_END in addition to KASAN_SHADOW_START and KASAN_SHADOW_SIZE. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312240755.MqsWuTno-lkp@intel.com/ Signed-off-by: Andrey Konovalov --- Andrew, please put this patch before "kasan: improve kasan_non_canonical_hook". --- arch/xtensa/include/asm/kasan.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/xtensa/include/asm/kasan.h b/arch/xtensa/include/asm/kasan.h index 216b6f32c375..8d2b4248466f 100644 --- a/arch/xtensa/include/asm/kasan.h +++ b/arch/xtensa/include/asm/kasan.h @@ -18,6 +18,8 @@ #define KASAN_SHADOW_START (XCHAL_PAGE_TABLE_VADDR + XCHAL_PAGE_TABLE_SIZE) /* Size of the shadow map */ #define KASAN_SHADOW_SIZE (-KASAN_START_VADDR >> KASAN_SHADOW_SCALE_SHIFT) +/* End of the shadow map */ +#define KASAN_SHADOW_END (KASAN_SHADOW_START + KASAN_SHADOW_SIZE) /* Offset for mem to shadow address transformation */ #define KASAN_SHADOW_OFFSET __XTENSA_UL_CONST(CONFIG_KASAN_SHADOW_OFFSET)