Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1778296yba; Fri, 10 May 2019 00:31:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqwna0dUiKzZtGtUs7i1MDrw57EqLR0UlswI4CMnTRzn07bxKW3dh5ic+DAQwP7FuB9Uaqtp X-Received: by 2002:a62:6f87:: with SMTP id k129mr11893862pfc.53.1557473504101; Fri, 10 May 2019 00:31:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557473504; cv=none; d=google.com; s=arc-20160816; b=ikZgBsixVbKNoRekFBxGaOnqp7IAUw6gmwQlff9A22cxF2T1DcUrVFdJBgAgGCRPgj C1iy5f4XQ2twcGx1wr1ilTuJlVb+xqn88YQElI9gX85/aAYd3KylXTexmw+z3Fq2Jd/o rY0ohaKIUuzj2X2ESyIpUSXesaA4A4hq67l8zJewA83dEUsS8S4NVAzbXrsSyGlfjyLe IK/s+h+Y3uORqJ4JWQhpjlbFHrL3RtaxhehWdOImMMZpv5G+uSXKuxx7bkqLHmXDN/Qm qq7ldBMSQ8UygaUfBS6NpfucRI0twGUGFoffezlcksdkRTyY0RzXc/H5lwLbMlFPAS0a qFgw== 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; bh=lQiUrFgpK3WSuynwoqS7v0LiyuzJY+ej+UicUsJzvio=; b=0F0YbWCAFJRQ9UNXAI7nwY5/ViqXwmEsZBZKpLTs/PinZ3CG8QLELriUjTPea5Swc7 G1lowAKL5EWDXBkJMuvrJrUc8CXe+UAeYQuACcxWCegLfPuv1foBC050rvx78+REM0Mx ssf70nk7xOlQGSI7GCrKmbyaqpJctRzzjSJ2FdzxQxLtqEUXHYZjzI8jyLXGuu3BtRMj +aRxFsO0rW5vmQZxvx8ot2gQqvelbFmhRVAwnAVPOM95WGcZADZuJA9ai/JSLYC8oRMU VolM77tDMZTpDyVtv+zAZ+z6heNgdDVAmqNjpEpaFx24kTMwfZvSXEKkCTE3kjasx5bw cb/g== ARC-Authentication-Results: i=1; mx.google.com; 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 s14si6071762pgs.343.2019.05.10.00.31.27; Fri, 10 May 2019 00:31:44 -0700 (PDT) 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; 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 S1727117AbfEJG42 (ORCPT + 99 others); Fri, 10 May 2019 02:56:28 -0400 Received: from lhrrgout.huawei.com ([185.176.76.210]:32931 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726816AbfEJG42 (ORCPT ); Fri, 10 May 2019 02:56:28 -0400 Received: from LHREML711-CAH.china.huawei.com (unknown [172.18.7.108]) by Forcepoint Email with ESMTP id 80FC5F410DD9BCBB68F2; Fri, 10 May 2019 07:56:26 +0100 (IST) Received: from [10.220.96.108] (10.220.96.108) by smtpsuk.huawei.com (10.201.108.34) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 10 May 2019 07:56:16 +0100 Subject: Re: [PATCH v2 0/3] initramfs: add support for xattrs in the initial ram disk To: Rob Landley , CC: , , , , , , , , , , , , , References: <20190509112420.15671-1-roberto.sassu@huawei.com> From: Roberto Sassu Message-ID: Date: Fri, 10 May 2019 08:56:18 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.220.96.108] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/9/2019 8:34 PM, Rob Landley wrote: > On 5/9/19 6:24 AM, Roberto Sassu wrote: >> This patch set aims at solving the following use case: appraise files from >> the initial ram disk. To do that, IMA checks the signature/hash from the >> security.ima xattr. Unfortunately, this use case cannot be implemented >> currently, as the CPIO format does not support xattrs. >> >> This proposal consists in marshaling pathnames and xattrs in a file called >> .xattr-list. They are unmarshaled by the CPIO parser after all files have >> been extracted. > > So it's in-band signalling that has a higher peak memory requirement. This can be modified. Now I allocate the memory necessary for the path and all xattrs of a file (max: .xattr-list size - 10 bytes). I could process each xattr individually (max: 255 + 1 + 65536 bytes). >> The difference with another proposal >> (https://lore.kernel.org/patchwork/cover/888071/) is that xattrs can be >> included in an image without changing the image format, as opposed to >> defining a new one. As seen from the discussion, if a new format has to be >> defined, it should fix the issues of the existing format, which requires >> more time. > > So you've explicitly chosen _not_ to address Y2038 while you're there. Can you be more specific? Thanks Roberto > Rob > -- HUAWEI TECHNOLOGIES Duesseldorf GmbH, HRB 56063 Managing Director: Bo PENG, Jian LI, Yanli SHI