Received: by 10.223.185.116 with SMTP id b49csp476373wrg; Sat, 10 Feb 2018 11:16:11 -0800 (PST) X-Google-Smtp-Source: AH8x226qSEzgrqh/ZOP45bjklCdMhoRT2H+dLy8WkZYjueM0T+cpXi97tZ3kJ5jJMNhzb+c48pbp X-Received: by 10.99.132.74 with SMTP id k71mr5572431pgd.4.1518290171077; Sat, 10 Feb 2018 11:16:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518290171; cv=none; d=google.com; s=arc-20160816; b=xZUyFgABPk1IVz/IIIBMOfWDXLGTtjyE+EzdKHbDOc9Rfa7nTJSgzzuVFqhk0Kzlm/ EdrlTZ+6mV06r0n34205kZOjVb3bilLjoNDj+fWSPZ8B7QF3hlPVJMe26gCdvxbK7tbu YTuCnZGpPEuU8CrWpwUq5L/HE0CK9BeWma9KohM8gwXe+qAb5P2Hnm5fe7pwdVI+tRuP T3a0Mz3ES/npKOTAa22bHcwWuEuc5aC5chTD5/1WXzI9KE5STVQH4bamdU61g3tSXx9a lfFfgONegZDlO0iVEXqAKQdK+l8OR4mAC4NbwAEZd8u9u+cymtKAiAhCth2LlHDp39nk niMg== 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 :arc-authentication-results; bh=oHsvJ1O9zTjMhbZWuzqCN8kPjMsBy3od1C77YB7DioA=; b=QvIhvKYB7lOFye0w/76G8wWFxvUQqLypLBzy30Yz1ua8ht60kvWGfs2Trxij8P9QKQ A+FIkmHQutibeB/thZ8fL+qeaKUSeb9TFPt/RgR9z5kTNprly0PFZuo0VscPkIwXNyJF wdBFTFuB49B5QgbHksOf6BNvaM3G6JhBPNunganUGO+oLqJyQtvODURd0Aa3kSaWPvDm saCG9/Bbpn6dBfmGAB2gmji+Co3Y44rDy2UswLeDJzSCYMb7js8xYqn8KKGm5OKb9x25 q0MliXgdpPL8laE/lc2w7P90XZq/fakI4PSkCpFAEVQMYPzMIwz6gmXrkBE01OEXbFSn jM/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=R4LbO5EG; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s4si3025334pgq.658.2018.02.10.11.15.57; Sat, 10 Feb 2018 11:16:11 -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=pass header.i=@google.com header.s=20161025 header.b=R4LbO5EG; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752172AbeBJTOW (ORCPT + 99 others); Sat, 10 Feb 2018 14:14:22 -0500 Received: from mail-ua0-f194.google.com ([209.85.217.194]:42326 "EHLO mail-ua0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752055AbeBJTOU (ORCPT ); Sat, 10 Feb 2018 14:14:20 -0500 Received: by mail-ua0-f194.google.com with SMTP id 47so7224473uau.9 for ; Sat, 10 Feb 2018 11:14:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=oHsvJ1O9zTjMhbZWuzqCN8kPjMsBy3od1C77YB7DioA=; b=R4LbO5EGT7PaE4yB5i7r4SJKLdiBbtIyxY9/CgwJ8cJbTlwyVK2xJriuPYh/OsAZGB +xlTjQ8Et7SyGeaMN8STODs28llSo2k579irT/1AcQP6VD1QrBsi13iVnXNKctGJsR8h 6RKUtPf7AibAgI+EcCRX/raJb0P/UfEPBd+9LzpsilMTIvK6q3eZjK9I9krCtmMt/lSm XrLb3QfXFpkbUHgwGGCSh7eStN1mZ0wyvguVIzTg6I3ICFm4fJfzqOzX8DDa7e+quNxn XEPe/Oa1/jto3IB2iBNz0GD1Gp3qH9mXM5kv0gUp3dwXiI3jckVnzJfcyYrqKV+fiepJ gl6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=oHsvJ1O9zTjMhbZWuzqCN8kPjMsBy3od1C77YB7DioA=; b=mUkc3/FCuMu05zcoayz5q9hJlK9ZddeKfc+1UfyeDCTrqUOwuLDT6UzGYsOU+baU1M BniDdQ0ZLzSdMuEE6XDoc90yZbpSzoWoAO1Wpr2VLknvmR62RTbmZVMYxe/+xQ/Aq/WD DcCkbLDvQR0VHnczW79KJTkXXPJJsY2/ReCjRNea+WvwqIGOMH1NVtyj8gmIJcIv35wX oCZ6ig0fNUbEwacVVtFnkuNRlHhu9yNQOZY1UnrRWAbHrmp58BuRgm3jGPtmS9Tumubt 0EKRX8nj6AyRHu2U3viBXVIZYtvwHP/lyNkn8W8rARpXX5ohRlZY7Pa+WL/0uYvYq2ET /yYw== X-Gm-Message-State: APf1xPDJutzIuVjsLP45TJNGMPNi0gJEVrub+3j2xmXdWVgbK5OBbsJD bV1jGUheZdeQdZ2d75nquK4Zfr0HhRJ27bTev8XpYg== X-Received: by 10.159.35.15 with SMTP id 15mr7021193uae.130.1518290058955; Sat, 10 Feb 2018 11:14:18 -0800 (PST) MIME-Version: 1.0 Received: by 10.31.67.196 with HTTP; Sat, 10 Feb 2018 11:14:18 -0800 (PST) In-Reply-To: <20180210072340.GC8814@kroah.com> References: <20180209133931.211869118@linuxfoundation.org> <20180209133934.472824776@linuxfoundation.org> <20180210072340.GC8814@kroah.com> From: Kees Cook Date: Sat, 10 Feb 2018 11:14:18 -0800 Message-ID: Subject: Re: [PATCH 4.9 46/92] x86/alternative: Print unadorned pointers To: Greg Kroah-Hartman Cc: LKML , "# 3.4.x" , Borislav Petkov , Thomas Gleixner , Rik van Riel , Andi Kleen , Peter Zijlstra , David Woodhouse , Jiri Kosina , Andy Lutomirski , Dave Hansen , Linus Torvalds , Josh Poimboeuf , Tim Chen , Paul Turner , David Woodhouse 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 Fri, Feb 9, 2018 at 11:23 PM, Greg Kroah-Hartman wrote: > On Fri, Feb 09, 2018 at 02:01:32PM -0800, Kees Cook wrote: >> On Fri, Feb 9, 2018 at 5:39 AM, Greg Kroah-Hartman >> wrote: >> > 4.9-stable review patch. If anyone has any objections, please let me know. >> > >> > ------------------ >> > >> > From: Borislav Petkov >> > >> > (cherry picked from commit 0e6c16c652cadaffd25a6bb326ec10da5bcec6b4) >> > >> > After commit ad67b74d2469 ("printk: hash addresses printed with %p") >> > pointers are being hashed when printed. However, this makes the alternative >> > debug output completely useless. Switch to %px in order to see the >> > unadorned kernel pointers. >> >> This missed a "Fixes:" tag so probably missed automated checking on >> how far back to port this. It shouldn't go back beyond 4.15 (where >> ad67b74d2469 first appeared). > > Good point. Should we instead be using %pK for this change instead? Or > should we just backport commit ad67b74d2469 to 4.14? :) ad67b74d2469 is pretty disruptive, I can't recommend putting it in 4.14. I mean, I think it'd be great, but I suspect other people would find it very surprising. :) I would just revert this commit from kernels earlier than 4.15; this %p usage is in debugging, so %pK doesn't make much sense here. -Kees -- Kees Cook Pixel Security