Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753769AbbBZM2f (ORCPT ); Thu, 26 Feb 2015 07:28:35 -0500 Received: from cantor2.suse.de ([195.135.220.15]:36025 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752883AbbBZM2e (ORCPT ); Thu, 26 Feb 2015 07:28:34 -0500 Date: Thu, 26 Feb 2015 13:27:30 +0100 From: Borislav Petkov To: Rasmus Villemoes Cc: Bjorn Helgaas , Tony Luck , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] PCI/AER: Avoid info leak in __print_tlp_header Message-ID: <20150226122730.GC3573@pd.tnic> References: <20150225225859.GB19236@pd.tnic> <1424940903-9147-1-git-send-email-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1424940903-9147-1-git-send-email-linux@rasmusvillemoes.dk> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1313 Lines: 32 On Thu, Feb 26, 2015 at 09:55:03AM +0100, Rasmus Villemoes wrote: > Commit fab4c256a58b ("PCI/AER: Add a TLP header print helper") > introduced the helper function __print_tlp_header, but contrary to the > intention, the behaviour did change: Since we're taking the address of > the parameter t, the first 4 or 8 bytes printed will be the value of > the pointer t itself, and the remaining 12 or 8 bytes will be > who-knows-what (something from the stack). > > We want to show the values of the four members of the struct > aer_header_log_regs; that can be done without ugly and error-prone > casts. On little-endian this should produce the same output as > originally intended, and since no-one has complained about getting > garbage output so far, I think big-endian should be ok too. > > Fixes: fab4c256a58b ("PCI/AER: Add a TLP header print helper") > Signed-off-by: Rasmus Villemoes Cc: Acked-by: Borislav Petkov -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/