From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 0646271653 for ; Mon, 4 Oct 2021 09:46:05 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id E662F17A7C for ; Mon, 4 Oct 2021 09:45:34 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 6E00817A6E for ; Mon, 4 Oct 2021 09:45:34 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 3D17145495 for ; Mon, 4 Oct 2021 09:45:34 +0200 (CEST) Message-ID: Date: Mon, 4 Oct 2021 09:44:26 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Thunderbird/93.0 Content-Language: en-US To: Proxmox VE development discussion , Stoiko Ivanov References: <20210923084317.3779388-1-s.ivanov@proxmox.com> From: Thomas Lamprecht In-Reply-To: <20210923084317.3779388-1-s.ivanov@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.228 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] applied: [PATCH pve-kernel-meta] proxmox-boot: fix #3632 copy kernel+initrd unconditionally X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Oct 2021 07:46:05 -0000 On 23.09.21 10:43, Stoiko Ivanov wrote: > do not use the -u (update) flag when copying kernel images and inird > from /boot to the ESPs: > * the ESPs are formatted with vfat, which has a 2 second precision for > mtime (`linux/fs/fat/misc.c` - `fat_truncate_time`) > * cp -u compares the mtimes of source (kernel image in /boot not on > vfat) and destination - leading to the copy always being carried > out, if the source files remain the same (and do not happen to have > a mtime exactly happening on a even second) > > as laid out in the bug-report - the case where this leads to an > unbootable system is when a kernel-version is shipped twice (built > with different tool-chains) - e.g. currently the 5.11 kernels in PVE 6 > and PVE 7. > > tested the behavior of `cp -u` by running opensnopp-bpfcc and copying > a file twice onto ext4 (opened only once) and on vfat (opened twice). > > additionally reproduced the issue (by dist-upgrading a PVE 6 VM to 7 > with the pve-no-subscription repo) and verified this patch fixes it. > > Signed-off-by: Stoiko Ivanov > --- > Initially considered using the output of `stat --format=%s:%Y` of both > files as 'fingerprint' for comparison > > proxmox-boot/zz-proxmox-boot | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > applied (on friday), thanks!