From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751602AbdKMBG6 (ORCPT ); Sun, 12 Nov 2017 20:06:58 -0500 Received: from ozlabs.org ([103.22.144.67]:34025 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750985AbdKMBG4 (ORCPT ); Sun, 12 Nov 2017 20:06:56 -0500 From: Michael Ellerman To: Frank Rowand , "Tobin C. Harding" , kernel-hardening@lists.openwall.com Cc: "Jason A. Donenfeld" , "Theodore Ts'o" , Linus Torvalds , Kees Cook , Paolo Bonzini , Tycho Andersen , "Roberts\, William C" , Tejun Heo , Jordan Glover , Greg KH , Petr Mladek , Joe Perches , Ian Campbell , Sergey Senozhatsky , Catalin Marinas , Will Deacon , Steven Rostedt , Chris Fries , Dave Weinstein , Daniel Micay , Djalal Harouni , linux-kernel@vger.kernel.org, Network Development , David Miller Subject: Re: [kernel-hardening] [PATCH v4] scripts: add leaking_addresses.pl In-Reply-To: <67c090b8-926a-1637-c335-863c068e62d0@gmail.com> References: <1510050731-32446-1-git-send-email-me@tobin.cc> <87k1z12cof.fsf@concordia.ellerman.id.au> <7fa01b32-4db0-3742-067b-955969020953@gmail.com> <87o9o7wwbl.fsf@concordia.ellerman.id.au> <67c090b8-926a-1637-c335-863c068e62d0@gmail.com> Date: Mon, 13 Nov 2017 12:06:51 +1100 Message-ID: <87tvxzvvf8.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Frank Rowand writes: > Hi Michael, > > On 11/12/17 03:49, Michael Ellerman wrote: ... >> >> On our bare metal machines the device tree comes from skiboot >> (firmware), with some of the content provided by hostboot (other >> firmware), both of which are open source, so in theory most of the >> information is available in *some* source tree. But there's still >> information about runtime allocations etc. that is not available in the >> source anywhere. > > Thanks for the additional information. > > Can you explain a little bit what "runtime allocations" are? Are you > referring to the memory reservation block, the memory node(s) and the > chosen node? Or other information? Yeah I was thinking of memory reservations. They're under the reserved-memory node as well as the reservation block, eg: $ ls -1 /proc/device-tree/reserved-memory/ ibm,firmware-allocs-memory@1000000000 ibm,firmware-allocs-memory@1800000000 ibm,firmware-allocs-memory@39c00000 ibm,firmware-allocs-memory@800000000 ibm,firmware-code@30000000 ibm,firmware-data@31000000 ibm,firmware-heap@30300000 ibm,firmware-stacks@31c00000 ibm,hbrt-code-image@1ffd510000 ibm,hbrt-target-image@1ffd6a0000 ibm,hbrt-vpd-image@1ffd700000 ibm,slw-image@1ffda00000 ibm,slw-image@1ffde00000 ibm,slw-image@1ffe200000 ibm,slw-image@1ffe600000 There's also some new systems where a catalog of PMU events is stored in flash as a DTB and then stitched into the device tree by skiboot before booting Linux. Anyway my point was mainly just that the device tree is not simply a copy of something in the kernel source. cheers From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Ellerman Subject: Re: [kernel-hardening] [PATCH v4] scripts: add leaking_addresses.pl Date: Mon, 13 Nov 2017 12:06:51 +1100 Message-ID: <87tvxzvvf8.fsf@concordia.ellerman.id.au> References: <1510050731-32446-1-git-send-email-me@tobin.cc> <87k1z12cof.fsf@concordia.ellerman.id.au> <7fa01b32-4db0-3742-067b-955969020953@gmail.com> <87o9o7wwbl.fsf@concordia.ellerman.id.au> <67c090b8-926a-1637-c335-863c068e62d0@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Cc: "Jason A. Donenfeld" , Theodore Ts'o , Linus Torvalds , Kees Cook , Paolo Bonzini , Tycho Andersen , "Roberts\, William C" , Tejun Heo , Jordan Glover , Greg KH , Petr Mladek , Joe Perches , Ian Campbell , Sergey Senozhatsky , Catalin Marinas , Will Deacon , Steven Rostedt , Chris Fries , Dave Weinstein , Daniel Micay , "Tobin C. Harding" , kernel-hardening@lists.openwall.com Return-path: In-Reply-To: <67c090b8-926a-1637-c335-863c068e62d0@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org Frank Rowand writes: > Hi Michael, > > On 11/12/17 03:49, Michael Ellerman wrote: ... >> >> On our bare metal machines the device tree comes from skiboot >> (firmware), with some of the content provided by hostboot (other >> firmware), both of which are open source, so in theory most of the >> information is available in *some* source tree. But there's still >> information about runtime allocations etc. that is not available in the >> source anywhere. > > Thanks for the additional information. > > Can you explain a little bit what "runtime allocations" are? Are you > referring to the memory reservation block, the memory node(s) and the > chosen node? Or other information? Yeah I was thinking of memory reservations. They're under the reserved-memory node as well as the reservation block, eg: $ ls -1 /proc/device-tree/reserved-memory/ ibm,firmware-allocs-memory@1000000000 ibm,firmware-allocs-memory@1800000000 ibm,firmware-allocs-memory@39c00000 ibm,firmware-allocs-memory@800000000 ibm,firmware-code@30000000 ibm,firmware-data@31000000 ibm,firmware-heap@30300000 ibm,firmware-stacks@31c00000 ibm,hbrt-code-image@1ffd510000 ibm,hbrt-target-image@1ffd6a0000 ibm,hbrt-vpd-image@1ffd700000 ibm,slw-image@1ffda00000 ibm,slw-image@1ffde00000 ibm,slw-image@1ffe200000 ibm,slw-image@1ffe600000 There's also some new systems where a catalog of PMU events is stored in flash as a DTB and then stitched into the device tree by skiboot before booting Linux. Anyway my point was mainly just that the device tree is not simply a copy of something in the kernel source. cheers From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Ellerman In-Reply-To: <67c090b8-926a-1637-c335-863c068e62d0@gmail.com> References: <1510050731-32446-1-git-send-email-me@tobin.cc> <87k1z12cof.fsf@concordia.ellerman.id.au> <7fa01b32-4db0-3742-067b-955969020953@gmail.com> <87o9o7wwbl.fsf@concordia.ellerman.id.au> <67c090b8-926a-1637-c335-863c068e62d0@gmail.com> Date: Mon, 13 Nov 2017 12:06:51 +1100 Message-ID: <87tvxzvvf8.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [kernel-hardening] [PATCH v4] scripts: add leaking_addresses.pl To: Frank Rowand , "Tobin C. Harding" , kernel-hardening@lists.openwall.com Cc: "Jason A. Donenfeld" , Theodore Ts'o , Linus Torvalds , Kees Cook , Paolo Bonzini , Tycho Andersen , "Roberts, William C" , Tejun Heo , Jordan Glover , Greg KH , Petr Mladek , Joe Perches , Ian Campbell , Sergey Senozhatsky , Catalin Marinas , Will Deacon , Steven Rostedt , Chris Fries , Dave Weinstein , Daniel Micay , Djalal Harouni , linux-kernel@vger.kernel.org, Network Development , David Miller List-ID: Frank Rowand writes: > Hi Michael, > > On 11/12/17 03:49, Michael Ellerman wrote: ... >> >> On our bare metal machines the device tree comes from skiboot >> (firmware), with some of the content provided by hostboot (other >> firmware), both of which are open source, so in theory most of the >> information is available in *some* source tree. But there's still >> information about runtime allocations etc. that is not available in the >> source anywhere. > > Thanks for the additional information. > > Can you explain a little bit what "runtime allocations" are? Are you > referring to the memory reservation block, the memory node(s) and the > chosen node? Or other information? Yeah I was thinking of memory reservations. They're under the reserved-memory node as well as the reservation block, eg: $ ls -1 /proc/device-tree/reserved-memory/ ibm,firmware-allocs-memory@1000000000 ibm,firmware-allocs-memory@1800000000 ibm,firmware-allocs-memory@39c00000 ibm,firmware-allocs-memory@800000000 ibm,firmware-code@30000000 ibm,firmware-data@31000000 ibm,firmware-heap@30300000 ibm,firmware-stacks@31c00000 ibm,hbrt-code-image@1ffd510000 ibm,hbrt-target-image@1ffd6a0000 ibm,hbrt-vpd-image@1ffd700000 ibm,slw-image@1ffda00000 ibm,slw-image@1ffde00000 ibm,slw-image@1ffe200000 ibm,slw-image@1ffe600000 There's also some new systems where a catalog of PMU events is stored in flash as a DTB and then stitched into the device tree by skiboot before booting Linux. Anyway my point was mainly just that the device tree is not simply a copy of something in the kernel source. cheers