Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp869430iog; Mon, 13 Jun 2022 14:57:52 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sjxWvSNSx0RLWxVzuPZ8qb4rY1NKrMZ+Y1JC3LE0kZz244hFooYmLT4x4YjC7XpmZ1WDvc X-Received: by 2002:a17:902:da8d:b0:165:7c1b:6803 with SMTP id j13-20020a170902da8d00b001657c1b6803mr977181plx.157.1655157472695; Mon, 13 Jun 2022 14:57:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655157472; cv=none; d=google.com; s=arc-20160816; b=mpbrGJIoBQTmVOs//HSajF2b2dPlnMF0Ed9jppXMmpJ0msuejSHBdujfInhou3eJdZ TQgMljAUvUcT3CH4PAXG9yVecPfPSRHmpX1Ls/OcghwmrGtG8kCrh3bWbWwptk7DYQw4 tGJedFq4UUNs30B1N9X+gJl7AktacdtHhZpSOUxr2CVNStpyHcqWNLhDQ9vJTzoLYH5k CU1Lzxx4vDZ/cRUOLDyeqNKvW0maN+xIxNNfUDtuE2ZGhoR8ZJNJQh4X6MQPM3/9eBxV DtdrhdqtUTv35TuFNQqx18shFyV1ueELH9RdURJpaEtTHPFFyRVNS/aURRrpc13D3jBT XJ2g== 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=A96ufEEJGkcVgzoWPRv3EhFngQRqdAI3ATKRX5R6FV4bYB6szQYYuR+xRSf7Hu5piG 93cc4HV4Y5zMCghe9qjNuKVTmJhSU2jCYQRsyb0ghX5mTtKCKXh0KNV2k3I2hnru/bNv 978NTJ1Qg6EXBMlTay9m/abKCYLQ7cSaK+Pi9vTmN4LPe6se0W5/lU0B7XbntAHXPfKf y30ofKxOBQv1RoAecWzIB8kIe7GA+TMiFMUuuRLJwFcLrahcEkdPCKhGHb56DGEHF4ng CAclMPsNt3qT3sqfiPNPurlv8+y8VNdAZPgPvaPcbN3ls7k10MjxuzQP0JbfAW6BAPgR nRLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=gY7JQXEB; 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 a1-20020a17090a854100b001e86a88ccbesi10026549pjw.81.2022.06.13.14.57.40; Mon, 13 Jun 2022 14:57:52 -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=gY7JQXEB; 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 S1349177AbiFMUzs (ORCPT + 99 others); Mon, 13 Jun 2022 16:55:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351492AbiFMUxi (ORCPT ); Mon, 13 Jun 2022 16:53:38 -0400 Received: from out1.migadu.com (out1.migadu.com [91.121.223.63]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2114918357 for ; Mon, 13 Jun 2022 13:17:35 -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=1655151453; 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=gY7JQXEBuSeNnEDCgLkcnyiE/DA+U2o3XKD0esu5cVnDXMCN4xpUf4g6sutMdMIbUtGf73 a1zplBChQUeo0ROg1thTsy+Fdn6m3+vLMYuukA+vIoYyvUtAmTNvUVdfHLByaaOWECK8os WtcT5mx80L6O+Oual9NGhwQYgarO5bw= 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 13/32] kasan: drop CONFIG_KASAN_GENERIC check from kasan_init_cache_meta Date: Mon, 13 Jun 2022 22:14:04 +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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,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 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