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: 183220 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp438868dyb; Mon, 25 Dec 2023 07:19:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IEY+wtp0i9SHwXQOp4wrbwm4DR0MxmYZsupb19A5bh0EynLq6bX8e61F/d4MIhOVka32A5B X-Received: by 2002:a50:c302:0:b0:553:68b2:31e3 with SMTP id a2-20020a50c302000000b0055368b231e3mr4355315edb.30.1703517591603; Mon, 25 Dec 2023 07:19:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703517591; cv=none; d=google.com; s=arc-20160816; b=vfDZ1P4BPp0jzqPj9wunDKK8q0/234JVszbS6jSrnxn0WbYu22msEFjFSCDD8wm7W2 KEOv5llNtq3FVpP+7OCRXgzHwRlhGhMF5yRyKzEX5mJUdsNEfQPCXcemLngoMDw8z6pm we2lSn94rkdUosXMthUnmPzMBKvwCmiccermi8VK3aK1qmu+O3jEMbcx79wrUyv6FneE bgTtcYgQHU7pn4V784Im435MPovm0GNNh7dzQ1lw2RcJVo27Fb5fwct+rKjetYUCxDPr FjPK6hlkumyNfzMLwyb5Ks2k7yWlurcyZq3ebKGcJJ3FGiUeUcvVBO8djzWxE39OZq/s RObQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=gtILRKJ0trYPt8tyQFLeNeQ04NHz6IkEJP80Wwo1cS0=; fh=39a/93hWRhBqbTclet/W9kHjKz2DsjZ5PwpcxR0ys54=; b=AAdn0hFWSwqu8iflT/s31oP8RzwkD3CsvJ6kQbT9RBRJ5nAUfOi8mPriRH1yz+Bybj aUvba/qUSbr20dawJic5rT0v6kc/I9Riv9R1yqHsv3C/oy10/diXpIg5UrwjQ5PfutSP N4XOzGINkCiabI/K2VCRZ3W4DsSTkRgT2IaFZkUc4c5SpTgIIXWCfmjUJQg4n5n6ga/f ZbVqlnP76DOSLh+coMu1dDaJAHZom4zyM7L89QAE6CHm4mhrIDj4qhTdrgnqR0doM3DZ xE52WBlW/ss0wfXRn2rUF19a2/EWpP19oNqptCTDemQ251R9lSB83w30Kpx5UiJuBRT/ GwNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=W5ZZFxgU; spf=pass (google.com: domain of linux-kernel+bounces-11112-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11112-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id h3-20020a056402280300b0054c90700948si4629603ede.321.2023.12.25.07.19.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Dec 2023 07:19:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11112-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=W5ZZFxgU; spf=pass (google.com: domain of linux-kernel+bounces-11112-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11112-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 31DFB1F2127D for ; Mon, 25 Dec 2023 15:19:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4F8B352F77; Mon, 25 Dec 2023 15:19:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="W5ZZFxgU" X-Original-To: linux-kernel@vger.kernel.org Received: from out-182.mta1.migadu.com (out-182.mta1.migadu.com [95.215.58.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C7149524B5 for ; Mon, 25 Dec 2023 15:19:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786267662490174023 X-GMAIL-MSGID: 1786267662490174023 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)