From patchwork Mon Jun 13 20:14:07 2022 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: 12880083 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 17F01CCA47B for ; Mon, 13 Jun 2022 20:17:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 469E58D01D0; Mon, 13 Jun 2022 16:17:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 37D398D01D1; Mon, 13 Jun 2022 16:17:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F3BA98D01D0; Mon, 13 Jun 2022 16:17:38 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id DA6628D01CC for ; Mon, 13 Jun 2022 16:17:38 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id B199C60C02 for ; Mon, 13 Jun 2022 20:17:38 +0000 (UTC) X-FDA: 79574322996.12.6D89FB1 Received: from out1.migadu.com (out1.migadu.com [91.121.223.63]) by imf29.hostedemail.com (Postfix) with ESMTP id B8A21120088 for ; Mon, 13 Jun 2022 20:17:37 +0000 (UTC) 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=1655151456; 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: in-reply-to:in-reply-to:references:references; bh=tSwVFyyCCOKYSS6nxmIV1PC3/qH9HgKDBeITqQWAPk0=; b=WPoF2wA8zrQJNUhNOi67mLPqkW+l6qCNPsDjnmD3jT2JzXaRnbEZfdN1PG9hjWxvcBGE/p YaM8gS1aZsx2KRB+eZgKeQGJbzkwaQyiC9eW09wivY8anWjgE47sCTEBIvu6laZIFCup3r 3KjAbbgkMrIctOvPB4lHtNWIK5aDe9k= From: andrey.konovalov@linux.dev To: Marco Elver , Alexander Potapenko Cc: Andrey Konovalov , Dmitry Vyukov , Andrey Ryabinin , kasan-dev@googlegroups.com, Peter Collingbourne , Evgenii Stepanov , Florian Mayer , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov Subject: [PATCH 16/32] kasan: only define metadata offsets for Generic mode Date: Mon, 13 Jun 2022 22:14:07 +0200 Message-Id: <56df12dd774101d121cfcfbbab69d71851d8671a.1655150842.git.andreyknvl@google.com> In-Reply-To: References: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1655151458; a=rsa-sha256; cv=none; b=hYyAFtGI/Re3UM0LSpb2zq0eMGdRuHhPKt3azRplyFXukf+AxELxIfUp6C1+yC7UdPmJUV 3pHZ41NT10AbCTeOZTSGy4/+XYpGE0AKWwoFl1+TRXC7E5rJFLOayKvHzP8RKCFtwRnCRi 7TDNM70eByGJcAZIcinfWtFtb7DHjCg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1655151458; 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:in-reply-to:references:references:dkim-signature; bh=tSwVFyyCCOKYSS6nxmIV1PC3/qH9HgKDBeITqQWAPk0=; b=ikgA54ZG6sgf0pcvc4rUslcCj/lgN9b4ze5NdustsHPFP/BUlO6zlh8GpYaLK4tMmX9akL LEuHhnAntDCnqMInJjclwXW0G+z5qfT2H60bATi1BHXZraIhauRjHossvc5D+iaDIKGeZl ib1085aQb+H+At2GBjBipiQST0t7BZE= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=WPoF2wA8; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf29.hostedemail.com: domain of andrey.konovalov@linux.dev designates 91.121.223.63 as permitted sender) smtp.mailfrom=andrey.konovalov@linux.dev Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=WPoF2wA8; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf29.hostedemail.com: domain of andrey.konovalov@linux.dev designates 91.121.223.63 as permitted sender) smtp.mailfrom=andrey.konovalov@linux.dev X-Rspam-User: X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: B8A21120088 X-Stat-Signature: mo1je3we68imwq58omygouxr8d499o5g X-HE-Tag: 1655151457-563339 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: From: Andrey Konovalov Hide the definitions of alloc_meta_offset and free_meta_offset under an ifdef CONFIG_KASAN_GENERIC check, as these fields are now only used when the Generic mode is enabled. Signed-off-by: Andrey Konovalov --- include/linux/kasan.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/kasan.h b/include/linux/kasan.h index 9743d4b3a918..a212c2e3f32d 100644 --- a/include/linux/kasan.h +++ b/include/linux/kasan.h @@ -98,8 +98,10 @@ static inline bool kasan_has_integrated_init(void) #ifdef CONFIG_KASAN struct kasan_cache { +#ifdef CONFIG_KASAN_GENERIC int alloc_meta_offset; int free_meta_offset; +#endif bool is_kmalloc; };