Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp349338rdb; Thu, 8 Feb 2024 07:42:17 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUw0aTqqRt5MGl1Hj0DMQhq2esczCz4cYqDyiya9oxSqrOcd7W+MgDnLMRI/VBliLIZFDGy3MDIScLeYx27uLb8HL5ApnKCov8hd8hIUA== X-Google-Smtp-Source: AGHT+IFFmC1Oup/4ryhGGc4HThoPw7ZpTsOoQl/P7WcZvZxFsWC64vFJcoPy317zTGBUuR9RZLp/ X-Received: by 2002:a17:906:b7cb:b0:a3b:c959:24e4 with SMTP id fy11-20020a170906b7cb00b00a3bc95924e4mr456576ejb.55.1707406937275; Thu, 08 Feb 2024 07:42:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707406937; cv=pass; d=google.com; s=arc-20160816; b=tV6XkPn0PB3RZ95Rzw9gGhp2FwlJ93R4wElio4DKSg4R19uzQ1u50rkQKpwy4r6PxL 27eoje8kQGQ7DXP9/WjKP4qlE2aHQRMxIh/E7YuiO4IktiBtW7tyR5staIjcGdlI/hOa ramJvGspKFQ+ebNoW6YVxqdkYYrRPkkRXY7sOM6GbIocvCgDF7fRWRC4GZl7pGtxLwIf 9xvouQyaVrgaAqILJDkhxBAgnGatRq/8xVojporPoqWCZ7fsRGOPYG2tDRJx5cZUe0ep OwJxhlrda91GvGqhrTpqHyWx3lOECLsxQDoxnFxizu7SGVqxSKuqnb/8XpdmsmOh+5Vc 0dZQ== 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=NKbb7p+kOEnvs7kyPggNgED1EnVbkGfw9/eZmIaWcyE=; fh=ZQeym2/2fh6sDBRFhnuKZCY+z71aWueTZXLT6d/B9BY=; b=O5AJsbw46s8Rccjj2sYWdBPKPETJHVCv3xoeyJXngeYI/eBjSeX07h8DOQWgi+EWud d4igHkTd5RrJ2Wz0/zcO4tRq0X/Gs5K/dd0oqr16Ix8QThMOWWmgPy7j/E85DAWDL/61 3B5qwQ7woSwqBUAtKquu5siOnfjSRLzc1GhpwuFqwqp5I3pK0PwHrYvcFy9vNV2vUA3t SHt0F9p8EcWByG5SHp8/ocIkyqRRYGCYv5Kc8ODocscEzw46+RdY3WdUpzdZo/p2O8wC 0Yx+fScMAwKmRQPzRbLaf1Sl8zOPP7tKI84B0Tq/elhe4mnRcuioKGoL1GhnBQ/995X6 4X0Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=Xj7Fog8K; 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-58296-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58296-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; AJvYcCXIjcp+HlNai8AJf0s2Ce8MkwV2YEiRDrfzM2WqFFgG3Rp086ngbRtl/o4/ddTIq7m2KsNB6DSYolgdtAjaHuGwM3GAjNSX8MegK8aHfQ== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id d13-20020a1709067f0d00b00a3a7f9c1086si151638ejr.556.2024.02.08.07.42.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 07:42:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58296-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=Xj7Fog8K; 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-58296-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58296-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 am.mirrors.kernel.org (Postfix) with ESMTPS id EBC2A1F2114B for ; Thu, 8 Feb 2024 15:42:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1F6D77C099; Thu, 8 Feb 2024 15:42:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Xj7Fog8K" Received: from mail-ua1-f51.google.com (mail-ua1-f51.google.com [209.85.222.51]) (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 D96F47C0A9 for ; Thu, 8 Feb 2024 15:42:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707406926; cv=none; b=CJfZGinl46l+k8+nJJ9i0Vq+6nYaAukiXoBvFZ4Qb9HlKKuHq00YieO5MaPRfDlRuDPfb8mLgAfDW4OmApfTDhGsYaKkvUjbfz+b+zG12fVzPljFkqzH+xxgiEkRKGiuq02hlxCswexfRepSuxqB1v6inwpYv1iu9eueWllub4c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707406926; c=relaxed/simple; bh=v6RY+HoEygcidTXsOrNnjWIcKG3qK9XPgGRFowXNBO8=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=UK1I1iRGiRyDu1Dak6SXLVOGdx0QP8DbeFnp+mX4++c6C+ng7IDkrfznYsB4hKBDINcPAftP+rmPtMDNdCD5HaaFNMAD8Heua0/7pf2cyPvPI9ZqWK4oplGETMtnuWllqJtPxbr3mRtnCdmABF6L84CLYL9iTwEt7Rp3eKVIMe4= 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=Xj7Fog8K; arc=none smtp.client-ip=209.85.222.51 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-f51.google.com with SMTP id a1e0cc1a2514c-7d5c25267deso662853241.3 for ; Thu, 08 Feb 2024 07:42:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1707406923; x=1708011723; 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=NKbb7p+kOEnvs7kyPggNgED1EnVbkGfw9/eZmIaWcyE=; b=Xj7Fog8KLhAkpp4/Wc0oFlzrFGiLSRpvC2L/Qe6bPM6ziqFhO7ZUPgIMdKTMkHD22q meEcowHCsedGQRnNLzcTCQl0e1Iqu6O2fmeWikOTxnTqo//rRMpaA7F9D3lvoxPn6ENH M5YnbTQH1fzwtWayIaG4W6znLb1h5KRLrMLyFQASLVN4ubmpGIStkDi0rYoyNPR+jHXM AOTvQcw/lR2TKGjkbOQShpuBHjRMunSSVII356dXolVKu3/YcC9zUGfpUYFl6sEI9c6O wAZa9mmR5IbNJd3ytw7BUhmqicN+tleXvmcSInJfCuD7/B1DldCA5WTgS1MMvTzpNcEd ZY3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707406923; x=1708011723; 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=NKbb7p+kOEnvs7kyPggNgED1EnVbkGfw9/eZmIaWcyE=; b=lRiTp7A/ltyNwqMt5R3EN6UZL3S37takR9/JvCou2MQkvn115R+za8RlCqHwzyN5Ep RuJfToHotEd2gxih7u0LvNmnjj2HacgN6fcBo7HhPCjYYuTjmayIVb+d7kFVFztjxSFq uNF7IO7RT8GZCZG7EuyPdW+yqqHsco7D6dqC5zNGDrl+QeiWhbcZqVIT1P6MHPF9KMih TyXJIx7WeYNUqjUMrKQZ7kJUnucC67QlLIyObPfHs4Sm06Dcxh53Qgw89Ah+uYqocz55 K2cOmd76v5IfrQFXAVi2s+55PvS2lB4ChDkuXHPec6xwT9Vz11bjcM9E6q6JgTOzZNaD jQ3A== X-Forwarded-Encrypted: i=1; AJvYcCWgs6jYtRIFM5D7gF6wxEfHyUUTHEjPPJ3ofLmM6GVahZn+fl5sOLHIpdI6z9I0FS7VAdLjxGiX04sUPxYd27W+rZ3MwyxenbPkLtOK X-Gm-Message-State: AOJu0YzCAj2qDJEwNmvOLHnXbrkaPX/gJTA+TIw3PJCvS23nWjTgtBlP SVd6kuDJpV3LR+ZdmdhZihZcGN6xssumsSw0I0JZLY5BriI4iRuqva5YEe3+gxZnBlGZD+b2JnN dULTnaJU2oh5a3ZJL0at0qgyZmxjjg/FHkDBv X-Received: by 2002:a67:bd07:0:b0:46d:20a8:cb4e with SMTP id y7-20020a67bd07000000b0046d20a8cb4emr5871603vsq.26.1707406923533; Thu, 08 Feb 2024 07:42:03 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240124-alice-mm-v1-0-d1abcec83c44@google.com> <20240124-alice-mm-v1-1-d1abcec83c44@google.com> <2024020859-lusty-ladylike-29d4@gregkh> In-Reply-To: <2024020859-lusty-ladylike-29d4@gregkh> From: Alice Ryhl Date: Thu, 8 Feb 2024 16:41:52 +0100 Message-ID: Subject: Re: [PATCH 1/3] rust: add userspace pointers To: Greg Kroah-Hartman Cc: Trevor Gross , Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Kees Cook , Al Viro , Andrew Morton , =?UTF-8?B?QXJ2ZSBIasO4bm5ldsOlZw==?= , Todd Kjos , Martijn Coenen , Joel Fernandes , Carlos Llamas , Suren Baghdasaryan , Arnd Bergmann , linux-mm@kvack.org, linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, Christian Brauner Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Feb 8, 2024 at 4:35=E2=80=AFPM Greg Kroah-Hartman wrote: > > On Thu, Feb 08, 2024 at 01:53:20PM +0100, Alice Ryhl wrote: > > > Is some sort of `Debug` implementation useful? > > > > Leaking pointer addresses in logs is frowned upon in the kernel, so I > > don't think we should include that. > > s/frowned upon/forbidden/ :) :) > Along those lines, you all are tieing in the "I want to print a pointer, > so hash it properly before I do so" logic from rust like we have in c, > right? Ideally you'd use the same logic if at all possible. > > If not, that probably needs to be done so that you don't accidentally > start leaking things. I don't know what the status of this is. For anything I've added, I've just made it entirely impossible to print addresses, hashed or not. Alice