Re: [PATCH] PCI/AER: Avoid info leak in __print_tlp_header

2015-02-25 Thread Borislav Petkov
On Wed, Feb 25, 2015 at 12:18:14PM -0800, Bjorn Helgaas wrote: > Why are we worrying about byte order here at all? I'd think we could > just print t->dw0 directly with %08x. Right, my only concern is since this is user-facing, someone/something might depend on its format/byte order. But since no

RE: [PATCH] PCI/AER: Avoid info leak in __print_tlp_header

2015-02-25 Thread Luck, Tony
> I think we should expect AER to be used on big-endian machines. I'm > pretty sure it's used on Itanium in big-endian mode. Itanium can run in either big or little endian mode - but Linux uses little endian: arch/ia64/include/uapi/asm/byteorder.h:#include -Tony N�r��yb�X��ǧv�^�)޺{.n

Re: [PATCH] PCI/AER: Avoid info leak in __print_tlp_header

2015-02-25 Thread Bjorn Helgaas
[+cc Tony] On Wed, Feb 25, 2015 at 10:54 AM, Borislav Petkov wrote: > On Tue, Feb 24, 2015 at 11:50:46PM +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 beh

Re: [PATCH] PCI/AER: Avoid info leak in __print_tlp_header

2015-02-25 Thread Borislav Petkov
On Tue, Feb 24, 2015 at 11:50:46PM +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 Whoops, good catch.

[PATCH] PCI/AER: Avoid info leak in __print_tlp_header

2015-02-24 Thread Rasmus Villemoes
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