From patchwork Mon Feb 25 19:10:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Mahoney X-Patchwork-Id: 10829059 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CEBFF922 for ; Mon, 25 Feb 2019 19:11:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BF0972B981 for ; Mon, 25 Feb 2019 19:11:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B34172B98D; Mon, 25 Feb 2019 19:11:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 658BA2B981 for ; Mon, 25 Feb 2019 19:11:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726950AbfBYTLA (ORCPT ); Mon, 25 Feb 2019 14:11:00 -0500 Received: from mx2.suse.de ([195.135.220.15]:39628 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726850AbfBYTLA (ORCPT ); Mon, 25 Feb 2019 14:11:00 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 5E6B0AFF2; Mon, 25 Feb 2019 19:10:59 +0000 (UTC) Received: from starscream.home.jeffm.io (starscream-1.home.jeffm.io [192.168.1.254]) by mail.home.jeffm.io (Postfix) with ESMTPS id 8CFD381AD3C1; Mon, 25 Feb 2019 14:12:58 -0500 (EST) Received: by starscream.home.jeffm.io (Postfix, from userid 1000) id BAFCB2C817B; Mon, 25 Feb 2019 14:10:57 -0500 (EST) From: jeffm@suse.com To: fstests@vger.kernel.org Cc: darrick.wong@oracle.com, Jeff Mahoney Subject: [PATCH] src/t_attr_corruption: use security.capability instead of security.evm Date: Mon, 25 Feb 2019 14:10:52 -0500 Message-Id: <20190225191052.15342-1-jeffm@suse.com> X-Mailer: git-send-email 2.16.4 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jeff Mahoney src/t_attr_corruption uses the security.evm extended attribute because it sorts before security.posix_acl_access. The security.evm attribute is a formatted structure and when passed an uninitialized buffer, it will fail with EPERM. We see test failures like: --- tests/generic/529.out2019-02-21 13:22:47.583406922 -0500 +++ /opt/xfstests/results//generic/529.out.bad 2019-02-21 13:57:31.967406922 -0500 @@ -1,2 +1,2 @@ QA output created by 529 -list attr: Numerical result out of range +set evm: Operation not permitted This patch uses security.capability which also sorts where it needs to do for the test and also accepts an unformatted buffer. Signed-off-by: Jeff Mahoney --- src/t_attr_corruption.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/t_attr_corruption.c b/src/t_attr_corruption.c index f26611f9..0c229dbc 100644 --- a/src/t_attr_corruption.c +++ b/src/t_attr_corruption.c @@ -76,7 +76,7 @@ int main(int argc, char *argv[]) if (ret) die("set posix acl"); - ret = fsetxattr(fd, "security.evm", buf, 1, 1); + ret = fsetxattr(fd, "security.capability", buf, 1, 1); if (ret) die("set evm");