Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp98960pxb; Tue, 15 Feb 2022 09:09:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJyZpRvY3JhbBy8CkSmPTOOnhIzn6lhhfYfrFvg/qrma4/5PeVhCOX3hLyXQLEG/WIRo2iiI X-Received: by 2002:aa7:d918:: with SMTP id a24mr4858995edr.315.1644944989978; Tue, 15 Feb 2022 09:09:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644944989; cv=none; d=google.com; s=arc-20160816; b=rrCGQXyQ+byf1cUgvf15GTeKaUKwMrL5ooYUHz0cc+SfCRrFuA6fyXB0oVJWkwtEii BfmsOi1hcQzJJcLr+PpaixHAQY9/CtxjYOJnDokOM7x72jiC/S3LPQoRotd611tuT3aw Y8U0ByJLHSaPYvqsFNrVu0yUtPTo+aqv/BB+cC6E5UjQ4jwCfjXDFzNE1Q6kNPU2x2Lh YjO4os7LL740eb4CbCxZU63JeB/fWhb9LgdY1hsQMPwpO7IjHw4s19m2JTuyNyXnllqG YmSOPmZ7yzVRzzjxu9/TXNyIHQ22YnqOj0dnpA6vq7D2TEzCFej+m5vctMyqqsUrnwD9 ETfQ== 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=y35bRNkgK0j2Sm1n64rEUtTMCcN82TDmDiN7/7FdSUQ=; b=cU9znE4UzQZpblzPRJjXn/X4WV6aYQb1cjTJ6k9NVQI5zEGQQR6UXXqnSj8QKdd9Q+ jgjVCX/LN/EYrDxtOVZ7GRuw8caKV928N91Pm1M4XLvE8Kin3Aovhrz6xi3FiIcnsTGs iuOq6O03Du6vjeJqwDgREmomDNWbbH0PUr4EhZyjGD+gZqORbW12WpOQQ1ZsNHPzs3Q9 4HHan2lP/wOAoctris0hfyJvWCoQc+D++Vy4DxvjoH0ZSllgFrfXTBT9iwroG5TXykF3 fP3MA9fvazsAvdpkXoLvQo532LiuvSWhIWCeEH5I+VNN+ViVTHHYb00INynPiVUAxGgJ qrfg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b13si262601edz.383.2022.02.15.09.09.24; Tue, 15 Feb 2022 09:09:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241483AbiBOQUc (ORCPT + 99 others); Tue, 15 Feb 2022 11:20:32 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:38618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241470AbiBOQUa (ORCPT ); Tue, 15 Feb 2022 11:20:30 -0500 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35109B8B4A; Tue, 15 Feb 2022 08:20:20 -0800 (PST) Received: from fraeml713-chm.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4JymWv4Dlyz67kVB; Wed, 16 Feb 2022 00:19:55 +0800 (CST) Received: from fraeml714-chm.china.huawei.com (10.206.15.33) by fraeml713-chm.china.huawei.com (10.206.15.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Tue, 15 Feb 2022 17:20:17 +0100 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.2308.021; Tue, 15 Feb 2022 17:20:17 +0100 From: Roberto Sassu To: Shuah Khan , "zohar@linux.ibm.com" , "shuah@kernel.org" , "ast@kernel.org" , "daniel@iogearbox.net" , "andrii@kernel.org" , "kpsingh@kernel.org" , "revest@chromium.org" CC: "linux-integrity@vger.kernel.org" , "linux-security-module@vger.kernel.org" , "linux-kselftest@vger.kernel.org" , "netdev@vger.kernel.org" , "bpf@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH v2 6/6] selftests/bpf: Add test for bpf_lsm_kernel_read_file() Thread-Topic: [PATCH v2 6/6] selftests/bpf: Add test for bpf_lsm_kernel_read_file() Thread-Index: AQHYImmRXWHSMGlI7Eid9Hu2hrMmoKyUt62AgAARXDA= Date: Tue, 15 Feb 2022 16:20:17 +0000 Message-ID: <509ea86d324445b59bedd4a93015d7c3@huawei.com> References: <20220215124042.186506-1-roberto.sassu@huawei.com> <20220215124042.186506-7-roberto.sassu@huawei.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.204.63.33] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: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