Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp228415rdf; Tue, 21 Nov 2023 00:26:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IHAwOYWfB7XrqQZXIoUKD+XKfhw9KOpQ3emlg5NRJ3scvd95B9/B+orCZXCVz4KcYFNIRJO X-Received: by 2002:a05:6a20:4f92:b0:187:afb0:c2f7 with SMTP id gh18-20020a056a204f9200b00187afb0c2f7mr9479893pzb.45.1700555184789; Tue, 21 Nov 2023 00:26:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700555184; cv=none; d=google.com; s=arc-20160816; b=R+82pHUrYRE3yMRUTcAKn+qeZLyYDC+ayJAeI46jyIgZOWhdo3TzG20m/pzzK0nYMV GwNKgbUmx2Ih6j+E0qVA/dWEmupkcSyX8Tx4t6qvsVIzk/xVbffmPJD2RL4xYsiEF9Qe esEQ61UMkQbwq3e207xQIEoRplxOVUQfNAWE+ia0w7NbWCA6Du3B2cgjNJ7bZ9Y9m/55 WrlG7C7G5aYm8+UNoGPUnWNCqt406BhZAsamipNXj97LTXlsHnEb5Sv0687Syj4pEHXe hW1zHBGdTCVLQc3jUH9Imd/hFKDNrgBnks+7cRtxzPArBVt8ZNrndcgJLzQIb8gCYbGC o4xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=VTTlQmptyhl28YwEosbclj7OWg+yV7E5QNOLel4gX6s=; fh=ezGgTJoHdqijbJ6IWHiSjHZUYI0p+VPBCX/sPRmQd+E=; b=yAzvZdE4a/6E5AdeoUN6eakRqvZ1kK/66vH0D+DuqMJ7br68oT8Sx5rtoXJMcPrGeI 0a1sHmThlrePOY05Kjvtz3WkZbntqL9zALkCFrAr3cOGikJTMKNFtWDrwITCY2PjSxiK Uq6QfngRyWGqSb15pZptkCYPXyEE+G2P7y9q5hqHw2gvLwaseiRXubZhTbuQSjuNMrlq QPiImtsinMbjMbX919TFKLliNPXgXKW425WngE2YIAy/bPbWFI+T+CqXWiqdhETFLC6s 6EFM7LUktyVFKqYthK+z97q3lYQ7rkmX3Dzr4icsizn5DIRsGKTC1MNSitgWLmrA+2U7 mcYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="G/g5h1CB"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id cn11-20020a056a020a8b00b005775e2a7951si9333563pgb.345.2023.11.21.00.26.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 00:26:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="G/g5h1CB"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id D2D9D80295BF; Tue, 21 Nov 2023 00:23:42 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229840AbjKUIXe (ORCPT + 99 others); Tue, 21 Nov 2023 03:23:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbjKUIXc (ORCPT ); Tue, 21 Nov 2023 03:23:32 -0500 Received: from mail-vs1-xe2c.google.com (mail-vs1-xe2c.google.com [IPv6:2607:f8b0:4864:20::e2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E6B6CB; Tue, 21 Nov 2023 00:23:29 -0800 (PST) Received: by mail-vs1-xe2c.google.com with SMTP id ada2fe7eead31-45d9689b65dso1817043137.0; Tue, 21 Nov 2023 00:23:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700555008; x=1701159808; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=VTTlQmptyhl28YwEosbclj7OWg+yV7E5QNOLel4gX6s=; b=G/g5h1CBMMbuDOL2blUuQrW38gjO9h01pWI7iXmf+9iKbRbvJGq9DkWXhZibq6OHUm PrbU4coZha45G+MOXJoplvgJaFGIQeszf+Df5tGxXMywGyQbdkYW8h5fpwxAp7Mn7sZb EgKRsDUO7GqzY53FhluHZqHlBRyjQcMoxuYLbs82jEE9Oh13rng7ATN2XvL5tugnWeNR dyKd/1mLMK2+cX57ckQ2/PZlp0UKmfARa7pFaEKFDBEry0AzYS2C3wws3Kr9cZ7THGsX cqwMEG9J/z6G9zx2SXkkW4HCHm6H83B5thcbU4/SWzKZwsbfdkY8fT69B6VHtMbZVgz4 kyHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700555008; x=1701159808; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VTTlQmptyhl28YwEosbclj7OWg+yV7E5QNOLel4gX6s=; b=PZA2gd+Zgmd5aOyKELJtF3PaX0ZrxzqykMsYK5e6wiYc2yOxijL7So7oAO+GHkwnTd HWgLVKun5yYj3YYHgk8wBuAk5wNQNHNgeLhArl8znjEQoFbxuIlknkU5qvJZmYzjeVpE tKazgSlohY6psJmjZtad0SHWnDUEKkYRsDCskb1PLAwNexA491G1PidiguYFVDdcLlby XNYaryAYMfyTeIDkSB+Atp0/DXyOTq2h/bZCh75GneOANHvlYCIA+BeXjDvfB6jPmlvl gdg1hEfxWuIXlI0Oy5sieR6Wndc6jHnlCWVr0NpfA20kclKsxbUFR6OlrU1IQFIaXGKD KgCQ== X-Gm-Message-State: AOJu0YzO+tHtZrcl45vWaWo7nJyZwMG+ZqjU7Ymrkix+I/M5/pwTDlvp yyT5Cj2cC/idm8DaBLjcJGeUNbVQ3KsK3frqBa0= X-Received: by 2002:a67:fbcc:0:b0:45d:a89f:e1f4 with SMTP id o12-20020a67fbcc000000b0045da89fe1f4mr4547806vsr.9.1700555008189; Tue, 21 Nov 2023 00:23:28 -0800 (PST) MIME-Version: 1.0 References: <20231120-slab-remove-slab-v2-0-9c9c70177183@suse.cz> <20231120-slab-remove-slab-v2-3-9c9c70177183@suse.cz> In-Reply-To: <20231120-slab-remove-slab-v2-3-9c9c70177183@suse.cz> From: Hyeonggon Yoo <42.hyeyoo@gmail.com> Date: Tue, 21 Nov 2023 17:23:17 +0900 Message-ID: Subject: Re: [PATCH v2 03/21] KASAN: remove code paths guarded by CONFIG_SLAB To: Vlastimil Babka Cc: David Rientjes , Christoph Lameter , Pekka Enberg , Joonsoo Kim , Andrew Morton , Roman Gushchin , Andrey Ryabinin , Alexander Potapenko , Andrey Konovalov , Dmitry Vyukov , Vincenzo Frascino , Marco Elver , Johannes Weiner , Michal Hocko , Shakeel Butt , Muchun Song , Kees Cook , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, cgroups@vger.kernel.org, linux-hardening@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HK_RANDOM_ENVFROM, HK_RANDOM_FROM,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 21 Nov 2023 00:23:43 -0800 (PST) On Tue, Nov 21, 2023 at 3:34=E2=80=AFAM Vlastimil Babka wr= ote: > > With SLAB removed and SLUB the only remaining allocator, we can clean up > some code that was depending on the choice. > > Reviewed-by: Kees Cook > Reviewed-by: Marco Elver > Signed-off-by: Vlastimil Babka > --- [...] > diff --git a/mm/kasan/quarantine.c b/mm/kasan/quarantine.c > index ca4529156735..138c57b836f2 100644 > --- a/mm/kasan/quarantine.c > +++ b/mm/kasan/quarantine.c > @@ -144,10 +144,6 @@ static void qlink_free(struct qlist_node *qlink, str= uct kmem_cache *cache) > { > void *object =3D qlink_to_object(qlink, cache); > struct kasan_free_meta *meta =3D kasan_get_free_meta(cache, objec= t); > - unsigned long flags; > - > - if (IS_ENABLED(CONFIG_SLAB)) > - local_irq_save(flags); > > /* > * If init_on_free is enabled and KASAN's free metadata is stored= in > @@ -166,9 +162,6 @@ static void qlink_free(struct qlist_node *qlink, stru= ct kmem_cache *cache) > *(u8 *)kasan_mem_to_shadow(object) =3D KASAN_SLAB_FREE; > > ___cache_free(cache, object, _THIS_IP_); > - > - if (IS_ENABLED(CONFIG_SLAB)) > - local_irq_restore(flags); > } FYI there's a slight conflict (easy to resolve, though) when I tried to merge this on top of linux-next, due to a recent change in KASAN: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/= ?id=3D0e8b630f3053f0ff84b7c3ab8ff98a7393863824 Thanks, Hyeonggon