From patchwork Tue Jul 19 00:09:53 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: 12921906 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 E6899C43334 for ; Tue, 19 Jul 2022 00:12:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 813716B0071; Mon, 18 Jul 2022 20:12:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7C2B68E0001; Mon, 18 Jul 2022 20:12:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 689DF6B0074; Mon, 18 Jul 2022 20:12:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 59D746B0071 for ; Mon, 18 Jul 2022 20:12:31 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay12.hostedemail.com (Postfix) with ESMTP id 3BFBC120194 for ; Tue, 19 Jul 2022 00:12:31 +0000 (UTC) X-FDA: 79701922902.01.09E6930 Received: from out1.migadu.com (out1.migadu.com [91.121.223.63]) by imf22.hostedemail.com (Postfix) with ESMTP id C4F66C0075 for ; Tue, 19 Jul 2022 00:12:30 +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=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 X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=GGtCf53T; spf=pass (imf22.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-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1658189550; a=rsa-sha256; cv=none; b=qPEgQIGWF94Jw3+tsJVbYBNLwCihSJWRdsfyOCyqCrDhvi58htByCUde/3FDdd8kuvjFMN ZI5ddEqRd5DQrCmM0wt7eoA5XvEfSeqWNMh7rTQ4C82GVK9eIUSVpkYdRQwHpZS3whP8I5 55/yPt8zKBldQWYBX/M41sSGobC46+U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1658189550; 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=UD3eBbLDl9LYJIKYdwORcsCb0ASJSFlwLEBYC+Ega+qQ5WFPazV57E2w/PtLDbY99ZY4g/ +rV0Tuei0Y4TwD+sPAUhLJL+r7ao5FaE2/R34Ezc4yHuJhcAHjyYz2z28qsOY8tnkuaYgX hW2wn4F5ndkEMny2UIWpfFWuxv78VsU= Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=GGtCf53T; spf=pass (imf22.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: rspam01 X-Stat-Signature: 93yrni8ueqkk46ttoo1o57y7n1e9whwg X-Rspamd-Queue-Id: C4F66C0075 X-HE-Tag: 1658189550-122696 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: