From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 82A88C04AB2 for ; Fri, 10 May 2019 06:56:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 56944217F5 for ; Fri, 10 May 2019 06:56:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727083AbfEJG42 (ORCPT ); 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-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@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