Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp856767lqb; Fri, 24 May 2024 16:26:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUXWUxD379YM8Aee7dKSfkAYyyV0Q/ypkb1N6fBVny709BpWNqGm8+m3tjxBQH6mZg+SGH0XHsdX3wqRUzlbxJMJ/+Tk4LCQ5MB+Li4Kw== X-Google-Smtp-Source: AGHT+IGFnRXTfujBxbzmSPA2d/QpKBDUOCp/m9dleyOs4az0Q+A9lD0KZher+7ymwoQQYoawJ16+ X-Received: by 2002:a25:9884:0:b0:df4:ab39:8c1f with SMTP id 3f1490d57ef6-df77223cca1mr3278359276.53.1716593211514; Fri, 24 May 2024 16:26:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716593211; cv=pass; d=google.com; s=arc-20160816; b=F46bMee0uJdIwDYeJDCXh6Y81bcE/7/LAlhpP964WM2YKMdvOvucqeUX26qs0Dr35b AWLaZH1+Xf2jGGGHT/XsShs7E89b/l8s86i4jVUH3MgCeFlqKo53OxvrzjdwEY8hLhF3 pYTKaBcIciRl1OKDgMpNRFU9t48M6MFXvgk0FLj98HEjeWmsA6Db9d0iTF6N9bR2crlz X6CllskFQGxIU/KVZLmpTne063V6mleP/dJxZ4klxk2UkEtPrWdpUkjBQDS6cn015ply RYqpm4Xen61LnFmvdqEfkEoqdd0FlVIGHAl0el8bvHarYV1BrimRleBfQG8aXx/HKiUI 0FLw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=rAjF+8L3fyaBjPnruoNhZhHPvWxDSPr1FotbktRhuLw=; fh=NiYo6hLm/TTA9OJdLZ7YFBv0ebPM1uvmzVXh3S3NP6Q=; b=H8Lj1mBzbXT3SkZq4xH5fee+fP2vp185Ul084wVVZc7x5BF5G3W2MclKw2LK2mPM7d OixAszGg2x36MzopkQ/12ygTh4AWL2vIdB6X/5VYwFuduV/RlGshPJZE6C9GkZ4GXTFH 1gPB4HihVfyYDAfrU5ODdAdgL9pqfqgShbokL4nmU1y1QB/GbOXs4Tqwfno0LkLCW+Ms +WLgpWUhTh5iHad2YCZWCMVR35ouiyxb5Af8r4329zxQh6zXXEVzshoh5IT+05kxvyzt WgQ6qcAv6CyYzFa1CCkwcrO7+bje58AuTSDiC7j4JESqec/w1gxwcZlsG+qZDAmxxsgU Iegg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=agDyVbk1; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-189189-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189189-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6ac0707d92bsi27312996d6.144.2024.05.24.16.26.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 16:26:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-189189-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=agDyVbk1; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-189189-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189189-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 3F81A1C20C5E for ; Fri, 24 May 2024 23:26:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0F501158869; Fri, 24 May 2024 23:26:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="agDyVbk1" Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EB96685936 for ; Fri, 24 May 2024 23:26:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716593205; cv=none; b=FByFGELpjp3IqW7WpgBsyO48T9rjbzqFFq+yjpIYfim8BV7WNTVYNbpLMhmLE1E7VPX8YqYgwZyJ+te3gAHUpsKd145MKSmmL0AZOn94FuqC+RHzvTcXy2/bfvFj+zEy0K5fiGB0qd7QBfrZ4FKhKyUuBbE1k2z3ZQf/brpzDwc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716593205; c=relaxed/simple; bh=u3LXnRNSMEFYkVGu4Hl2g6Gy9SUnQc1J8YGkPSu6FIk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=NKFD9wa04+k4YAewwTejK8VfQ7N+OZ5HT5kAy5A/t/2cdxPX2r2tEkporavThKGRQ5euZDqMJ57Uy+gKPBL/+Xpx3sRZjJcT1AGMipKAJUQEy6GfLk30I4ZzkJ0yToAkPfdEg+UOb69reN7fe5HrWvuP8nqzCrjA2dtWdpJrhI4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=agDyVbk1; arc=none smtp.client-ip=209.85.214.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-1f44b5ba445so12750565ad.3 for ; Fri, 24 May 2024 16:26:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1716593203; x=1717198003; 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=rAjF+8L3fyaBjPnruoNhZhHPvWxDSPr1FotbktRhuLw=; b=agDyVbk1LkUC8KuhN9tee4QpLwyoYfqzMjDEBRgPxc+39X9qB92SaUJaKqe7YleRax JeRmA7X8EnAJNn2/JXQV42FZUjeSeSMt8jAs+eyA64RvUJLgcXH83Rw2xp+o6MyFQOis L3efg04yBekxh9/6q8uLU7jhXcgROXJT3pIVg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716593203; x=1717198003; 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=rAjF+8L3fyaBjPnruoNhZhHPvWxDSPr1FotbktRhuLw=; b=sbLQPM7ZNPyorXeq3N/wikKbftfPWxtC1nOSNP2oh+QIJ9JLHqSX5gnkLRUm5LEspC DkVEwRhjK8yzv+j4pQ3YhjaOKJkc7u7kTbqnfyaxzpG+pZxNWEj4eFmGA55Tbmt1H2IG dxKzYAfC6E1PLivBz6of5ctCIFc6uDh0vX8vZ1wGzuWm2LMytpfuAgylwZwj1TTzOk09 PG49AkugCQOAQycptWbeX/l2H0quip58rwCAJ3rptS0YEPYWlJWjcIyW67Z4DnwSpk+e TlybqQLdyyhlcUWDmJ/jDZtwNcfrFHoU7AC0G2wdXTU24hfzPQbeHuNeSKK3iPqt7L4r C+6g== X-Forwarded-Encrypted: i=1; AJvYcCXLrSc6b+2uW3cpA9Py+/MCvVkQ1p9v2OEtg7rCFiTmWXuWPv47Dj3A3TeVR3trlJZNKfObEveurB/kFLV8eomdb7GG0xS4UxD2t3Vy X-Gm-Message-State: AOJu0YykNPCGpChx9q4RVvebmcn1Nv37upvw0Mbc7cbQuZPPyIdu/4yj 2pJIvpl5+Z4bkzP0fq3H6zQBFcP81LSpRyvrqpw64khwuoMLuwI30TxT253cKgUkjcd4Uqv0lr4 = X-Received: by 2002:a17:902:e883:b0:1f4:5b00:401 with SMTP id d9443c01a7336-1f45b0008c4mr19940655ad.54.1716593203148; Fri, 24 May 2024 16:26:43 -0700 (PDT) Received: from www.outflux.net ([198.0.35.241]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f44c7592c1sm19078485ad.57.2024.05.24.16.26.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 16:26:42 -0700 (PDT) Date: Fri, 24 May 2024 16:26:41 -0700 From: Kees Cook To: Vlastimil Babka Cc: Christoph Lameter , David Rientjes , Andrew Morton , Roman Gushchin , Hyeonggon Yoo <42.hyeyoo@gmail.com>, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Kent Overstreet , Suren Baghdasaryan Subject: Re: [PATCH] mm, slab: don't wrap internal functions with alloc_hooks() Message-ID: <202405241625.9FF3B5E@keescook> References: <20240522095037.13958-1-vbabka@suse.cz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240522095037.13958-1-vbabka@suse.cz> On Wed, May 22, 2024 at 11:50:37AM +0200, Vlastimil Babka wrote: > The functions __kmalloc_noprof(), kmalloc_large_noprof(), > kmalloc_trace_noprof() and their _node variants are all internal to the > implementations of kmalloc_noprof() and kmalloc_node_noprof() and are > only declared in the "public" slab.h and exported so that those > implementations can be static inline and distinguish the build-time > constant size variants. The only other users for some of the internal > functions are slub_kunit and fortify_kunit tests which make very > short-lived allocations. If it's only internal, I'm happy to drop it from fortify_kunit. -Kees -- Kees Cook