From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 34D1CC4332F for ; Tue, 14 Nov 2023 04:42:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231187AbjKNEm7 (ORCPT ); Mon, 13 Nov 2023 23:42:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232054AbjKNEmz (ORCPT ); Mon, 13 Nov 2023 23:42:55 -0500 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFA11125 for ; Mon, 13 Nov 2023 20:42:51 -0800 (PST) Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1cc921a4632so47360905ad.1 for ; Mon, 13 Nov 2023 20:42:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1699936971; x=1700541771; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=sCrSsxjAq1jCq+B2JpsAc9Scn9B6dHAemDj3eFlW1CE=; b=PicbEKxJg/UQGOrmAEEc1CFbYiPVXA4zgetGi1XaHRZx3T3vft9I8d4NKcB97Fj1NA GlwPWecS2g0DWpjuJ6UVfX3PqT36r/HU5aXZ7pOchbgI3v5UvJBB66mqNBsHogDhZEST yn4E/W7e3HCNnPfPWL4OA7JISg7xENXuYJTCs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699936971; x=1700541771; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=sCrSsxjAq1jCq+B2JpsAc9Scn9B6dHAemDj3eFlW1CE=; b=mJ4n02cNOCTCsKYB//1W49O5lRyaB9LmAV+SI8gz8rpVDJiuibMs6/3rU86HT3petG mpprIhNmsZ2V//nvIErCmhFAYdksfJrjxKcLk2kY9b7DSL53gorcdGZEgA4alNw5BOyb 62DUYJ5WcYjgXzn08YEly8GUMtmSNjcgGebSULZUMzxtrGY67tX5J8eJMZEUZ92wzRiQ 4qQ7h5GHhlj8/1czFidAcnjiaYW6vWypS0lZMdVrXsa2/gUvPwbyjRUDVdq/PpcFGsPP VujMpD4tJSAdOf/xymbrtHv8Rh4yKhtdFWDAjkldjUuEGif0e076J+vJVg4HRKgnzqRT oliA== X-Gm-Message-State: AOJu0YxPPPA4vgkno6UzO8Mf0Tcsy7h7XCVtR6tUMc0Nm+Rog9tEqhps PlCEMg4bKZ1ry1qEnwPMaAusgg== X-Google-Smtp-Source: AGHT+IGdwyQZzmA4/9nwfKzzB4u85s8j9BkjlV/hZKmIfu7UdDuaDJSnLL1zsdTxEYzRzIo24svtGQ== X-Received: by 2002:a17:902:db0d:b0:1cc:4467:a563 with SMTP id m13-20020a170902db0d00b001cc4467a563mr1181743plx.3.1699936971495; Mon, 13 Nov 2023 20:42:51 -0800 (PST) Received: from www.outflux.net (198-0-35-241-static.hfc.comcastbusiness.net. [198.0.35.241]) by smtp.gmail.com with ESMTPSA id z5-20020a1709027e8500b001b8622c1ad2sm4947830pla.130.2023.11.13.20.42.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Nov 2023 20:42:51 -0800 (PST) Date: Mon, 13 Nov 2023 20:42:50 -0800 From: Kees Cook To: Vlastimil Babka Cc: David Rientjes , Christoph Lameter , Pekka Enberg , Joonsoo Kim , Andrew Morton , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Roman Gushchin , linux-mm@kvack.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev, Andrey Ryabinin , Alexander Potapenko , Andrey Konovalov , Dmitry Vyukov , Vincenzo Frascino , Marco Elver , Johannes Weiner , Michal Hocko , Shakeel Butt , Muchun Song , kasan-dev@googlegroups.com, cgroups@vger.kernel.org Subject: Re: [PATCH 12/20] mm/slab: move pre/post-alloc hooks from slab.h to slub.c Message-ID: <202311132042.CA0081D@keescook> References: <20231113191340.17482-22-vbabka@suse.cz> <20231113191340.17482-34-vbabka@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231113191340.17482-34-vbabka@suse.cz> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 13, 2023 at 08:13:53PM +0100, Vlastimil Babka wrote: > We don't share the hooks between two slab implementations anymore so > they can be moved away from the header. As part of the move, also move > should_failslab() from slab_common.c as the pre_alloc hook uses it. > This means slab.h can stop including fault-inject.h and kmemleak.h. > Fix up some files that were depending on the includes transitively. > > Signed-off-by: Vlastimil Babka Reviewed-by: Kees Cook -- Kees Cook