Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp487094pxy; Thu, 22 Apr 2021 06:48:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxa8/lmqO60B6mL8zUDLaEFpZeYljOMgNxbknJkiNg5o9L/1YTvF9M2eNx0Q+shoGglwghO X-Received: by 2002:a17:902:70c5:b029:ec:9a57:9cc8 with SMTP id l5-20020a17090270c5b02900ec9a579cc8mr3643233plt.73.1619099280112; Thu, 22 Apr 2021 06:48:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619099280; cv=none; d=google.com; s=arc-20160816; b=CtDmzJv8OeAZYKCz2aDEJHrs2aCt3Q0FNAcr0t2yZmKKmdV701ozB3j/OnvGbc0iTV J6wWI/ZF1PUxi/kfMYqc4r4YtpVFyIpghoNGEge2ai7Mr3zgajgF5Hlq+AgGYxi/Ihw3 /hUkPnlAu567o8M5xWmmwgSgcPJiHT2s4dkhbvHkov5T7J2aMW2YWuhfXDnvkrfhbrRR zUOXSRZGJ7VWmyK7dZfazW7eqG/Nj+IZLLzhQBut6fmHi5sxAmAKY1nB+0tzHCos4xOQ SB4OAHgBmfxBMv35R7xnAyoFqUf1y+2+McvSHz38ebvFZAAJUIFLVzWDZ3ApJheauSjH 0ZmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=JPZG7Eq3cvwldEPQNRrAHd1CrGpDd66wnvVAxBk74Rw=; b=xnd9ybEOROVwGnTGqvYaUznyAkZlchkVa3CfT9WjPcfeou9KojgiUhwERqYQO29Epe khNSHbqxWO/lh8GR8+UH8K3fGUMv9y1TF3ymOfdtqWPKCaUjhYSSY5mTpflOsYbOczgq LGGmrz4W7LwfbZrC3MYvWBZwexDXTexcm72S1BIkpf9QBBfUc1xkK8Til/sCQj8cU+FF g4uAJ1Bkrca2UaUjnv0Q43NGD8v+wOaCsJvvWWMLF+P/ee+Pb7gthmoZjF4okVlIzi7A Ul6PABMCiLo/drpntKTU+nkzJyyVJzL93NWQrEV5ymTtKIcHW9KQwOtKza8jM9Luw17R lTHA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bb13si6101718pjb.29.2021.04.22.06.47.46; Thu, 22 Apr 2021 06:48:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236712AbhDVNqu (ORCPT + 99 others); Thu, 22 Apr 2021 09:46:50 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]:2906 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236344AbhDVNqt (ORCPT ); Thu, 22 Apr 2021 09:46:49 -0400 Received: from fraeml710-chm.china.huawei.com (unknown [172.18.147.226]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4FQz2g47lCz680Y4; Thu, 22 Apr 2021 21:35:55 +0800 (CST) Received: from fraeml714-chm.china.huawei.com (10.206.15.33) by fraeml710-chm.china.huawei.com (10.206.15.59) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Thu, 22 Apr 2021 15:46:12 +0200 Received: from fraeml714-chm.china.huawei.com ([10.206.15.33]) by fraeml714-chm.china.huawei.com ([10.206.15.33]) with mapi id 15.01.2176.012; Thu, 22 Apr 2021 15:46:12 +0200 From: Roberto Sassu To: Casey Schaufler , "zohar@linux.ibm.com" , "jmorris@namei.org" , "paul@paul-moore.com" CC: "linux-integrity@vger.kernel.org" , "linux-security-module@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "selinux@vger.kernel.org" , "reiserfs-devel@vger.kernel.org" Subject: RE: [PATCH v2 3/6] security: Pass xattrs allocated by LSMs to the inode_init_security hook Thread-Topic: [PATCH v2 3/6] security: Pass xattrs allocated by LSMs to the inode_init_security hook Thread-Index: AQHXNsotY/K28wHuekOIDth+NQB1IKq/cHuAgAEcEXA= Date: Thu, 22 Apr 2021 13:46:12 +0000 Message-ID: <406d450699034f54b6c184f286acccfe@huawei.com> References: <20210421161925.968825-1-roberto.sassu@huawei.com> <20210421161925.968825-4-roberto.sassu@huawei.com> <0caf1e58-1e2d-c781-3f71-18aaf55cada2@schaufler-ca.com> In-Reply-To: <0caf1e58-1e2d-c781-3f71-18aaf55cada2@schaufler-ca.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.221.98.153] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org PiBGcm9tOiBDYXNleSBTY2hhdWZsZXIgW21haWx0bzpjYXNleUBzY2hhdWZsZXItY2EuY29tXQ0K PiBTZW50OiBUaHVyc2RheSwgQXByaWwgMjIsIDIwMjEgMTI6NDQgQU0NCj4gT24gNC8yMS8yMDIx IDk6MTkgQU0sIFJvYmVydG8gU2Fzc3Ugd3JvdGU6DQo+ID4gSW4gcHJlcGFyYXRpb24gZm9yIG1v dmluZyBFVk0gdG8gdGhlIExTTSBpbmZyYXN0cnVjdHVyZSwgdGhpcyBwYXRja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