From mboxrd@z Thu Jan 1 00:00:00 1970 From: Colin Ian King Subject: Re: [PATCH] ovl: create UUIDs for file systems that do not set the superblock UUID Date: Thu, 7 Nov 2019 08:45:55 +0000 Message-ID: <02adb5f3-10be-1827-f48b-b621bd61783a@canonical.com> References: <20191106234301.283006-1-colin.king@canonical.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: Amir Goldstein Cc: Miklos Szeredi , overlayfs , kernel-janitors@vger.kernel.org, linux-kernel List-Id: linux-unionfs@vger.kernel.org On 07/11/2019 07:08, Amir Goldstein wrote: > On Thu, Nov 7, 2019 at 1:43 AM Colin King wrote: >> >> From: Colin Ian King >> >> Some file systems such as squashfs do not set the UUID in the >> superblock resulting in a zero'd UUID. In cases were two or more >> of these file systems are overlayed on the lower layer we can hit >> overlay corruption issues because identical zero'd overlayfs UUIDs >> are impossible to differentiate between. This can be fixed by >> creating an overlayfs UUID based on the file system from the >> superblock s_magic and s_dev fields. (This currently seems like >> enough information to be able create a UUID, but the could be >> scope to use other super block fields such as the pointer s_fs_info >> but may need some obfuscation). >> > > The fix is incorrent. uuid stored in xattr needs to have persistent properties. > In the use case that you describe, the origin file handle should simply be > ignored. > > Please test attached patch. Thanks for the patch. Tested, and the error still occurs: [ 163.959633] overlayfs: invalid origin (etc/.pwd.lock, ftype=8000, origin ftype=4000). Colin > > Thanks, > Amir. > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Colin Ian King Date: Thu, 07 Nov 2019 08:45:55 +0000 Subject: Re: [PATCH] ovl: create UUIDs for file systems that do not set the superblock UUID Message-Id: <02adb5f3-10be-1827-f48b-b621bd61783a@canonical.com> List-Id: References: <20191106234301.283006-1-colin.king@canonical.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable To: Amir Goldstein Cc: Miklos Szeredi , overlayfs , kernel-janitors@vger.kernel.org, linux-kernel On 07/11/2019 07:08, Amir Goldstein wrote: > On Thu, Nov 7, 2019 at 1:43 AM Colin King wrot= e: >> >> From: Colin Ian King >> >> Some file systems such as squashfs do not set the UUID in the >> superblock resulting in a zero'd UUID. In cases were two or more >> of these file systems are overlayed on the lower layer we can hit >> overlay corruption issues because identical zero'd overlayfs UUIDs >> are impossible to differentiate between. This can be fixed by >> creating an overlayfs UUID based on the file system from the >> superblock s_magic and s_dev fields. (This currently seems like >> enough information to be able create a UUID, but the could be >> scope to use other super block fields such as the pointer s_fs_info >> but may need some obfuscation). >> >=20 > The fix is incorrent. uuid stored in xattr needs to have persistent prope= rties. > In the use case that you describe, the origin file handle should simply be > ignored. >=20 > Please test attached patch. Thanks for the patch. Tested, and the error still occurs: [ 163.959633] overlayfs: invalid origin (etc/.pwd.lock, ftype=8000, origin ftype@00). Colin >=20 > Thanks, > Amir. >=20