From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f73.google.com (mail-wr1-f73.google.com [209.85.221.73]) (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 5138B23504B for ; Thu, 26 Mar 2026 08:00:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774512049; cv=none; b=ZRYxIVni7/JUsMb70R/r8LjLAK9QaoQMnfhgrnTwdYX8Hjl+JtQ+xkUsWocUYGGAVBrb504EpTwzchYDIbbnQm7+8122M5wW5r0tdNLXCaua51bARHSi9hZBu1SfrPkog2mygOQZRAYOzzN/sZeycCepXW7bYkIK/2oxF+ZysHM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774512049; c=relaxed/simple; bh=Yo32ZYCfdMZkwQCgMWz7jHSyMyhF3Tt7vLflS8cpGQY=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=GZIW1vkeMqUpDuoojSmuxfVqdUtaLRFJrm7mHuS9EPk8PumhTYzUAUCEOXChaVHqgGzr0fTa1gh/l5SuIgGtGegII2MGktYap5nvRQi3uajTrcu8zjB1DDO3DsvXhIqaKKjEkqit3mk3TBxSritzGB2FIIzwqkkkfxJdxOu6T7o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=eNEGJIp9; arc=none smtp.client-ip=209.85.221.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="eNEGJIp9" Received: by mail-wr1-f73.google.com with SMTP id ffacd0b85a97d-43b42eee946so1481966f8f.1 for ; Thu, 26 Mar 2026 01:00:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1774512046; x=1775116846; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=1CGLDoIxCryhkA1hK4oCYk2ZFoPODM9ZNGInCWJhwyA=; b=eNEGJIp97ChY/STzm64ZONqSQbb99kkN4t78hVTdM7co5j+oS4CNKMWwq3EEmM/8wk sG6nKgU+xM0uOTeQ4TMCMK37o2G9dS5vreGa4agv6WtIeW7svCn0ngqdpj01R/NUMiBY lxk7LqEVoTMYJoyziFOC6G83FH147cAAOy0DBjJge7bTkYJ22fgdyeMnYPiT5o9g6rzH 1JAZs0oct+fQRVxMDRWnbOm2HSqjfyUChEkUhb8I6QOnfNLTCLWZPEmDtXWYnI4tUBZh GWo/T7eJ2MjmBKP79JCrXWJCSaaKhzVNE0ggcPd7zsBtXzgG3Lr2dUpVkkYGHY/hcY28 2JSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774512046; x=1775116846; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=1CGLDoIxCryhkA1hK4oCYk2ZFoPODM9ZNGInCWJhwyA=; b=XMMLqBmqH9+cuFhGAOBoj03A/wbTFgQ1cv73ApkUnmrkp17UHznM5mcVhpHp3BTi/e U5F4QXJ8jO+Iop45/Tx5N0QNIhWd2hAzH5EawlQoDSJmeYkxvC3XyfaD+BRszdPfGbT3 Ar1Lu3x07MguYNZGSAiMB840KPCXBRCQkrB66LXN2hyYHklx6QIB2Drs2DB/3vEeqdEQ VQCCCqgHbSwsFfkCYQV2bSdUnAaV/Ptqcj65xQjUbHCs5IambrO7j2pBXV7GWpUVJPpF 9Jx2ULACQN0XZ/KP7o8pXscg6TxQ94yTt7v4Klgt1d4nkmk11uipOx9BzSXRHa7oCkf4 W+jQ== X-Forwarded-Encrypted: i=1; AJvYcCUqAL7v6IF1cBKkLBG20DQUDdjwDqCoZqE7HRb8HpjW9VJzkevnt/MsJMR+fjQqIA6QEBSwaiB//NP1w0c=@vger.kernel.org X-Gm-Message-State: AOJu0Yyk7j0M5rdrjbXycZZlbSz3tQuHL6il6O+1sLRygB4ggxVUemLS ntDPtYOw/SVkTt6uxi5wIesQOyG0C65x5wNxPJX0D8a+gdDe8kAI51KZewAaHaF7/lbCdbtDPd9 lmYsheWWcnkzw2al1cg== X-Received: from wmmr21.prod.google.com ([2002:a05:600c:4255:b0:485:343f:9fb3]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:c10e:b0:477:9890:9ab8 with SMTP id 5b1f17b1804b1-48722b93132mr5932835e9.3.1774512046240; Thu, 26 Mar 2026 01:00:46 -0700 (PDT) Date: Thu, 26 Mar 2026 08:00:44 +0000 In-Reply-To: <20260325163313.749336-3-ynorov@nvidia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260325163313.749336-1-ynorov@nvidia.com> <20260325163313.749336-3-ynorov@nvidia.com> Message-ID: Subject: Re: [PATCH 2/2] uaccess: minimize INLINE_COPY_USER-related ifdefery From: Alice Ryhl To: Yury Norov Cc: Andrew Morton , Thomas Gleixner , "Peter Zijlstra (Intel)" , Mathieu Desnoyers , Viktor Malik , Randy Dunlap , David Laight , linux-kernel@vger.kernel.org, "Christophe Leroy (CS GROUP)" , Yury Norov Content-Type: text/plain; charset="utf-8" On Wed, Mar 25, 2026 at 12:33:12PM -0400, Yury Norov wrote: > Now that we've got the same knob selecting inline vs outline copy_to_user() > and copy_from_user(), we can simplify the corresponding logic in the > uaccess.h. > > Signed-off-by: Yury Norov Both patches are: Tested-by: Alice Ryhl But I can't help but think if it wouldn't be slightly better to split up the first patch in a targeted Fixes: path that just fixes the FROM/TO mixup, and a follow-up non-fix that actually deduplicates the two ifdefs. > @@ -217,11 +219,8 @@ copy_from_user(void *to, const void __user *from, unsigned long n) > { > if (!check_copy_size(to, n, false)) > return n; > -#ifdef INLINE_COPY_USER > - return _inline_copy_from_user(to, from, n); > -#else > + > return _copy_from_user(to, from, n); > -#endif Spurious extra empty line here? Alice