Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp3587642rwb; Mon, 5 Sep 2022 14:47:53 -0700 (PDT) X-Google-Smtp-Source: AA6agR5m4bfImqjRsCH+44LyczQhvfOHGpydhUpmwY/0jUsx1IJeI8kKr9mkaZrZbfAnz79rSEQd X-Received: by 2002:a63:6b49:0:b0:42a:910f:b4cf with SMTP id g70-20020a636b49000000b0042a910fb4cfmr42798143pgc.48.1662414473660; Mon, 05 Sep 2022 14:47:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662414473; cv=none; d=google.com; s=arc-20160816; b=NTLON9J/AU7VQBul7OyKbwld98jORawzHoEkgrIH/ROCF8bgUdHDYXUmM44wZce02Z FROeQXJ5OE5epNr5+SN0QucAI8Sz311A/fzJMEe+R3vlJ2B4zDcaogcG2eeuAylYlxoX vOuu7ECX9vkCXnCBcdQDHJ2E3YV8jhLFsordJoig1lZiTVMz0YfFZJ3r+lLiaCU3L63b TEsFB5TQS8b1LgWw3Wk96n5wOqSgdsjARZIPaIDA0qrnD7wswQzabBVur5Zuw069FBDD bO2DwuSGFjvIkXByyM/TpPRQentwt7SOl4hia67oaSmzRJh8e5JCyzQHwaDzg1o+JWCe L+zQ== 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=3Ia3unTlaKp85Rb8pWqelG9+mYXrhoeUqospQVb1dz0=; b=p3GAAhaSwMOL9nEpvja3tLHH7yQ3H57FhcO6i2XDcoQNzoeu3WpmE795sqaDwsXfMF UoZ8hpfjl08EefpE701fLwtuYdQcGW/3Xzni9eleD1tYdQwwyTTBrzxddTzJO+hxPjqw VL2aef1m4OyI+AyAstGPn3so7Dy7cjiGHr0ttJXA5aBUQf48lQVt69rLaWBd9f9ovkis h/ZKOct7HVEmOu81ENfscDrwO1h/wS1zeTf9kDdMgxlisd1KKuLBMXnXQY7EHrQUBkZy zl9tPyT7a/Gqb7kuI78Y2Cj84tlGdycclswmfhdfQw6lumbvCwziQLGl24cx2lV2SnGb BRJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=k9Gvhrle; 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-20020a170902cece00b00176c59140c5si658247plg.138.2022.09.05.14.47.42; Mon, 05 Sep 2022 14:47:53 -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=k9Gvhrle; 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 S233166AbiIEVIS (ORCPT + 99 others); Mon, 5 Sep 2022 17:08:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233032AbiIEVIH (ORCPT ); Mon, 5 Sep 2022 17:08:07 -0400 Received: from out1.migadu.com (out1.migadu.com [91.121.223.63]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C44FE659C2 for ; Mon, 5 Sep 2022 14:08:05 -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=1662412084; 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=3Ia3unTlaKp85Rb8pWqelG9+mYXrhoeUqospQVb1dz0=; b=k9GvhrlesqCcUrbDOdnmlBch7VRwv0bUACvXsj5KrUPW5sdF4MBjC5SZkRj442d+sx6w7m tnEWCOK+q5fIRjz97s32CE0s9rJ95/UktQODMqjySocOXO6gpAQX1RYImMu6y9OxKme/In w/UU/p6t/iyei5VBf3WFp6FMJjZl8CA= 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 13/34] kasan: drop CONFIG_KASAN_GENERIC check from kasan_init_cache_meta Date: Mon, 5 Sep 2022 23:05:28 +0200 Message-Id: <211f8f2b213aa91e9148ca63342990b491c4917a.1662411799.git.andreyknvl@google.com> 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. Reviewed-by: Marco Elver 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