Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp839479iog; Mon, 13 Jun 2022 14:11:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRNvDxdajT8a9S/EB0LtsjKyTsaD2S78v8nXQ0mAZzsxJUvde+5ov52157VhH6O+jxz6GB X-Received: by 2002:a17:906:7394:b0:712:3c15:ba52 with SMTP id f20-20020a170906739400b007123c15ba52mr1404855ejl.169.1655154713544; Mon, 13 Jun 2022 14:11:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655154713; cv=none; d=google.com; s=arc-20160816; b=nHoKff2memHfOvLiuuLP5jB9j9IxEVay0Gu5xXfi69dXUy7NgjTFHRS5vqPStCbdco qjFWqHwnV4XT/mAU3EYF4cB7tSG9I6UKiJYFdmzTJ/gbLYITvGuLt/WNFLGlxNsoHdnb 9QTi6P3nryKAJ4KSvKRKOAq/HsaIrUYPpzXK4ZTSoyxFly4BCMBYy0P0E7qgeXbNPlV0 6mFKX8skFxbY4AWal2wCbGtWL/WyWx+A7GKnhjmJ+2pOZIPNJLd09zNSeoDr0XRDfkVT 0tKeRRPgDId6Y0vHqqoQtuQ1xe1o5zAeAdnjSk+x/9m/cKquo9AgvgJu5hFQjAIr289E h73A== 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=rKOEOhr6NNG7MGi6Qs5G7Cyl7sEVB7SB+mpZ3BNUu65hczVC6c1j3IB5YAsti3i456 u/SFmHcY9JvGHRRfZyPu48Yu/qCIo1d5BkkcSG+Mlq/34nYatILWt0SdlLVcV6DbQ/Mn olKuy4god+BekGPLUBMhuzrpA9JZVLqFSnhCdAS7TGV1Hy/BZDCEFytqfwH89EYHUxyF TUTMpvp4e5vHYx2koA39jRoHtV6Cu58SDL9VLAmLhuZ3vCD2EXzzP2BuDFtoECUaLh2T 9bgMhZ7HfI0BAO34pOSNEBhfpilXFthE0mBQd1fzlBsSVndY9G6BtuUFI3HL7eqxn9aA Vkdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=WPoF2wA8; 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 cr14-20020a170906d54e00b00711ffe66c06si10019584ejc.754.2022.06.13.14.11.28; Mon, 13 Jun 2022 14:11:53 -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=WPoF2wA8; 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 S1349395AbiFMUzy (ORCPT + 99 others); Mon, 13 Jun 2022 16:55:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351517AbiFMUxj (ORCPT ); Mon, 13 Jun 2022 16:53:39 -0400 Received: from out1.migadu.com (out1.migadu.com [IPv6:2001:41d0:2:863f::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D56DD18383 for ; Mon, 13 Jun 2022 13:17:37 -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=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 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,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE 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