From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f73.google.com (mail-wm1-f73.google.com [209.85.128.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 620CF3D649F for ; Mon, 27 Apr 2026 14:54:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777301675; cv=none; b=KhQTGh9ceSWkeJqZt+8cQxly7yfEUglsBOxuVdD1dvnVIm1TABcQDPX9U/w2wR3xfTaTvv/rRfMeul9us3IklyvZPMcsIXiY0umU5zbFRz/3tGvP4D8Tb4YWM/iutMBGuOwUK8eJTnWCRYQxu5gYRXwauzrU4LuwSxW0UjtLZE8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777301675; c=relaxed/simple; bh=tR6rVUBtOMeJ2y4aOkHhOAuzupBn89w/0Xk4s6rLjS8=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=KXN7bHYthzJUR1ZGij00xbX2waFuNoswMxgJUYcTLLsk79JBpkYKT7FGy6uVS6GujGN90D7QtJHtt5zMa2DCkMG0vefap63U/5Z60/F9v7Bk1b8tp9W3tc5YMPXmWghV/McZkUIO12LGecHQXeBKBFkHIEhiPG+HZE08YmE0UO4= 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=Q5eUTiPx; arc=none smtp.client-ip=209.85.128.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="Q5eUTiPx" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-488c768a9a9so68181895e9.1 for ; Mon, 27 Apr 2026 07:54:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1777301668; x=1777906468; 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=vDt0DeFnf/l+12RnvYHHUL0w+2WcF86wH8LDoCMZx5k=; b=Q5eUTiPxK5fbvboPJuHu93On5uiEdUtDCWtzcP/RRmVzdTiFWoAS8OqEdCck6cDU1w vqRSzL0ZJa+IaFLuMw/ufBqPpYf4R9s9Au6u1RVlRpEAWCAEDp94yXeXL/XDilqCGY/x s9AQN+6qXEtqg0/gTPfWzUyeS4Kck+7uJ/VLyUSar8frsSmwcIoT9jSfuxwEudMEgM3F t4iGXx5m6SK23D0kiikV/FeqZJfMzhfn0RijUmZ0Lm8RjlU1poY3mJpvFu+OLFi21dzY bXDW15QOuf4lkG4Lvg3k2VHCtnPZScN2cQQ+f/+zaxCfLRklB7NKQJnHH6iYuIvxkxRr +vkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777301668; x=1777906468; 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=vDt0DeFnf/l+12RnvYHHUL0w+2WcF86wH8LDoCMZx5k=; b=jIXZZxr351LclAZGDSFH/gyfEgqP4+xSJUOd5PN6pC/iZ4OC4jSTCJ5/iq/zBANAdf djLN7V6f+wR0nicpvf4LvPiU4B8U5pWziGbQP2lBRU8aPyiENjeBj6aZSpQYYdn8SknQ vwMUHSgLSLKZZY14O7aw6uU8XCm4pWBbaza6uBAdP12rbX/nPvZh1jSuYtbVD/HpCcye teYq24VMCOZ921WklomKlMca1It3kXjxPiMEhXSlw8Og6scNQ3QybapvM/iXXiYQcb4s F16nxxa69/4I953SZZUKdK2qbzHfnAUhNW9f9BmrR9wfDPVlVEulkZuoMcubT0+c0PSD vnUA== X-Forwarded-Encrypted: i=1; AFNElJ8iAbwcBgw0+/3SLGzTWlbCGv8Su0UzzyJH8iyBFYLcanIQf6V8I6/W8RsKGGoz7ZIAOgDBaeBcCz7wPmo=@vger.kernel.org X-Gm-Message-State: AOJu0YzL0l75lY0lO4t0uex82im1O/ZYRdwNZUSG2meky9fWhgXvA7Ux xOAMtSiOJIn0kjdBymi0fPgLcGt0Hnlju6QGYd1eJ22G1GtU3uhsE9QpJyV84VghCR3K1jU5P6C e49YIdhCfEFXdzX1ZpQ== X-Received: from wma4.prod.google.com ([2002:a05:600c:8904:b0:48a:58aa:514]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:c04a:b0:487:12c:e7e1 with SMTP id 5b1f17b1804b1-488fb750840mr433424345e9.11.1777301668081; Mon, 27 Apr 2026 07:54:28 -0700 (PDT) Date: Mon, 27 Apr 2026 14:54:26 +0000 In-Reply-To: <20260425020857.356850-2-ynorov@nvidia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260425020857.356850-1-ynorov@nvidia.com> <20260425020857.356850-2-ynorov@nvidia.com> Message-ID: Subject: Re: [PATCH v2 1/3] rust: uaccess: use INLINE_COPY_TO_USER to guard copy_to_user()\ 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 Fri, Apr 24, 2026 at 10:08:55PM -0400, Yury Norov wrote: > The copy_to_user() rust helper is only needed when the main kernel inlines > the function. It is controlled by INLINE_COPY_TO_USER, but the rust helper > is protected with INLINE_COPY_FROM_USER. > > Fix that. > > Reported-by: Christophe Leroy (CS GROUP) > Closes: https://lore.kernel.org/all/746c9c50-20c4-4dc9-a539-bf1310ff9414@kernel.org/ > Fixes: d99dc586ca7c7 ("uaccess: decouple INLINE_COPY_FROM_USER and CONFIG_RUST") > Signed-off-by: Yury Norov Reviewed-by: Alice Ryhl