Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp361211lqr; Wed, 5 Jun 2024 08:10:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWrFiEUDWkTj5yO7YwNlRSNgtSh0eTuknW8wQGhXq83ntX75s0L5AVKHl1sJDSkU6N7uww2K7YUqgSB0k38hu9iy56hfWU9HJQzZemKpQ== X-Google-Smtp-Source: AGHT+IHjfzfT1z+HKcoj6lB9ssDMs4isOxvfHS3AoxNWW6/W9gOvBNpLUFXopa8473NJKKBfZvzo X-Received: by 2002:a54:4098:0:b0:3d1:fcc6:2a1e with SMTP id 5614622812f47-3d2044deb11mr2826781b6e.57.1717600249350; Wed, 05 Jun 2024 08:10:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717600249; cv=pass; d=google.com; s=arc-20160816; b=WtYIP4PT4m+WMf3+GxlfdX9s9Lxzk+AAPWztHJmQCPp+ULGQunmf5CzhFERzHohQ/X cTjQmTZwDTQucyjG2T2czGdQgNWGW0ogDwdmF5HIE6REKUsA9n54jSCxtakeVCM7aKx4 v4XqfFafASXSQbFPzvP8h2A1seqWWSHl0gCFffMFefujWl4fdgJ1WW1ZMKTyaYMLrgs1 K5o0AQoV/PN5hapBPPD3bjH625IekDDUiy7zDjf3qnN1WnN7H8cyFfJRTtg7fkDwha++ JBOxX5qADFha/69XAGEdEMpyqO6ALct9XVhfgXHdhrfkPINzX7NF/zvxKPO4LliZY/uN 5XcQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=SiSRiLqVQvkgjbroyhbLKTPsZvrrL6hgIXaNmPPH5Hc=; fh=UpV0up1multLC9e1JBQ2r8T7JiiahbBfU3qFc/Pn64M=; b=DLW7wATwfXDfZsveKxJon7ZJoVDXKu7pAaJdUmJtLc30pJ0ksFuOiCceazVRdZFLoW 3bdIrkmTWIbQ/6ECcEJMxXkhsGVrSRYvBAJXHnwsyPO1JPLgeWTrYZ2uHill5DYTjMO0 po2hqQTZfL5Gw45b/6nPsyQs3Wr7KJz4VPhxtMj72shyeMlsEE3iBjjRqiBUTrrUMBp2 cP4I27i+a0xB+MZmjp9DCNNm8MFBQeCfFvlI4vZMU6qMTIGPJSc+enM7L0VtstBI86KN gKJu1xpbCmzcqPgxX/04+cB60kOaXjtvblJA4AGgFc6N4/UE4Rnt0ild4Jl8QZm8+I6q 2hDA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=bwPGMecg; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-202806-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202806-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 71dfb90a1353d-4eafef4cae9si2139671e0c.215.2024.06.05.08.10.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 08:10:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202806-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=@gmail.com header.s=20230601 header.b=bwPGMecg; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-202806-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202806-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 0F4721C2089E for ; Wed, 5 Jun 2024 15:10:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 307D545027; Wed, 5 Jun 2024 15:10:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bwPGMecg" Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) (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 E05C419D891; Wed, 5 Jun 2024 15:10:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717600239; cv=none; b=NbbUaAU22kMjHA2hOiTUP33viqSWK4UauTj1t8AFbWk436JWsaR5nddG+ub2NOBvZq160Lz7uxBDKeKNwlyZI3glsN6g6A+FH3KLxSWWdu9KXpkfwGxUHeNtrGo9q5BasfkEG/+LY8q89HyprTtVyfd7AjnfmtEvI56hUmbmmPw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717600239; c=relaxed/simple; bh=SiSRiLqVQvkgjbroyhbLKTPsZvrrL6hgIXaNmPPH5Hc=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=L6FqSUQh8iBknU/3oIuRieY6UoNPVkGL7Wpwi6bstwcuUU0z2Vu7d8+ir1fZd9p0GnzhK/DzcDTEeeb8LFAcj74TLNcgi11I2M/DRXvzWXqJEHKBrh+aqEh/dROwtpMU9uK4WtxlmGt+Vj2+KijdIDzsPbrRfmXRGXwKZDik+PQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=bwPGMecg; arc=none smtp.client-ip=209.85.208.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-f52.google.com with SMTP id 4fb4d7f45d1cf-57a31d63b6bso3280881a12.0; Wed, 05 Jun 2024 08:10:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717600236; x=1718205036; 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=SiSRiLqVQvkgjbroyhbLKTPsZvrrL6hgIXaNmPPH5Hc=; b=bwPGMecgqov+HbunlNCZf5WZWYiDwfsYJtC9UyUDeXTf/GbSY+epnZ/zP1ZvebpM/j T0h65xiRNSqczRHE6lNsrj3gFTu4XAD8zF/pXTbB7/G7UGAHPmW11izTIIMxrPJVF/Oe ZMTKPaubNICp9gQrjI59Pff0+Tm6b1U+AMjYVORTtiMvokyejX3ClwyrpcG/myzEDhi6 C0laUD8resYIuHtx375GfjAchndfsiFlV/4O4pXl2d57oLPQWm3L/Re3t27ERLkYroQU 7Tqrgjf5XMstMGqRO7hCmKGNclRMQdJxASmcgMKBORJT67K5gKn8waeNfMmYakx+tORZ +6uQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717600236; x=1718205036; 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=SiSRiLqVQvkgjbroyhbLKTPsZvrrL6hgIXaNmPPH5Hc=; b=nuTNnoiq4gGQs5QknXUopueR28d0yHtFU8u1PKi4Ixg+AP0FX8sER00ETo9jh9rjgE iPwNyg5OUazWI/FaV9FtqW8LMWojFr2WATb0BqqJFcVsyj0VbNszo3Qojt8t8Yg59Xm1 V1BgGZLvtm5SIX3KiIjsZLteKAir+knENqdOIodmGE8uvdMFxRdbp1eGxTDFj8KF4fy4 mUjaRjom0Rwde+5bzUhZLavfnUSJMtMHUqcZi/m1izSyy8zteKp/DDRl5WwLqcWNA+0L 7znTdDh+Fg/s8ZevJotl1Wl6tkyNy8zzBdWb5hNL15WyNoZRRDaZNEcwn4VT+Z1fAHH+ ibHg== X-Forwarded-Encrypted: i=1; AJvYcCWlGAM2w3hKf6syL0wgELFnCxB7ONNnRlwozoXSSs/5r9kJKuTwatvBPaqCakqWNPIqk8LPPgkuBfm3ZakzUl01WlQNfTe85hld44qrykF7ayWNOyecAGjkxQZcxkN+j5oo8rlcnuMKRnKiVw== X-Gm-Message-State: AOJu0Yx9HWvxKKd8zy/MjkfLtlTWjMGiPiHVVXE7phJPaPgjnryQaLYJ N/n5PDLsiGxzEqOo0P13csaLZQ+qm464ZWJb5EvbN3lXVSK/b/aiOKeuGCzVaiWJRB82B9jIJNc nSqkH17okulkzgvcLZdcLqD1tnGU= X-Received: by 2002:a50:9548:0:b0:57a:31eb:83da with SMTP id 4fb4d7f45d1cf-57a8b7c6240mr1913836a12.30.1717600235863; Wed, 05 Jun 2024 08:10:35 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240604155257.109500-1-mjguzik@gmail.com> <20240604155257.109500-4-mjguzik@gmail.com> <20240605-sonnabend-busbahnhof-3f93ffcac846@brauner> In-Reply-To: <20240605-sonnabend-busbahnhof-3f93ffcac846@brauner> From: Mateusz Guzik Date: Wed, 5 Jun 2024 17:10:23 +0200 Message-ID: Subject: Re: [PATCH 3/3] vfs: shave a branch in getname_flags To: Christian Brauner Cc: viro@zeniv.linux.org.uk, jack@suse.cz, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jun 5, 2024 at 5:03=E2=80=AFPM Christian Brauner wrote: > > On Tue, Jun 04, 2024 at 05:52:57PM +0200, Mateusz Guzik wrote: > > Check for an error while copying and no path in one branch. > > Fine to move that check up but we need to redo it after we recopied. > It's extremely unlikely but the contents could've changed iirc. I can > fix that up though. Oh I see, you mean the buffer might have initially been too big so it landed in the zmalloc fallback, but by that time userspace might have played games and slapped a NUL char in there. Fair, but also trivial to fix up, so I would appreciate if you sorted it out, especially since you offered :) --=20 Mateusz Guzik