Received: by 10.223.176.5 with SMTP id f5csp2851767wra; Mon, 5 Feb 2018 10:58:12 -0800 (PST) X-Google-Smtp-Source: AH8x225iKLo+ZLVxM4qn+O48hIgMkiOu/huHTGPLv6Ur5QwUcvpcaJx/3Mo0ArLNZ/iSYch2HlEM X-Received: by 10.101.101.84 with SMTP id a20mr4218587pgw.163.1517857092648; Mon, 05 Feb 2018 10:58:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517857092; cv=none; d=google.com; s=arc-20160816; b=G776UBsEZ9obJTsUUj+dRyWgTLfpH8q/Q16K8pyJGmS4f3EZaMMrjkQSbxNTTro+x9 KKJJjE3aosN3pjlKYlseXQ2JhWL4QVcOnuRi1SXf6s1nUPyaeeP3/MVJ63oclLHJ3007 tTiLPRQ1s+VX/INpj+HAzwwbypTJT0Yy6A/TbfSUVWK6ATjopwMA4TngB4Y87+PkcMFq GA3GOydmIa05/YSo8BzpcXIlI6pabQUwCokV8WVHBzm+dsM2JlzvcIhZ9eHa1ddn89kf h/D0T3FaS7wVZp/VL46Otm0h/6tIW7vAT9bpKr1kUmnoci9Om1D2mKRdNjU1d3M8nsdS Hvpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=Sih1aHQlxAOPCvuJxsHh9j1GhCNElMuHpgZJQwvdPYc=; b=cpDz8hxsN+dZIyLvMrtTI9avPrv6/rAQ7teUgSQfGa0npdrTBezhbo9dl77b7jUcYe nKVxYbDyZH1I5TvqTBN7obk4Ayip2C57/lanBfSdLehccgELplmnpf2JxyKEipPfL7RJ RAXN36cAp+k50xJCU4f2ffEayB8qpv0ADW/zHr+KiyLsBWOXdoQpCD21qpA6RZgTzQ+l 45szC8jlQDRogzhT/9CPzSiNInclTu3k0BuchLul8oW5ordtoGU8Moqd4+78h0v0vTrt qq43+J37ctx5OLxtc8gF2EwlcFOo9TAP/rYGoG5/prQvNW9q5TuE90JXLGY/ZaYy4h9q 3WqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@google.com header.s=20161025 header.b=kXefR0Kq; dkim=fail header.i=@chromium.org header.s=google header.b=YxypPZsD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w34-v6si7267497pla.629.2018.02.05.10.57.58; Mon, 05 Feb 2018 10:58:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@google.com header.s=20161025 header.b=kXefR0Kq; dkim=fail header.i=@chromium.org header.s=google header.b=YxypPZsD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753826AbeBES5c (ORCPT + 99 others); Mon, 5 Feb 2018 13:57:32 -0500 Received: from mail-ua0-f174.google.com ([209.85.217.174]:34106 "EHLO mail-ua0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753627AbeBES5U (ORCPT ); Mon, 5 Feb 2018 13:57:20 -0500 Received: by mail-ua0-f174.google.com with SMTP id g5so7598564uac.1 for ; Mon, 05 Feb 2018 10:57:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=Sih1aHQlxAOPCvuJxsHh9j1GhCNElMuHpgZJQwvdPYc=; b=kXefR0Kq6tJXvqAMHJK+d3EJt8X6+LGz3bXaCZ2oRENRFVw5ZPFPH0rn1WnpaJC3Zf auDt1FXPnqaru+R8JrsQimyYsbaRllLUrtMWM7SkrcisN9T93ZNeJvpF9P8ImiClPP8n IwRGGwbVcw8MSDtSv7bUCPyoOjbugjITdaLWB/4xnR91HPq31Sgyg9+TZG8d3z+petrT L8J/aqkjb/qa7KwIb2d00/lK3LjcgPtT7h9rDhZeFNOQkjRYxWSH2yyF5UX2osb3yWh2 geo7MO+qRw4EozFjnn0AaGLVH5qG1YfBTwYbEvbS4llDbIrrxUsJ3ixnaI1cv2tKXlX3 s3ZA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=Sih1aHQlxAOPCvuJxsHh9j1GhCNElMuHpgZJQwvdPYc=; b=YxypPZsDSmyLw475/moUs515qWfxJ7tjqbNg/XWPbc1ZSl3Z+dkJhVRTR7TB2C5MOH 0UKBUQikyjl41xK6ghrwUeWwFOZO40F+Jpa3/8E0e0y8y/Ic5GAuLS8dD6d0OcgwVlHN 98h9p8uNWWHV4VJNdjvLwrxpc3pzPgD4Zk5j8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=Sih1aHQlxAOPCvuJxsHh9j1GhCNElMuHpgZJQwvdPYc=; b=GcAujS6Rb9O525b9k4nxsIlrYyKfydKvDa/6xT9RZfpBnQXoHa7WGRE5xJqlEuG573 hIY+N2lBx54Z4YtDpH4vCoplqkjWl7ly5wzy00LpwZIKp3elHwmWqblxgZoAJaHmqKBT 9gzb0qBdm+ZuN0auKxV1txazB9IwvrGc6v+CFZ/WacLjg9Avwf8sqVsvNGBGUZf2C8ZF c5kkfXwkN9X0ZeO90HAUx3VLL6AtqtC8KELS3UrFwW7EKTpuMkDpMLiKfhJpGggAuNCg SVgUfnvVbqFbEUAu36LjxGZHYDXH5Tzb9DrQm5kF1yF9DlQTgYjMLyc4fQgWaPg7XCQ3 ThVw== X-Gm-Message-State: APf1xPBeZZYeuy4k24wA5gxTXRcqKq4cIbrvovz+ZTDgJWURPP54a4TI NpNJswraeVK1KT3NxnGnahRz7OlPTCvpK52ilgeDnA== X-Received: by 10.176.76.43 with SMTP id l43mr7802729uaf.155.1517857039738; Mon, 05 Feb 2018 10:57:19 -0800 (PST) MIME-Version: 1.0 Received: by 10.31.67.196 with HTTP; Mon, 5 Feb 2018 10:57:17 -0800 (PST) In-Reply-To: <20180205094438.pfd7ffymlvklpxe7@pathway.suse.cz> References: <20180204174521.21383-1-kilobyte@angband.pl> <20180205094438.pfd7ffymlvklpxe7@pathway.suse.cz> From: Kees Cook Date: Tue, 6 Feb 2018 05:57:17 +1100 X-Google-Sender-Auth: xzzltZ0RMfZIAwTtIFclBgxOQ9M Message-ID: Subject: Re: [PATCH] vsprintf: avoid misleading "(null)" for %px To: Petr Mladek Cc: Adam Borowski , Sergey Senozhatsky , Steven Rostedt , LKML , "Tobin C. Harding" , Andrew Morton , Joe Perches , "Roberts, William C" , Linus Torvalds , David Laight , Randy Dunlap , Geert Uytterhoeven Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 5, 2018 at 8:44 PM, Petr Mladek wrote: > Hi, > > I add people who actively commented on adding %px modifier, > see the thread starting at > https://lkml.kernel.org/r/1511921105-3647-5-git-send-email-me@tobin.cc > > Just for reference. It seems to be related to the commit 9f36e2c448007b54 > ("printk: use %pK for /proc/kallsyms and /proc/modules"). > > > On Sun 2018-02-04 18:45:21, Adam Borowski wrote: >> Like %pK already does, print "00000000" instead. >> >> This confused people -- the convention is that "(null)" means you tried to >> dereference a null pointer as opposed to printing the address. > > By other words, this avoids regressions when people convert > %x to %px. Do I get it right, please? Nothing should be converting from %x to %px, it's %p to %px. %p print "(null)" for 0x0, so it would be surprising for a conversion from %p to %px to change that. (Though generally speaking "(null)" is never useful...) -Kees -- Kees Cook Pixel Security