From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932594AbcHEUrA (ORCPT ); Fri, 5 Aug 2016 16:47:00 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:40574 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1424593AbcHEUqw (ORCPT ); Fri, 5 Aug 2016 16:46:52 -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: kexec@lists.infradead.org Cc: "Eric W. Biederman" , Vivek Goyal , Dave Young , Baoquan He , Arnd Bergmann , Michael Ellerman , Russell King - ARM Linux , Mark Rutland , Stewart Smith , Jeremy Kerr , Samuel Mendoza-Jonas , Mimi Zohar , linux-kernel@vger.kernel.org, AKASHI Takahiro , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 3/3] kexec: extend kexec_file_load system call Date: Fri, 05 Aug 2016 17:46:43 -0300 User-Agent: KMail/4.14.3 (Linux/3.13.0-92-generic; KDE/4.14.13; x86_64; ; ) In-Reply-To: <1469579069-28472-1-git-send-email-bauerman@linux.vnet.ibm.com> References: <20160712014201.11456-4-takahiro.akashi@linaro.org> <1469579069-28472-1-git-send-email-bauerman@linux.vnet.ibm.com> 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: 16080520-0028-0000-0000-0000012F3964 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16080520-0029-0000-0000-000013E20112 Message-Id: <1988385.QMVjiCbb5e@hactar> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-08-05_14:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=13 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1608050242 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Am Dienstag, 26 Juli 2016, 21:24:29 schrieb Thiago Jung Bauermann: > Notes: > This is a new version of the last patch in this series which adds > a function where each architecture can verify if the DTB is safe > to load: > > int __weak arch_kexec_verify_buffer(enum kexec_file_type type, > const void *buf, > unsigned long size) > { > return -EINVAL; > } > > I will then provide an implementation in my powerpc patch series > which checks that the DTB only contains nodes and properties from a > whitelist. arch_kexec_kernel_image_load will copy these properties > to the device tree blob the kernel was booted with (and perform > other changes such as setting /chosen/bootargs, of course). Is this approach ok? If so, I'll post a patch next week adding an arch_kexec_verify_buffer hook for powerpc to enforce the whitelist, and also a new version of the patches implementing kexec_file_load for powerpc on top of this series. Eric, does this address your concerns? -- []'s Thiago Jung Bauermann IBM Linux Technology Center