Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp852772rdb; Fri, 9 Feb 2024 03:16:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IHEe0s8Y+HqFtWyOqEGVpVc1LaUJLq5cRJI2AI3FmMzYHJFGNsGD2hY4phknJDUa+mvCezt X-Received: by 2002:a67:ff8b:0:b0:46d:2336:fcc0 with SMTP id v11-20020a67ff8b000000b0046d2336fcc0mr922767vsq.25.1707477372238; Fri, 09 Feb 2024 03:16:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707477372; cv=pass; d=google.com; s=arc-20160816; b=CQ0APavIJ2q+Pqqk9VV1iBfK/j/6JGrHfLAJPlk1tqxKaGPnBCXQ02HTBhpKZnO4Df ecjhFZxSdDimX3dQeYqwX9qFbGbo1v0vJ9gUF9LhDTurR9gtcktmeuoacukDiT6IFRRy 0RsqMoMeo0uU2EZBrhmv5Q6vWYSFdriqFpq8y4RBeGYIpYykBbnuNPG+8d0T5vLZOS89 zpUq7eY4uOmanAkVr+48Cxt2/So7PWVtugHkcVKCYLuhiRTs9SX7VpPhT1Pw5ev2vo8C vOSBLGtkpgE2rDjVqPKJnifR79KVclSOWMTZJ5PuYeFQb/ZgdfVVdlHTXq1MdmjCNsOI R4Bw== 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=ed++djY+4BK8SmyO+juBd+LCPHe4DjXsTTMrzEs49OU=; fh=qXDCK+TKkKjv3GUC1FFmrY6Y8muzSm4kCVRh8b5RFmc=; b=Y1ZJDFRlRFQNIrO7Vos1psD3dzIiA3zlO48ZO9wmuY8sJY6O/T0rEdufvOuDj+EmnO BcweRy6dHQ8TCX4fD3nWT8PMuAUyFkUCcRzNhWQZt26ScaWPXA9+3oUM4x+1Mwqvuet4 uB+/45fmc+mxGj1RdtaYrwBY0JAquuzkJE8ZEOhdkchIK6Bmuk13VN1T2O/xY8DZ51aW hnDwkFiMSNiy+Owt+8m5+yXHu78uD5E3HYXoKzgBwNjPHcJzrUx6YXROMimC/MEhA6f+ oa4+QVM2LMYc/MqhD5wSsyIfSd3qQv7V4u70NmccK686vHB6yZbCLq08xuRMsRSL1rye +Kwg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=2XQae5ap; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-59272-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59272-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com X-Forwarded-Encrypted: i=2; AJvYcCWn5eiNniT11Av7qwXxf4scgBcgdxkQaq9u7rJLhN+xgvT+RF46vWH2TOg9g735BA5VCSarhiS3tn6V2NMlQhRpFUS5wa4Ccc4e23uv8w== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id gs9-20020a056214226900b0068cae96f029si1705520qvb.32.2024.02.09.03.16.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 03:16:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-59272-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=@google.com header.s=20230601 header.b=2XQae5ap; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-59272-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59272-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.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 030B61C23CD7 for ; Fri, 9 Feb 2024 11:16:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0DCE628E0B; Fri, 9 Feb 2024 11:16:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="2XQae5ap" Received: from mail-ua1-f42.google.com (mail-ua1-f42.google.com [209.85.222.42]) (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 C73093FEC for ; Fri, 9 Feb 2024 11:16:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707477362; cv=none; b=jJSrxrbg5DHNV8XfuKpG0PL3+sNGJpOATVHIHgwU3ku/PeGEZMSn12y4MbRkbvLbju+lbqkkUQmaVe778HRIAVGcwA8vmUTP9WTmH/Lg/U7FGjsBpVd37ClsmCm5aM4wLRh4YN8yEeTXOBLyP+MlCVujjIbx0e3Df6dc/oDIj34= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707477362; c=relaxed/simple; bh=RgFHHs7raVYUXy7WupCB2WW9Niv6eFSl7EsJTR5+7V0=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=Vhkb1ItYXCMUf9tqZQIuX1LadD4HTT9loqpgaJZGxd5cNX1PG9D9jV3LDPbBzRpddL41+ZnNqpnP+DCo1CVKLq2MBeRWks86CEAEvrN2/UYpBnWwdhN/0Z4CURla8cSjVP37LwkhqT41GX7OlowCqQwFwLA68x1wAchRqepkbUU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=2XQae5ap; arc=none smtp.client-ip=209.85.222.42 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=google.com Received: by mail-ua1-f42.google.com with SMTP id a1e0cc1a2514c-7d5bbbe5844so395521241.0 for ; Fri, 09 Feb 2024 03:16:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1707477359; x=1708082159; 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=ed++djY+4BK8SmyO+juBd+LCPHe4DjXsTTMrzEs49OU=; b=2XQae5aprUmX57r0mX1D61jjfJC4QRuGFBjm55EMBhOk9cpeUrBclyGRoafg0uwyLj XNw2YDQY/JYj7YjCvru0ucM7oV8LQeuJX8mL+AIticoaz25ELU1DUrX/2Kv1vUIdVLgm iNA8dXFrZZMfbwKBPXAbI0o8rHsIeu73LnHRVYTKTBV0V9uGGuxwhaLr6piVZLMSWaqR 1wb8DgqKfXHcTQUU7dCzFk2/70lrd8MG7G3KypbC32/jn/fPZBmz9bmF4kVMV8/vxjKs uBJ5GdRI6ssfygG4q/qkegjOCPylKNU5eiE7Tgn+xvX59fJT8VfhNMvXlduHdQwgRPcX zfYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707477359; x=1708082159; 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=ed++djY+4BK8SmyO+juBd+LCPHe4DjXsTTMrzEs49OU=; b=WqujvpRrpziO1yuXjKOFz6s91cou+dzeFmWT3pFwdfKEWJGdJLzSYxIQ/v+abnzICK du7uPfqd2nD1j8uWthVh3zUplOuDy27fWBsMPeU0q6AjLQgoRy2iWSdx4iLciS+tjOzA e/qFpVG8dxVxIhvUSD13UQxcgaF8eE8pHdmD5k0Qjz+Ph1PWRzd51KaeN+keLwTF58GN v+CUcPcrOF1WZ1QGPL5332dVSTanV7TvZabD1KRI/xbsTEAyqDOEaNm7L5zG++TXft7R JqpbwOPG0R81ttpLUeFACm7vNWKvFnioBlTTP1yG0B7UovPiaPAtgb+Lk+0AKT3EkTKc X01A== X-Gm-Message-State: AOJu0YxtReRJKgVSXVdoelcmPF9uZMvwbq4xwKOJd4FuXtluTpfyvy0n yBD6/xZfuwvWhhUi/CmgNVFjZnmVD/x7EgRDsLCv9tR02W07oVd/2Vg2CkLupnQhnXz9BWqdETo HgKGrRm1ee7/NtIVJspzQKLZGWqLde/1nKlmT X-Received: by 2002:a05:6102:1607:b0:46c:b7a8:4b59 with SMTP id cu7-20020a056102160700b0046cb7a84b59mr1154577vsb.23.1707477359448; Fri, 09 Feb 2024 03:15:59 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240208-alice-mm-v2-1-d821250204a6@google.com> <20240208225407.11951-1-kernel@valentinobst.de> In-Reply-To: <20240208225407.11951-1-kernel@valentinobst.de> From: Alice Ryhl Date: Fri, 9 Feb 2024 12:15:48 +0100 Message-ID: Subject: Re: [PATCH v2 1/4] rust: uaccess: add userspace pointers To: Valentin Obst Cc: a.hindborg@samsung.com, akpm@linux-foundation.org, alex.gaynor@gmail.com, arnd@arndb.de, arve@android.com, benno.lossin@proton.me, bjorn3_gh@protonmail.com, boqun.feng@gmail.com, brauner@kernel.org, cmllamas@google.com, gary@garyguo.net, gregkh@linuxfoundation.org, joel@joelfernandes.org, keescook@chromium.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, maco@android.com, ojeda@kernel.org, rust-for-linux@vger.kernel.org, surenb@google.com, tkjos@android.com, viro@zeniv.linux.org.uk, wedsonaf@gmail.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Feb 8, 2024 at 11:54=E2=80=AFPM Valentin Obst wrote: > > > + /// Reads the entirety of the user slice, appending it to the end = of the > > + /// provided buffer. > > + /// > > + /// Fails with `EFAULT` if the read encounters a page fault. > > + pub fn read_all(self, buf: &mut Vec) -> Result<()> { > > + self.reader().read_all(buf) > > + } > > I think there is also no need to give an explicit `()` for the > generic type parameter here as it is the default (applies to some > other methods in this patch as well). I'll change this if I send a v3, but I don't think it's that important. Alice