Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933218Ab2KEPbv (ORCPT ); Mon, 5 Nov 2012 10:31:51 -0500 Received: from cantor2.suse.de ([195.135.220.15]:59627 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932925Ab2KEPbs (ORCPT ); Mon, 5 Nov 2012 10:31:48 -0500 Date: Mon, 5 Nov 2012 16:31:40 +0100 (CET) From: Jiri Kosina To: "Eric W. Biederman" Cc: Vivek Goyal , Chris Friesen , Pavel Machek , Eric Paris , James Bottomley , Oliver Neukum , Alan Cox , Matthew Garrett , Josh Boyer , linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, linux-efi@vger.kernel.org Subject: Re: [RFC] Second attempt at kernel secure boot support In-Reply-To: Message-ID: References: <50919EED.3020601@genband.com> <36538307.gzWq1oO7Kg@linux-lqwf.site> <1351760905.2391.19.camel@dabdike.int.hansenpartnership.com> <1351762703.2391.31.camel@dabdike.int.hansenpartnership.com> <1351763954.2391.37.camel@dabdike.int.hansenpartnership.com> <20121101202701.GB20817@xo-6d-61-c0.localdomain> <5092E361.7080901@genband.com> <20121102154833.GG3300@redhat.com> <87390ok0zy.fsf@xmission.com> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1786 Lines: 41 On Mon, 5 Nov 2012, Jiri Kosina wrote: > Do I understand you correctly that by the 'glue' stuff you actually mean > the division of the kexec image into segments? > > Of course, when we are dividing the image into segments and then passing > those individually (even more so if some transformations are performed on > those segments, which I don't know whether that's the case or not), then > we can't do any signature verification of the image any more. > > But I still don't fully understand what is so magical about taking the > kernel image as is, and passing the whole lot to the running kernel as-is, > allowing for signature verification. > > Yes, it couldn't be sys_kexec_load(), as that would be ABI breakage, so > it'd mean sys_kexec_raw_load(), or whatever ... but I fail to see why that > would be problem in principle. > > If you can point me to the code where all the magic that prevents this > easy handling is happening, I'd appreciate it. OK, so after wandering through kexec-tools sources for a while, I am starting to get your point. I wasn't actually aware of the fact that it supports such a wide variety of binary formats etc. (multiboot, nbi, etc). I had a naive idea of just putting in-kernel verification of a complete ELF binary passed to kernel by userspace, and if the signature matches, jumping to it. Would work for elf-x86_64 nicely I guess, but we'd lose a lot of other functionality currently being provided by kexec-tools. Bah. This is a real pandora's box. -- Jiri Kosina SUSE Labs -- 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/