From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f74.google.com (mail-wm1-f74.google.com [209.85.128.74]) (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 93AA3313532 for ; Fri, 9 Jan 2026 08:22:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.74 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767946962; cv=none; b=HSId4b+kCs3JxAl8ft0R0nYr1qPe6CqSWejrSeMWM1o197xTrx0dcc7tZOf1UiehM+/4qtU+yK4xlxd04dZXZAxzgkTBsZqtyfy9xbC7E+vhWGaCR3AAfOHzjgS91lVNIviBs21tWG8nop79iQkSIBbwa5vjCGnJNYC0eV7IgGw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767946962; c=relaxed/simple; bh=BLWi4uMHypmGV8DiJceiHRqHNwP7ddPE8JON7n+XU/U=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=RbWa4a90SX8iHwvs7m8gDNSq8CVWLSMlOe6d9Osnuip8vf4aZxDYrGcriJVuJrOwbt1Q9K8kRF2KS1cjwFGpxGyfkZOZ/aY5TGUAD1GX+acK1i5H7JKGQpu9AQRtgPvsHvSD5k8croQ+S+fCGPlxSNIaHNo06HZLWeC/TOr+sN8= 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=E7gtv2zy; arc=none smtp.client-ip=209.85.128.74 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="E7gtv2zy" Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-47d17fff653so18282005e9.0 for ; Fri, 09 Jan 2026 00:22:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1767946951; x=1768551751; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=BLWi4uMHypmGV8DiJceiHRqHNwP7ddPE8JON7n+XU/U=; b=E7gtv2zybODcpB8HCEeGimjclxeY9Bfk09Al6+FlikWcmOf43s5IlLWkL3eC6wGXa6 5bQs6N4PxogGTbsPkLSyaQTxqW4wifZjloF6A0jd+mWztp6TD6Z55o+YikTJ0RKGCNQf Fghs28fjy5gQcUpOaU4bXI7+w8qEDU8P7OEPOOhKSNqmJPFs0O+eD46+kf66NC8mLrtt 8bK7FX5v6MYoqJqIgtt4JkwPrvaACDn4cKNEFoer85p0+G5J/2+cdCGy6MIoLSklBN6O PbUXS609uNfpybv2i4vIgOw277TChQOYYoLGlj74VOXoiLeoxGYi2gFXK0vMXbOFL86z y4WA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767946951; x=1768551751; h=content-transfer-encoding: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=BLWi4uMHypmGV8DiJceiHRqHNwP7ddPE8JON7n+XU/U=; b=ZBa8IkdHf3QevxlP9ZMTep8741ymEhRydmWDSdO8pb1zl1BM6S3VFbsIO7DTJhhHc+ A06ow3434OYgcC3vLAo0FmLzrk0kDB2YixYGAyVdPIkOs0oolnJLbi99IF4wj4wwggh5 t1pNhnqGRvv+BcLO+0oerL2Hh3PZ0yQ49YppQhWyoOlbExQGuPpbNE2xPOZBQC6YdpzL Wr/YiEX2xtxomrrMF//zKlfp+0nof+9fCobUdjKHSIC01SyTnvY5qSxDSxbV79YMdwdA AI7qccuSrOGEnvysJ+sks9VjCLvlVo9AUjimXer1vxcTIgPgj2VfEnLSM43yppZQMd/Z HWRg== X-Forwarded-Encrypted: i=1; AJvYcCUtPvWGT7fSDJKMM/F2cdb6AZ+gzsSZXIcJvRx6MinWy6a2aE/XuKZYPzHpTDxvcajIAEMcAJw9ieT2HXc=@vger.kernel.org X-Gm-Message-State: AOJu0Ywnl0KoKcbon2gGp9fY6cuEX3zihFrjiCj5mbm8d6s288pYoxgn T9cO6xLqAD5ERJPD1hUmhpn4EZ0HTtpNxPocjerYV8o+8vEbxJzzQj2AzD9tMDWjs94jZJRmLwk fFWUF04aUtcmAZ1Vngg== X-Google-Smtp-Source: AGHT+IEbxcQ4QUiqRAyEc7W6J4X1COn8Ookqdn7VsojZAE78DV6frK8QksRsao28kPky3Jp8+ejCpJBoRLnDzJ4= X-Received: from wmbdx7.prod.google.com ([2002:a05:600c:63c7:b0:47a:814a:e0cf]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:1e24:b0:46e:4a13:e6c6 with SMTP id 5b1f17b1804b1-47d84b32efemr94221605e9.19.1767946951244; Fri, 09 Jan 2026 00:22:31 -0800 (PST) Date: Fri, 9 Jan 2026 08:22:30 +0000 In-Reply-To: <20260107-restricted-pointers-binder-v1-1-181018bf3812@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260107-restricted-pointers-binder-v1-1-181018bf3812@linutronix.de> Message-ID: Subject: Re: [PATCH] binder: don't use %pK through printk From: Alice Ryhl To: "Thomas =?utf-8?Q?Wei=C3=9Fschuh?=" Cc: Greg Kroah-Hartman , "Arve =?utf-8?B?SGrDuG5uZXbDpWc=?=" , Todd Kjos , Christian Brauner , Carlos Llamas , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Wed, Jan 07, 2026 at 03:29:50PM +0100, Thomas Wei=C3=9Fschuh wrote: > In the past %pK was preferable to %p as it would not leak raw pointer > values into the kernel log. Since commit ad67b74d2469 ("printk: hash > addresses printed with %p") the regular %p has been improved to avoid > this issue. Furthermore, restricted pointers ("%pK") were never meant > to be used through printk(). They can still unintentionally leak raw > pointers or acquire sleeping locks in atomic contexts. >=20 > Switch to the regular pointer formatting which is safer and > easier to reason about. >=20 > There are still a few users of %pK left, but these use it through > seq_file, for which its usage is safe. >=20 > Signed-off-by: Thomas Wei=C3=9Fschuh Reviewed-by: Alice Ryhl