From patchwork Fri Oct 27 14:44:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Christian Brauner X-Patchwork-Id: 158980 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp658218vqb; Fri, 27 Oct 2023 07:47:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFypKEIKLdRAKamZuZiDLg9IAjlGHEcgf860rlqmqNEMTKOiXIYmiphZtOkPjaBD620IWY2 X-Received: by 2002:a05:6808:619:b0:3ae:156f:d325 with SMTP id y25-20020a056808061900b003ae156fd325mr2529919oih.58.1698418041723; Fri, 27 Oct 2023 07:47:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698418041; cv=none; d=google.com; s=arc-20160816; b=Rdj8oueQ/6SuW3L2hQykmjZcGVhSDzEjxW88wtbiRisiLgsYGHN6pCsM0F6BDcEOty 6Bbw12oW3Ape9VSJ8yt15q2QFdbPRGM40GdzZO7maO1oCEPVt6u9cOIwYVIck8liK4ma Q0A8j7evi5X0TyyyyYYQonurxYQRuBSch01sU6jzNXTYKu0tGy6yewSrEgvLnHrQOQng wqhOgF53lWUbjmX3r5fUMPY12Iwuu5n0z7BNNJZZplpSlJzMavHSzPZJw1VKXSSoO6Bw AJioIc1HfCRgfyYc2dmz+hfqYpXDu+xaTPPTd+GMg9JrtTy7upEsJ50cwfcJ1cCtx5Ov +HdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=L/FUetdShL1gR13etAZO1rFqMU2GqVmMA9a3jJWBAKI=; fh=qDZ+YnS9HJbCVOaeWFr2FnYZt7eE+vt5IJIDIlhBdxU=; b=xfRE9vECHHmJ7JNWFSnu5FFNP8mXJdHmvttNrVPXPzil+yUbLsvyCNFokvdMWC9Ft6 jxVTvk1G+Afdb7QuIdbDDTZW/QmJ55v+djzFv9yDiX1MTcRXWJyg6Iu57T7xdZN5Iqyd auTofgglUZtJah0pSLOueC2AlyKF0q+nW1zKqKu8anr3+2zxYVFUHOy0/vm9SbblciGM 3Y3+lDi0+/dcS6fOaJnEC6DVLZRhyP9wlJI/pV0wml0nV/LsYzdFNAy5mi+0vGJ4f75o DLBsVo+pYb5RSjGRmUOlp1/V6wUaWKIu1B7wK+7y/CdxdCQV8MgNysTDQWBtIpWniT2s +Fzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Al1HfaZl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id 133-20020a25148b000000b00da059f54e62si2443324ybu.22.2023.10.27.07.47.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 07:47:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Al1HfaZl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 833178371D3F; Fri, 27 Oct 2023 07:47:18 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345996AbjJ0Oqz (ORCPT + 25 others); Fri, 27 Oct 2023 10:46:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346000AbjJ0Oqv (ORCPT ); Fri, 27 Oct 2023 10:46:51 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF20210E for ; Fri, 27 Oct 2023 07:46:47 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 41A35C433C7; Fri, 27 Oct 2023 14:46:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698418007; bh=Is8861coE2dMv1ozjLxtkdJ2o33KTHb/T1OB32cPMlI=; h=From:To:Cc:Subject:Date:From; b=Al1HfaZlOyDX0AmQ6zkklGZSoiEFZg6G/MY0wPwA6qCyN9wZLByEbwgCCpizGCJnw LkYO73cNmSSqta9nN100y8U7QczB3MfZxqjqSlpQ9TGXN/HF/y63D8GGz9xcDRsF9L BEdkYb6MH82s0Ib1Croi2IybVsInVjs76mWflxtOQfSvMbXR/s6TvvGBltpWtJLLKM ddC1JCnuk1+IYw3hAXN8sBGFlhpdq5Vd4jdEUvkcnV7HQTJJkztioWDr5Y3WR0h+2J mVxIvcCrdSAcZjr5kZ7MMxKHX+AcOCbzTq+Dopz4cbAd4zEcERcgVbzf0qIfzhD9kn DyLdo0FUtwYeA== From: Christian Brauner To: Linus Torvalds Cc: Christian Brauner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [GIT PULL for v6.7] vfs xattr updates Date: Fri, 27 Oct 2023 16:44:00 +0200 Message-Id: <20231027-vfs-xattr-6eeea5632c93@brauner> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=5883; i=brauner@kernel.org; h=from:subject:message-id; bh=L23UqZR0i6BQlmP1jQpRywpoX9dfv6WXNEUHjt3dBWk=; b=owGbwMvMwCU28Zj0gdSKO4sYT6slMaRan6n8YDzxrXO+/dKAVk7R6sYweYELntOzjseZCbeV7rz2 5sS3jlIWBjEuBlkxRRaHdpNwueU8FZuNMjVg5rAygQxh4OIUgIm0tzH8z9cR+n0gWfCFrK/gtijOKx MC4iOEk+uXdk9RaTT227r2KcMfzgRZixUpbzZOF+Z32Rr1xHU6g9ZkweYD3GI8hrsT3XSZAQ== X-Developer-Key: i=brauner@kernel.org; a=openpgp; fpr=4880B8C9BD0E5106FC070F4F7B3C391EFEA93624 X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Fri, 27 Oct 2023 07:47:18 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780920396635845109 X-GMAIL-MSGID: 1780920396635845109 Hey Linus, /* Summary */ The 's_xattr' field of 'struct super_block' currently requires a mutable table of 'struct xattr_handler' entries (although each handler itself is const). However, no code in vfs actually modifies the tables. This changes the type of 's_xattr' to allow const tables, and modifies existing file systems to move their tables to .rodata. This is desirable because these tables contain entries with function pointers in them; moving them to .rodata makes it considerably less likely to be modified accidentally or maliciously at runtime. /* Testing */ clang: Debian clang version 16.0.6 (16) gcc: gcc (Debian 13.2.0-5) 13.2.0 All patches are based on v6.6-rc2 and have been sitting in linux-next. No build failures or warnings were observed. /* Conflicts */ At the time of creating this PR no merge conflicts were reported from linux-next and no merge conflicts showed up doing a test-merge with current mainline. The following changes since commit ce9ecca0238b140b88f43859b211c9fdfd8e5b70: Linux 6.6-rc2 (2023-09-17 14:40:24 -0700) are available in the Git repository at: git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.7.xattr for you to fetch changes up to a640d888953cd18e8542283653c20160b601d69d: const_structs.checkpatch: add xattr_handler (2023-10-12 17:14:11 +0200) Please consider pulling these changes from the signed vfs-6.7.xattr tag. Thanks! Christian ---------------------------------------------------------------- vfs-6.7.xattr ---------------------------------------------------------------- Thomas Weißschuh (1): const_structs.checkpatch: add xattr_handler Wedson Almeida Filho (29): xattr: make the xattr array itself const ext4: move ext4_xattr_handlers to .rodata 9p: move xattr-related structs to .rodata afs: move afs_xattr_handlers to .rodata btrfs: move btrfs_xattr_handlers to .rodata ceph: move ceph_xattr_handlers to .rodata ecryptfs: move ecryptfs_xattr_handlers to .rodata erofs: move erofs_xattr_handlers and xattr_handler_map to .rodata ext2: move ext2_xattr_handlers and ext2_xattr_handler_map to .rodata f2fs: move f2fs_xattr_handlers and f2fs_xattr_handler_map to .rodata fuse: move fuse_xattr_handlers to .rodata gfs2: move gfs2_xattr_handlers_max to .rodata hfs: move hfs_xattr_handlers to .rodata hfsplus: move hfsplus_xattr_handlers to .rodata jffs2: move jffs2_xattr_handlers to .rodata jfs: move jfs_xattr_handlers to .rodata kernfs: move kernfs_xattr_handlers to .rodata nfs: move nfs4_xattr_handlers to .rodata ntfs3: move ntfs_xattr_handlers to .rodata ocfs2: move ocfs2_xattr_handlers and ocfs2_xattr_handler_map to .rodata orangefs: move orangefs_xattr_handlers to .rodata reiserfs: move reiserfs_xattr_handlers to .rodata smb: move cifs_xattr_handlers to .rodata squashfs: move squashfs_xattr_handlers to .rodata ubifs: move ubifs_xattr_handlers to .rodata xfs: move xfs_xattr_handlers to .rodata overlayfs: move xattr tables to .rodata shmem: move shmem_xattr_handlers to .rodata net: move sockfs_xattr_handlers to .rodata fs/9p/xattr.c | 8 ++++---- fs/9p/xattr.h | 2 +- fs/afs/internal.h | 2 +- fs/afs/xattr.c | 2 +- fs/btrfs/xattr.c | 2 +- fs/btrfs/xattr.h | 2 +- fs/ceph/super.h | 2 +- fs/ceph/xattr.c | 2 +- fs/ecryptfs/ecryptfs_kernel.h | 2 +- fs/ecryptfs/inode.c | 2 +- fs/erofs/xattr.c | 2 +- fs/erofs/xattr.h | 4 ++-- fs/ext2/xattr.c | 4 ++-- fs/ext2/xattr.h | 2 +- fs/ext4/xattr.c | 2 +- fs/ext4/xattr.h | 2 +- fs/f2fs/xattr.c | 4 ++-- fs/f2fs/xattr.h | 2 +- fs/fuse/fuse_i.h | 2 +- fs/fuse/xattr.c | 2 +- fs/gfs2/super.h | 4 ++-- fs/gfs2/xattr.c | 4 ++-- fs/hfs/attr.c | 2 +- fs/hfs/hfs_fs.h | 2 +- fs/hfsplus/xattr.c | 2 +- fs/hfsplus/xattr.h | 2 +- fs/jffs2/xattr.c | 2 +- fs/jffs2/xattr.h | 2 +- fs/jfs/jfs_xattr.h | 2 +- fs/jfs/xattr.c | 2 +- fs/kernfs/inode.c | 2 +- fs/kernfs/kernfs-internal.h | 2 +- fs/nfs/nfs.h | 2 +- fs/nfs/nfs4_fs.h | 2 +- fs/nfs/nfs4proc.c | 2 +- fs/ntfs3/ntfs_fs.h | 2 +- fs/ntfs3/xattr.c | 2 +- fs/ocfs2/xattr.c | 4 ++-- fs/ocfs2/xattr.h | 2 +- fs/orangefs/orangefs-kernel.h | 2 +- fs/orangefs/xattr.c | 2 +- fs/overlayfs/super.c | 4 ++-- fs/reiserfs/reiserfs.h | 2 +- fs/reiserfs/xattr.c | 4 ++-- fs/smb/client/cifsfs.h | 2 +- fs/smb/client/xattr.c | 2 +- fs/squashfs/squashfs.h | 2 +- fs/squashfs/xattr.c | 2 +- fs/ubifs/ubifs.h | 2 +- fs/ubifs/xattr.c | 2 +- fs/xattr.c | 6 +++--- fs/xfs/xfs_xattr.c | 2 +- fs/xfs/xfs_xattr.h | 2 +- include/linux/fs.h | 2 +- include/linux/pseudo_fs.h | 2 +- mm/shmem.c | 2 +- net/socket.c | 2 +- scripts/const_structs.checkpatch | 1 + 58 files changed, 71 insertions(+), 70 deletions(-)