From patchwork Mon Mar 1 05:18:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Bezdeka X-Patchwork-Id: 343 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:c583:0:0:0:0:0 with SMTP id x3csp3589130oop; Mon, 1 Mar 2021 07:19:35 -0800 (PST) X-Received: by 2002:a2e:320c:: with SMTP id y12mr4083400ljy.360.1614611974772; Mon, 01 Mar 2021 07:19:34 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1614611974; cv=pass; d=google.com; s=arc-20160816; b=apPizaS2gqlaAoKKJSOFIQcn+jgSRxVg4MJlNe2dFLIcVb4957M0J5eRI2SxV7JmXB 8AKc2JoCmlEuciyoaP00u+0i8I82++UK0brE7DlZpGT5n2H98fgXuefnKnmLdpIjGLf2 ogHihek1O9sE28KVY0RZo3MHOd579WaAV3YvDtE4mWwSeVZlGWBwfb/RpEfGQPe9bTt9 YXyrAnknld40OyKJOlJ7/kdnA6GzTca79/7D6edu6l1YjeC5WEuv52ZwJ2mWlfKjRyKw kt1Mxix13iuv5OGyL2Qw3f+LbggCB6SmFD75c0cHzReQj2E5ZgjTLJH0zo7shyGNOM9s 5/wQ== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=meAnyIlbPWHFxhhF9/8ymajQae4ltQyN64Lq5Wew2w4=; b=NySYeK/XJFXICPwkdLtzc3ldCcENhlVm4ViduI6FoGLiFd1hiebh847VTxmiKakQ85 dk7rCZhNGXQOk2nyagUxHaMCApukSxMbF9VQMjHesWvTRBvG0YCEFzoRqjMYnCiaRwUn 01LYVQiWvPom6Kjyr+rHm5xm8EFiAkFZp9x0Vps1ewMlukTVN8rEvB/eT8w69zanCHOs qcdG0PZFHppKQMnsu/BXAxkux+rGc5CthPFcRsKJ87uf9k2AI++uDAguN+jB0tOEaVHw NxyeOZUKEfgZtKoLV8mwHuXdnYB3IG0E9mt21bEOUDB6Mbvokzl7S7k0Cwgiv3FoEb2V f2jQ== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=ZzUoKdqS; arc=pass (i=2 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of isar-users+bncbc44vtvy2uerbbmm6saqmgqe7utovhq@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBC44VTVY2UERBBMM6SAQMGQE7UTOVHQ@googlegroups.com; dmarc=fail (p=NONE sp=NONE dis=NONE arc=pass) header.from=siemens.com Received: from mail-sor-f55.google.com (mail-sor-f55.google.com. [209.85.220.55]) by mx.google.com with SMTPS id y9sor7136199ljc.77.2021.03.01.07.19.34 (Google Transport Security); Mon, 01 Mar 2021 07:19:34 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbc44vtvy2uerbbmm6saqmgqe7utovhq@googlegroups.com designates 209.85.220.55 as permitted sender) client-ip=209.85.220.55; Authentication-Results: mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=ZzUoKdqS; arc=pass (i=2 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of isar-users+bncbc44vtvy2uerbbmm6saqmgqe7utovhq@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBC44VTVY2UERBBMM6SAQMGQE7UTOVHQ@googlegroups.com; dmarc=fail (p=NONE sp=NONE dis=NONE arc=pass) header.from=siemens.com ARC-Seal: i=2; a=rsa-sha256; t=1614611974; cv=pass; d=google.com; s=arc-20160816; b=vRoiyB1P9E6+sCgQPmErZQX0U+yQcqMkCHToe7BlVuW3dVjgz2NwY4RAweJMOrSvW/ Noy0NnV2ZPHMroTpF46WidgymHYS5XsR1JGhQifZWGeEyXFU7qu37rXvrYNdude7P0t8 SjZLjgKiobs6rtVml/N0I1kKN1Vbow5lsAxZheBDSAheUMtIK7iSL2yn0WNCd79qXxqh lqUhawQakJpZz9ujkZhWX8EJsOHNS0+Jv+JFZ5o0dWD3hqrcEUIRjSz7HCotPM7mIfo3 Bf38nZENf1+sPdnELSHEq2jKr0p+Xv6xNW1mYgqY2kSVl4j/NqKVB8UJi9srOZ6Syt6c uqZw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=meAnyIlbPWHFxhhF9/8ymajQae4ltQyN64Lq5Wew2w4=; b=p4JeBiiTKnLLUrZVtMemB1dCKk+T3TN79BK6G1G+jkN6o0eJZ+1MsSfc49xSN8L+N+ sEOp7jjXe2CEAOIVDi+GSMa9o0VopmORhN3A0JUdD+11/kvjuFOFwMGM2RZgsqsy8RLp jeIcUQLF72x39pceYoi3hUQf8gZjkiie7zFMkfMIEv2q40ZCxj8corjs8MKc5NCMV+/z KM4DQ0xfuLgCXx4iHjoPXYDEaHlJPWCE/pgYWbAvMOk2CR/Kp7Uh0ouKVGPCh9s92QVq EeoiMRQVMdXiGgBdhiyH2zycVy7YrvrfGwb2ZYNv+wwUfL6mO9QGm+HQ4l5IHsFmi2uA 17OQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of florian.bezdeka@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=florian.bezdeka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=meAnyIlbPWHFxhhF9/8ymajQae4ltQyN64Lq5Wew2w4=; b=ZzUoKdqSoshY4o1b5Xs41OU+ojkXAhgGvOapBkLQ2vwkvQ0MtXq3UsNsibM7tGwJIh WDxLBUAB7VHWu/63rZ9UTqSK6e4CnJayLQ1YdeWeEPmI3d4i0laNm+6BBa+UgIZbVIs/ 9Ph33JpE5qQ/GSVALkN6GkqVy2mIYuLEG+gMDTW07l+5aQFsUsioNRDVwTrViVnUbAyQ S8lkiezx8FnSfhU0UVd5LfNE+ZfpsVtlyNWRk8NqFY4HiQpovuZbamV16kXJDmFOESC1 7yvvQECch805XGsYegCUftnlwtfZH2E405kNM1DQQ2+SIA3PlT7mTFxNkBP0rJNCJjem 4jEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=meAnyIlbPWHFxhhF9/8ymajQae4ltQyN64Lq5Wew2w4=; b=KrvbHBKrV47s1uHXMg7ofdunb6w929flCH7FEsk3c3NBmZ9NQtqg7nkn4oQPav2ko1 KOJm98sfYsxS7QWPM3DBxaBQax3Ae8rDk6pY8QNWJoeVMhgvj+vBFCpDAAaLi4FS2gYM 5DC9yqguuOCStqnAaHOJyRXAvB5bw2lzeaQe0QVgjU4zyaCvgx3dZ+h9czXKZ+Wip8Og 2Sw2eKDK8FMr4rhNFZEaJfK4RTqWZw0GrbhZa8pQQS8vmSh5XMbH3Mk7ksyg0/bhaf0S zLxWE/+XCNrPudGNYWWK02gVzjyDmfOjdoEKHtujmWhlk0OV0nFIVhjX4Lr0koxMe1rQ sEMw== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM533mDTItWOMwFAHwW6AYSI0iSVIYBdpgO1aThvpfwMgms33+eL7h 57EfgjKCyWfrq3jltsHlJpc= X-Google-Smtp-Source: ABdhPJz0K5/jZhEje8O6MSWuRKkcHleCc+E8K4jRhugcwdFEn5UBISvsBuFuAr2cefG38qe5/4o7uw== X-Received: by 2002:a2e:d11:: with SMTP id 17mr9897360ljn.295.1614611974081; Mon, 01 Mar 2021 07:19:34 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:bc11:: with SMTP id b17ls2867800ljf.7.gmail; Mon, 01 Mar 2021 07:19:33 -0800 (PST) X-Received: by 2002:a2e:3308:: with SMTP id d8mr476463ljc.100.1614611973150; Mon, 01 Mar 2021 07:19:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614611973; cv=none; d=google.com; s=arc-20160816; b=OAhVdeqaNbMYfEFpVJnZBLoieremTna/MptkzxwFOFV6zVx/cQ/7nnkpvG6UV8FfqW MXFB9zE760Rtb+GemLiB4zByt2ugDzYIDHPfC/dPl/E3upMH5wdIURj4BggHGDAqfz8b wIUtoTfb3CTcVy5k5cKlB0q7cfG9HczqtYKKsPIXxq3IMD8qQaX13tMEtnlLVl/N2bAE Xlu5NVo0M1xdYFCO3uHmUlFUWt2Vy8W2Z6ZWyvunIP4MUnyr7J7JqVXZZlHDdbN59IVC 8WxtfUuITcymMPV/ZDRvb56tnUczKnhvSQ17evZ0uD9G1hajU+f2ntKQSeDzIfp98lNV /+ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=Fk2zx2Jp/LK9D20ffZmb3HN3ygZtvpJRT04WuhP8ASs=; b=wxkID85CYVmHCiQp9VJNZS5McSJ7CpTW7ALsvjUXPEvsL0XEoIvOVAArWFfMNGYYF5 9YJ+PHn4ZNSUm2TT55hBKsWwaZRPe1M1s+6TwrIN5VZTKgfa7+tx5IvNVZp4agK/OeGT Kx/hXOLOO+/cXe52O4Z2WGtwi1NXD1VTL5omMXxj+bLigtZLrj+K/bcMU5HMTOYn7cO0 u335U1clmgXChY8/gSn0CNq3PMGM7Ys8AdjmxruL4aGjTVX8BDULMtnOWDMXC2sCqjDN llU1kb0CYNKWX64cJspXfJj+9RCCqiIXH96eBtb0lBtrXFFRTumQNYcQs406xmdKSa9e qgdA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of florian.bezdeka@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=florian.bezdeka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from david.siemens.de (david.siemens.de. [192.35.17.14]) by gmr-mx.google.com with ESMTPS id a17si432425ljq.5.2021.03.01.07.19.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Mar 2021 07:19:33 -0800 (PST) Received-SPF: pass (google.com: domain of florian.bezdeka@siemens.com designates 192.35.17.14 as permitted sender) client-ip=192.35.17.14; Received: from mail1.siemens.de (mail1.siemens.de [139.23.33.14]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id 121FJWYq027802 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 1 Mar 2021 16:19:32 +0100 Received: from md2st94c.bbg.bezdeka.de ([167.87.0.232]) by mail1.siemens.de (8.15.2/8.15.2) with ESMTP id 121FJVUT023372; Mon, 1 Mar 2021 16:19:32 +0100 From: Florian Bezdeka To: isar-users@googlegroups.com Cc: henning.schild@siemens.com, jan.kiszka@siemens.com, ibr@radix50.net, Florian Bezdeka Subject: [PATCH] wic: Warn if an ext filesystem affected by the Y2038 problem is used Date: Mon, 1 Mar 2021 16:18:23 +0100 Message-Id: <20210301151823.64574-1-florian.bezdeka@siemens.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210217115643.GD20742@yssyq.m.ilbers.de> References: <20210217115643.GD20742@yssyq.m.ilbers.de> MIME-Version: 1.0 X-Original-Sender: florian.bezdeka@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of florian.bezdeka@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=florian.bezdeka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1693043365971918184?= X-GMAIL-MSGID: =?utf-8?q?1693043365971918184?= This is the backport for upstream (openembedded-core) eecbe6255584 ("wic: Warn if an ext filesystem affected by the Y2038 problem is used") We are getting closer and closer to the year 2038 where the 32 bit time_t overflow will happen. While products (= embedded systems) with an expected life time of 15 years are still save the situation may change if your system has to survive the next 20 years. ext2 and ext3 filesystems are always affected by the time overflow, so let's warn the user if these filesystems are still being used. If ext4 is affected depends on the inode size chosen during filesystem creation. At least 256 bytes are necessary to be safe. As ext4 is used very often (and partitions may be created small first and extended later) this might be an issue for many users. Signed-off-by: Florian Bezdeka --- scripts/lib/wic/misc.py | 1 + scripts/lib/wic/partition.py | 15 +++++++-------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/lib/wic/misc.py b/scripts/lib/wic/misc.py index 4b08d64..c4332d5 100644 --- a/scripts/lib/wic/misc.py +++ b/scripts/lib/wic/misc.py @@ -26,6 +26,7 @@ logger = logging.getLogger('wic') # executable -> recipe pairs for exec_native_cmd NATIVE_RECIPES = {"bmaptool": "bmap-tools", + "dumpe2fs": "e2fsprogs", "grub-mkimage": "grub-efi", "isohybrid": "syslinux", "mcopy": "mtools", diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py index 4a5a31e..e6bcc9e 100644 --- a/scripts/lib/wic/partition.py +++ b/scripts/lib/wic/partition.py @@ -432,26 +432,25 @@ class Partition(): if part.mountpoint: args = [part.fstype, "mounted at %s" % part.mountpoint] elif part.label: - args = [part.fstype, "labeled %s" % part.label] + args = [part.fstype, "labeled '%s'" % part.label] elif part.part_name: - args = [part.fstype, "in partition %s" % part.part_name] + args = [part.fstype, "in partition '%s'" % part.part_name] else: - args = [part.fstype, ""] + args = [part.fstype, "in partition %s" % part.num] return err.format(*args) - ret, out = exec_native_cmd("dumpe2fs %s" % rootfs, native_sysroot) - # ext2 and ext3 are always affected by the Y2038 problem if self.fstype in ["ext2", "ext3"]: logger.warn(get_err_str(self)) return + ret, out = exec_native_cmd("dumpe2fs %s" % rootfs, native_sysroot) + # if ext4 is affected by the Y2038 problem depends on the inode size - # Remember: inode size depends on the file system size for line in out.splitlines(): if line.startswith("Inode size:"): size = int(line.split(":")[1].strip()) if size < 256: - logger.warn("%s Inodes (of size %d) are too small." % \ + logger.warn("%s Inodes (of size %d) are too small." % (get_err_str(self), size)) - break \ No newline at end of file + break