Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp58839lqs; Mon, 4 Mar 2024 15:03:32 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWfk4RrsKFDGQ6CZDrj44KJWa5Q6OPJJM6Uz4pzVfOR7AhkcmhJBTWbU34eSP0bLOHPf/gtjMuJLs+fT4nUDe7ZRxCBxe/PXpQcqCFh2g== X-Google-Smtp-Source: AGHT+IFuw4nVrIQ9eSuh2aYAmPxk0espzzFFJyMwchCwXm7S8PkgFimTIAoO2FDdBGCtIYww04zX X-Received: by 2002:ac8:7dd6:0:b0:42e:7e4d:9b68 with SMTP id c22-20020ac87dd6000000b0042e7e4d9b68mr461908qte.18.1709593411925; Mon, 04 Mar 2024 15:03:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709593411; cv=pass; d=google.com; s=arc-20160816; b=Y/X9YnHTqEOPl8Go8l0N8Zwgel93EY1Zt+f7PbJvyLx6XHKWCb5g7wPPiQVli7/xaQ 3tQGRWP4xfo66bOYOG1Lg4DO1bdh1gcVgQ4KVN628Oxbkm43EuLjjFt5C1NIWA4QGNWr +NLFBHnLanzKtIrphhbYQPVItqNFZXJWNlMgnJJYm3hbVHpdn0yKm9Nkx8raYUqWxyZm ipZWdAxEA1T1TrxFIR9YYRCZJMUSpf8Q5/4utDDuC/TsdMpb75sJpz+iz3DZe9y6Y4SX pn4cTCGJtSovzPH2xV1HJNBj9Y44Gcd7XMTE5IegCOQdmEUlkAJ/BJZ51iA5D4NqbWdh xCmg== 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=Zra570GFR/pjaJOF7w0ZjlWxu8eCrPVL1ueeZxNYpzs=; fh=EQUTVPz1DLGgfCgpqzu4wmXATfs8YG+9ESOAAkCbmMM=; b=G/q4rG1sBAbgannoFmp1GrDHnB0Ar1BHJggJvz4VfvT85EVtVkWQFcrNjZqoJdGzGQ GHWTfNiMqRWgEynUG0j5uT0DrKJKyElxxliRjG+qzsC47tL334W4ouDK6htAN78wU2ig hiueZ/Ld9W1MAltHZlHmMtmpUMRtjzFZAVVF5XIF+d+1bbIIkkDMn+VV/FkjoCYzpEcp Fbi/u9ogVOyX0g7l+rBthJcBdsqN200OKYAIay6L1KzpV/jYP/DW/sdnv1qp4SzTK05g SdwNHeqQJioYMf29jQ6Nc0nMqDyAJXTcQau94xeU9139xPBbXiweNCOHAeldLLQNK3Au e+bw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=MWIfQ8je; 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-91388-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91388-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 br24-20020a05622a1e1800b0042ef5d510c4si2393484qtb.610.2024.03.04.15.03.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 15:03:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-91388-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=MWIfQ8je; 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-91388-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91388-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 91C8C1C22180 for ; Mon, 4 Mar 2024 23:03:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1713D7C6D5; Mon, 4 Mar 2024 23:03:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="MWIfQ8je" Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) (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 D74EB7B3FA for ; Mon, 4 Mar 2024 23:03:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709593400; cv=none; b=eDyZiOILJNAJT/C1H9Dv4cXgkHkeMz2XuyF1/oAzk772qAaH2PcDSwVaG0JMh+jS/GqPnMo15FaL/MfLPzJNLljJOl+iEipJdfy1C58daaISAn9XzI3fHF4/L33KI8FY8+jt7IfdcciHlydaVCmA0TqWyZiKPbWJDIhZuZvnc5c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709593400; c=relaxed/simple; bh=7WegmzHOMCbx4tuQ23wzNZFpsXhn+SpD9Xu3BPE9yV8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=o+XrRWgx++O3qB6JhMMifDe2/sJk8EUPMnK9xAiTIINa6J1uaRmla8LvcfpYRMCZusmJnoobSqH96ed10jlz+43HGv1aGk7wJ1RXv4ZR5MRgi4HDXYFfdI590ouBrvKw0q+4jntirYa8892Q7kzn5uMHJ6Yju+ueh2L2JH4NY0k= 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=MWIfQ8je; arc=none smtp.client-ip=209.85.214.180 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-f180.google.com with SMTP id d9443c01a7336-1dc3b4b9b62so43256055ad.1 for ; Mon, 04 Mar 2024 15:03:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1709593398; x=1710198198; 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=Zra570GFR/pjaJOF7w0ZjlWxu8eCrPVL1ueeZxNYpzs=; b=MWIfQ8jeMC8v6Z+60GpM2H7Sd92e+wbzvNan9EPrvt6nuj9ttlOqjdkrhRrYgqviub 0J68qEpVmXIjkZPMnc6ZWrjhWRhunw6/f9R0tf+fXdAfJhkshVhFgUirISaRCr/51qWy r99Hrza97tr+JBQFmxZgp4xAZ1gblbDL5pXdk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709593398; x=1710198198; 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=Zra570GFR/pjaJOF7w0ZjlWxu8eCrPVL1ueeZxNYpzs=; b=b1a/qNjv7oVryyzRpcqYaSy4EG+QSAeClDHRr7zy4C4LKop3rS+wA3U/2u4HKvkDjS pTCSeRxSczUflBvVYy3sSw1d3fF9xEOaoucnHwlWBI+DS7oQyuqaAS54MQFkAdcYQP36 IrE03Cf/LLoGblf3Ob3RnfVLu9JPN3mQMTAMfJsDIaYP6+ySKZ8LfGKNvD9sLaSPzyPf rZ41lz0khUu1BzwIpGBG3Ov82oc1OvDUtfGfQaNgmTOGAS+a+eDD50Pc5Lcoytb7F06X 0TXfk6XDMhZzT3mw1c1nhYIuC2Iih7kM1f/NilJV/Tn6Bjb2Y3kpUDad8ZQ7DDEFpNWe SznQ== X-Forwarded-Encrypted: i=1; AJvYcCXFm+/C5exB6uKu1E0vAhs/nd6bEJ0emcXSCF66Na4WuXb3g6kHF2Giw5XKvAd6euuf0FTvb7bxYsmbN4r7IH0lbMeXFRYz0yLsoBF6 X-Gm-Message-State: AOJu0YzMbmBKkYoTzN+7v7NQscbn+N9rYALC4/iLpOwtu3+oxDjy8qbm H0EhSBXoYdqgM2bYs8EhcAVh42RBAe+kxiLkwiu6ENO7pt3O19cGALx1JGJKLg== X-Received: by 2002:a17:902:ec8f:b0:1dc:fc84:198 with SMTP id x15-20020a170902ec8f00b001dcfc840198mr231857plg.29.1709593398024; Mon, 04 Mar 2024 15:03:18 -0800 (PST) Received: from www.outflux.net ([198.0.35.241]) by smtp.gmail.com with ESMTPSA id o12-20020a170902d4cc00b001dc9422891esm9060623plg.30.2024.03.04.15.03.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 15:03:17 -0800 (PST) Date: Mon, 4 Mar 2024 15:03:16 -0800 From: Kees Cook To: Eric Biggers Cc: Vlastimil Babka , Christian Brauner , Alexander Viro , Jan Kara , linux-fsdevel@vger.kernel.org, "GONG, Ruiqi" , Xiu Jianfeng , Suren Baghdasaryan , Kent Overstreet , Andrew Morton , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Roman Gushchin , Hyeonggon Yoo <42.hyeyoo@gmail.com>, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH 3/4] xattr: Use dedicated slab buckets for setxattr() Message-ID: <202403041502.28477148C0@keescook> References: <20240304184252.work.496-kees@kernel.org> <20240304184933.3672759-3-keescook@chromium.org> <20240304221648.GA17145@sol.localdomain> 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: <20240304221648.GA17145@sol.localdomain> On Mon, Mar 04, 2024 at 02:16:48PM -0800, Eric Biggers wrote: > On Mon, Mar 04, 2024 at 10:49:31AM -0800, Kees Cook wrote: > > xattr: Use dedicated slab buckets for setxattr() > > This patch actually changes listxattr(), not setxattr(). > > getxattr(), setxattr(), and listxattr() all allocate a user controlled size. > Perhaps you meant to change all three? What is special about listxattr() (or > setxattr() if you actually meant to change that one)? Whoops. Yes, I did one and stopped. :P I'll fix it up in v2. -- Kees Cook