From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751284AbcGMSp6 (ORCPT ); Wed, 13 Jul 2016 14:45:58 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:39152 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750949AbcGMSpt (ORCPT ); Wed, 13 Jul 2016 14:45:49 -0400 X-IBM-Helo: d24dlp01.br.ibm.com X-IBM-MailFrom: bauerman@linux.vnet.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org From: Thiago Jung Bauermann To: Arnd Bergmann Cc: Mark Rutland , linuxppc-dev@lists.ozlabs.org, Dave Young , linux-arm-kernel@lists.infradead.org, bhe@redhat.com, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, AKASHI Takahiro , "Eric W. Biederman" , Vivek Goyal Subject: Re: [RFC 0/3] extend kexec_file_load system call Date: Wed, 13 Jul 2016 15:45:41 -0300 User-Agent: KMail/4.14.3 (Linux/3.13.0-91-generic; KDE/4.14.13; x86_64; ; ) In-Reply-To: <7352796.seiSnHrYPy@wuerfel> References: <20160712014201.11456-1-takahiro.akashi@linaro.org> <20160713094127.GC14522@leverpostej> <7352796.seiSnHrYPy@wuerfel> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16071318-0028-0000-0000-000001245811 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16071318-0029-0000-0000-000013CF1AB6 Message-Id: <2222184.ZN0KkkXgPC@hactar> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-07-13_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1607130204 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Mittwoch, 13 Juli 2016, 15:13:42 schrieb Arnd Bergmann: > On Wednesday, July 13, 2016 10:41:28 AM CEST Mark Rutland wrote: > > On Wed, Jul 13, 2016 at 10:01:33AM +0200, Arnd Bergmann wrote: > > > - kboot/petitboot with all of the user space being part of the trusted > > > boot> > > > > chain: it would be good to allow these to modify the dtb as needed > > > without breaking the trust chain, just like we allow grub or u-boot > > > to modify the dtb before passing it to the kernel. > > > > It depends on *what* we need to modify here. We can modify the bootargs > > and initrd properties as part of the kexec_file_load syscall, so what > > else would we want to alter? > > I guess petitboot can also just use kexec_load() instead of > kexec_file_load(), as long as the initramfs containing petitboot is > trusted by the kernel. For secure boot, Petitboot needs to use kexec_file_load, because of the following two features which the system call enables: 1. only allow loading of signed kernels. 2. "measure" (i.e., record the hashes of) the kernel, initrd, kernel command line and other boot inputs for the Integrity Measurement Architecture subsystem. Those can't be done with kexec_load. As for what we need to modify, Petitboot does the following modifications to the DTB: 1. Set /chosen/linux,stdout-path based on which console is being used to interact with it, as Stewart mentioned in another email. 2. Set display properties on /pciex@n/.../vga@0 in machines with an OpenFirmware framebuffer. -- []'s Thiago Jung Bauermann IBM Linux Technology Center