From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6924371667242188800 X-Received: by 2002:a19:8805:: with SMTP id k5mr8802760lfd.567.1612205912021; Mon, 01 Feb 2021 10:58:32 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:bc11:: with SMTP id b17ls3332169ljf.7.gmail; Mon, 01 Feb 2021 10:58:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJx8ySOhXwEZx7J9TZaCxbNXkGUg2inBK0xEs3msS4+l393SOGc71sa6jWL93f+gyM2zIOCx X-Received: by 2002:a2e:9dc6:: with SMTP id x6mr10627943ljj.133.1612205910860; Mon, 01 Feb 2021 10:58:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1612205910; cv=pass; d=google.com; s=arc-20160816; b=mBe2uwdCoQAOiKRuvOS9xY+0v5PDZiJ+pTyO/dxJzqjrBhYd0YUSu6SJG5rlJV5VEn 6jpbUKe9Jm90ES9GdBMwnFP4QdcItPW7zaUJl3CQ49iNTUPfmF9uKp35ZaLqA5xpQZR3 pzDwZgvDhsrPHiEXZb3XH72VC9yVmVAEpffNlO0SYYjrSmKEjdTbT1/Jt5uwtk1Yc/Tc ww+iFhrKo54h+6TPEf7dvfaTbv58TA/jWAme6bxnpTjuYNBmK/Vyt1KtFj8VQfa6wSVj bGCTBCvOSn8DmkBzE8+xmbhExTotd6wtDKuvuA5zFhgVCSy7FAPRVkOFcKAjnd3hih10 dXQw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:content-transfer-encoding:content-language :accept-language:message-id:date:thread-index:thread-topic:subject :cc:to:from:dkim-signature; bh=ovcoXXNdW0nMilQFxwcOVkEs+XQrRos87EiJQWyTOk0=; b=hNpC4dghyrboeKdsNANq7LCQk8NdWboArUt+c7elxqsROvusVstAATT1+Cf4LnfUsf km/be+tnwkr8choksUJPweQ+cprzFcWR7qqeyv3o1cnptn0wvgZO1lqL8FrFrDhJKCju ZxQcyYgvETOOAOxEV00R8vxcAwnJ0sTrmKY41S59T4bqYB+PVJJf0ou/tvMRQMeZGgMY hIm4wM4vy50ojCJHRj6vbJHFZG4UpdTvCRk+ctK2nc2z92er//eGc/fzteJrRIzcdyED UFBwqgT7ZD8qDJWydGXwSxDvc+rQVx4hT0oNCzCcUTa6skZQJjtcYNf3HbuPIy0uy0bb d6qw== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.onmicrosoft.com header.s=selector1-siemens-onmicrosoft-com header.b=nowPk8Us; arc=pass (i=1 spf=pass spfdomain=siemens.com dkim=pass dkdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of florian.bezdeka@siemens.com designates 40.107.7.57 as permitted sender) smtp.mailfrom=florian.bezdeka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70057.outbound.protection.outlook.com. [40.107.7.57]) by gmr-mx.google.com with ESMTPS id d25si1046536lji.8.2021.02.01.10.58.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Feb 2021 10:58:30 -0800 (PST) Received-SPF: pass (google.com: domain of florian.bezdeka@siemens.com designates 40.107.7.57 as permitted sender) client-ip=40.107.7.57; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.onmicrosoft.com header.s=selector1-siemens-onmicrosoft-com header.b=nowPk8Us; arc=pass (i=1 spf=pass spfdomain=siemens.com dkim=pass dkdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of florian.bezdeka@siemens.com designates 40.107.7.57 as permitted sender) smtp.mailfrom=florian.bezdeka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a+PE1PMqAkLROjf7+B9Q8KTKgjor40HT9wddWt5sSZDfN4D2ZRYbDHHg719shEorCzyqKak4sUofVk7jN8u+4NsHcGUr/LpoY74bKbIkFIMcxYR8/6Biwv5i8Slb/TLBk9q1fWftKjUwPIWXiM3P3qEPYlkn8OjOvsSh0M4TbQYjnDsYSGC6wc73eFeNaMngrJFbu2Jj2t4jTKIym3NcwkbTw707MmBpQbBrgw9W8bi8o9zhMENk55YcnGjXIq7YaneAzmJsQ8fVK5DkKsCzQfQPtIoeLQK2gFO5dodSxRWtLOesbauOkkMx6OqvLE3jJ/haLsszYUhAQQFiYzek3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ovcoXXNdW0nMilQFxwcOVkEs+XQrRos87EiJQWyTOk0=; b=Z8SSR+Kb7bmsY49aXBsCp2nNAQGC7cdnguOa5+UU/nerGJvcyS2KY3Z23slMdzOlxxQbcVxE8VP0I2QcKNQC3dsxNw6NC6K9puQ5+sfHq4enJdHDuWvgUbxws0AiUHqMq2TfsurpYOe6T1c+5qjs4ka6dajVnWdcNetrKY3xyrItYohPDVKpJyfU3ksd0XoNRdYdF3Y+gdkCzExWu3A/Jzx8tSHFI5LE2gMNoLOCR8Wlb9ILc7N9k3u6W0oRSE4dJLpJvfPI1pULsFAJOV41R3ELtTxcy9iLnmUfF0QAUirJdpNP+Ny9jCqgyHOpDLbL0DZoIAWdoHFNZIVsbBKbLA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=siemens.com; dmarc=pass action=none header.from=siemens.com; dkim=pass header.d=siemens.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=siemens.onmicrosoft.com; s=selector1-siemens-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ovcoXXNdW0nMilQFxwcOVkEs+XQrRos87EiJQWyTOk0=; b=nowPk8UsEADypyrFzkCfmQoxpquPVd4xqrRsdM4Bu3w1xrIf8zFe2Tzo04mFBQBamLDnB+7xHqhqyqm3D/g60+YWb8jAHA9JxAWZart1l7SnFitlhSE9PE3S/CkaZGa3M1EMX/8Y8NPLQ5OTO5xTO4kFUQ4GxMXiraiiYVpvWMU= Received: from AM0PR10MB1906.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:49::10) by AM0PR10MB2004.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:46::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3805.17; Mon, 1 Feb 2021 18:58:20 +0000 Received: from AM0PR10MB1906.EURPRD10.PROD.OUTLOOK.COM ([fe80::dc9b:2590:a1cf:3301]) by AM0PR10MB1906.EURPRD10.PROD.OUTLOOK.COM ([fe80::dc9b:2590:a1cf:3301%7]) with mapi id 15.20.3805.025; Mon, 1 Feb 2021 18:58:20 +0000 From: "florian.bezdeka@siemens.com" To: "isar-users@googlegroups.com" CC: "henning.schild@siemens.com" , "quirin.gylstorff@siemens.com" , "jan.kiszka@siemens.com" , "florian.bezdeka@siemens.com" Subject: [RFC PATCH 0/2] wic: warn on usage of Y2038 affected file systems Thread-Topic: [RFC PATCH 0/2] wic: warn on usage of Y2038 affected file systems Thread-Index: AQHW+Mw1tCfK99wuFEmzCoMdASoRpA== Date: Mon, 1 Feb 2021 18:58:20 +0000 Message-ID: <20210201185815.382326-1-florian.bezdeka@siemens.com> Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.29.2 authentication-results: googlegroups.com; dkim=none (message not signed) header.d=none;googlegroups.com; dmarc=none action=none header.from=siemens.com; x-originating-ip: [178.27.123.43] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 2ce7f34f-a203-479f-3df4-08d8c6e357c1 x-ms-traffictypediagnostic: AM0PR10MB2004: x-ld-processed: 38ae3bcd-9579-4fd4-adda-b42e1495d55a,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 5DA9CdoSPSATOONuIFIqoxhcCprHqcPVMIJt54y5lyMr7big85j63OBrEAbDgaZA5qaR+WbZjT5z2jfTuWCo7SQuC99Ed4rYKel46YhoOCJzp8zUDLlKdiAfF+1HJJdlPjaw5NMBfAnm2ufvk1CIZxGrFkaGn5DgkJWD0k420yrRPB12q+Y7JSYPxSLT2UNPFRuKKlOFH20ZTxmOqDtcdLTd75y+Cg0YSGb2C8OdyothSY/djbPfGvHWkeA7VhobnASCyim0DDCNLeGw7yyJXqRwbOdFQIRTIf5/mB5A88opX75/9AXjrGflTWXxCMwi242NrCWpnb11v1nM7gDjwZtR6XgEXE+dtHXsAbYfea/aVsB8kOanQJaV+QzogUzZkgcSek/ATpRxA+KeNh8O5yw3eZyMh8k3VXaH0drUtIcsNTUvXP9Gn4g5ZRrc+PXl4oRcFmEo4bCioCDLwFNr4enF279kdckg84XD7C+LZO1fTQjykhuiXexhOUQmbMhKw66lA+9cU925PBUqsO0Ulg== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR10MB1906.EURPRD10.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(4636009)(346002)(39860400002)(376002)(136003)(366004)(396003)(6916009)(26005)(4326008)(1076003)(91956017)(6512007)(5660300002)(478600001)(2616005)(64756008)(86362001)(8936002)(71200400001)(2906002)(6486002)(36756003)(66556008)(66476007)(4743002)(83380400001)(107886003)(8676002)(66946007)(6506007)(186003)(76116006)(54906003)(316002)(66446008);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata: =?iso-8859-1?Q?PnyolWSpDEszDQKo7Lbt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YWHEr5GIf0GjyG6/gvuVuz3J9T8aU9Git5uUCYV283b9nRB7x/b2TxnIW9?= =?iso-8859-1?Q?n5Blpjym2afgf72ThI+wo8nh2+wI6P/b3WGQWVzP+IywH6zFXdy9WzFVG9?= =?iso-8859-1?Q?mVe8OZAvhbneKp8qikwhHyMB6XGvhk6mVQ4+c7/8L2cjeF1P6RihabSLYp?= =?iso-8859-1?Q?m/ogrbX63Dqhigmly+ZMDVw070KUj/rprmWYldKyOs8w/eVspW9Q0hBX2W?= =?iso-8859-1?Q?U0NrjfMw=3D=3D?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: siemens.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM0PR10MB1906.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 2ce7f34f-a203-479f-3df4-08d8c6e357c1 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Feb 2021 18:58:20.3793 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 38ae3bcd-9579-4fd4-adda-b42e1495d55a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: VoTXL3CHEnEdYapjKuWYF29bq6yPegPDuS51X5G6z82SsLhgOoHzy3Z97QP8OaYWzg5mhGozEjNCmICE9X6SUYTplnZfMs9fwpakq6TW9sY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR10MB2004 X-TUID: IXhJlB8mHg6Q From: Florian Bezdeka Hi ISAR developers, this series is the summary of a nice journey through the file system jungle regarding Y2038 problem. It all began with a warning which is reported by kernels >=3D 5.4: ext4 filesystem being mounted at (mountpoint) supports timestamps until 2038 (0x7fffffff) I guess that most ISAR layers are using the Debian kernels, so that warning was not recognized yet or at least not very often. When reading this warning I was surprised. Shouldn't a modern file system like ext4 be Y2038-safe? As it turned out it depends on the inode size if an ext4 file system is safe or not. So why was the inode size not sufficient in my case? The inode size is chosen during file system generation and depends on the size of the file system that is going to be created. For details let's have a look at `man mke2fs`: -T usage-type[,...] Specify how the filesystem is going to be used, so that mke2fs can choose optimal filesystem parameters for that use. The usage types that are supported are defined in the configuration file /etc/mke2fs.conf. The user may specify one or more usage types using a comma separated list. If this option is is not specified, mke2fs will pick a single default usage type based on the size of the filesystem to be created. If the filesystem size is less than 3 megabytes, mke2fs will use the filesystem type floppy. If the filesystem size is greater than or equal to 3 but less than 512 megabytes, mke2fs(8) will use the filesystem type small. The relevant parts from /etc/mke2fs.conf: [fs_types] ... small =3D { blocksize =3D 1024 inode_size =3D 128 inode_ratio =3D 4096 } ... So whenever you create an ext4 file system with less than 512MB in size you will end up with 128 byte inodes and your file system is not Y2038-safe. The ISAR part: ext4 may often be used in combination with the expand-on-first-boot recipe / feature. So whenever creating a small partition (e.g. inside a wic file) and extending it later may result in a Y2038 affected ext4 file system. That is exactly what happened to me and I would like to make sure that all other ISAR users are aware of this situation. Valid workarounds found so far: - Tell wic that an partition will grow: Add `--mkfs-extraopts "-T ext4"` to your wic partition definition - Set the inode size to 256 (for small ext4 partitions) Add `--mkfs-extraopts "-I 256"` to your wic partition definition The upstream part: None of the following patches has been sent to any upstream (OE) mailing lists yet but hopefully that will happen soon. So far: Any comments welcome! Best regards, Florian Florian Bezdeka (2): wic-img: Forward warnings from wic to bitbake wic: Warn if an ext filesystem affected by the Y2038 problem is used meta/classes/wic-img.bbclass | 20 ++++++++++++++----- scripts/lib/wic/partition.py | 38 ++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 5 deletions(-) --=20 2.29.2