From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 81E8C1BB6AE for ; Mon, 9 Sep 2024 13:56:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725890173; cv=none; b=Gx7OEarF8pQ4wKaZWVzjNmARGcB90waO2H/63nY+g1TYHiuePUlRVo6aaD0VkX0+jdkivSz8S+Lu24seF+Z1MN2TxN+f/9YGtnmeB1hfs2ghdl5kgWzFlQc2ny2WlK1LNGd+33kyYvY1juQjiVLxQQrlVmoN6n5lnbRX7ZZKI5k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725890173; c=relaxed/simple; bh=XzoRWEoEudmxaucEcd0tMqRYCLm5ezK/+O+cSJW9Nqo=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=rbKv+Aqxn5fjGFE6eQy4yNm/mYnoenOWj5zZMnnJWcZw1yPW2pSYKduo4QVBtRY+A346YdlZge2VpyoeHva0MhMGOhW6GU5pUPsERyy/EeNSiifXEy44Pgx3AMlIS2QO5VG3lL315sbtInkGExmHmui3wMyCHePWS8fmCg0f1ac= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=ROiEEQqP; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ROiEEQqP" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725890169; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eYhtjmyZJWBN50A78LZx2Nv8438j+9S4h7dYlc79Xpg=; b=ROiEEQqPoCI5ovoJZcVSgW9RLVyfFWf7DcrKkLtO3yo5eYrzUqUybXDg6+xPsjuE0zOEoW zhM/SqLG8YUgr9SE6xiLiq2Y7HuWs8F/KzoJIk1L9Wlhv3s9Ra4Ad7di3qEdCnBwWZPchs 5BbR7Lf/oHx/m1hA8uNr6HbBBBThhcM= Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-185-XmCTAre3OZqQxY8bSgQ_yQ-1; Mon, 09 Sep 2024 09:56:06 -0400 X-MC-Unique: XmCTAre3OZqQxY8bSgQ_yQ-1 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C6B8F1955D45; Mon, 9 Sep 2024 13:56:03 +0000 (UTC) Received: from rotkaeppchen (unknown [10.39.192.107]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 590FB30001A1; Mon, 9 Sep 2024 13:55:58 +0000 (UTC) Date: Mon, 9 Sep 2024 15:55:55 +0200 From: Philipp Rudo To: "Jarkko Sakkinen" Cc: "Ard Biesheuvel" , "Pingfan Liu" , "Jan Hendrik Farr" , "Lennart Poettering" , "Eric Biederman" , "Baoquan He" , "Dave Young" , "Mark Rutland" , "Will Deacon" , "Catalin Marinas" , , , Subject: Re: [RFCv2 0/9] UEFI emulator for kexec Message-ID: <20240909155555.257e13eb@rotkaeppchen> In-Reply-To: References: <20240819145417.23367-1-piliu@redhat.com> <20240906125438.1e54c5f6@rotkaeppchen> Organization: Red Hat inc. Precedence: bulk X-Mailing-List: linux-efi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Hi Jarkko, On Sat, 07 Sep 2024 14:41:38 +0300 "Jarkko Sakkinen" wrote: > On Sat Sep 7, 2024 at 2:31 PM EEST, Jarkko Sakkinen wrote: > > On Sat Sep 7, 2024 at 2:27 PM EEST, Jarkko Sakkinen wrote: > > > On Fri Sep 6, 2024 at 1:54 PM EEST, Philipp Rudo wrote: > > > > Let me throw an other wild idea in the ring. Instead of implementing > > > > a EFI runtime we could also include a eBPF version of the stub into the > > > > images. kexec could then extract the eBPF program and let it run just > > > > like any other eBPF program with all the pros (and cons) that come with > > > > it. That won't be as generic as the EFI runtime, e.g. you couldn't > > > > simply kexec any OS installer. On the other hand it would make it > > > > easier to port UKIs et al. to non-EFI systems. What do you think? > > > > > > BPF would have some guarantees that are favorable such as programs > > > always end, even faulty ones. It always has implicit "ExitBootServices". > > > > > > Just a remark. > > > > Some days ago I was thinking could some of the kernel functionality be > > eBPF at least like in formal theory because most of it is amortized, > > i.e. does a fixed chunk of work. Not going into that rabbit hole but > > I really like this idea and could be good experimentation ground for > > such innovation. > > E.g. let's imagine there would imaginary eBPF-TPM driver framework. > > How I would go doing that would be to take the existing TPM driver > functionality and provide extra functions and resources available for > subsystem specific BPF environment, and have the orhestration code as > eBPF. I pretty much concluded that there is a chance that such could > work out. > > Not something in my immediate table but it is still really interesting > idea, as instead of using language to separate "safe" and unsafe" > regions you would use "VM" environments to create the walls. In the > end of the day that would also great venture for Rust in kernel, i.e. > compile that BPF from Rust. > > Sorry going of the hook the comment triggered me ;-) I'm glad you like the idea :-) Sounds like an interesting idea you are having there! Thanks Philipp