From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id OABHErH/emeVbwEAqHPOHw:P1 (envelope-from ) for ; Sun, 05 Jan 2025 21:54:57 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id OABHErH/emeVbwEAqHPOHw (envelope-from ) for ; Sun, 05 Jan 2025 22:54:57 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=wolfsden.cz header.s=mail header.b=vkST+PPB; dkim=pass header.d=wolfsden.cz header.s=mail header.b=j3IwGPcT; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=wolfsden.cz ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1736114097; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=gvCXi6iQWgUHpXYahmcwEcDzpXDZbuGfGXfIPOX/axU=; b=ezG0cH8SXb05M/kmpkbH5mNr5PUk1wZdNBKiXsEYirrh/WwW3SaYsTbXdY0cGxHPot/2tj qnyVexu+uVh2t48ghvtcMECUuE17FU4vSEjvNTKWcrNakN3tA4vipSuiAcnDQ+ncJZ1Eiq 8LQU3492mDSjdT5p5pu3uMiAGhZ5LbzAdAh27ENEpLIMceNDLzAZc0oeYtV8KVBGFE24G1 0rgyUH/qNiuJOtSj8OmyUZAjtfI8JrMmEOmpt0pcgfTxO2jxnYg9FrnsrxhEArMC+eqdqi aVdW+BE097AodMr0E9pR/2bow9/XbaBjJOaz66z5kkI5NRaMgcx/Qbhv7tUsHw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=wolfsden.cz header.s=mail header.b=vkST+PPB; dkim=pass header.d=wolfsden.cz header.s=mail header.b=j3IwGPcT; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=wolfsden.cz ARC-Seal: i=1; s=key1; d=yhetil.org; t=1736114097; a=rsa-sha256; cv=none; b=VdMHDuppMdYs+e8ovUw2HWc7TExhYpUr4wO3OEpiFJVSkziO8h+f2QRtgy3dQ8BhtTnmeV XC0dkxM54SDMGNqpPntOqeTm83qHdl+OtQyVl0vWKE79mwF+xXoGcwVJCKVxsfZFUaUMB7 nxjiYdrDQgl7b6VVSTPemvchD7QK/kcqOoOm3uqSA8gwyiiHeJBR9P90DinwX2TjGZO3vN BLGfqluxBwwZfKcU38GLlc9FU8w3puznyM057/rViHUKyuKRRDtPkdvZJPq2gK4Vzl2GXj Qgio92MGtZ1KWF9dC06W1lBv3KLUZ3dzxrFzqPXsP9Ch40ps5msOh+d1FNhQ2w== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C4BB0234EE for ; Sun, 05 Jan 2025 22:54:56 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUYZZ-0007DJ-2Z; Sun, 05 Jan 2025 16:54:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <~@wolfsden.cz>) id 1tUYZX-0007DA-C1 for guix-devel@gnu.org; Sun, 05 Jan 2025 16:54:11 -0500 Received: from wolfsden.cz ([37.205.8.62]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <~@wolfsden.cz>) id 1tUYZV-0006tP-57; Sun, 05 Jan 2025 16:54:10 -0500 Received: by wolfsden.cz (Postfix, from userid 104) id 156D1353878; Sun, 5 Jan 2025 21:54:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1736114044; bh=k87J1HzF0DkhpSDGQhbD5+CZwNn6aZUXsXfdDMDy5+A=; h=From:To:Subject:In-Reply-To:References:CC:Date; b=vkST+PPBD6SoN0sVlmctaBzDBZ+QEmHI4Rt+57BDy/LlpB+vOxbpGS5LLKk3hB+2E 7F5pfmiZdDU9m7xC+MudB6wa5+zKTvXbrrCmiMFF8b3qQgf1PDUH091a1/jBQ21Y43 rX/FpHFNhS79kaPEjjP18PvbUzpCtNktAX7trIN0dkv81ZgY5s2UEEHAwfA0ROmsGA 6WfMeXNGzj7X39Xy/cHnHCSxhfrY4J87XfPj5ML5cWHJmU+hEWTXz2f/XYgJ+Mbf/F v51AMZsDXDmFj54F3CRmEn2zYiCLMfWZwKmv8Md/TF5mW/Wxsxutl3PegHjPeA9BgS 2x9fuzGvyuXtNDQcWdVsFytxA7t7g/ZD19xzDJG1TZq+ZnsR+LjCHktQYh2Voas4sl ZnT4w+XbtM+dACRB0CjnG9BRhhUzw3tvB9/1RVAu3BX+c6AH/6J7U6DHOIYs5x+RjG opr7iIGjAUOLlCPBYggRCjL8fACsT27yvVfZTxMkwyZupczv4ln0rvlOYksMqUyrJ2 5keieYJEsbOHqXpQtdqDmlo28f2meFehl4Pzjx7bGG3xrlBCU4EZ6NPLt8VdBhu3AN UC2F7nNGdbBnJgHBUcckzo4n6twHy+bavDlcoEQnL/xOEsIEg3b4SCYVAN1Q62bQla e37LkrPDfLs3Q5T2O//O890U= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 9AAE93534AC; Sun, 5 Jan 2025 21:54:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1736114043; bh=k87J1HzF0DkhpSDGQhbD5+CZwNn6aZUXsXfdDMDy5+A=; h=From:To:Subject:In-Reply-To:References:CC:Date; b=j3IwGPcTd7xAM+zEcDZWy4KJBpU3ZMPtq9+2+JXjDc07pSj6u4x73F0HRSXzqv26I DbAlAjNmERH1Ynzcpon/rKIe1TedEPy7AbB70E40UxjaV0XUsgDr+WawdbgGTYIMvi eXFinExwvFuLRF+6yAkixh0GPAuYChOgeYCgAMEmg8D2+VbrHDsXgM8yCxgO8t5G4r QYbWDGXjRoUHGjb4yC+jeKBlR98iL8WnX91eZs0uG05H0oP+F5Bq1PUDczTECA/+ON WNKPNVZUw8sR7rK97KackOmfyD1i0Bmfeo1+zxb/lnzP/vyHrCUnvTkxogzs6Hg4B+ B1r/5P09K6Maeg77PuKSGcBDWydBBSLwqKEEN9WbRDhIOjF/FoEZqGRSCdJqMocS9O l/2KD1Hgk8dlQr3PHMxpaBMMZFRisUoUnmKjkMMtqn26rZ9/lgsYUu6GPK1Xl33b4f dVKDlfoxDeHPaKIlfMWQdy971wAOa4UOcLxfR5CjIbCJk86kgm/jSgZlUwQHhnOXWc z/9yEuBfDEK0o3fLcJ/jlTT5Wcw1Vg4kXNmnywxNYSnj0E2Q+uJ8QbhV1qYibFNpnw MshxVjbiDrFwv9j8cLwp0FvIoe2jm+U+Tc/PhQHjVaHsrTDKIU0BEIh1bWZhV3zwxC rSyo/M1+mrpg5Ttvm8QdnAEE= From: Tomas Volf <~@wolfsden.cz> To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: 03/11: reconfigure: Support loading the system for kexec reboot. In-Reply-To: <87y0zqqyrr.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Sat, 04 Jan 2025 18:23:04 +0100") References: <173542420171.3052447.14254740746301984406@vcs3.savannah.gnu.org> <20241228221642.E5EB9D3CB98@vcs3.savannah.gnu.org> <87jzbi3f7f.fsf@wolfsden.cz> <87y0zqqyrr.fsf@gnu.org> CC: guix-devel@gnu.org Mail-Followup-To: Ludovic =?utf-8?Q?Court=C3=A8s?= , guix-devel@gnu.org Date: Sun, 05 Jan 2025 22:54:02 +0100 Message-ID: <87a5c5ylj9.fsf@wolfsden.cz> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=37.205.8.62; envelope-from=~@wolfsden.cz; helo=wolfsden.cz X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -4.84 X-Spam-Score: -4.84 X-Migadu-Queue-Id: C4BB0234EE X-TUID: x92F5pK0Xw9O --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: Hello :) > Hi, > > Tomas Volf <~@wolfsden.cz> skribis: > >> thank you for this series, it looks quite useful, however couple of >> questions about this commit are below. :) > > For me privately? If not, feel free to share my reply with the list. It just felt unnecessary to spam the whole list with these questions, but I defer to your judgment here and will reply to the list. > >> Is it expected that I can call `reboot -k' without any system being >> loaded for the kexec (yet)? The VM I have tried it in seems to just >> "shutdown" half-way and then hang, with last message being "Rebooting >> via kexec" or something like that. I am not sure if that is expected >> (and the onus is on me to make sure I load the image before `reboot -k') >> or if I should bug report it. > > It=E2=80=99s a bug fixed in Shepherd =E2=80=98main=E2=80=99 (bug-fix rele= ase will be out > soon). Nice. > >>> + (program-file >>> + "kexec-load-system.scm" >>> + (with-imported-modules '((guix build syscalls)) >>> + #~(begin >>> + (use-modules (guix build syscalls)) >>> + >>> + (let ((kernel (open-fdes #$(operating-system-kernel-file os) >>> + O_RDONLY)) >>> + (initrd (open-fdes #$(operating-system-initrd-file os) >>> + O_RDONLY))) >> >> Do I understand it right that this program basically loads just the >> (initrd) field of the operating-system definitions, and ignores the >> (extra-initrd) field? If so, that is a shame. Would have allowed >> reboots of LUKS encrypted machines without entering the password at all. > > Good point! kexec_file_load(2) can only be given one initrd, so I > suppose it cannot support extra initrds. > > That=E2=80=99s something we should at least document and probably protect > against. Based on the kexec_file_load's man page it looks like it takes a file descriptor. Is there a technical reason why we cannot just construct the unified initrd in memory by overlaying the extra-initrd over the initrd (which is what GRUB does anyway) and feed the result to the kernel via a pipe? I am willing to give a shot writing the code for it (once the kexec loading works at all on my machines, see #75320), assuming you consider this approach sound. Have a nice day, Tomas =2D-=20 There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJCBAEBCgAsFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmd6/3oOHH5Ad29sZnNk ZW4uY3oACgkQL7/ufbZ/wanu/hAAsjYcMB9QwnhqMSARl7kNuPlidt/e/Ji8zNiI pioIvsCfQ1jOc6oAeuRXb/x+PkwQlDwQhdW3bFQjVlR3NEcDUqBjovNm7fVE3GHf BbioSFNrL8votcizTFd3mBRaYMle8gaIFrg0Mo/e2EdtEhuAz3Rsw2ZFMzX8Vj+R 5TLgAxumtt7kkNRzd13+zdj0CIgi42eauZeB5oTGNvzLJpbNIDdR0UAWzjFCEj/K yj3qXkL68I8hnU6i1vxX8oNlBBs1aXD+DLlwEK/AlISk4+GDrJQjpP8ItSb5gAKV jA48cy9pM99B7h3aQspK8s8BYF9qer2lCzBMoQFODtedU/KYsksGw4lxn4XOIOR0 5HKQw7JYuAVbPXKiMtOPM/wumm2cByHnjicSU1Z3PsrBDq1HUfc6jbfeIMGG5FXw nUTvONDKy1PCFluoP1qlnjKyrWQlvJJm1m5w4mCl0/u3tYQ0Xfza6JDSaY/b57QF PFQqNI7yZHDh80YCibt25k2b4SWp7q8Q3KlkJvruENawhxvD6WdDhm4TWRolusLn F2yfDpkjF+lgFDu9Zfvj8KKYnc7SxtMTfPVnD4zE4VO1mE/FUhS/IWnQGhVc1P3H 6YeRAjgJ/9aVYgkXcbYySK+rC5RUFmZkbgz55Fi1zUFSw6R3VKy3mm67qEoQSOvi OjxuqAM= =5oXG -----END PGP SIGNATURE----- --=-=-=--