From patchwork Thu Nov 3 16:00:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Gruenbacher X-Patchwork-Id: 9411121 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E086F6022E for ; Thu, 3 Nov 2016 16:01:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D1B762ACFB for ; Thu, 3 Nov 2016 16:01:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C69352ACFF; Thu, 3 Nov 2016 16:01:16 +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=-6.9 required=2.0 tests=BAYES_00,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 2E9492ACFD for ; Thu, 3 Nov 2016 16:01:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758246AbcKCQBG (ORCPT ); Thu, 3 Nov 2016 12:01:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9070 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758106AbcKCQBF (ORCPT ); Thu, 3 Nov 2016 12:01:05 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 173137F415; Thu, 3 Nov 2016 16:01:04 +0000 (UTC) Received: from nux.redhat.com (vpn1-5-13.ams2.redhat.com [10.36.5.13]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uA3G10ga012894; Thu, 3 Nov 2016 12:01:01 -0400 From: Andreas Gruenbacher To: Casey Schaufler , Al Viro Cc: Andreas Gruenbacher , linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, Stephen Smalley Subject: Re: [PATCH] xattr: Fix setting security xattrs on sockfs Date: Thu, 3 Nov 2016 17:00:59 +0100 Message-Id: <1478188859-12354-1-git-send-email-agruenba@redhat.com> References: <1478115261-29669-1-git-send-email-agruenba@redhat.com> <57e9db81-d785-98ab-dd52-47c1f82c76c3@schaufler-ca.com> <1478180706-9456-1-git-send-email-agruenba@redhat.com> In-Reply-To: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 03 Nov 2016 16:01:04 +0000 (UTC) Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: X-Virus-Scanned: ClamAV using ClamSMTP On Thu, Nov 3, 2016 at 4:51 PM, Casey Schaufler wrote: > On 11/3/2016 6:45 AM, Andreas Gruenbacher wrote: >> Casey, the first patch broke filesystems that support setxattr for some xattrs >> but not security xattrs. Here's an updated patch; could you please test? > > This patch does not fix the problem. I am back to EOPTNOTSUP. Ah, I forgot to register the new sockfs xattr handler. Does this help? Thanks, Andreas --- net/socket.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/socket.c b/net/socket.c index 816392a..9820725 100644 --- a/net/socket.c +++ b/net/socket.c @@ -357,6 +357,7 @@ static const struct xattr_handler sockfs_security_xattr_handler = { static const struct xattr_handler *sockfs_xattr_handlers[] = { &sockfs_xattr_handler, + &sockfs_security_xattr_handler, NULL };