From patchwork Mon Jun 13 20:14:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: andrey.konovalov@linux.dev X-Patchwork-Id: 12880079 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 556BDC433EF for ; Mon, 13 Jun 2022 20:17:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DDCAB8D01CD; Mon, 13 Jun 2022 16:17:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D8C9F8D01CC; Mon, 13 Jun 2022 16:17:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C2DD98D01CD; Mon, 13 Jun 2022 16:17:35 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id B05CF8D01C0 for ; Mon, 13 Jun 2022 16:17:35 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 83A3F21087 for ; Mon, 13 Jun 2022 20:17:35 +0000 (UTC) X-FDA: 79574322870.17.4B1C751 Received: from out1.migadu.com (out1.migadu.com [91.121.223.63]) by imf25.hostedemail.com (Postfix) with ESMTP id E3EFBA0090 for ; Mon, 13 Jun 2022 20:17:34 +0000 (UTC) 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 X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1655151455; a=rsa-sha256; cv=none; b=h5ZlT3R5zzHxAN3/GiT59TPQofbPUM3MyKjvNVdBHBMRmedDuEu7gHHj6Y1e0idV2M4iK7 8xaXKbav2vzmxbGhjJeEM+w6XidHMAIo48HFn8xjPLkvUAAx8rv8Zb+aSJGkCKK8z4jNQ4 1dPVOWvKn5mAkXg1TDW0BHQ1AjQB69U= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=gY7JQXEB; spf=pass (imf25.hostedemail.com: domain of andrey.konovalov@linux.dev designates 91.121.223.63 as permitted sender) smtp.mailfrom=andrey.konovalov@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1655151455; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=gFl1aLadfWJPQ+Xg4RcAPABChePIqsdWPpe8i7e+EqU=; b=41mxwSf30K+AH/21c+OqV8/PL5kBqqVY1jSj80pr3Jgo4xgV7n8ZIhMoxBALKlLa+2SGk9 dDcCE+5xqr/vtkUQetpHAAC24t6AXXjx+aIft0Is7RG0xGkwNAiYNX/RSXyxt8etr0aGmq nuQmFqtp3RoptEmw6a+vaxdfbr7i7m8= X-Stat-Signature: srnnx5ehke66q4peccq19rgufnikjajb X-Rspamd-Queue-Id: E3EFBA0090 Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=gY7JQXEB; spf=pass (imf25.hostedemail.com: domain of andrey.konovalov@linux.dev designates 91.121.223.63 as permitted sender) smtp.mailfrom=andrey.konovalov@linux.dev; dmarc=pass (policy=none) header.from=linux.dev X-Rspam-User: X-Rspamd-Server: rspam02 X-HE-Tag: 1655151454-78784 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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: