From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6924371667242188800 X-Received: by 2002:a19:c7d7:: with SMTP id x206mr6415773lff.403.1614619366409; Mon, 01 Mar 2021 09:22:46 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:8503:: with SMTP id j3ls618379lji.6.gmail; Mon, 01 Mar 2021 09:22:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJzr3z686Y71Ok8VB3isCD80Yzy8FbFvpfRWLsN/16zXniI+xcKILnPRlUVVhp2nM3wUpO9v X-Received: by 2002:a2e:3614:: with SMTP id d20mr9813520lja.509.1614619365249; Mon, 01 Mar 2021 09:22:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614619365; cv=none; d=google.com; s=arc-20160816; b=nBvKB+poFNh7SFpxag1fZYcA7QQJyo/UxT1EtSWWuCsRTZY0naY/Je76bBIhCQJLvl yt/cmsan22VPCY6ebZ7haRRIfrZEZk5EYADfomHX6/UdO01aMnmRQoM8E0J+j1+yDhCs XjV1u/Vr5GFsxphMaB1DO2i53BE+V6l53ZwicmSU9K13exW9VtCaE1kqRIJ4ykhPxZWU Cx8W3cp7HFrvChGgo6jN0HhmY4EXzxuKmwxOfDRPpdHVVbf9u27uvjPq8UGQ3tv1bXgv 50nr0BVymQkSU55dUI/ktv5Im6vrhNcv8T2OTN75lcKi9jUy4DCf4fYbzZdA9vdS9K1J Ze8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject; bh=2wajyZ8xkm4OJLe9DqocSqgjWWDQPigHHDrRENAQpyY=; b=l8CTek41q+E1v7VCyTjYKJhhi+rnD40GQV77PCnPeRwdtUkRIwuyF/5OW0v6vInsqb WPWrYwh61js2PsfN92DgIu/GVKv+JOFJ+uVsurcFIYaRHTyNh78jRD64hiJHxKq5Hztl 8QBjuqUU3jOZeJyZ5xTiCgLnGMqnW2+RcMiIq36EzXwIessjGFugUc/dEmtmZFZo4IDF oDEYG0/uim7YukYbz04jZJ5mCELOBUWTUGvL6lEIIYc3tBn8DHsO1hER/Huza9/l3lFn 1f9hq/horEwxmgGK5HCE7Fw3zQZsLxu+C3gF0au+LVXAp3BRtb0J0xQwbj8KBeqPaGet siGA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from gecko.sbs.de (gecko.sbs.de. [194.138.37.40]) by gmr-mx.google.com with ESMTPS id t21si500418lfe.3.2021.03.01.09.22.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Mar 2021 09:22:45 -0800 (PST) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.40 as permitted sender) client-ip=194.138.37.40; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by gecko.sbs.de (8.15.2/8.15.2) with ESMTPS id 121HMil8014966 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 1 Mar 2021 18:22:44 +0100 Received: from [167.87.94.143] ([167.87.94.143]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 121HMhvP012251; Mon, 1 Mar 2021 18:22:44 +0100 Subject: Re: [PATCH] wic: Warn if an ext filesystem affected by the Y2038 problem is used To: Florian Bezdeka , isar-users@googlegroups.com Cc: henning.schild@siemens.com, ibr@radix50.net References: <20210217115643.GD20742@yssyq.m.ilbers.de> <20210301151823.64574-1-florian.bezdeka@siemens.com> From: Jan Kiszka Message-ID: <581c68ac-3b56-206a-9898-7b7a21871ac1@siemens.com> Date: Mon, 1 Mar 2021 18:22:43 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <20210301151823.64574-1-florian.bezdeka@siemens.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: 7L2FmfdCAzCF On 01.03.21 16:18, Florian Bezdeka wrote: > This is the backport for upstream (openembedded-core) > eecbe6255584 ("wic: Warn if an ext filesystem affected by the Y2038 problem is used") > We need to sync to a specific commit of upstream, rather than expanding the fork. Jan > 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 > -- Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux