Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1407851pxb; Fri, 20 Nov 2020 08:45:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJy1oBGErwyqw11wC7pghEnEAi5Uagf0Xgm6JyTKI7+CcOFk3UU3C2kOaQBEtgL/f2wQjSwK X-Received: by 2002:a17:906:26c6:: with SMTP id u6mr34912164ejc.349.1605890759578; Fri, 20 Nov 2020 08:45:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605890759; cv=none; d=google.com; s=arc-20160816; b=exUMAbTGdzTM6oPlaMnxt38VGo2/K/zNx6cZ+djxI7N+zWxbDbJyUk6H+25jdzIRQd khUeOeQLvRNcFxOPmTWSAFq/9j3RPg39wexWEsu8KRg27zQd5clPLgrAVzTBsbJ6mFwW 8WCIGs5LROoCd5jgTOc7Qz4ugHbnAiOfeYD63Qc2ezHXXRwqnz0/Uv6sopBUgau0lTGk 7yQqwnewji/MDTmZEp9lfEi95JRvOKLfWPaDafrKYBEzQp1UwrVW9v9LmYfjzOV4qMN/ l/JqsSDXPIXimHEMbLBmH+O47c0vtOCWleGSlxuDXSgCkOBiVu/Il8W0CxCGcrhxLxk2 pNKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:content-disposition:mime-version :message-id:subject:cc:to:from:date; bh=beAwutNviF7xg8AHOHZ30Iwv95fLkkyhw28kWfglp6E=; b=M18seYLlck9E5XWbaVkTnukltJSGa5AMEr6yITB3wqnoYlxtHJFpV/sLA9Dxi2R9SG qV9Mg9GistxGAGZbMNr+4wfGU+H89C2RgLcelHU7CEhsO4lDUoYgN/6JbNGT71nXAofU WVMeA0t9KYzSyHpNCUwrQEv1oE2p9L81Yc0a7k5/U5wD/BqaxksZrO92dlAhkxsQQum2 r+/AuVPQJUNOaEyBQ2M3w2NahtcZntyyg0C7LGWP3wka0LJp4LFy2HMub+YzBIf1pI6M prqg2Vc4X/rj8R+5DafNeSmxgQ+IxiaNQ7ID4tPxpWamP/EusM0fbn7uVS55IdJxHAWz 2Frw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gs36si923848ejc.260.2020.11.20.08.45.35; Fri, 20 Nov 2020 08:45:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728872AbgKTQoN (ORCPT + 99 others); Fri, 20 Nov 2020 11:44:13 -0500 Received: from netrider.rowland.org ([192.131.102.5]:34519 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1726426AbgKTQoN (ORCPT ); Fri, 20 Nov 2020 11:44:13 -0500 Received: (qmail 621340 invoked by uid 1000); 20 Nov 2020 11:44:12 -0500 Date: Fri, 20 Nov 2020 11:44:12 -0500 From: Alan Stern To: Petr Mladek , Steven Rostedt , Sergey Senozhatsky Cc: Kernel development list Subject: Printk specifiers for __user pointers Message-ID: <20201120164412.GD619708@rowland.harvard.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org To the VSPRINTF maintainers: Documentation/core-api/printk-formats.rst lists a large number of format specifiers for pointers of various sorts. Yet as far as I can see, there is no specifier meant for use with __user pointers. The security implications of printing the true, unmangled value of a __user pointer are minimal, since doing so does not leak any kernel information. So %px would work, but tools like checkpatch.pl don't like it. Should a new specifier be added? If not, should we simply use %px? Alan Stern