Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp3582282rwb; Mon, 5 Sep 2022 14:39:14 -0700 (PDT) X-Google-Smtp-Source: AA6agR5VW6et8ulsMqSqh/9A1F27JuadvjvybkchPlkwWyQvd6H7kAFB3bghf8w1WGvJK88mk9I8 X-Received: by 2002:a17:907:3e12:b0:738:fd2f:df80 with SMTP id hp18-20020a1709073e1200b00738fd2fdf80mr38753193ejc.29.1662413954347; Mon, 05 Sep 2022 14:39:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662413954; cv=none; d=google.com; s=arc-20160816; b=JhpQNR62SdYpTe8NDwEMLCZ0rg5iQ5gtqOjPuBRuB/vIMLwkePtEJKr6rQtbazr4WK 8Vshj1UAJA5N/ilnR/gDqWv2QhuVgb0D/sT6drawG2Je8y9NDfmdMdujXMKtkjNPSsVv pzM4vuesNF4VRftWkK/ZQi0P+q31bY5ReeE45p92Ij4tSc96e/dqln+mIYR5Evm/K+eg jA4iTnlAaUoygICX79UKUTPqhrvFUghP/C1TWyMh5IiXMH5JHY9zgsnPzanHGsGk+6qJ VItds0HMSrxwvUPU5HXBGnqNjVr9oYp0ED+4gDsUJgOdCnQnkPHsdKpOsy8uYPdRBIvm HbEA== 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=7s+y+NnFVR6SyFemhnOS8Di33idWzWChFcSyQrIGTFc=; b=cT7ARZWPbs1UPBoLK2jVyC1VMuqVnzeCRJKwbg20A6M4gecVwpVE9iIERJZjVv5+Su s3N0ZHs9UVRL1W9IKKGXAqMiMAD0Vwi+VKE9J9g9sd50Icpq812t5LtVW/I0vkrs6EYh iy1JP15s6z9NsH92s5IGJy5YQS4st1kIjS/zUSKf5gZ2eZcmOF/mqieIXNXEb5sz7aRR 7xHEIqqvqALIrLQDiNCUBQxpWt34MY6rFQ/V6D28vjrwAGoz8kjNCrCCdlEBpkmWc/CP G9NdtI3kCLwyljdDe7lQ4wtVxfU0ToaldoN75lKomwzit3p4/pahy4A/0DPx1e5Ty7gK gZVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=MhZf34zW; 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 nb37-20020a1709071ca500b007387740b9c2si9563440ejc.2.2022.09.05.14.38.49; Mon, 05 Sep 2022 14:39:14 -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=MhZf34zW; 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 S233050AbiIEVIc (ORCPT + 99 others); Mon, 5 Sep 2022 17:08:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233043AbiIEVIJ (ORCPT ); Mon, 5 Sep 2022 17:08:09 -0400 Received: from out1.migadu.com (out1.migadu.com [IPv6:2001:41d0:2:863f::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3EC0F659C7 for ; Mon, 5 Sep 2022 14:08:08 -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=1662412086; 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=7s+y+NnFVR6SyFemhnOS8Di33idWzWChFcSyQrIGTFc=; b=MhZf34zW8g7msIkJ6Hi53oNdGsMbCO0SSXSal68C05dDkRfBW2HWXu0xrCDi0IWwvgbn0a obKerD9WtlA1KYihfdrWmJVlvZrhzrZ1EgTN19sSmW2cn2Bw6ZuBL9LfHyuOU7oXlj1aTG 9dns8cLxlS1xSOBmsHcBx5JsbWaBKzQ= From: andrey.konovalov@linux.dev To: Andrew Morton Cc: Andrey Konovalov , Marco Elver , Alexander Potapenko , Dmitry Vyukov , Andrey Ryabinin , kasan-dev@googlegroups.com, Peter Collingbourne , Evgenii Stepanov , Florian Mayer , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov Subject: [PATCH mm v3 16/34] kasan: only define metadata offsets for Generic mode Date: Mon, 5 Sep 2022 23:05:31 +0200 Message-Id: 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,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. Reviewed-by: Marco Elver 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