Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3240077imu; Sat, 24 Nov 2018 00:51:26 -0800 (PST) X-Google-Smtp-Source: AJdET5d1W5NyK4iSCQxgSxg8ZQSVCFVJR6gorNU1yl+7HJLafjdYPiEK7EmSOxV42nCRVsKF5RDO X-Received: by 2002:aa7:804e:: with SMTP id y14-v6mr19036410pfm.73.1543049486918; Sat, 24 Nov 2018 00:51:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543049486; cv=none; d=google.com; s=arc-20160816; b=NrqQR9hyyMDjBrYcXW3Dw8r5B9g5WZkUPGKi1OBJx4tDZXcPBVPBL8eJwFkHUPugRJ 4MGSxh3YdYv+Se4Sj3xaNIr/BqdxMN2iKBuX7F6C+9UiSpggA0yxsNN0cEG3YD0an6RS IS9Yzw0ANDbM6wzmWVadvcMpmWIUDuQzZNXKwDAuPx61lgBVSUt0BHZ3LbU4UWwqMK8Y GMy8Q1LnatJEcstgc9VQeACkhWLUrVwKnMbhQK/PTVkHTkWUZkjDy4BkOloPWfsKS3Bj ZnM5mfLFPMCyAU0H/YK6HEwVe2yYQ0Hqa/Sya9Y8vPI6X50rFu7efabm2H2w8KDHYyav j0KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=0ztVUjuR029DPuq6x1COYKxRhgpBTvFYUQJdXiWMSsY=; b=ozKlhAMhxWzBlFmbfsSBFn0NAQwqRnmIN/3U1cLeKrbMwNn87189mjXiqrnzcp4FxP eQywGybrjO1neG2eY0Q48BrL+cnhzcgRuWLMSe06gNKw011lVEk8SM32tynHb9+ooXGN ZnrqHO67LPTHXAA4NSHV7uxHoRSttBc7pKDCAM+6rstyoX/+pakbgnwo0GILcd68bPY7 73ii9e/d2qsCB+xESu2v8Ci+vufNrS8y6NI53h0xaH8gCASZElFCdpGKGPgKUqpa1KHE Kzhhj+p9N4it+XlUkLpawNSmDwYX+YerWyYMA/y1rvJMucW4SVeHtjbdeSQonT/1R8id E2aQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@landley-net.20150623.gappssmtp.com header.s=20150623 header.b=QHg+1Glv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q18si39912801pls.30.2018.11.24.00.51.12; Sat, 24 Nov 2018 00:51:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@landley-net.20150623.gappssmtp.com header.s=20150623 header.b=QHg+1Glv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2441457AbeKXHHX (ORCPT + 99 others); Sat, 24 Nov 2018 02:07:23 -0500 Received: from mail-it1-f195.google.com ([209.85.166.195]:39073 "EHLO mail-it1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727635AbeKXHHX (ORCPT ); Sat, 24 Nov 2018 02:07:23 -0500 Received: by mail-it1-f195.google.com with SMTP id m15so19445976itl.4 for ; Fri, 23 Nov 2018 12:21:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=landley-net.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=0ztVUjuR029DPuq6x1COYKxRhgpBTvFYUQJdXiWMSsY=; b=QHg+1Glvk7KVsuJp7mdds9RnOMm9MUE5lHaigz6dVIESzE+lM0ulpzN3RurgPx8/ii oltlMRx9XnrOFFyipqW1iqq/3+l34wHxJO68tYHKDe0K6Frvg7OJRLQaH+bVOaBu3qeG 2TAkwyR4ial7zcNN7GOeFafLky+ns+WP6SCDLsqNIw30P0RDH+uSbot5WHNOp6CEtyA8 vDBb+VRd89QGXGkVklJ7euvqXEkxuiq6cEwlEK/GSJsQP1Bxfq0Y10/FyXafr6gbOoRY eFPPJVr/cDdevfu/HtrkDV4AHnJzUtCnCiCkNjZC52JaHoJ/rS9Fd+K2qMhfJ0QHdXGz 7AgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=0ztVUjuR029DPuq6x1COYKxRhgpBTvFYUQJdXiWMSsY=; b=k+VhrPN++3hlOvo4ksVg8Da3LB0Jpw2FXqgGQBZdmTgLuClMCQh95CJzY6argqB+4g 4PGNvLzNQcc4dRJHs0ttcBblrKU4BW1v9/mgQ0gyzXZicKgNwqvmkL+4Y5D0FOlawZsy Erm5+14b08J/niqVzDGzkte/ViWbI/zyyljDOB0KGMr/r4hXmYHQbzX9avOafDVSNkVk 9ayBvOX5YGmRd+ku9H9Az91mQ+w2G7ojuhvYHT3focT9VUyY59t7KKAhlPMWHXceaRMQ 2bAsYo7JFVxq9VLFc5gdlbB7+sCqVvzapSBrLdC8SHxhisTM6wi8ZJ3wgCw2+en8cM77 8mUw== X-Gm-Message-State: AA+aEWY1FwdZrZQxf981Qngg6pQ6BUqRX1uJ0PVcXOidnL/IG+Rs8ZmQ xScmn8Z0xQE8MyiGG0HqzOSaPg== X-Received: by 2002:a24:76d0:: with SMTP id z199mr3048319itb.165.1543004496721; Fri, 23 Nov 2018 12:21:36 -0800 (PST) Received: from [192.168.5.201] (96-67-187-70-static.hfc.comcastbusiness.net. [96.67.187.70]) by smtp.googlemail.com with ESMTPSA id s13sm6521238ioj.71.2018.11.23.12.21.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Nov 2018 12:21:35 -0800 (PST) Subject: Re: [RFC][PATCH] fs: set xattrs in initramfs from regular files To: Roberto Sassu , viro@zeniv.linux.org.uk Cc: linux-fsdevel@vger.kernel.org, linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, initramfs@vger.kernel.org, linux-kernel@vger.kernel.org, zohar@linux.ibm.com, silviu.vlasceanu@huawei.com, dmitry.kasatkin@huawei.com, takondra@cisco.com, kamensky@cisco.com, hpa@zytor.com, arnd@arndb.de, james.w.mcmechan@gmail.com References: <20181122154942.18262-1-roberto.sassu@huawei.com> From: Rob Landley Message-ID: <7f2b0288-a173-e2bb-70ee-d552610bfc1e@landley.net> Date: Fri, 23 Nov 2018 14:21:34 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20181122154942.18262-1-roberto.sassu@huawei.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/22/18 9:49 AM, Roberto Sassu wrote: > Although rootfs (tmpfs) supports xattrs, they are not set due to the > limitation of the cpio format. A new format called 'newcx' was proposed to > overcome this limitation. I got email about that format the day before you posted this, by the way. > However, it looks like that adding a new format is not simple: 15 kernel > patches; user space tools must support the new format; mistakes made in the > past should be avoided; it is unclear whether the kernel should switch from > cpio to tar. The kernel _can't_ switch from cpio to tar without breaking backwards compatability, it could only add tar as a second format it supported (remember cpio images can be sideloaded so a new rootfs can be used with an existing initramfs, plus existing build systems generate them and would still need to if they wanted to keep supporting older kernels), and then once you've got two formats somebody will propose zip support, and let's just not go there please. The changes to the userspace tools are trivial (I say that as the maintainer of toybox, which has a cpio). The argument was about things like 64 bit timestamps (y2038 problem), nanosecond support, sparse files, etc. And I think the argument had largely died down? Keep in mind the squashfs guy spent 5 years trying to get his filesystem merged (https://lwn.net/Articles/563578/), I spent several years trying to get my perl removal patch merged (and only work up the enthusiasm to resubmit http://lists.busybox.net/pipermail/buildroot/2015-March/123385.html https://patchwork.kernel.org/patch/9193529/ https://lkml.org/lkml/2017/9/13/651 about once a year because dealing with linux-kernel is just no fun for hobbyists anymore). > The aim of this patch is to provide the same functionality without > introducing a new format. The value of xattrs is placed in regular files > having the same file name as the files xattrs are added to, plus a > separator and the xattr name (.xattr-). I think you're solving the wrong problem, but that's just my opinion. Rob