Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp842170rdb; Thu, 30 Nov 2023 23:02:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IG0veIvcItG3glQxEkU/RRHaLI4kRCg6oOAjll5AM9pGjBIErSgx6p1SgepEeDIUdFb/RH5 X-Received: by 2002:a17:90b:388d:b0:285:da91:69d9 with SMTP id mu13-20020a17090b388d00b00285da9169d9mr16197416pjb.9.1701414161914; Thu, 30 Nov 2023 23:02:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701414161; cv=none; d=google.com; s=arc-20160816; b=TOeirIJBOixcsbnbZVqs+Cq7iesG33U1+KmUSmBmSAJOVps68PCUYRAoPdVGdN3pCB qFFjpWl8F0Tqhe93xhxOLwOlIXcDc7SyQhGu08/qf1yGiPJlxaIsJtQFGTXRCBkHohaz 56kATxxlmlPJ7MihsdtyRppeIWSDAGbYfyG6dzyCCdV8NnM+oQYKMvUm3jkntzfhCImT +fC5x3/i+nZPoKBlKvR/9QMiqhrISkQW7gItFsEaZbfMuYqkcZ1QNer48V61YbANzR76 6tj5R6aCgoy4sSJvwyvfsInU6iaroOi4Pyzyxk/s71Wq+TDBbA1jNrxll0Oudh/E9NCV NZYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=wLkcAdJ+2CsAW3aJ8yXqdMwiV/NfPGMVK63PMTslRyw=; fh=658IzL/FnSGry58xenYrijK6lVYrX2ZKm8jUOjcb14s=; b=lmBBjz2a3dA1NluI2yfDDmncUxR4FNzA7cqxvZL410jwQ7o2NzAkjz/3QHzJrnasJs bV0btj4yXumrYeqZQvIRAjuDoTwYPcNDHYCuj7Je9WRWqqofXWIZGtW20h66ZUSvb0jS kcssuK3elOovHtWHlp4JS9cFXmBfKr5NuDIzsJ4rXhmQF2b1fOgoa5p8bXVn0Sn3LwPD j9TG5V5Q3074wqRLaR1IZ7DzCm8yP/bgMpSdXVEXIVXKc0yTAbgZ+kikC2LD5w9SHVxA XL2YpshvUEgyfn9corDF8oCsDSyrhTSxGHItU7WzNZwgCNNo+JYDYKmgap+2fCVF7ZDo MdQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=2Elw92Wz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id b14-20020a170902b60e00b001cf5cc3029fsi2609603pls.548.2023.11.30.23.02.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 23:02:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=2Elw92Wz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 7512B8077994; Thu, 30 Nov 2023 23:01:30 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229654AbjLAHBS (ORCPT + 99 others); Fri, 1 Dec 2023 02:01:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229496AbjLAHBR (ORCPT ); Fri, 1 Dec 2023 02:01:17 -0500 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB85110F9 for ; Thu, 30 Nov 2023 23:01:23 -0800 (PST) Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-1d04dba2781so1951785ad.3 for ; Thu, 30 Nov 2023 23:01:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1701414083; x=1702018883; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=wLkcAdJ+2CsAW3aJ8yXqdMwiV/NfPGMVK63PMTslRyw=; b=2Elw92WzGfu65Y/N4KlozgnPOdR3QypYed6S3SCTR/40xb4jSGyozOol8Whbx9qdFh D5m1Vo88rxhpl+iS/BSxDh9LdkgNAYTWutzPQrRnX9M0THVrjaaU+Zr+0haTIHzQP3BL ummMEL00UnZHhs6yzXL9ypZcTYFCfymkjv9Hxas733IwzjwDspJl9cBeods8palyI0lf FfxtR0loliXtCZxZteupike6eb725sR6JQ7sEGpsmG8LHWiKtNk6P/jA2j+Ggpkmt+iF c5j2fSuU5XEVk0c4n/sHMXDAlocvnHIJN1JxpzQKGYnkeWvKOrWprfZsM8elp+3loVnR chLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701414083; x=1702018883; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=wLkcAdJ+2CsAW3aJ8yXqdMwiV/NfPGMVK63PMTslRyw=; b=un1+1KuenbCZnj8Im3L1Ob7Hi0Ae21u/cMXiLS+fl/1rKIYoxOv8So86xsybw99yIU 2H0Ue3MssUKoUu4jJTCUoypA8rG68KL/u1GqOqbMJaTUHJ8+/Dg/YYTp/MDnWe+nCoO3 2GtZF6XyH1EMJpBi+K4p8AU75iZuUjaT/0SwMHmZlBDhpzK2SfHLwh2GkBArmXNiSxug fIBfG08JX/xhdC4XXD5L+meKtr7YGV7JHHxe/XGUtOdGCoPNcr2hBrmALBs+MLXuuPeN 0ngYOKYgcbSvhbhgT0xueSc4/x8vFC3pkiPE2WUJoG9v52GGhB7C4KA48PltGSnqmnCG wBgQ== X-Gm-Message-State: AOJu0Yy4XiZBMzNAWAELM7f6z/Z64oAoG5SsOIsvBj3sTpCRWeY4JiFX OwYi2urDTnstyfAgtC4a2mnwBQ== X-Received: by 2002:a17:903:2696:b0:1d0:551e:9388 with SMTP id jf22-20020a170903269600b001d0551e9388mr852110plb.7.1701414083278; Thu, 30 Nov 2023 23:01:23 -0800 (PST) Received: from google.com (170.102.105.34.bc.googleusercontent.com. [34.105.102.170]) by smtp.gmail.com with ESMTPSA id l6-20020a170902f68600b001c72d5e16acsm2551032plg.57.2023.11.30.23.01.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 23:01:22 -0800 (PST) Date: Fri, 1 Dec 2023 07:01:19 +0000 From: Carlos Llamas To: Alice Ryhl Cc: Arve =?iso-8859-1?B?SGr4bm5lduVn?= , Christian Brauner , Greg Kroah-Hartman , Joel Fernandes , kernel-team@android.com, linux-kernel@vger.kernel.org, Martijn Coenen , Suren Baghdasaryan , Todd Kjos Subject: Re: [PATCH 08/21] binder: keep vma addresses type as unsigned long Message-ID: References: <20231102185934.773885-9-cmllamas@google.com> <20231107090813.258015-1-aliceryhl@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231107090813.258015-1-aliceryhl@google.com> X-Spam-Status: No, score=-13.8 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,FSL_HELO_FAKE,RCVD_IN_DNSWL_BLOCKED, SORTED_RECIPS,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 30 Nov 2023 23:01:30 -0800 (PST) On Tue, Nov 07, 2023 at 09:08:13AM +0000, Alice Ryhl wrote: > Carlos Llamas writes: > > - seq_printf(m, " size %zd:%zd data %pK\n", > > + seq_printf(m, " size %zd:%zd data %lx\n", > > buffer->data_size, buffer->offsets_size, > > buffer->user_data); > > This changes all of the print operations to use %lx instead of %pK, > which means that the addresses are no longer being hidden when using > kptr_restrict. > > Since the pointers are all userspace pointers, it's not clear to me what > the consequences of this are. However, I'd like to confirm whether this > is an intentional change? I confirm the change was intentional, we are giving the impression that these are kernel pointers when they are not. However, I do think your concern is valid. I've added a patch to v2 to deal with this. I can tell you we are already logging the unhashed userspace addresses in other places and we should probably fix those too. -- Carlos Llamas