Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3926987imw; Mon, 18 Jul 2022 17:39:18 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v2kokKphIqD/WfkQw0u2SCS976XI24ZL1kw1m6py8h82Uae9oCr7Gs1rNj8evSObmb3egQ X-Received: by 2002:a17:90b:2252:b0:1f2:2e7:fb45 with SMTP id hk18-20020a17090b225200b001f202e7fb45mr40853pjb.17.1658191158214; Mon, 18 Jul 2022 17:39:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658191158; cv=none; d=google.com; s=arc-20160816; b=f9bhOZauEYGmavLxsbydimPvBQdpcu5SezI1xphLTBGFRFqui/Ew6XmXm9yK/vYqLt e5yECz0v/q1nCObNz1SoLLBTSy18sUTPFc2mAmjqhpxSD0yzI8ZB+vUAW+EB3NNEg7ke gHk4o7DkI37UQEgBGk5uFq7gzAdVWNf8ehoWG1ygIbgPVu/il7GXFEHQ1uHrBn2BO3dl cE1Eme/movHfHAYBzYUwEKv8JN0JIAstRrzMBeH+lRs/gwDMA9NpgJfXBgZ2fK+R9z9e HfcSugRXXljPmKlxCLgiRWiaUe5zZNOfBPJuJKrOuaSpDYSKedVhPh4G2GSxvLmVF2av P+9A== 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=gFl1aLadfWJPQ+Xg4RcAPABChePIqsdWPpe8i7e+EqU=; b=cdjsXrA9nKAjxJ8mELOgd2yJ5rK4JnLR2N5lh2GKtFFZsQ5C0FUB0ptyQWkYPjO3uy Gcw9t5oK055xZe8A3e7SnW5dK2aTISQ7+dV5RcHTNjPszWlI2n2SWHW2eslW/SR/GUtN Cbdc13xymlZecPMNS/O5VxfNmZ9DkfrCTRijF6A19SG0M+SMlhPZBc1YbjYu+G1q8Oku enUaritFZPWfXD0KRF5j4Vct8ORX/pEKNOS3jHW5l8cKWbHs4lNAB1tVTCSFEywUUx8l V7at5ibJJDdvD9Dn9+3gIU7CNKKPIoUWKYJ+Q61GQY0QZARb677rOtGwRAyDpeNXWlk2 o66Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=GGtCf53T; 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 d14-20020a056a00198e00b00525425b20f0si18076955pfl.257.2022.07.18.17.39.03; Mon, 18 Jul 2022 17:39:18 -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=GGtCf53T; 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 S236549AbiGSAMe (ORCPT + 99 others); Mon, 18 Jul 2022 20:12:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236544AbiGSAMd (ORCPT ); Mon, 18 Jul 2022 20:12:33 -0400 Received: from out1.migadu.com (out1.migadu.com [IPv6:2001:41d0:2:863f::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9197933E21 for ; Mon, 18 Jul 2022 17:12:30 -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=1658189549; 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=gFl1aLadfWJPQ+Xg4RcAPABChePIqsdWPpe8i7e+EqU=; b=GGtCf53TQnL1kZxA120KVapzN39vL6tDViucW+URm5HgflNNpIrtRxPN3Kp7BrL2t6IzvH AH3YyL6UhrAFteVWBoKtRDHhEFRQyToCA01A7olK5sGQpmWSVlsA8VUs1BBFRDt4gohHX3 bB+YHVL6hw+Ap6XDONJrHErSVswR61s= 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 13/33] kasan: drop CONFIG_KASAN_GENERIC check from kasan_init_cache_meta Date: Tue, 19 Jul 2022 02:09:53 +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 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 As kasan_init_cache_meta() is only defined for the Generic mode, it does not require the CONFIG_KASAN_GENERIC check. Signed-off-by: Andrey Konovalov --- mm/kasan/generic.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/mm/kasan/generic.c b/mm/kasan/generic.c index 73aea784040a..5125fad76f70 100644 --- a/mm/kasan/generic.c +++ b/mm/kasan/generic.c @@ -367,12 +367,6 @@ void kasan_init_cache_meta(struct kmem_cache *cache, unsigned int *size) /* Continue, since free meta might still fit. */ } - /* Only the generic mode uses free meta or flexible redzones. */ - if (!IS_ENABLED(CONFIG_KASAN_GENERIC)) { - cache->kasan_info.free_meta_offset = KASAN_NO_FREE_META; - return; - } - /* * Add free meta into redzone when it's not possible to store * it in the object. This is the case when: -- 2.25.1