Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp892387ybh; Wed, 11 Mar 2020 13:00:36 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvVDWnLAFtFIgcfGB5Uwd3T6qitCPnFufqd943FhZfczFa33vG0+utieUPUI6jAmCDG85eB X-Received: by 2002:a9d:19ef:: with SMTP id k102mr3696960otk.220.1583956836567; Wed, 11 Mar 2020 13:00:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583956836; cv=none; d=google.com; s=arc-20160816; b=eUwg5qCbKUlBkWwwwLtUoemCogPz8dzE0WSMjx3HSNCq2eoRW78+HLwDQS9e5nupU7 bEDjtGLYZ6gdtPD9RSRDqYvzPXZVX+QZn+0DfRHxfgTDOcLK385wPrgVKGLlm/WO/u/Q O8bV8P3TM8mHz3g5Ibi9CpjjgbfQmNhV/UNeo1umEzz4NSdRD87uwy1d4R49qMKfHfsQ fRuVQ/PQ7xwEcOxoErQof98lZOeX9fU72BonfsZhKKZBQSNHEDeSLeTLhaIGFnQ4JdAv yMy59/3uy8r96D8ep6Aenu0/tgwGdnc+mmKtYLEgWhtJNvaI9pGgo7taqUhJqNHawb4u wptg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:ironport-sdr:dkim-signature; bh=LbJW0Zt8Sq9kif23K5B2AYAf81NCOkTuXMuqg14/4mo=; b=CmBl6+RsWJ2pXSSbdHXO12VrYCz3Xdt+kdiwBuPoAAMac6B7gHUBZV2RAJpyS2p1Ke /sx5rALJhai0EEWYZf7LhTN+f75LOTSjMCjlKFd8kK0YesToKnPm0IEY76sr4EgUwPM4 Q9p3h6g6HsxNNCP1x/W6038MiXzYTJUaE5ZXaIq62rvhAcP9k+IPSqywnPHrXYOPJSBO 2ppLrtrrBOiDfq226Kf7l1+LqTdVGEuPAe1xy4Frih4qqKNb6aUUGcMZLHoUK+NdIhdo 8WdOq/vx06OiA4utx3QVagIfxMh1ySKGodgK3fIBRxxEJqVyrscuWrIeUd+ZSOsLL7VG GTWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=ZzD7ttOw; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h10si1505846oie.63.2020.03.11.13.00.24; Wed, 11 Mar 2020 13:00:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=ZzD7ttOw; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387445AbgCKUAD (ORCPT + 99 others); Wed, 11 Mar 2020 16:00:03 -0400 Received: from smtp-fw-2101.amazon.com ([72.21.196.25]:62469 "EHLO smtp-fw-2101.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387426AbgCKUAB (ORCPT ); Wed, 11 Mar 2020 16:00:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1583956800; x=1615492800; h=from:to:cc:subject:date:message-id:mime-version; bh=LbJW0Zt8Sq9kif23K5B2AYAf81NCOkTuXMuqg14/4mo=; b=ZzD7ttOwZV3kTXgYQqUUlcUQED9dGBSEyvZgHk/FrIsDJi5EAKfDnduy WQKv1j40UC0NylxbW+uzT/XnMAGtr3epQOFXfMXLxi0lXbFV7vxW1jcK2 4tN+O+6FQ3l2E8zWuify05ayPpWIN+9elNDxqKdBE2DYWM4YaZvqMVJUv k=; IronPort-SDR: asw/sxJZKxONTyvRJ0+XpkX4hUE3e1c8JeqzHs8bSMoAcpWbuVp0f8NdOaM371B3inON2Z8LpH soKdqzo0BUzA== X-IronPort-AV: E=Sophos;i="5.70,541,1574121600"; d="scan'208";a="21101078" Received: from iad12-co-svc-p1-lb1-vlan2.amazon.com (HELO email-inbound-relay-1e-c7c08562.us-east-1.amazon.com) ([10.43.8.2]) by smtp-border-fw-out-2101.iad2.amazon.com with ESMTP; 11 Mar 2020 19:59:59 +0000 Received: from EX13MTAUWA001.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan2.iad.amazon.com [10.40.159.162]) by email-inbound-relay-1e-c7c08562.us-east-1.amazon.com (Postfix) with ESMTPS id BCFDB248F59; Wed, 11 Mar 2020 19:59:57 +0000 (UTC) Received: from EX13D13UWA002.ant.amazon.com (10.43.160.172) by EX13MTAUWA001.ant.amazon.com (10.43.160.118) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 11 Mar 2020 19:59:56 +0000 Received: from EX13MTAUEA002.ant.amazon.com (10.43.61.77) by EX13D13UWA002.ant.amazon.com (10.43.160.172) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 11 Mar 2020 19:59:55 +0000 Received: from dev-dsk-fllinden-2c-c1893d73.us-west-2.amazon.com (172.23.141.97) by mail-relay.amazon.com (10.43.61.169) with Microsoft SMTP Server id 15.0.1236.3 via Frontend Transport; Wed, 11 Mar 2020 19:59:55 +0000 Received: by dev-dsk-fllinden-2c-c1893d73.us-west-2.amazon.com (Postfix, from userid 6262777) id 04B4FDD8DB; Wed, 11 Mar 2020 19:59:54 +0000 (UTC) From: Frank van der Linden To: , , CC: Frank van der Linden Subject: [PATCH 00/14] server side user xattr support (RFC 8276) Date: Wed, 11 Mar 2020 19:59:40 +0000 Message-ID: <20200311195954.27117-1-fllinden@amazon.com> X-Mailer: git-send-email 2.16.6 MIME-Version: 1.0 Content-Type: text/plain Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org This patchset implements the server side for NFS user extended attributes, as defined in RFC8726. This was originally posted as an RFC in: https://patchwork.kernel.org/cover/11143565/ Patch 1 is shared with the client side patch, posted separately. Most comments in there still apply, except that: 1. As per the discussion, user extended attributes are enabled if the client and server support them (e.g. they support 4.2 and advertise the user extended attribute FATTR). There are no longer options to switch them off on either the client or the server. 2. The code is no longer conditioned on a config option. 3. The number of patches has been reduced somewhat by merging smaller, related ones. This has been tested as follows: * Linux client and server: * Test all corner cases (XATTR_SIZE_*) * Test all failure cases (no xattr, setxattr with different or invalid flags, etc). * Verify the content of xattrs across several operations. * Use KASAN and KMEMLEAK for a longer mix of testruns to verify that there were no leaks (after unmounting the filesystem). * Tested against the FreeBSD-current implementation as well, which works (after I fixed 2 bugs in that implementation, which I'm sending out to them too). * Not tested: RDMA (I couldn't get a setup going). Frank van der Linden (14): nfs,nfsd: NFSv4.2 extended attribute protocol definitions xattr: modify vfs_{set,remove}xattr for NFS server use nfsd: split off the write decode code in to a separate function nfsd: make sure the nfsd4_ops array has the right size nfsd: add defines for NFSv4.2 extended attribute support nfsd: define xattr functions to call in to their vfs counterparts nfsd: take xattr bits in to account for permission checks nfsd: add structure definitions for xattr requests / responses nfsd: use kvmalloc in svcxdr_tmpalloc nfsd: implement the xattr procedure functions. nfsd: add user xattr RPC XDR encoding/decoding logic nfsd: add xattr operations to ops array xattr: add a function to check if a namespace is supported nfsd: add fattr support for user extended attributes fs/nfsd/nfs4proc.c | 141 +++++++++++- fs/nfsd/nfs4xdr.c | 535 +++++++++++++++++++++++++++++++++++++++++++--- fs/nfsd/nfsd.h | 5 +- fs/nfsd/vfs.c | 142 ++++++++++++ fs/nfsd/vfs.h | 10 + fs/nfsd/xdr4.h | 31 +++ fs/xattr.c | 90 +++++++- include/linux/nfs4.h | 22 +- include/linux/xattr.h | 4 + include/uapi/linux/nfs4.h | 3 + 10 files changed, 940 insertions(+), 43 deletions(-) -- 2.16.6