Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3909426imw; Mon, 18 Jul 2022 17:15:22 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vTGp5v8IsZyonTtq9eE+6tX4VJVjoh8+vKJMFV+rKD9DFi8YUjvlfQQeq58bHfywg+VgPJ X-Received: by 2002:a17:90a:ea88:b0:1ef:94f6:834 with SMTP id h8-20020a17090aea8800b001ef94f60834mr35261396pjz.236.1658189722170; Mon, 18 Jul 2022 17:15:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658189722; cv=none; d=google.com; s=arc-20160816; b=DEEZ07uBZtEdofkO3npUec0066qhj06airWF8TPn1JthFz9J3Tlzjo/Htf2Wq7vUSE Xqlras15dIWwg1ZuVKbblKlcqydRAiPQzNCUr0s4VU7tIfFgd2ivmdRmZbmtK86BsIpn Hux6Ix36nBnmVj9YK90oblxdBjHLvFianR4uCGJu/lz1jh90/rBnpJTtIhyGTavkMowp SSkpGjm5XkoGEvlYs3HtQlUw7+x55ClaXMQm5/Bpf3V3PdL1GdAB0vJ8bFLGCzkvt44E pgvfjl/ReMZYY+JcvO01TqN3OgllMSQ7chp8UVaY6QhE9PVdRwcHjPQr6T0zWauX0/0Y OIow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tSwVFyyCCOKYSS6nxmIV1PC3/qH9HgKDBeITqQWAPk0=; b=Tx94M7yUkgCLDe/zPTIyheB67rV0RiLhS9xUNVtoVurWKKlj0unDEFjl5e+DZBN+t0 /crcaO4Km5fnzjH7lGPYxIFBoHYPgd6yVwApDj2nJbsI7egsKFcrGHLcir0BkRAIV9Lf 9K9U8I8ZssBiTcZdiM7j6MlY9ZShmf93DxP4VxUWO63NEkR6pXNjUapQCJPHWcLRlRN2 kKFln6wiemVG0GWePvCjjhCD/Om3VS/QQTD08y8yO3IncGlqi+sy9QshdonkSR06O+uq 3PkZH2HuMy2pyaPk0hb+m79xs6PjduP2bHprlMyPVXO6vWE355gr8GmfMOUcISEIG8IM D6rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=iaswNaVc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o5-20020a170902d4c500b0016c399bd186si19698008plg.379.2022.07.18.17.15.06; Mon, 18 Jul 2022 17:15:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=iaswNaVc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233836AbiGSANN (ORCPT + 99 others); Mon, 18 Jul 2022 20:13:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236647AbiGSANG (ORCPT ); Mon, 18 Jul 2022 20:13:06 -0400 Received: from out1.migadu.com (out1.migadu.com [IPv6:2001:41d0:2:863f::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B38537FB4 for ; Mon, 18 Jul 2022 17:13:04 -0700 (PDT) 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=1658189552; 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=iaswNaVcKlE6Ibx4Q/VaDqXuU//N8Bb1UH2IAMNJ/JWMbQ+g7p+b8yxsXFuzuVs1OLrb1/ WO2FkIPf2mND0jqNAq+nV6C4i52UasUQh94R1v6bxjJJhOXKBCsjr/oJoEXPYDHvqy/R/0 jWVu+YLfZGTImLr6K4Xcsg4M9iinHi0= 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 mm v2 16/33] kasan: only define metadata offsets for Generic mode Date: Tue, 19 Jul 2022 02:09:56 +0200 Message-Id: <902cc38713c94e729b3eca170cd53ce9dfb5fb47.1658189199.git.andreyknvl@google.com> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; }; -- 2.25.1