WORKSPACE: bump Linux to 5.15.2
This involves ripping out fsinfo because there now is quotactl_fd which
handles what we originally used fsinfo for. I also enabled a few new
interesting kernel features in the config like the Landlock LSM and
KFENCE.
Change-Id: Ic0a113893a437b2c8068d06984fdc386f34e6adb
Reviewed-on: https://review.monogon.dev/c/monogon/+/444
Reviewed-by: Sergiusz Bazanski <serge@monogon.tech>
diff --git a/WORKSPACE b/WORKSPACE
index f81e37c..8e83327 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -121,7 +121,7 @@
linux_external(
name = "linux",
- version = "5.10.4",
+ version = "5.15.2",
)
load("//third_party/edk2:external.bzl", "edk2_external")
diff --git a/metropolis/pkg/fsquota/BUILD.bazel b/metropolis/pkg/fsquota/BUILD.bazel
index dbeb19b..b25d812 100644
--- a/metropolis/pkg/fsquota/BUILD.bazel
+++ b/metropolis/pkg/fsquota/BUILD.bazel
@@ -3,10 +3,7 @@
go_library(
name = "go_default_library",
- srcs = [
- "fsinfo.go",
- "fsquota.go",
- ],
+ srcs = ["fsquota.go"],
importpath = "source.monogon.dev/metropolis/pkg/fsquota",
visibility = ["//metropolis:__subpackages__"],
deps = [
diff --git a/metropolis/pkg/fsquota/fsinfo.go b/metropolis/pkg/fsquota/fsinfo.go
deleted file mode 100644
index ecbaecf..0000000
--- a/metropolis/pkg/fsquota/fsinfo.go
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2020 The Monogon Project Authors.
-//
-// SPDX-License-Identifier: Apache-2.0
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package fsquota
-
-import (
- "fmt"
- "os"
- "unsafe"
-
- "golang.org/x/sys/unix"
-)
-
-// This requires fsinfo() support, which is not yet in any stable kernel. Our
-// kernel has that syscall backported. This would otherwise be an extremely
-// expensive operation and also involve lots of logic from our side.
-
-// From syscall_64.tbl
-const sys_fsinfo = 441
-
-// From uapi/linux/fsinfo.h
-const fsinfo_attr_source = 0x09
-const fsinfo_flags_query_path = 0x0000
-const fsinfo_flags_query_fd = 0x0001
-
-type fsinfoParams struct {
- resolveFlags uint64
- atFlags uint32
- flags uint32
- request uint32
- nth uint32
- mth uint32
-}
-
-func fsinfoGetSource(dir *os.File) (string, error) {
- buf := make([]byte, 256)
- params := fsinfoParams{
- flags: fsinfo_flags_query_fd,
- request: fsinfo_attr_source,
- }
- n, _, err := unix.Syscall6(sys_fsinfo, dir.Fd(), 0, uintptr(unsafe.Pointer(¶ms)), unsafe.Sizeof(params), uintptr(unsafe.Pointer(&buf[0])), 256)
- if err != unix.Errno(0) {
- return "", fmt.Errorf("failed to call fsinfo: %w", err)
- }
- return string(buf[:n-1]), nil
-}
diff --git a/metropolis/pkg/fsquota/fsquota.go b/metropolis/pkg/fsquota/fsquota.go
index 263dd48..0d49592 100644
--- a/metropolis/pkg/fsquota/fsquota.go
+++ b/metropolis/pkg/fsquota/fsquota.go
@@ -43,10 +43,6 @@
return err
}
defer dir.Close()
- source, err := fsinfoGetSource(dir)
- if err != nil {
- return err
- }
var valid uint32
if maxBytes > 0 {
valid |= quotactl.FlagBLimitsValid
@@ -69,7 +65,7 @@
// kernels setquota interface. Due to the short time window and
// infrequent calls this should not be an immediate issue.
for {
- quota, err := quotactl.GetNextQuota(source, quotactl.QuotaTypeProject, lastID)
+ quota, err := quotactl.GetNextQuota(dir, quotactl.QuotaTypeProject, lastID)
if err == unix.ENOENT || err == unix.ESRCH {
// We have enumerated all quotas, nothing exists here
break
@@ -102,7 +98,7 @@
// Always round up to the nearest block size
bytesLimitBlocks := uint64(math.Ceil(float64(maxBytes) / float64(1024)))
- return quotactl.SetQuota(source, quotactl.QuotaTypeProject, lastID, "actl.Quota{
+ return quotactl.SetQuota(dir, quotactl.QuotaTypeProject, lastID, "actl.Quota{
BHardLimit: bytesLimitBlocks,
BSoftLimit: bytesLimitBlocks,
IHardLimit: maxInodes,
@@ -126,10 +122,6 @@
return nil, err
}
defer dir.Close()
- source, err := fsinfoGetSource(dir)
- if err != nil {
- return nil, err
- }
attrs, err := fsxattrs.Get(dir)
if err != nil {
return nil, err
@@ -137,7 +129,7 @@
if attrs.ProjectID == 0 {
return nil, os.ErrNotExist
}
- quota, err := quotactl.GetQuota(source, quotactl.QuotaTypeProject, attrs.ProjectID)
+ quota, err := quotactl.GetQuota(dir, quotactl.QuotaTypeProject, attrs.ProjectID)
if err != nil {
return nil, err
}
diff --git a/metropolis/pkg/fsquota/quotactl/quotactl.go b/metropolis/pkg/fsquota/quotactl/quotactl.go
index 337daaa..08be6e0 100644
--- a/metropolis/pkg/fsquota/quotactl/quotactl.go
+++ b/metropolis/pkg/fsquota/quotactl/quotactl.go
@@ -21,6 +21,7 @@
import (
"fmt"
+ "os"
"unsafe"
"golang.org/x/sys/unix"
@@ -101,16 +102,12 @@
)
// QuotaOn turns quota accounting and enforcement on
-func QuotaOn(device string, qtype QuotaType, quotaFormat QuotaFormat, quotaFilePath string) error {
- devArg, err := unix.BytePtrFromString(device)
- if err != nil {
- return err
- }
+func QuotaOn(fd *os.File, qtype QuotaType, quotaFormat QuotaFormat, quotaFilePath string) error {
pathArg, err := unix.BytePtrFromString(quotaFilePath)
if err != nil {
return err
}
- _, _, err = unix.Syscall6(unix.SYS_QUOTACTL, uintptr(Q_QUOTAON|uint(qtype)), uintptr(unsafe.Pointer(devArg)), uintptr(quotaFormat), uintptr(unsafe.Pointer(pathArg)), 0, 0)
+ _, _, err = unix.Syscall6(unix.SYS_QUOTACTL_FD, fd.Fd(), uintptr(Q_QUOTAON|uint(qtype)), uintptr(quotaFormat), uintptr(unsafe.Pointer(pathArg)), 0, 0)
if err != unix.Errno(0) {
return err
}
@@ -118,12 +115,8 @@
}
// QuotaOff turns quotas off
-func QuotaOff(device string, qtype QuotaType) error {
- devArg, err := unix.BytePtrFromString(device)
- if err != nil {
- return err
- }
- _, _, err = unix.Syscall6(unix.SYS_QUOTACTL, uintptr(Q_QUOTAOFF|uint(qtype)), uintptr(unsafe.Pointer(devArg)), 0, 0, 0, 0)
+func QuotaOff(fd *os.File, qtype QuotaType) error {
+ _, _, err := unix.Syscall6(unix.SYS_QUOTACTL_FD, fd.Fd(), uintptr(Q_QUOTAOFF|uint(qtype)), 0, 0, 0, 0)
if err != unix.Errno(0) {
return err
}
@@ -131,13 +124,9 @@
}
// GetFmt gets the quota format used on given filesystem
-func GetFmt(device string, qtype QuotaType) (QuotaFormat, error) {
+func GetFmt(fd *os.File, qtype QuotaType) (QuotaFormat, error) {
var fmt uint32
- devArg, err := unix.BytePtrFromString(device)
- if err != nil {
- return 0, err
- }
- _, _, err = unix.Syscall6(unix.SYS_QUOTACTL, uintptr(Q_GETFMT|uint(qtype)), uintptr(unsafe.Pointer(devArg)), 0, uintptr(unsafe.Pointer(&fmt)), 0, 0)
+ _, _, err := unix.Syscall6(unix.SYS_QUOTACTL_FD, fd.Fd(), uintptr(Q_GETFMT|uint(qtype)), 0, uintptr(unsafe.Pointer(&fmt)), 0, 0)
if err != unix.Errno(0) {
return 0, err
}
@@ -145,13 +134,9 @@
}
// GetInfo gets information about quota files
-func GetInfo(device string, qtype QuotaType) (*DQInfo, error) {
+func GetInfo(fd *os.File, qtype QuotaType) (*DQInfo, error) {
var info DQInfo
- devArg, err := unix.BytePtrFromString(device)
- if err != nil {
- return nil, err
- }
- _, _, err = unix.Syscall6(unix.SYS_QUOTACTL, uintptr(Q_GETINFO|uint(qtype)), uintptr(unsafe.Pointer(devArg)), 0, uintptr(unsafe.Pointer(&info)), 0, 0)
+ _, _, err := unix.Syscall6(unix.SYS_QUOTACTL_FD, fd.Fd(), uintptr(Q_GETINFO|uint(qtype)), 0, uintptr(unsafe.Pointer(&info)), 0, 0)
if err != unix.Errno(0) {
return nil, err
}
@@ -159,12 +144,8 @@
}
// SetInfo sets information about quota files
-func SetInfo(device string, qtype QuotaType, info *DQInfo) error {
- devArg, err := unix.BytePtrFromString(device)
- if err != nil {
- return err
- }
- _, _, err = unix.Syscall6(unix.SYS_QUOTACTL, uintptr(Q_SETINFO|uint(qtype)), uintptr(unsafe.Pointer(devArg)), 0, uintptr(unsafe.Pointer(info)), 0, 0)
+func SetInfo(fd *os.File, qtype QuotaType, info *DQInfo) error {
+ _, _, err := unix.Syscall6(unix.SYS_QUOTACTL_FD, fd.Fd(), uintptr(Q_SETINFO|uint(qtype)), 0, uintptr(unsafe.Pointer(info)), 0, 0)
if err != unix.Errno(0) {
return err
}
@@ -172,13 +153,9 @@
}
// GetQuota gets user quota structure
-func GetQuota(device string, qtype QuotaType, id uint32) (*Quota, error) {
+func GetQuota(fd *os.File, qtype QuotaType, id uint32) (*Quota, error) {
var info Quota
- devArg, err := unix.BytePtrFromString(device)
- if err != nil {
- return nil, err
- }
- _, _, err = unix.Syscall6(unix.SYS_QUOTACTL, uintptr(Q_GETQUOTA|uint(qtype)), uintptr(unsafe.Pointer(devArg)), uintptr(id), uintptr(unsafe.Pointer(&info)), 0, 0)
+ _, _, err := unix.Syscall6(unix.SYS_QUOTACTL_FD, fd.Fd(), uintptr(Q_GETQUOTA|uint(qtype)), uintptr(id), uintptr(unsafe.Pointer(&info)), 0, 0)
if err != unix.Errno(0) {
return nil, err
}
@@ -186,13 +163,9 @@
}
// GetNextQuota gets disk limits and usage > ID
-func GetNextQuota(device string, qtype QuotaType, id uint32) (*NextDQBlk, error) {
+func GetNextQuota(fd *os.File, qtype QuotaType, id uint32) (*NextDQBlk, error) {
var info NextDQBlk
- devArg, err := unix.BytePtrFromString(device)
- if err != nil {
- return nil, err
- }
- _, _, err = unix.Syscall6(unix.SYS_QUOTACTL, uintptr(Q_GETNEXTQUOTA|uint(qtype)), uintptr(unsafe.Pointer(devArg)), uintptr(id), uintptr(unsafe.Pointer(&info)), 0, 0)
+ _, _, err := unix.Syscall6(unix.SYS_QUOTACTL_FD, fd.Fd(), uintptr(Q_GETNEXTQUOTA|uint(qtype)), uintptr(id), uintptr(unsafe.Pointer(&info)), 0, 0)
if err != unix.Errno(0) {
return nil, err
}
@@ -200,12 +173,8 @@
}
// SetQuota sets the given quota
-func SetQuota(device string, qtype QuotaType, id uint32, quota *Quota) error {
- devArg, err := unix.BytePtrFromString(device)
- if err != nil {
- return err
- }
- _, _, err = unix.Syscall6(unix.SYS_QUOTACTL, uintptr(Q_SETQUOTA|uint(qtype)), uintptr(unsafe.Pointer(devArg)), uintptr(id), uintptr(unsafe.Pointer(quota)), 0, 0)
+func SetQuota(fd *os.File, qtype QuotaType, id uint32, quota *Quota) error {
+ _, _, err := unix.Syscall6(unix.SYS_QUOTACTL_FD, fd.Fd(), uintptr(Q_SETQUOTA|uint(qtype)), uintptr(id), uintptr(unsafe.Pointer(quota)), 0, 0)
if err != unix.Errno(0) {
return fmt.Errorf("failed to set quota: %w", err)
}
@@ -214,13 +183,9 @@
// Sync syncs disk copy of filesystems quotas. If device is empty it syncs all
// filesystems.
-func Sync(device string) error {
- if device != "" {
- devArg, err := unix.BytePtrFromString(device)
- if err != nil {
- return err
- }
- _, _, err = unix.Syscall6(unix.SYS_QUOTACTL, uintptr(Q_SYNC), uintptr(unsafe.Pointer(devArg)), 0, 0, 0, 0)
+func Sync(fd *os.File) error {
+ if fd != nil {
+ _, _, err := unix.Syscall6(unix.SYS_QUOTACTL_FD, fd.Fd(), uintptr(Q_SYNC), 0, 0, 0, 0)
if err != unix.Errno(0) {
return err
}
diff --git a/third_party/linux/external.bzl b/third_party/linux/external.bzl
index c74d387..04a0826 100644
--- a/third_party/linux/external.bzl
+++ b/third_party/linux/external.bzl
@@ -21,16 +21,13 @@
"5.4.7": "abc9b21d9146d95853dac35f4c4489a0199aff53ee6eee4b0563d1b37079fcc9",
"5.6": "e342b04a2aa63808ea0ef1baab28fc520bd031ef8cf93d9ee4a31d4058fcb622",
"5.10.4": "904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec",
+ "5.15.2": "5634033a4981be42d3259f50d5371a2cdc9ace5d9860da67a2879630533ab175",
}
http_archive(
name = name,
build_file = "//third_party/linux/external:BUILD.repo",
patch_args = ["-p1"],
patches = [
- # Add fsinfo() syscall
- "//third_party/linux/external:0001-fsinfo-Introduce-a-non-repeating-system-unique-super.patch",
- "//third_party/linux/external:0002-fsinfo-Add-fsinfo-syscall-to-query-filesystem-inform.patch",
- "//third_party/linux/external:0003-fsinfo-Allow-retrieval-of-superblock-devname-options.patch",
"//third_party/linux/external:0001-block-partition-expose-PARTUUID-through-uevent.patch",
],
sha256 = sums[version],
diff --git a/third_party/linux/external/0001-block-partition-expose-PARTUUID-through-uevent.patch b/third_party/linux/external/0001-block-partition-expose-PARTUUID-through-uevent.patch
index f9e14dd..ad25836 100644
--- a/third_party/linux/external/0001-block-partition-expose-PARTUUID-through-uevent.patch
+++ b/third_party/linux/external/0001-block-partition-expose-PARTUUID-through-uevent.patch
@@ -1,4 +1,4 @@
-From 360fb82dc695dbddc31be40ed86c1d3105ca8edf Mon Sep 17 00:00:00 2001
+From 114d7d050fee217ec68bf7caee9e0ae465fec732 Mon Sep 17 00:00:00 2001
From: Mateusz Zalega <mateusz@monogon.tech>
Date: Tue, 19 Oct 2021 18:18:14 +0200
Subject: [PATCH] block: partition: expose PARTUUID through uevent
@@ -9,18 +9,18 @@
1 file changed, 2 insertions(+)
diff --git a/block/partitions/core.c b/block/partitions/core.c
-index a02e22411594..5c66aae379e7 100644
+index 7bea19dd9458..5a42f0b0eb8f 100644
--- a/block/partitions/core.c
+++ b/block/partitions/core.c
@@ -270,6 +270,8 @@ static int part_uevent(struct device *dev, struct kobj_uevent_env *env)
- add_uevent_var(env, "PARTN=%u", part->partno);
- if (part->info && part->info->volname[0])
- add_uevent_var(env, "PARTNAME=%s", part->info->volname);
-+ if (part->info && part->info->uuid[0])
-+ add_uevent_var(env, "PARTUUID=%s", part->info->uuid);
+ add_uevent_var(env, "PARTN=%u", part->bd_partno);
+ if (part->bd_meta_info && part->bd_meta_info->volname[0])
+ add_uevent_var(env, "PARTNAME=%s", part->bd_meta_info->volname);
++ if (part->bd_meta_info && part->bd_meta_info->uuid[0])
++ add_uevent_var(env, "PARTUUID=%s", part->bd_meta_info->uuid);
return 0;
}
--
-2.31.1
+2.25.1
diff --git a/third_party/linux/external/0001-fsinfo-Introduce-a-non-repeating-system-unique-super.patch b/third_party/linux/external/0001-fsinfo-Introduce-a-non-repeating-system-unique-super.patch
deleted file mode 100644
index 831114e..0000000
--- a/third_party/linux/external/0001-fsinfo-Introduce-a-non-repeating-system-unique-super.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From 2ed1d2a0a5bf09ab741f5c3d6d10021c0702be08 Mon Sep 17 00:00:00 2001
-From: David Howells <dhowells@redhat.com>
-Date: Fri, 5 Jul 2019 11:10:10 +0100
-Subject: [PATCH 1/3] fsinfo: Introduce a non-repeating system-unique
- superblock ID
-
-Introduce an (effectively) non-repeating system-unique superblock ID that
-can be used to determine that two objects are in the same superblock
-without needing to worry about the ID changing in the meantime (as is
-possible with device IDs).
-
-The counter could also be used to tag other features, such as mount
-objects.
-
-Signed-off-by: David Howells <dhowells@redhat.com>
----
- fs/internal.h | 1 +
- fs/super.c | 2 ++
- include/linux/fs.h | 3 +++
- 3 files changed, 6 insertions(+)
-
-diff --git a/fs/internal.h b/fs/internal.h
-index a7cd0f64faa4a..1b7460f055a3b 100644
---- a/fs/internal.h
-+++ b/fs/internal.h
-@@ -112,6 +112,7 @@ extern struct file *alloc_empty_file_noaccount(int, const struct cred *);
- /*
- * super.c
- */
-+extern atomic64_t vfs_unique_counter;
- extern int reconfigure_super(struct fs_context *);
- extern bool trylock_super(struct super_block *sb);
- extern struct super_block *user_get_super(dev_t);
-diff --git a/fs/super.c b/fs/super.c
-index 98bb0629ee108..31fadb7189d27 100644
---- a/fs/super.c
-+++ b/fs/super.c
-@@ -44,6 +44,7 @@ static int thaw_super_locked(struct super_block *sb);
-
- static LIST_HEAD(super_blocks);
- static DEFINE_SPINLOCK(sb_lock);
-+atomic64_t vfs_unique_counter; /* Unique identifier counter */
-
- static char *sb_writers_name[SB_FREEZE_LEVELS] = {
- "sb_writers",
-@@ -273,6 +274,7 @@ static struct super_block *alloc_super(struct file_system_type *type, int flags,
- goto fail;
- if (list_lru_init_memcg(&s->s_inode_lru, &s->s_shrink))
- goto fail;
-+ s->s_unique_id = atomic64_inc_return(&vfs_unique_counter);
- return s;
-
- fail:
-diff --git a/include/linux/fs.h b/include/linux/fs.h
-index 8bde32cf97115..e1325dec4fa86 100644
---- a/include/linux/fs.h
-+++ b/include/linux/fs.h
-@@ -1547,6 +1547,9 @@ struct super_block {
-
- spinlock_t s_inode_wblist_lock;
- struct list_head s_inodes_wb; /* writeback inodes */
-+
-+ /* Superblock information */
-+ u64 s_unique_id;
- } __randomize_layout;
-
- /* Helper functions so that in most cases filesystems will
---
-2.25.1
-
diff --git a/third_party/linux/external/0002-fsinfo-Add-fsinfo-syscall-to-query-filesystem-inform.patch b/third_party/linux/external/0002-fsinfo-Add-fsinfo-syscall-to-query-filesystem-inform.patch
deleted file mode 100644
index 7b5147f..0000000
--- a/third_party/linux/external/0002-fsinfo-Add-fsinfo-syscall-to-query-filesystem-inform.patch
+++ /dev/null
@@ -1,1953 +0,0 @@
-From 5837a1c690d51c270c8f04029530f2ce6856739a Mon Sep 17 00:00:00 2001
-From: David Howells <dhowells@redhat.com>
-Date: Fri, 6 Mar 2020 14:59:51 +0000
-Subject: [PATCH 2/3] fsinfo: Add fsinfo() syscall to query filesystem
- information
-
-Add a system call to allow filesystem information to be queried. A request
-value can be given to indicate the desired attribute. Support is provided
-for enumerating multi-value attributes.
-
-===============
-NEW SYSTEM CALL
-===============
-
-The new system call looks like:
-
- int ret = fsinfo(int dfd,
- const char *pathname,
- const struct fsinfo_params *params,
- size_t params_size,
- void *result_buffer,
- size_t result_buf_size);
-
-The params parameter optionally points to a block of parameters:
-
- struct fsinfo_params {
- __u64 resolve_flags;
- __u32 at_flags;
- __u32 flags;
- __u32 request;
- __u32 Nth;
- __u32 Mth;
- };
-
-If params is NULL, the default is that params->request is
-FSINFO_ATTR_STATFS and all the other fields are 0. params_size indicates
-the size of the parameter struct. If the parameter block is short compared
-to what the kernel expects, the missing length will be set to 0; if the
-parameter block is longer, an error will be given if the excess is not all
-zeros.
-
-The object to be queried is specified as follows - part param->flags
-indicates the type of reference:
-
- (1) FSINFO_FLAGS_QUERY_PATH - dfd, pathname and at_flags indicate a
- filesystem object to query.
-
- There is no separate system call providing an analogue of lstat() -
- AT_SYMLINK_NOFOLLOW should be set in at_flags instead.
- AT_NO_AUTOMOUNT can also be used to an allow automount point to be
- queried without triggering it.
-
- RESOLVE_* flags can also be set in resolve_flags to further restrict
- the patchwalk.
-
- (2) FSINFO_FLAGS_QUERY_FD - dfd indicates a file descriptor pointing to
- the filesystem object to query. pathname should be NULL.
-
- (3) FSINFO_FLAGS_QUERY_MOUNT - pathname indicates the numeric ID of the
- mountpoint to query as a string. dfd is used to constrain which
- mounts can be accessed. If dfd is AT_FDCWD, the mount must be within
- the subtree rooted at chroot, otherwise the mount must be within the
- subtree rooted at the directory specified by dfd.
-
- (4) In the future FSINFO_FLAGS_QUERY_FSCONTEXT will be added - dfd will
- indicate a context handle fd obtained from fsopen() or fspick(),
- allowing that to be queried before the target superblock is attached
- to the filesystem or even created.
-
-params->request indicates the attribute/attributes to be queried. This can
-be one of:
-
- FSINFO_ATTR_STATFS - statfs-style info
- FSINFO_ATTR_IDS - Filesystem IDs
- FSINFO_ATTR_LIMITS - Filesystem limits
- FSINFO_ATTR_SUPPORTS - Support for statx, ioctl, etc.
- FSINFO_ATTR_TIMESTAMP_INFO - Inode timestamp info
- FSINFO_ATTR_VOLUME_ID - Volume ID (string)
- FSINFO_ATTR_VOLUME_UUID - Volume UUID
- FSINFO_ATTR_VOLUME_NAME - Volume name (string)
- FSINFO_ATTR_FSINFO_ATTRIBUTE_INFO - Information about attr Nth
- FSINFO_ATTR_FSINFO_ATTRIBUTES - List of supported attrs
-
-Some attributes (such as the servers backing a network filesystem) can have
-multiple values. These can be enumerated by setting params->Nth and
-params->Mth to 0, 1, ... until ENODATA is returned.
-
-result_buffer and result_buf_size point to the reply buffer. The buffer is
-filled up to the specified size, even if this means truncating the reply.
-The size of the full reply is returned, irrespective of the amount data
-that was copied. In future versions, this will allow extra fields to be
-tacked on to the end of the reply, but anyone not expecting them will only
-get the subset they're expecting. If either buffer of result_buf_size are
-0, no copy will take place and the data size will be returned.
-
-Ported to 5.10 by Lorenz Brun <lorenz@nexantic.com>
-
-Signed-off-by: David Howells <dhowells@redhat.com>
-cc: linux-api@vger.kernel.org
----
- arch/alpha/kernel/syscalls/syscall.tbl | 1 +
- arch/arm/tools/syscall.tbl | 1 +
- arch/arm64/include/asm/unistd.h | 2 +-
- arch/arm64/include/asm/unistd32.h | 2 +
- arch/ia64/kernel/syscalls/syscall.tbl | 1 +
- arch/m68k/kernel/syscalls/syscall.tbl | 1 +
- arch/microblaze/kernel/syscalls/syscall.tbl | 1 +
- arch/mips/kernel/syscalls/syscall_n32.tbl | 1 +
- arch/mips/kernel/syscalls/syscall_n64.tbl | 1 +
- arch/mips/kernel/syscalls/syscall_o32.tbl | 1 +
- arch/parisc/kernel/syscalls/syscall.tbl | 1 +
- arch/powerpc/kernel/syscalls/syscall.tbl | 1 +
- arch/s390/kernel/syscalls/syscall.tbl | 1 +
- arch/sh/kernel/syscalls/syscall.tbl | 1 +
- arch/sparc/kernel/syscalls/syscall.tbl | 1 +
- arch/x86/entry/syscalls/syscall_32.tbl | 1 +
- arch/x86/entry/syscalls/syscall_64.tbl | 1 +
- arch/xtensa/kernel/syscalls/syscall.tbl | 1 +
- fs/Kconfig | 7 +
- fs/Makefile | 1 +
- fs/fsinfo.c | 596 ++++++++++++++++++
- include/linux/fs.h | 4 +
- include/linux/fsinfo.h | 74 +++
- include/linux/syscalls.h | 4 +
- include/uapi/asm-generic/unistd.h | 4 +-
- include/uapi/linux/fsinfo.h | 189 ++++++
- kernel/sys_ni.c | 1 +
- samples/vfs/Makefile | 2 +-
- samples/vfs/test-fsinfo.c | 646 ++++++++++++++++++++
- 29 files changed, 1545 insertions(+), 3 deletions(-)
- create mode 100644 fs/fsinfo.c
- create mode 100644 include/linux/fsinfo.h
- create mode 100644 include/uapi/linux/fsinfo.h
- create mode 100644 samples/vfs/test-fsinfo.c
-
-diff --git a/arch/alpha/kernel/syscalls/syscall.tbl b/arch/alpha/kernel/syscalls/syscall.tbl
-index ee7b01bb7346c..c955e31d57289 100644
---- a/arch/alpha/kernel/syscalls/syscall.tbl
-+++ b/arch/alpha/kernel/syscalls/syscall.tbl
-@@ -480,3 +480,4 @@
- 548 common pidfd_getfd sys_pidfd_getfd
- 549 common faccessat2 sys_faccessat2
- 550 common process_madvise sys_process_madvise
-+551 common fsinfo sys_fsinfo
-diff --git a/arch/arm/tools/syscall.tbl b/arch/arm/tools/syscall.tbl
-index d056a548358ea..308dfe68d892c 100644
---- a/arch/arm/tools/syscall.tbl
-+++ b/arch/arm/tools/syscall.tbl
-@@ -454,3 +454,4 @@
- 438 common pidfd_getfd sys_pidfd_getfd
- 439 common faccessat2 sys_faccessat2
- 440 common process_madvise sys_process_madvise
-+441 common fsinfo sys_fsinfo
-diff --git a/arch/arm64/include/asm/unistd.h b/arch/arm64/include/asm/unistd.h
-index b3b2019f8d16b..86a9d7b3eabe9 100644
---- a/arch/arm64/include/asm/unistd.h
-+++ b/arch/arm64/include/asm/unistd.h
-@@ -38,7 +38,7 @@
- #define __ARM_NR_compat_set_tls (__ARM_NR_COMPAT_BASE + 5)
- #define __ARM_NR_COMPAT_END (__ARM_NR_COMPAT_BASE + 0x800)
-
--#define __NR_compat_syscalls 441
-+#define __NR_compat_syscalls 442
- #endif
-
- #define __ARCH_WANT_SYS_CLONE
-diff --git a/arch/arm64/include/asm/unistd32.h b/arch/arm64/include/asm/unistd32.h
-index 107f08e03b9fd..20650e0edacb2 100644
---- a/arch/arm64/include/asm/unistd32.h
-+++ b/arch/arm64/include/asm/unistd32.h
-@@ -889,6 +889,8 @@ __SYSCALL(__NR_pidfd_getfd, sys_pidfd_getfd)
- __SYSCALL(__NR_faccessat2, sys_faccessat2)
- #define __NR_process_madvise 440
- __SYSCALL(__NR_process_madvise, sys_process_madvise)
-+#define __NR_fsinfo 441
-+__SYSCALL(__NR_fsinfo, sys_fsinfo)
-
- /*
- * Please add new compat syscalls above this comment and update
-diff --git a/arch/ia64/kernel/syscalls/syscall.tbl b/arch/ia64/kernel/syscalls/syscall.tbl
-index b96ed8b8a5089..548428f7b76c7 100644
---- a/arch/ia64/kernel/syscalls/syscall.tbl
-+++ b/arch/ia64/kernel/syscalls/syscall.tbl
-@@ -361,3 +361,4 @@
- 438 common pidfd_getfd sys_pidfd_getfd
- 439 common faccessat2 sys_faccessat2
- 440 common process_madvise sys_process_madvise
-+441 common fsinfo sys_fsinfo
-diff --git a/arch/m68k/kernel/syscalls/syscall.tbl b/arch/m68k/kernel/syscalls/syscall.tbl
-index 625fb6d328424..3dd9c1f0815ce 100644
---- a/arch/m68k/kernel/syscalls/syscall.tbl
-+++ b/arch/m68k/kernel/syscalls/syscall.tbl
-@@ -440,3 +440,4 @@
- 438 common pidfd_getfd sys_pidfd_getfd
- 439 common faccessat2 sys_faccessat2
- 440 common process_madvise sys_process_madvise
-+441 common fsinfo sys_fsinfo
-diff --git a/arch/microblaze/kernel/syscalls/syscall.tbl b/arch/microblaze/kernel/syscalls/syscall.tbl
-index aae729c95cf99..420a6d0b01004 100644
---- a/arch/microblaze/kernel/syscalls/syscall.tbl
-+++ b/arch/microblaze/kernel/syscalls/syscall.tbl
-@@ -446,3 +446,4 @@
- 438 common pidfd_getfd sys_pidfd_getfd
- 439 common faccessat2 sys_faccessat2
- 440 common process_madvise sys_process_madvise
-+441 common fsinfo sys_fsinfo
-diff --git a/arch/mips/kernel/syscalls/syscall_n32.tbl b/arch/mips/kernel/syscalls/syscall_n32.tbl
-index 32817c954435d..01420fe120bab 100644
---- a/arch/mips/kernel/syscalls/syscall_n32.tbl
-+++ b/arch/mips/kernel/syscalls/syscall_n32.tbl
-@@ -379,3 +379,4 @@
- 438 n32 pidfd_getfd sys_pidfd_getfd
- 439 n32 faccessat2 sys_faccessat2
- 440 n32 process_madvise sys_process_madvise
-+441 n32 fsinfo sys_fsinfo
-diff --git a/arch/mips/kernel/syscalls/syscall_n64.tbl b/arch/mips/kernel/syscalls/syscall_n64.tbl
-index 9e4ea3c31b1ce..6c319c38779e9 100644
---- a/arch/mips/kernel/syscalls/syscall_n64.tbl
-+++ b/arch/mips/kernel/syscalls/syscall_n64.tbl
-@@ -355,3 +355,4 @@
- 438 n64 pidfd_getfd sys_pidfd_getfd
- 439 n64 faccessat2 sys_faccessat2
- 440 n64 process_madvise sys_process_madvise
-+441 n64 fsinfo sys_fsinfo
-diff --git a/arch/mips/kernel/syscalls/syscall_o32.tbl b/arch/mips/kernel/syscalls/syscall_o32.tbl
-index 29f5f28cf5cea..46d4aa7ecb306 100644
---- a/arch/mips/kernel/syscalls/syscall_o32.tbl
-+++ b/arch/mips/kernel/syscalls/syscall_o32.tbl
-@@ -428,3 +428,4 @@
- 438 o32 pidfd_getfd sys_pidfd_getfd
- 439 o32 faccessat2 sys_faccessat2
- 440 o32 process_madvise sys_process_madvise
-+441 o32 fsinfo sys_fsinfo
-diff --git a/arch/parisc/kernel/syscalls/syscall.tbl b/arch/parisc/kernel/syscalls/syscall.tbl
-index f375ea528e59c..008282637f6af 100644
---- a/arch/parisc/kernel/syscalls/syscall.tbl
-+++ b/arch/parisc/kernel/syscalls/syscall.tbl
-@@ -438,3 +438,4 @@
- 438 common pidfd_getfd sys_pidfd_getfd
- 439 common faccessat2 sys_faccessat2
- 440 common process_madvise sys_process_madvise
-+441 common fsinfo sys_fsinfo
-diff --git a/arch/powerpc/kernel/syscalls/syscall.tbl b/arch/powerpc/kernel/syscalls/syscall.tbl
-index 1275daec7fec3..85da23afb3535 100644
---- a/arch/powerpc/kernel/syscalls/syscall.tbl
-+++ b/arch/powerpc/kernel/syscalls/syscall.tbl
-@@ -530,3 +530,4 @@
- 438 common pidfd_getfd sys_pidfd_getfd
- 439 common faccessat2 sys_faccessat2
- 440 common process_madvise sys_process_madvise
-+441 common fsinfo sys_fsinfo
-diff --git a/arch/s390/kernel/syscalls/syscall.tbl b/arch/s390/kernel/syscalls/syscall.tbl
-index 28c1680004834..83fdaebbf0b08 100644
---- a/arch/s390/kernel/syscalls/syscall.tbl
-+++ b/arch/s390/kernel/syscalls/syscall.tbl
-@@ -443,3 +443,4 @@
- 438 common pidfd_getfd sys_pidfd_getfd sys_pidfd_getfd
- 439 common faccessat2 sys_faccessat2 sys_faccessat2
- 440 common process_madvise sys_process_madvise sys_process_madvise
-+441 common fsinfo sys_fsinfo sys_fsinfo
-diff --git a/arch/sh/kernel/syscalls/syscall.tbl b/arch/sh/kernel/syscalls/syscall.tbl
-index 783738448ff55..e1f52ffa86bb8 100644
---- a/arch/sh/kernel/syscalls/syscall.tbl
-+++ b/arch/sh/kernel/syscalls/syscall.tbl
-@@ -443,3 +443,4 @@
- 438 common pidfd_getfd sys_pidfd_getfd
- 439 common faccessat2 sys_faccessat2
- 440 common process_madvise sys_process_madvise
-+441 common fsinfo sys_fsinfo
-diff --git a/arch/sparc/kernel/syscalls/syscall.tbl b/arch/sparc/kernel/syscalls/syscall.tbl
-index 78160260991be..1f42dc9965c23 100644
---- a/arch/sparc/kernel/syscalls/syscall.tbl
-+++ b/arch/sparc/kernel/syscalls/syscall.tbl
-@@ -486,3 +486,4 @@
- 438 common pidfd_getfd sys_pidfd_getfd
- 439 common faccessat2 sys_faccessat2
- 440 common process_madvise sys_process_madvise
-+441 common fsinfo sys_fsinfo
-diff --git a/arch/x86/entry/syscalls/syscall_32.tbl b/arch/x86/entry/syscalls/syscall_32.tbl
-index 0d0667a9fbd70..70da9bad3f79d 100644
---- a/arch/x86/entry/syscalls/syscall_32.tbl
-+++ b/arch/x86/entry/syscalls/syscall_32.tbl
-@@ -445,3 +445,4 @@
- 438 i386 pidfd_getfd sys_pidfd_getfd
- 439 i386 faccessat2 sys_faccessat2
- 440 i386 process_madvise sys_process_madvise
-+441 i386 fsinfo sys_fsinfo
-diff --git a/arch/x86/entry/syscalls/syscall_64.tbl b/arch/x86/entry/syscalls/syscall_64.tbl
-index 379819244b91d..94a51b78e85ed 100644
---- a/arch/x86/entry/syscalls/syscall_64.tbl
-+++ b/arch/x86/entry/syscalls/syscall_64.tbl
-@@ -362,6 +362,7 @@
- 438 common pidfd_getfd sys_pidfd_getfd
- 439 common faccessat2 sys_faccessat2
- 440 common process_madvise sys_process_madvise
-+441 common fsinfo sys_fsinfo
-
- #
- # Due to a historical design error, certain syscalls are numbered differently
-diff --git a/arch/xtensa/kernel/syscalls/syscall.tbl b/arch/xtensa/kernel/syscalls/syscall.tbl
-index b070f272995d6..2723c2f43c59a 100644
---- a/arch/xtensa/kernel/syscalls/syscall.tbl
-+++ b/arch/xtensa/kernel/syscalls/syscall.tbl
-@@ -411,3 +411,4 @@
- 438 common pidfd_getfd sys_pidfd_getfd
- 439 common faccessat2 sys_faccessat2
- 440 common process_madvise sys_process_madvise
-+441 common fsinfo sys_fsinfo
-diff --git a/fs/Kconfig b/fs/Kconfig
-index aa4c122823018..b84156272983b 100644
---- a/fs/Kconfig
-+++ b/fs/Kconfig
-@@ -15,6 +15,13 @@ config VALIDATE_FS_PARSER
- Enable this to perform validation of the parameter description for a
- filesystem when it is registered.
-
-+config FSINFO
-+ bool "Enable the fsinfo() system call"
-+ help
-+ Enable the file system information querying system call to allow
-+ comprehensive information to be retrieved about a filesystem,
-+ superblock or mount object.
-+
- if BLOCK
-
- config FS_IOMAP
-diff --git a/fs/Makefile b/fs/Makefile
-index 999d1a23f036c..02da949de3b42 100644
---- a/fs/Makefile
-+++ b/fs/Makefile
-@@ -54,6 +54,7 @@ obj-$(CONFIG_COREDUMP) += coredump.o
- obj-$(CONFIG_SYSCTL) += drop_caches.o
-
- obj-$(CONFIG_FHANDLE) += fhandle.o
-+obj-$(CONFIG_FSINFO) += fsinfo.o
- obj-y += iomap/
-
- obj-y += quota/
-diff --git a/fs/fsinfo.c b/fs/fsinfo.c
-new file mode 100644
-index 0000000000000..7d9c73e9cbdef
---- /dev/null
-+++ b/fs/fsinfo.c
-@@ -0,0 +1,596 @@
-+// SPDX-License-Identifier: GPL-2.0
-+/* Filesystem information query.
-+ *
-+ * Copyright (C) 2020 Red Hat, Inc. All Rights Reserved.
-+ * Written by David Howells (dhowells@redhat.com)
-+ */
-+#include <linux/syscalls.h>
-+#include <linux/fs.h>
-+#include <linux/file.h>
-+#include <linux/mount.h>
-+#include <linux/namei.h>
-+#include <linux/statfs.h>
-+#include <linux/security.h>
-+#include <linux/uaccess.h>
-+#include <linux/fsinfo.h>
-+#include <uapi/linux/mount.h>
-+#include "internal.h"
-+
-+/**
-+ * fsinfo_opaque - Store opaque blob as an fsinfo attribute value.
-+ * @s: The blob to store (may be NULL)
-+ * @ctx: The parameter context
-+ * @len: The length of the blob
-+ */
-+int fsinfo_opaque(const void *s, struct fsinfo_context *ctx, unsigned int len)
-+{
-+ void *p = ctx->buffer;
-+ int ret = 0;
-+
-+ if (s) {
-+ if (!ctx->want_size_only)
-+ memcpy(p, s, len);
-+ ret = len;
-+ }
-+
-+ return ret;
-+}
-+EXPORT_SYMBOL(fsinfo_opaque);
-+
-+/**
-+ * fsinfo_string - Store a NUL-terminated string as an fsinfo attribute value.
-+ * @s: The string to store (may be NULL)
-+ * @ctx: The parameter context
-+ */
-+int fsinfo_string(const char *s, struct fsinfo_context *ctx)
-+{
-+ if (!s)
-+ return 1;
-+ return fsinfo_opaque(s, ctx, min_t(size_t, strlen(s) + 1, ctx->buf_size));
-+}
-+EXPORT_SYMBOL(fsinfo_string);
-+
-+/*
-+ * Get basic filesystem stats from statfs.
-+ */
-+static int fsinfo_generic_statfs(struct path *path, struct fsinfo_context *ctx)
-+{
-+ struct fsinfo_statfs *p = ctx->buffer;
-+ struct kstatfs buf;
-+ int ret;
-+
-+ ret = vfs_statfs(path, &buf);
-+ if (ret < 0)
-+ return ret;
-+
-+ p->f_blocks.lo = buf.f_blocks;
-+ p->f_bfree.lo = buf.f_bfree;
-+ p->f_bavail.lo = buf.f_bavail;
-+ p->f_files.lo = buf.f_files;
-+ p->f_ffree.lo = buf.f_ffree;
-+ p->f_favail.lo = buf.f_ffree;
-+ p->f_bsize = buf.f_bsize;
-+ p->f_frsize = buf.f_frsize;
-+ return sizeof(*p);
-+}
-+
-+static int fsinfo_generic_ids(struct path *path, struct fsinfo_context *ctx)
-+{
-+ struct fsinfo_ids *p = ctx->buffer;
-+ struct super_block *sb;
-+ struct kstatfs buf;
-+ int ret;
-+
-+ ret = vfs_statfs(path, &buf);
-+ if (ret < 0 && ret != -ENOSYS)
-+ return ret;
-+ if (ret == 0)
-+ memcpy(&p->f_fsid, &buf.f_fsid, sizeof(p->f_fsid));
-+
-+ sb = path->dentry->d_sb;
-+ p->f_fstype = sb->s_magic;
-+ p->f_dev_major = MAJOR(sb->s_dev);
-+ p->f_dev_minor = MINOR(sb->s_dev);
-+ p->f_sb_id = sb->s_unique_id;
-+ strlcpy(p->f_fs_name, sb->s_type->name, sizeof(p->f_fs_name));
-+ return sizeof(*p);
-+}
-+
-+int fsinfo_generic_limits(struct path *path, struct fsinfo_context *ctx)
-+{
-+ struct fsinfo_limits *p = ctx->buffer;
-+ struct super_block *sb = path->dentry->d_sb;
-+
-+ p->max_file_size.hi = 0;
-+ p->max_file_size.lo = sb->s_maxbytes;
-+ p->max_ino.hi = 0;
-+ p->max_ino.lo = UINT_MAX;
-+ p->max_hard_links = sb->s_max_links;
-+ p->max_uid = UINT_MAX;
-+ p->max_gid = UINT_MAX;
-+ p->max_projid = UINT_MAX;
-+ p->max_filename_len = NAME_MAX;
-+ p->max_symlink_len = PATH_MAX;
-+ p->max_xattr_name_len = XATTR_NAME_MAX;
-+ p->max_xattr_body_len = XATTR_SIZE_MAX;
-+ p->max_dev_major = 0xffffff;
-+ p->max_dev_minor = 0xff;
-+ return sizeof(*p);
-+}
-+EXPORT_SYMBOL(fsinfo_generic_limits);
-+
-+int fsinfo_generic_supports(struct path *path, struct fsinfo_context *ctx)
-+{
-+ struct fsinfo_supports *p = ctx->buffer;
-+ struct super_block *sb = path->dentry->d_sb;
-+
-+ p->stx_mask = STATX_BASIC_STATS;
-+ if (sb->s_d_op && sb->s_d_op->d_automount)
-+ p->stx_attributes |= STATX_ATTR_AUTOMOUNT;
-+ return sizeof(*p);
-+}
-+EXPORT_SYMBOL(fsinfo_generic_supports);
-+
-+static const struct fsinfo_timestamp_info fsinfo_default_timestamp_info = {
-+ .atime = {
-+ .minimum = S64_MIN,
-+ .maximum = S64_MAX,
-+ .gran_mantissa = 1,
-+ .gran_exponent = 0,
-+ },
-+ .mtime = {
-+ .minimum = S64_MIN,
-+ .maximum = S64_MAX,
-+ .gran_mantissa = 1,
-+ .gran_exponent = 0,
-+ },
-+ .ctime = {
-+ .minimum = S64_MIN,
-+ .maximum = S64_MAX,
-+ .gran_mantissa = 1,
-+ .gran_exponent = 0,
-+ },
-+ .btime = {
-+ .minimum = S64_MIN,
-+ .maximum = S64_MAX,
-+ .gran_mantissa = 1,
-+ .gran_exponent = 0,
-+ },
-+};
-+
-+int fsinfo_generic_timestamp_info(struct path *path, struct fsinfo_context *ctx)
-+{
-+ struct fsinfo_timestamp_info *p = ctx->buffer;
-+ struct super_block *sb = path->dentry->d_sb;
-+ s8 exponent;
-+
-+ *p = fsinfo_default_timestamp_info;
-+
-+ if (sb->s_time_gran < 1000000000) {
-+ if (sb->s_time_gran < 1000)
-+ exponent = -9;
-+ else if (sb->s_time_gran < 1000000)
-+ exponent = -6;
-+ else
-+ exponent = -3;
-+
-+ p->atime.gran_exponent = exponent;
-+ p->mtime.gran_exponent = exponent;
-+ p->ctime.gran_exponent = exponent;
-+ p->btime.gran_exponent = exponent;
-+ }
-+
-+ return sizeof(*p);
-+}
-+EXPORT_SYMBOL(fsinfo_generic_timestamp_info);
-+
-+static int fsinfo_generic_volume_uuid(struct path *path, struct fsinfo_context *ctx)
-+{
-+ struct fsinfo_volume_uuid *p = ctx->buffer;
-+ struct super_block *sb = path->dentry->d_sb;
-+
-+ memcpy(p, &sb->s_uuid, sizeof(*p));
-+ return sizeof(*p);
-+}
-+
-+static int fsinfo_generic_volume_id(struct path *path, struct fsinfo_context *ctx)
-+{
-+ return fsinfo_string(path->dentry->d_sb->s_id, ctx);
-+}
-+
-+static const struct fsinfo_attribute fsinfo_common_attributes[] = {
-+ FSINFO_VSTRUCT (FSINFO_ATTR_STATFS, fsinfo_generic_statfs),
-+ FSINFO_VSTRUCT (FSINFO_ATTR_IDS, fsinfo_generic_ids),
-+ FSINFO_VSTRUCT (FSINFO_ATTR_LIMITS, fsinfo_generic_limits),
-+ FSINFO_VSTRUCT (FSINFO_ATTR_SUPPORTS, fsinfo_generic_supports),
-+ FSINFO_VSTRUCT (FSINFO_ATTR_TIMESTAMP_INFO, fsinfo_generic_timestamp_info),
-+ FSINFO_STRING (FSINFO_ATTR_VOLUME_ID, fsinfo_generic_volume_id),
-+ FSINFO_VSTRUCT (FSINFO_ATTR_VOLUME_UUID, fsinfo_generic_volume_uuid),
-+
-+ FSINFO_LIST (FSINFO_ATTR_FSINFO_ATTRIBUTES, (void *)123UL),
-+ FSINFO_VSTRUCT_N(FSINFO_ATTR_FSINFO_ATTRIBUTE_INFO, (void *)123UL),
-+ {}
-+};
-+
-+/*
-+ * Determine an attribute's minimum buffer size and, if the buffer is large
-+ * enough, get the attribute value.
-+ */
-+static int fsinfo_get_this_attribute(struct path *path,
-+ struct fsinfo_context *ctx,
-+ const struct fsinfo_attribute *attr)
-+{
-+ int buf_size;
-+
-+ if (ctx->Nth != 0 && !(attr->flags & (FSINFO_FLAGS_N | FSINFO_FLAGS_NM)))
-+ return -ENODATA;
-+ if (ctx->Mth != 0 && !(attr->flags & FSINFO_FLAGS_NM))
-+ return -ENODATA;
-+
-+ switch (attr->type) {
-+ case FSINFO_TYPE_VSTRUCT:
-+ ctx->clear_tail = true;
-+ buf_size = attr->size;
-+ break;
-+ case FSINFO_TYPE_STRING:
-+ case FSINFO_TYPE_OPAQUE:
-+ case FSINFO_TYPE_LIST:
-+ buf_size = 4096;
-+ break;
-+ default:
-+ return -ENOPKG;
-+ }
-+
-+ if (ctx->buf_size < buf_size)
-+ return buf_size;
-+
-+ return attr->get(path, ctx);
-+}
-+
-+static void fsinfo_attributes_insert(struct fsinfo_context *ctx,
-+ const struct fsinfo_attribute *attr)
-+{
-+ __u32 *p = ctx->buffer;
-+ unsigned int i;
-+
-+ if (ctx->usage >= ctx->buf_size ||
-+ ctx->buf_size - ctx->usage < sizeof(__u32)) {
-+ ctx->usage += sizeof(__u32);
-+ return;
-+ }
-+
-+ for (i = 0; i < ctx->usage / sizeof(__u32); i++)
-+ if (p[i] == attr->attr_id)
-+ return;
-+
-+ p[i] = attr->attr_id;
-+ ctx->usage += sizeof(__u32);
-+}
-+
-+static int fsinfo_list_attributes(struct path *path,
-+ struct fsinfo_context *ctx,
-+ const struct fsinfo_attribute *attributes)
-+{
-+ const struct fsinfo_attribute *a;
-+
-+ for (a = attributes; a->get; a++)
-+ fsinfo_attributes_insert(ctx, a);
-+ return -EOPNOTSUPP; /* We want to go through all the lists */
-+}
-+
-+static int fsinfo_get_attribute_info(struct path *path,
-+ struct fsinfo_context *ctx,
-+ const struct fsinfo_attribute *attributes)
-+{
-+ const struct fsinfo_attribute *a;
-+ struct fsinfo_attribute_info *p = ctx->buffer;
-+
-+ if (!ctx->buf_size)
-+ return sizeof(*p);
-+
-+ for (a = attributes; a->get; a++) {
-+ if (a->attr_id == ctx->Nth) {
-+ p->attr_id = a->attr_id;
-+ p->type = a->type;
-+ p->flags = a->flags;
-+ p->size = a->size;
-+ p->size = a->size;
-+ return sizeof(*p);
-+ }
-+ }
-+ return -EOPNOTSUPP; /* We want to go through all the lists */
-+}
-+
-+/**
-+ * fsinfo_get_attribute - Look up and handle an attribute
-+ * @path: The object to query
-+ * @params: Parameters to define a request and place to store result
-+ * @attributes: List of attributes to search.
-+ *
-+ * Look through a list of attributes for one that matches the requested
-+ * attribute then call the handler for it.
-+ */
-+int fsinfo_get_attribute(struct path *path, struct fsinfo_context *ctx,
-+ const struct fsinfo_attribute *attributes)
-+{
-+ const struct fsinfo_attribute *a;
-+
-+ switch (ctx->requested_attr) {
-+ case FSINFO_ATTR_FSINFO_ATTRIBUTE_INFO:
-+ return fsinfo_get_attribute_info(path, ctx, attributes);
-+ case FSINFO_ATTR_FSINFO_ATTRIBUTES:
-+ return fsinfo_list_attributes(path, ctx, attributes);
-+ default:
-+ for (a = attributes; a->get; a++)
-+ if (a->attr_id == ctx->requested_attr)
-+ return fsinfo_get_this_attribute(path, ctx, a);
-+ return -EOPNOTSUPP;
-+ }
-+}
-+EXPORT_SYMBOL(fsinfo_get_attribute);
-+
-+/**
-+ * generic_fsinfo - Handle an fsinfo attribute generically
-+ * @path: The object to query
-+ * @params: Parameters to define a request and place to store result
-+ */
-+static int fsinfo_call(struct path *path, struct fsinfo_context *ctx)
-+{
-+ int ret;
-+
-+ if (path->dentry->d_sb->s_op->fsinfo) {
-+ ret = path->dentry->d_sb->s_op->fsinfo(path, ctx);
-+ if (ret != -EOPNOTSUPP)
-+ return ret;
-+ }
-+ ret = fsinfo_get_attribute(path, ctx, fsinfo_common_attributes);
-+ if (ret != -EOPNOTSUPP)
-+ return ret;
-+
-+ switch (ctx->requested_attr) {
-+ case FSINFO_ATTR_FSINFO_ATTRIBUTE_INFO:
-+ return -ENODATA;
-+ case FSINFO_ATTR_FSINFO_ATTRIBUTES:
-+ return ctx->usage;
-+ default:
-+ return -EOPNOTSUPP;
-+ }
-+}
-+
-+/**
-+ * vfs_fsinfo - Retrieve filesystem information
-+ * @path: The object to query
-+ * @params: Parameters to define a request and place to store result
-+ *
-+ * Get an attribute on a filesystem or an object within a filesystem. The
-+ * filesystem attribute to be queried is indicated by @ctx->requested_attr, and
-+ * if it's a multi-valued attribute, the particular value is selected by
-+ * @ctx->Nth and then @ctx->Mth.
-+ *
-+ * For common attributes, a value may be fabricated if it is not supported by
-+ * the filesystem.
-+ *
-+ * On success, the size of the attribute's value is returned (0 is a valid
-+ * size). A buffer will have been allocated and will be pointed to by
-+ * @ctx->buffer. The caller must free this with kvfree().
-+ *
-+ * Errors can also be returned: -ENOMEM if a buffer cannot be allocated, -EPERM
-+ * or -EACCES if permission is denied by the LSM, -EOPNOTSUPP if an attribute
-+ * doesn't exist for the specified object or -ENODATA if the attribute exists,
-+ * but the Nth,Mth value does not exist. -EMSGSIZE indicates that the value is
-+ * unmanageable internally and -ENOPKG indicates other internal failure.
-+ *
-+ * Errors such as -EIO may also come from attempts to access media or servers
-+ * to obtain the requested information if it's not immediately to hand.
-+ *
-+ * [*] Note that the caller may set @ctx->want_size_only if it only wants the
-+ * size of the value and not the data. If this is set, a buffer may not be
-+ * allocated under some circumstances. This is intended for size query by
-+ * userspace.
-+ *
-+ * [*] Note that @ctx->clear_tail will be returned set if the data should be
-+ * padded out with zeros when writing it to userspace.
-+ */
-+static int vfs_fsinfo(struct path *path, struct fsinfo_context *ctx)
-+{
-+ struct dentry *dentry = path->dentry;
-+ int ret;
-+
-+ ret = security_sb_statfs(dentry);
-+ if (ret)
-+ return ret;
-+
-+ /* Call the handler to find out the buffer size required. */
-+ ctx->buf_size = 0;
-+ ret = fsinfo_call(path, ctx);
-+ if (ret < 0 || ctx->want_size_only)
-+ return ret;
-+ ctx->buf_size = ret;
-+
-+ do {
-+ /* Allocate a buffer of the requested size. */
-+ if (ctx->buf_size > INT_MAX)
-+ return -EMSGSIZE;
-+ ctx->buffer = kvzalloc(ctx->buf_size, GFP_KERNEL);
-+ if (!ctx->buffer)
-+ return -ENOMEM;
-+
-+ ctx->usage = 0;
-+ ctx->skip = 0;
-+ ret = fsinfo_call(path, ctx);
-+ if (IS_ERR_VALUE((long)ret))
-+ return ret;
-+ if ((unsigned int)ret <= ctx->buf_size)
-+ return ret; /* It fitted */
-+
-+ /* We need to resize the buffer */
-+ ctx->buf_size = roundup(ret, PAGE_SIZE);
-+ kvfree(ctx->buffer);
-+ ctx->buffer = NULL;
-+ } while (!signal_pending(current));
-+
-+ return -ERESTARTSYS;
-+}
-+
-+static int vfs_fsinfo_path(int dfd, const char __user *pathname,
-+ const struct fsinfo_params *up,
-+ struct fsinfo_context *ctx)
-+{
-+ struct path path;
-+ unsigned lookup_flags = LOOKUP_FOLLOW | LOOKUP_AUTOMOUNT;
-+ int ret = -EINVAL;
-+
-+ if (up->resolve_flags & ~VALID_RESOLVE_FLAGS)
-+ return -EINVAL;
-+ if (up->at_flags & ~(AT_SYMLINK_NOFOLLOW | AT_NO_AUTOMOUNT |
-+ AT_EMPTY_PATH))
-+ return -EINVAL;
-+
-+ if (up->resolve_flags & RESOLVE_NO_XDEV)
-+ lookup_flags |= LOOKUP_NO_XDEV;
-+ if (up->resolve_flags & RESOLVE_NO_MAGICLINKS)
-+ lookup_flags |= LOOKUP_NO_MAGICLINKS;
-+ if (up->resolve_flags & RESOLVE_NO_SYMLINKS)
-+ lookup_flags |= LOOKUP_NO_SYMLINKS;
-+ if (up->resolve_flags & RESOLVE_BENEATH)
-+ lookup_flags |= LOOKUP_BENEATH;
-+ if (up->resolve_flags & RESOLVE_IN_ROOT)
-+ lookup_flags |= LOOKUP_IN_ROOT;
-+ if (up->at_flags & AT_SYMLINK_NOFOLLOW)
-+ lookup_flags &= ~LOOKUP_FOLLOW;
-+ if (up->at_flags & AT_NO_AUTOMOUNT)
-+ lookup_flags &= ~LOOKUP_AUTOMOUNT;
-+ if (up->at_flags & AT_EMPTY_PATH)
-+ lookup_flags |= LOOKUP_EMPTY;
-+
-+retry:
-+ ret = user_path_at(dfd, pathname, lookup_flags, &path);
-+ if (ret)
-+ goto out;
-+
-+ ret = vfs_fsinfo(&path, ctx);
-+ path_put(&path);
-+ if (retry_estale(ret, lookup_flags)) {
-+ lookup_flags |= LOOKUP_REVAL;
-+ goto retry;
-+ }
-+out:
-+ return ret;
-+}
-+
-+static int vfs_fsinfo_fd(unsigned int fd, struct fsinfo_context *ctx)
-+{
-+ struct fd f = fdget_raw(fd);
-+ int ret = -EBADF;
-+
-+ if (f.file) {
-+ ret = vfs_fsinfo(&f.file->f_path, ctx);
-+ fdput(f);
-+ }
-+ return ret;
-+}
-+
-+/**
-+ * sys_fsinfo - System call to get filesystem information
-+ * @dfd: Base directory to pathwalk from or fd referring to filesystem.
-+ * @pathname: Filesystem to query or NULL.
-+ * @params: Parameters to define request (NULL: FSINFO_ATTR_STATFS).
-+ * @params_size: Size of parameter buffer.
-+ * @result_buffer: Result buffer.
-+ * @result_buf_size: Size of result buffer.
-+ *
-+ * Get information on a filesystem. The filesystem attribute to be queried is
-+ * indicated by @_params->request, and some of the attributes can have multiple
-+ * values, indexed by @_params->Nth and @_params->Mth. If @_params is NULL,
-+ * then the 0th fsinfo_attr_statfs attribute is queried. If an attribute does
-+ * not exist, EOPNOTSUPP is returned; if the Nth,Mth value does not exist,
-+ * ENODATA is returned.
-+ *
-+ * On success, the size of the attribute's value is returned. If
-+ * @result_buf_size is 0 or @result_buffer is NULL, only the size is returned.
-+ * If the size of the value is larger than @result_buf_size, it will be
-+ * truncated by the copy. If the size of the value is smaller than
-+ * @result_buf_size then the excess buffer space will be cleared. The full
-+ * size of the value will be returned, irrespective of how much data is
-+ * actually placed in the buffer.
-+ */
-+SYSCALL_DEFINE6(fsinfo,
-+ int, dfd,
-+ const char __user *, pathname,
-+ const struct fsinfo_params __user *, params,
-+ size_t, params_size,
-+ void __user *, result_buffer,
-+ size_t, result_buf_size)
-+{
-+ struct fsinfo_context ctx;
-+ struct fsinfo_params user_params;
-+ unsigned int result_size;
-+ void *r;
-+ int ret;
-+
-+ if ((!params && params_size) ||
-+ ( params && !params_size) ||
-+ (!result_buffer && result_buf_size) ||
-+ ( result_buffer && !result_buf_size))
-+ return -EINVAL;
-+ if (result_buf_size > UINT_MAX)
-+ return -EOVERFLOW;
-+
-+ memset(&ctx, 0, sizeof(ctx));
-+ ctx.requested_attr = FSINFO_ATTR_STATFS;
-+ ctx.flags = FSINFO_FLAGS_QUERY_PATH;
-+ ctx.want_size_only = (result_buf_size == 0);
-+
-+ if (params) {
-+ ret = copy_struct_from_user(&user_params, sizeof(user_params),
-+ params, params_size);
-+ if (ret < 0)
-+ return ret;
-+ if (user_params.flags & ~FSINFO_FLAGS_QUERY_MASK)
-+ return -EINVAL;
-+ ctx.flags = user_params.flags;
-+ ctx.requested_attr = user_params.request;
-+ ctx.Nth = user_params.Nth;
-+ ctx.Mth = user_params.Mth;
-+ }
-+
-+ switch (ctx.flags & FSINFO_FLAGS_QUERY_MASK) {
-+ case FSINFO_FLAGS_QUERY_PATH:
-+ ret = vfs_fsinfo_path(dfd, pathname, &user_params, &ctx);
-+ break;
-+ case FSINFO_FLAGS_QUERY_FD:
-+ if (pathname)
-+ return -EINVAL;
-+ ret = vfs_fsinfo_fd(dfd, &ctx);
-+ break;
-+ default:
-+ return -EINVAL;
-+ }
-+
-+ if (ret < 0)
-+ goto error;
-+
-+ r = ctx.buffer + ctx.skip;
-+ result_size = min_t(size_t, ret, result_buf_size);
-+ if (result_size > 0 &&
-+ copy_to_user(result_buffer, r, result_size) != 0) {
-+ ret = -EFAULT;
-+ goto error;
-+ }
-+
-+ /* Clear any part of the buffer that we won't fill if we're putting a
-+ * struct in there. Strings, opaque objects and arrays are expected to
-+ * be variable length.
-+ */
-+ if (ctx.clear_tail &&
-+ result_buf_size > result_size &&
-+ clear_user(result_buffer + result_size,
-+ result_buf_size - result_size) != 0) {
-+ ret = -EFAULT;
-+ goto error;
-+ }
-+
-+error:
-+ kvfree(ctx.buffer);
-+ return ret;
-+}
-diff --git a/include/linux/fs.h b/include/linux/fs.h
-index e1325dec4fa86..2d5a2f709f322 100644
---- a/include/linux/fs.h
-+++ b/include/linux/fs.h
-@@ -68,6 +68,7 @@ struct fsverity_info;
- struct fsverity_operations;
- struct fs_context;
- struct fs_parameter_spec;
-+struct fsinfo_context;
-
- extern void __init inode_init(void);
- extern void __init inode_init_early(void);
-@@ -1951,6 +1952,9 @@ struct super_operations {
- int (*thaw_super) (struct super_block *);
- int (*unfreeze_fs) (struct super_block *);
- int (*statfs) (struct dentry *, struct kstatfs *);
-+#ifdef CONFIG_FSINFO
-+ int (*fsinfo)(struct path *, struct fsinfo_context *);
-+#endif
- int (*remount_fs) (struct super_block *, int *, char *);
- void (*umount_begin) (struct super_block *);
-
-diff --git a/include/linux/fsinfo.h b/include/linux/fsinfo.h
-new file mode 100644
-index 0000000000000..a811d69b02ff0
---- /dev/null
-+++ b/include/linux/fsinfo.h
-@@ -0,0 +1,74 @@
-+// SPDX-License-Identifier: GPL-2.0
-+/* Filesystem information query
-+ *
-+ * Copyright (C) 2020 Red Hat, Inc. All Rights Reserved.
-+ * Written by David Howells (dhowells@redhat.com)
-+ */
-+
-+#ifndef _LINUX_FSINFO_H
-+#define _LINUX_FSINFO_H
-+
-+#ifdef CONFIG_FSINFO
-+
-+#include <uapi/linux/fsinfo.h>
-+
-+struct path;
-+
-+#define FSINFO_NORMAL_ATTR_MAX_SIZE 4096
-+
-+struct fsinfo_context {
-+ __u32 flags; /* [in] FSINFO_FLAGS_* */
-+ __u32 requested_attr; /* [in] What is being asking for */
-+ __u32 Nth; /* [in] Instance of it (some may have multiple) */
-+ __u32 Mth; /* [in] Subinstance */
-+ bool want_size_only; /* [in] Just want to know the size, not the data */
-+ bool clear_tail; /* [out] T if tail of buffer should be cleared */
-+ unsigned int skip; /* [out] Number of bytes to skip in buffer */
-+ unsigned int usage; /* [tmp] Amount of buffer used (if large) */
-+ unsigned int buf_size; /* [tmp] Size of ->buffer[] */
-+ void *buffer; /* [out] The reply buffer */
-+};
-+
-+/*
-+ * A filesystem information attribute definition.
-+ */
-+struct fsinfo_attribute {
-+ unsigned int attr_id; /* The ID of the attribute */
-+ enum fsinfo_value_type type:8; /* The type of the attribute's value(s) */
-+ unsigned int flags:8;
-+ unsigned int size:16; /* - Value size (FSINFO_STRUCT/LIST) */
-+ int (*get)(struct path *path, struct fsinfo_context *params);
-+};
-+
-+#define __FSINFO(A, T, S, G, F) \
-+ { .attr_id = A, .type = T, .flags = F, .size = S, .get = G }
-+
-+#define _FSINFO(A, T, S, G) __FSINFO(A, T, S, G, 0)
-+#define _FSINFO_N(A, T, S, G) __FSINFO(A, T, S, G, FSINFO_FLAGS_N)
-+#define _FSINFO_NM(A, T, S, G) __FSINFO(A, T, S, G, FSINFO_FLAGS_NM)
-+
-+#define _FSINFO_VSTRUCT(A,S,G) _FSINFO (A, FSINFO_TYPE_VSTRUCT, sizeof(S), G)
-+#define _FSINFO_VSTRUCT_N(A,S,G) _FSINFO_N (A, FSINFO_TYPE_VSTRUCT, sizeof(S), G)
-+#define _FSINFO_VSTRUCT_NM(A,S,G) _FSINFO_NM(A, FSINFO_TYPE_VSTRUCT, sizeof(S), G)
-+
-+#define FSINFO_VSTRUCT(A,G) _FSINFO_VSTRUCT (A, A##__STRUCT, G)
-+#define FSINFO_VSTRUCT_N(A,G) _FSINFO_VSTRUCT_N (A, A##__STRUCT, G)
-+#define FSINFO_VSTRUCT_NM(A,G) _FSINFO_VSTRUCT_NM(A, A##__STRUCT, G)
-+#define FSINFO_STRING(A,G) _FSINFO (A, FSINFO_TYPE_STRING, 0, G)
-+#define FSINFO_STRING_N(A,G) _FSINFO_N (A, FSINFO_TYPE_STRING, 0, G)
-+#define FSINFO_STRING_NM(A,G) _FSINFO_NM(A, FSINFO_TYPE_STRING, 0, G)
-+#define FSINFO_OPAQUE(A,G) _FSINFO (A, FSINFO_TYPE_OPAQUE, 0, G)
-+#define FSINFO_LIST(A,G) _FSINFO (A, FSINFO_TYPE_LIST, sizeof(A##__STRUCT), G)
-+#define FSINFO_LIST_N(A,G) _FSINFO_N (A, FSINFO_TYPE_LIST, sizeof(A##__STRUCT), G)
-+
-+extern int fsinfo_opaque(const void *, struct fsinfo_context *, unsigned int);
-+extern int fsinfo_string(const char *, struct fsinfo_context *);
-+extern int fsinfo_generic_timestamp_info(struct path *, struct fsinfo_context *);
-+extern int fsinfo_generic_supports(struct path *, struct fsinfo_context *);
-+extern int fsinfo_generic_limits(struct path *, struct fsinfo_context *);
-+extern int fsinfo_get_attribute(struct path *, struct fsinfo_context *,
-+ const struct fsinfo_attribute *);
-+
-+#endif /* CONFIG_FSINFO */
-+
-+#endif /* _LINUX_FSINFO_H */
-diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
-index 37bea07c12f21..e315f719899a1 100644
---- a/include/linux/syscalls.h
-+++ b/include/linux/syscalls.h
-@@ -47,6 +47,7 @@ struct stat64;
- struct statfs;
- struct statfs64;
- struct statx;
-+struct fsinfo_params;
- struct sysinfo;
- struct timespec;
- struct __kernel_old_timeval;
-@@ -1008,6 +1009,9 @@ asmlinkage long sys_pidfd_send_signal(int pidfd, int sig,
- siginfo_t __user *info,
- unsigned int flags);
- asmlinkage long sys_pidfd_getfd(int pidfd, int fd, unsigned int flags);
-+asmlinkage long sys_fsinfo(int dfd, const char __user *pathname,
-+ const struct fsinfo_params __user *params, size_t params_size,
-+ void __user *result_buffer, size_t result_buf_size);
-
- /*
- * Architecture-specific system calls
-diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h
-index 2056318988f77..3a2e44f770f8e 100644
---- a/include/uapi/asm-generic/unistd.h
-+++ b/include/uapi/asm-generic/unistd.h
-@@ -859,9 +859,11 @@ __SYSCALL(__NR_pidfd_getfd, sys_pidfd_getfd)
- __SYSCALL(__NR_faccessat2, sys_faccessat2)
- #define __NR_process_madvise 440
- __SYSCALL(__NR_process_madvise, sys_process_madvise)
-+#define __NR_fsinfo 441
-+__SYSCALL(__NR_fsinfo, sys_fsinfo)
-
- #undef __NR_syscalls
--#define __NR_syscalls 441
-+#define __NR_syscalls 443
-
- /*
- * 32 bit systems traditionally used different
-diff --git a/include/uapi/linux/fsinfo.h b/include/uapi/linux/fsinfo.h
-new file mode 100644
-index 0000000000000..65892239ba86c
---- /dev/null
-+++ b/include/uapi/linux/fsinfo.h
-@@ -0,0 +1,189 @@
-+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-+/* fsinfo() definitions.
-+ *
-+ * Copyright (C) 2020 Red Hat, Inc. All Rights Reserved.
-+ * Written by David Howells (dhowells@redhat.com)
-+ */
-+#ifndef _UAPI_LINUX_FSINFO_H
-+#define _UAPI_LINUX_FSINFO_H
-+
-+#include <linux/types.h>
-+#include <linux/socket.h>
-+#include <linux/openat2.h>
-+
-+/*
-+ * The filesystem attributes that can be requested. Note that some attributes
-+ * may have multiple instances which can be switched in the parameter block.
-+ */
-+#define FSINFO_ATTR_STATFS 0x00 /* statfs()-style state */
-+#define FSINFO_ATTR_IDS 0x01 /* Filesystem IDs */
-+#define FSINFO_ATTR_LIMITS 0x02 /* Filesystem limits */
-+#define FSINFO_ATTR_SUPPORTS 0x03 /* What's supported in statx, iocflags, ... */
-+#define FSINFO_ATTR_TIMESTAMP_INFO 0x04 /* Inode timestamp info */
-+#define FSINFO_ATTR_VOLUME_ID 0x05 /* Volume ID (string) */
-+#define FSINFO_ATTR_VOLUME_UUID 0x06 /* Volume UUID (LE uuid) */
-+#define FSINFO_ATTR_VOLUME_NAME 0x07 /* Volume name (string) */
-+
-+#define FSINFO_ATTR_FSINFO_ATTRIBUTE_INFO 0x100 /* Information about attr N (for path) */
-+#define FSINFO_ATTR_FSINFO_ATTRIBUTES 0x101 /* List of supported attrs (for path) */
-+
-+/*
-+ * Optional fsinfo() parameter structure.
-+ *
-+ * If this is not given, it is assumed that fsinfo_attr_statfs instance 0,0 is
-+ * desired.
-+ */
-+struct fsinfo_params {
-+ __u64 resolve_flags; /* RESOLVE_* flags */
-+ __u32 at_flags; /* AT_* flags */
-+ __u32 flags; /* Flags controlling fsinfo() specifically */
-+#define FSINFO_FLAGS_QUERY_MASK 0x0007 /* What object should fsinfo() query? */
-+#define FSINFO_FLAGS_QUERY_PATH 0x0000 /* - path, specified by dirfd,pathname,AT_EMPTY_PATH */
-+#define FSINFO_FLAGS_QUERY_FD 0x0001 /* - fd specified by dirfd */
-+ __u32 request; /* ID of requested attribute */
-+ __u32 Nth; /* Instance of it (some may have multiple) */
-+ __u32 Mth; /* Subinstance of Nth instance */
-+};
-+
-+enum fsinfo_value_type {
-+ FSINFO_TYPE_VSTRUCT = 0, /* Version-lengthed struct (up to 4096 bytes) */
-+ FSINFO_TYPE_STRING = 1, /* NUL-term var-length string (up to 4095 chars) */
-+ FSINFO_TYPE_OPAQUE = 2, /* Opaque blob (unlimited size) */
-+ FSINFO_TYPE_LIST = 3, /* List of ints/structs (unlimited size) */
-+};
-+
-+/*
-+ * Information struct for fsinfo(FSINFO_ATTR_FSINFO_ATTRIBUTE_INFO).
-+ *
-+ * This gives information about the attributes supported by fsinfo for the
-+ * given path.
-+ */
-+struct fsinfo_attribute_info {
-+ unsigned int attr_id; /* The ID of the attribute */
-+ enum fsinfo_value_type type; /* The type of the attribute's value(s) */
-+ unsigned int flags;
-+#define FSINFO_FLAGS_N 0x01 /* - Attr has a set of values */
-+#define FSINFO_FLAGS_NM 0x02 /* - Attr has a set of sets of values */
-+ unsigned int size; /* - Value size (FSINFO_STRUCT/FSINFO_LIST) */
-+};
-+
-+#define FSINFO_ATTR_FSINFO_ATTRIBUTE_INFO__STRUCT struct fsinfo_attribute_info
-+#define FSINFO_ATTR_FSINFO_ATTRIBUTES__STRUCT __u32
-+
-+struct fsinfo_u128 {
-+#if defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN)
-+ __u64 hi;
-+ __u64 lo;
-+#elif defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN)
-+ __u64 lo;
-+ __u64 hi;
-+#endif
-+};
-+
-+/*
-+ * Information struct for fsinfo(FSINFO_ATTR_STATFS).
-+ * - This gives extended filesystem information.
-+ */
-+struct fsinfo_statfs {
-+ struct fsinfo_u128 f_blocks; /* Total number of blocks in fs */
-+ struct fsinfo_u128 f_bfree; /* Total number of free blocks */
-+ struct fsinfo_u128 f_bavail; /* Number of free blocks available to ordinary user */
-+ struct fsinfo_u128 f_files; /* Total number of file nodes in fs */
-+ struct fsinfo_u128 f_ffree; /* Number of free file nodes */
-+ struct fsinfo_u128 f_favail; /* Number of file nodes available to ordinary user */
-+ __u64 f_bsize; /* Optimal block size */
-+ __u64 f_frsize; /* Fragment size */
-+};
-+
-+#define FSINFO_ATTR_STATFS__STRUCT struct fsinfo_statfs
-+
-+/*
-+ * Information struct for fsinfo(FSINFO_ATTR_IDS).
-+ *
-+ * List of basic identifiers as is normally found in statfs().
-+ */
-+struct fsinfo_ids {
-+ char f_fs_name[15 + 1]; /* Filesystem name */
-+ __u64 f_fsid; /* Short 64-bit Filesystem ID (as statfs) */
-+ __u64 f_sb_id; /* Internal superblock ID for sbnotify()/mntnotify() */
-+ __u32 f_fstype; /* Filesystem type from linux/magic.h [uncond] */
-+ __u32 f_dev_major; /* As st_dev_* from struct statx [uncond] */
-+ __u32 f_dev_minor;
-+ __u32 __padding[1];
-+};
-+
-+#define FSINFO_ATTR_IDS__STRUCT struct fsinfo_ids
-+
-+/*
-+ * Information struct for fsinfo(FSINFO_ATTR_LIMITS).
-+ *
-+ * List of supported filesystem limits.
-+ */
-+struct fsinfo_limits {
-+ struct fsinfo_u128 max_file_size; /* Maximum file size */
-+ struct fsinfo_u128 max_ino; /* Maximum inode number */
-+ __u64 max_uid; /* Maximum UID supported */
-+ __u64 max_gid; /* Maximum GID supported */
-+ __u64 max_projid; /* Maximum project ID supported */
-+ __u64 max_hard_links; /* Maximum number of hard links on a file */
-+ __u64 max_xattr_body_len; /* Maximum xattr content length */
-+ __u32 max_xattr_name_len; /* Maximum xattr name length */
-+ __u32 max_filename_len; /* Maximum filename length */
-+ __u32 max_symlink_len; /* Maximum symlink content length */
-+ __u32 max_dev_major; /* Maximum device major representable */
-+ __u32 max_dev_minor; /* Maximum device minor representable */
-+ __u32 __padding[1];
-+};
-+
-+#define FSINFO_ATTR_LIMITS__STRUCT struct fsinfo_limits
-+
-+/*
-+ * Information struct for fsinfo(FSINFO_ATTR_SUPPORTS).
-+ *
-+ * What's supported in various masks, such as statx() attribute and mask bits
-+ * and IOC flags.
-+ */
-+struct fsinfo_supports {
-+ __u64 stx_attributes; /* What statx::stx_attributes are supported */
-+ __u32 stx_mask; /* What statx::stx_mask bits are supported */
-+ __u32 fs_ioc_getflags; /* What FS_IOC_GETFLAGS may return */
-+ __u32 fs_ioc_setflags_set; /* What FS_IOC_SETFLAGS may set */
-+ __u32 fs_ioc_setflags_clear; /* What FS_IOC_SETFLAGS may clear */
-+ __u32 fs_ioc_fsgetxattr_xflags; /* What FS_IOC_FSGETXATTR[A] may return in fsx_xflags */
-+ __u32 fs_ioc_fssetxattr_xflags_set; /* What FS_IOC_FSSETXATTR may set in fsx_xflags */
-+ __u32 fs_ioc_fssetxattr_xflags_clear; /* What FS_IOC_FSSETXATTR may set in fsx_xflags */
-+ __u32 win_file_attrs; /* What DOS/Windows FILE_* attributes are supported */
-+};
-+
-+#define FSINFO_ATTR_SUPPORTS__STRUCT struct fsinfo_supports
-+
-+struct fsinfo_timestamp_one {
-+ __s64 minimum; /* Minimum timestamp value in seconds */
-+ __s64 maximum; /* Maximum timestamp value in seconds */
-+ __u16 gran_mantissa; /* Granularity(secs) = mant * 10^exp */
-+ __s8 gran_exponent;
-+ __u8 __padding[5];
-+};
-+
-+/*
-+ * Information struct for fsinfo(FSINFO_ATTR_TIMESTAMP_INFO).
-+ */
-+struct fsinfo_timestamp_info {
-+ struct fsinfo_timestamp_one atime; /* Access time */
-+ struct fsinfo_timestamp_one mtime; /* Modification time */
-+ struct fsinfo_timestamp_one ctime; /* Change time */
-+ struct fsinfo_timestamp_one btime; /* Birth/creation time */
-+};
-+
-+#define FSINFO_ATTR_TIMESTAMP_INFO__STRUCT struct fsinfo_timestamp_info
-+
-+/*
-+ * Information struct for fsinfo(FSINFO_ATTR_VOLUME_UUID).
-+ */
-+struct fsinfo_volume_uuid {
-+ __u8 uuid[16];
-+};
-+
-+#define FSINFO_ATTR_VOLUME_UUID__STRUCT struct fsinfo_volume_uuid
-+
-+#endif /* _UAPI_LINUX_FSINFO_H */
-diff --git a/kernel/sys_ni.c b/kernel/sys_ni.c
-index f27ac94d5fa72..3cf167e82606f 100644
---- a/kernel/sys_ni.c
-+++ b/kernel/sys_ni.c
-@@ -51,6 +51,7 @@ COND_SYSCALL_COMPAT(io_pgetevents);
- COND_SYSCALL(io_uring_setup);
- COND_SYSCALL(io_uring_enter);
- COND_SYSCALL(io_uring_register);
-+COND_SYSCALL(fsinfo);
-
- /* fs/xattr.c */
-
-diff --git a/samples/vfs/Makefile b/samples/vfs/Makefile
-index 6377a678134ac..8efb67c45ceaa 100644
---- a/samples/vfs/Makefile
-+++ b/samples/vfs/Makefile
-@@ -1,4 +1,4 @@
- # SPDX-License-Identifier: GPL-2.0-only
--userprogs-always-y += test-fsmount test-statx
-+userprogs-always-y += test-fsinfo test-fsmount test-statx
-
- userccflags += -I usr/include
-diff --git a/samples/vfs/test-fsinfo.c b/samples/vfs/test-fsinfo.c
-new file mode 100644
-index 0000000000000..934b25399ffed
---- /dev/null
-+++ b/samples/vfs/test-fsinfo.c
-@@ -0,0 +1,646 @@
-+// SPDX-License-Identifier: GPL-2.0-or-later
-+/* Test the fsinfo() system call
-+ *
-+ * Copyright (C) 2020 Red Hat, Inc. All Rights Reserved.
-+ * Written by David Howells (dhowells@redhat.com)
-+ */
-+
-+#define _GNU_SOURCE
-+#define _ATFILE_SOURCE
-+#include <stdbool.h>
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <stdint.h>
-+#include <string.h>
-+#include <unistd.h>
-+#include <ctype.h>
-+#include <errno.h>
-+#include <time.h>
-+#include <math.h>
-+#include <fcntl.h>
-+#include <sys/syscall.h>
-+#include <linux/fsinfo.h>
-+#include <linux/socket.h>
-+#include <sys/stat.h>
-+#include <arpa/inet.h>
-+
-+#ifndef __NR_fsinfo
-+#define __NR_fsinfo -1
-+#endif
-+
-+static bool debug = 0;
-+static bool list_last;
-+
-+static __attribute__((unused))
-+ssize_t fsinfo(int dfd, const char *filename,
-+ struct fsinfo_params *params, size_t params_size,
-+ void *result_buffer, size_t result_buf_size)
-+{
-+ return syscall(__NR_fsinfo, dfd, filename,
-+ params, params_size,
-+ result_buffer, result_buf_size);
-+}
-+
-+struct fsinfo_attribute {
-+ unsigned int attr_id;
-+ enum fsinfo_value_type type;
-+ unsigned int size;
-+ const char *name;
-+ void (*dump)(void *reply, unsigned int size);
-+};
-+
-+static const struct fsinfo_attribute fsinfo_attributes[];
-+
-+static ssize_t get_fsinfo(const char *, const char *, struct fsinfo_params *, void **);
-+
-+static void dump_hex(FILE *f, unsigned char *data, int from, int to)
-+{
-+ unsigned offset, col = 0;
-+ bool print_offset = true;
-+
-+ for (offset = from; offset < to; offset++) {
-+ if (print_offset) {
-+ fprintf(f, "%04x: ", offset);
-+ print_offset = 0;
-+ }
-+ fprintf(f, "%02x", data[offset]);
-+ col++;
-+ if ((col & 3) == 0) {
-+ if ((col & 15) == 0) {
-+ fprintf(f, "\n");
-+ print_offset = 1;
-+ } else {
-+ fprintf(f, " ");
-+ }
-+ }
-+ }
-+
-+ if (!print_offset)
-+ fprintf(f, "\n");
-+}
-+
-+static void dump_attribute_info(void *reply, unsigned int size)
-+{
-+ struct fsinfo_attribute_info *attr_info = reply;
-+ const struct fsinfo_attribute *attr;
-+ char type[32], val_size[32];
-+
-+ switch (attr_info->type) {
-+ case FSINFO_TYPE_VSTRUCT: strcpy(type, "V-STRUCT"); break;
-+ case FSINFO_TYPE_STRING: strcpy(type, "STRING"); break;
-+ case FSINFO_TYPE_OPAQUE: strcpy(type, "OPAQUE"); break;
-+ case FSINFO_TYPE_LIST: strcpy(type, "LIST"); break;
-+ default:
-+ sprintf(type, "type-%x", attr_info->type);
-+ break;
-+ }
-+
-+ if (attr_info->flags & FSINFO_FLAGS_N)
-+ strcat(type, " x N");
-+ else if (attr_info->flags & FSINFO_FLAGS_NM)
-+ strcat(type, " x NM");
-+
-+ for (attr = fsinfo_attributes; attr->name; attr++)
-+ if (attr->attr_id == attr_info->attr_id)
-+ break;
-+
-+ if (attr_info->size)
-+ sprintf(val_size, "%u", attr_info->size);
-+ else
-+ strcpy(val_size, "-");
-+
-+ printf("%8x %-12s %08x %5s %s\n",
-+ attr_info->attr_id,
-+ type,
-+ attr_info->flags,
-+ val_size,
-+ attr->name ? attr->name : "");
-+}
-+
-+static void dump_fsinfo_generic_statfs(void *reply, unsigned int size)
-+{
-+ struct fsinfo_statfs *f = reply;
-+
-+ printf("\n");
-+ printf("\tblocks : n=%llu fr=%llu av=%llu\n",
-+ (unsigned long long)f->f_blocks.lo,
-+ (unsigned long long)f->f_bfree.lo,
-+ (unsigned long long)f->f_bavail.lo);
-+
-+ printf("\tfiles : n=%llu fr=%llu av=%llu\n",
-+ (unsigned long long)f->f_files.lo,
-+ (unsigned long long)f->f_ffree.lo,
-+ (unsigned long long)f->f_favail.lo);
-+ printf("\tbsize : %llu\n",
-+ (unsigned long long)f->f_bsize);
-+ printf("\tfrsize : %llu\n",
-+ (unsigned long long)f->f_frsize);
-+}
-+
-+static void dump_fsinfo_generic_ids(void *reply, unsigned int size)
-+{
-+ struct fsinfo_ids *f = reply;
-+
-+ printf("\n");
-+ printf("\tdev : %02x:%02x\n", f->f_dev_major, f->f_dev_minor);
-+ printf("\tfs : type=%x name=%s\n", f->f_fstype, f->f_fs_name);
-+ printf("\tfsid : %llx\n", (unsigned long long)f->f_fsid);
-+ printf("\tsbid : %llx\n", (unsigned long long)f->f_sb_id);
-+}
-+
-+static void dump_fsinfo_generic_limits(void *reply, unsigned int size)
-+{
-+ struct fsinfo_limits *f = reply;
-+
-+ printf("\n");
-+ printf("\tmax file size: %llx%016llx\n",
-+ (unsigned long long)f->max_file_size.hi,
-+ (unsigned long long)f->max_file_size.lo);
-+ printf("\tmax ino : %llx%016llx\n",
-+ (unsigned long long)f->max_ino.hi,
-+ (unsigned long long)f->max_ino.lo);
-+ printf("\tmax ids : u=%llx g=%llx p=%llx\n",
-+ (unsigned long long)f->max_uid,
-+ (unsigned long long)f->max_gid,
-+ (unsigned long long)f->max_projid);
-+ printf("\tmax dev : maj=%x min=%x\n",
-+ f->max_dev_major, f->max_dev_minor);
-+ printf("\tmax links : %llx\n",
-+ (unsigned long long)f->max_hard_links);
-+ printf("\tmax xattr : n=%x b=%llx\n",
-+ f->max_xattr_name_len,
-+ (unsigned long long)f->max_xattr_body_len);
-+ printf("\tmax len : file=%x sym=%x\n",
-+ f->max_filename_len, f->max_symlink_len);
-+}
-+
-+static void dump_fsinfo_generic_supports(void *reply, unsigned int size)
-+{
-+ struct fsinfo_supports *f = reply;
-+
-+ printf("\n");
-+ printf("\tstx_attr : %llx\n", (unsigned long long)f->stx_attributes);
-+ printf("\tstx_mask : %x\n", f->stx_mask);
-+ printf("\tfs_ioc_*flags: get=%x set=%x clr=%x\n",
-+ f->fs_ioc_getflags, f->fs_ioc_setflags_set, f->fs_ioc_setflags_clear);
-+ printf("\tfs_ioc_*xattr: fsx_xflags: get=%x set=%x clr=%x\n",
-+ f->fs_ioc_fsgetxattr_xflags,
-+ f->fs_ioc_fssetxattr_xflags_set,
-+ f->fs_ioc_fssetxattr_xflags_clear);
-+ printf("\twin_fattrs : %x\n", f->win_file_attrs);
-+}
-+
-+static void print_time(struct fsinfo_timestamp_one *t, char stamp)
-+{
-+ printf("\t%ctime : gran=%uE%d range=%llx-%llx\n",
-+ stamp,
-+ t->gran_mantissa, t->gran_exponent,
-+ (long long)t->minimum, (long long)t->maximum);
-+}
-+
-+static void dump_fsinfo_generic_timestamp_info(void *reply, unsigned int size)
-+{
-+ struct fsinfo_timestamp_info *f = reply;
-+
-+ printf("\n");
-+ print_time(&f->atime, 'a');
-+ print_time(&f->mtime, 'm');
-+ print_time(&f->ctime, 'c');
-+ print_time(&f->btime, 'b');
-+}
-+
-+static void dump_fsinfo_generic_volume_uuid(void *reply, unsigned int size)
-+{
-+ struct fsinfo_volume_uuid *f = reply;
-+
-+ printf("%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x"
-+ "-%02x%02x%02x%02x%02x%02x\n",
-+ f->uuid[ 0], f->uuid[ 1],
-+ f->uuid[ 2], f->uuid[ 3],
-+ f->uuid[ 4], f->uuid[ 5],
-+ f->uuid[ 6], f->uuid[ 7],
-+ f->uuid[ 8], f->uuid[ 9],
-+ f->uuid[10], f->uuid[11],
-+ f->uuid[12], f->uuid[13],
-+ f->uuid[14], f->uuid[15]);
-+}
-+
-+static void dump_string(void *reply, unsigned int size)
-+{
-+ char *s = reply, *p;
-+ bool nl = false, last_nl = false;
-+
-+ p = s;
-+ if (size >= 4096) {
-+ size = 4096;
-+ p[4092] = '.';
-+ p[4093] = '.';
-+ p[4094] = '.';
-+ p[4095] = 0;
-+ } else {
-+ p[size] = 0;
-+ }
-+
-+ for (p = s; *p; p++) {
-+ if (*p == '\n') {
-+ last_nl = nl = true;
-+ continue;
-+ }
-+ last_nl = false;
-+ if (!isprint(*p) && *p != '\t')
-+ *p = '?';
-+ }
-+
-+ if (nl)
-+ putchar('\n');
-+ printf("%s", s);
-+ if (!last_nl)
-+ putchar('\n');
-+}
-+
-+#define dump_fsinfo_meta_attribute_info (void *)0x123
-+#define dump_fsinfo_meta_attributes (void *)0x123
-+
-+/*
-+ *
-+ */
-+#define __FSINFO(A, T, S, G, F, N) \
-+ { .attr_id = A, .type = T, .size = S, .name = N, .dump = dump_##G }
-+
-+#define _FSINFO(A,T,S,G,N) __FSINFO(A, T, S, G, 0, N)
-+#define _FSINFO_N(A,T,S,G,N) __FSINFO(A, T, S, G, FSINFO_FLAGS_N, N)
-+#define _FSINFO_NM(A,T,S,G,N) __FSINFO(A, T, S, G, FSINFO_FLAGS_NM, N)
-+
-+#define _FSINFO_VSTRUCT(A,S,G,N) _FSINFO (A, FSINFO_TYPE_VSTRUCT, sizeof(S), G, N)
-+#define _FSINFO_VSTRUCT_N(A,S,G,N) _FSINFO_N (A, FSINFO_TYPE_VSTRUCT, sizeof(S), G, N)
-+#define _FSINFO_VSTRUCT_NM(A,S,G,N) _FSINFO_NM(A, FSINFO_TYPE_VSTRUCT, sizeof(S), G, N)
-+
-+#define FSINFO_VSTRUCT(A,G) _FSINFO_VSTRUCT (A, A##__STRUCT, G, #A)
-+#define FSINFO_VSTRUCT_N(A,G) _FSINFO_VSTRUCT_N (A, A##__STRUCT, G, #A)
-+#define FSINFO_VSTRUCT_NM(A,G) _FSINFO_VSTRUCT_NM(A, A##__STRUCT, G, #A)
-+#define FSINFO_STRING(A,G) _FSINFO (A, FSINFO_TYPE_STRING, 0, G, #A)
-+#define FSINFO_STRING_N(A,G) _FSINFO_N (A, FSINFO_TYPE_STRING, 0, G, #A)
-+#define FSINFO_STRING_NM(A,G) _FSINFO_NM(A, FSINFO_TYPE_STRING, 0, G, #A)
-+#define FSINFO_OPAQUE(A,G) _FSINFO (A, FSINFO_TYPE_OPAQUE, 0, G, #A)
-+#define FSINFO_LIST(A,G) _FSINFO (A, FSINFO_TYPE_LIST, sizeof(A##__STRUCT), G, #A)
-+#define FSINFO_LIST_N(A,G) _FSINFO_N (A, FSINFO_TYPE_LIST, sizeof(A##__STRUCT), G, #A)
-+
-+static const struct fsinfo_attribute fsinfo_attributes[] = {
-+ FSINFO_VSTRUCT (FSINFO_ATTR_STATFS, fsinfo_generic_statfs),
-+ FSINFO_VSTRUCT (FSINFO_ATTR_IDS, fsinfo_generic_ids),
-+ FSINFO_VSTRUCT (FSINFO_ATTR_LIMITS, fsinfo_generic_limits),
-+ FSINFO_VSTRUCT (FSINFO_ATTR_SUPPORTS, fsinfo_generic_supports),
-+ FSINFO_VSTRUCT (FSINFO_ATTR_TIMESTAMP_INFO, fsinfo_generic_timestamp_info),
-+ FSINFO_STRING (FSINFO_ATTR_VOLUME_ID, string),
-+ FSINFO_VSTRUCT (FSINFO_ATTR_VOLUME_UUID, fsinfo_generic_volume_uuid),
-+ FSINFO_STRING (FSINFO_ATTR_VOLUME_NAME, string),
-+ FSINFO_VSTRUCT_N(FSINFO_ATTR_FSINFO_ATTRIBUTE_INFO, fsinfo_meta_attribute_info),
-+ FSINFO_LIST (FSINFO_ATTR_FSINFO_ATTRIBUTES, fsinfo_meta_attributes),
-+ {}
-+};
-+
-+static __attribute__((noreturn))
-+void bad_value(const char *what,
-+ struct fsinfo_params *params,
-+ const struct fsinfo_attribute *attr,
-+ const struct fsinfo_attribute_info *attr_info,
-+ void *reply, unsigned int size)
-+{
-+ printf("\n");
-+ fprintf(stderr, "%s %s{%u}{%u} t=%x f=%x s=%x\n",
-+ what, attr->name, params->Nth, params->Mth,
-+ attr_info->type, attr_info->flags, attr_info->size);
-+ fprintf(stderr, "size=%u\n", size);
-+ dump_hex(stderr, reply, 0, size);
-+ exit(1);
-+}
-+
-+static void dump_value(unsigned int attr_id,
-+ const struct fsinfo_attribute *attr,
-+ const struct fsinfo_attribute_info *attr_info,
-+ void *reply, unsigned int size)
-+{
-+ if (!attr || !attr->dump) {
-+ printf("<no dumper>\n");
-+ return;
-+ }
-+
-+ if (attr->type == FSINFO_TYPE_VSTRUCT && size < attr->size) {
-+ printf("<short data %u/%u>\n", size, attr->size);
-+ return;
-+ }
-+
-+ attr->dump(reply, size);
-+}
-+
-+static void dump_list(unsigned int attr_id,
-+ const struct fsinfo_attribute *attr,
-+ const struct fsinfo_attribute_info *attr_info,
-+ void *reply, unsigned int size)
-+{
-+ size_t elem_size = attr_info->size;
-+ unsigned int ix = 0;
-+
-+ printf("\n");
-+ if (!attr || !attr->dump) {
-+ printf("<no dumper>\n");
-+ return;
-+ }
-+
-+ if (attr->type == FSINFO_TYPE_VSTRUCT && size < attr->size) {
-+ printf("<short data %u/%u>\n", size, attr->size);
-+ return;
-+ }
-+
-+ list_last = false;
-+ while (size >= elem_size) {
-+ printf("\t[%02x] ", ix);
-+ if (size == elem_size)
-+ list_last = true;
-+ attr->dump(reply, size);
-+ reply += elem_size;
-+ size -= elem_size;
-+ ix++;
-+ }
-+}
-+
-+/*
-+ * Call fsinfo, expanding the buffer as necessary.
-+ */
-+static ssize_t get_fsinfo(const char *file, const char *name,
-+ struct fsinfo_params *params, void **_r)
-+{
-+ ssize_t ret;
-+ size_t buf_size = 4096;
-+ void *r;
-+
-+ for (;;) {
-+ r = malloc(buf_size);
-+ if (!r) {
-+ perror("malloc");
-+ exit(1);
-+ }
-+ memset(r, 0xbd, buf_size);
-+
-+ errno = 0;
-+ ret = fsinfo(AT_FDCWD, file, params, sizeof(*params), r, buf_size - 1);
-+ if (ret == -1)
-+ goto error;
-+
-+ if (ret <= buf_size - 1)
-+ break;
-+ buf_size = (ret + 4096 - 1) & ~(4096 - 1);
-+ }
-+
-+ if (debug)
-+ printf("fsinfo(%s,%s,%u,%u) = %zd\n",
-+ file, name, params->Nth, params->Mth, ret);
-+
-+ ((char *)r)[ret] = 0;
-+ *_r = r;
-+ return ret;
-+
-+error:
-+ *_r = NULL;
-+ free(r);
-+ if (debug)
-+ printf("fsinfo(%s,%s,%u,%u) = %m\n",
-+ file, name, params->Nth, params->Mth);
-+ return ret;
-+}
-+
-+/*
-+ * Try one subinstance of an attribute.
-+ */
-+static int try_one(const char *file, struct fsinfo_params *params,
-+ const struct fsinfo_attribute_info *attr_info, bool raw)
-+{
-+ const struct fsinfo_attribute *attr;
-+ const char *name;
-+ size_t size = 4096;
-+ char namebuf[32];
-+ void *r;
-+
-+ for (attr = fsinfo_attributes; attr->name; attr++) {
-+ if (attr->attr_id == params->request) {
-+ name = attr->name;
-+ if (strncmp(name, "fsinfo_generic_", 15) == 0)
-+ name += 15;
-+ goto found;
-+ }
-+ }
-+
-+ sprintf(namebuf, "<unknown-%x>", params->request);
-+ name = namebuf;
-+ attr = NULL;
-+
-+found:
-+ size = get_fsinfo(file, name, params, &r);
-+
-+ if (size == -1) {
-+ if (errno == ENODATA) {
-+ if (!(attr_info->flags & (FSINFO_FLAGS_N | FSINFO_FLAGS_NM)) &&
-+ params->Nth == 0 && params->Mth == 0)
-+ bad_value("Unexpected ENODATA",
-+ params, attr, attr_info, r, size);
-+ free(r);
-+ return (params->Mth == 0) ? 2 : 1;
-+ }
-+ if (errno == EOPNOTSUPP) {
-+ if (params->Nth > 0 || params->Mth > 0)
-+ bad_value("Should return ENODATA",
-+ params, attr, attr_info, r, size);
-+ //printf("\e[33m%s\e[m: <not supported>\n",
-+ // fsinfo_attr_names[attr]);
-+ free(r);
-+ return 2;
-+ }
-+ perror(file);
-+ exit(1);
-+ }
-+
-+ if (raw) {
-+ if (size > 4096)
-+ size = 4096;
-+ dump_hex(stdout, r, 0, size);
-+ free(r);
-+ return 0;
-+ }
-+
-+ switch (attr_info->flags & (FSINFO_FLAGS_N | FSINFO_FLAGS_NM)) {
-+ case 0:
-+ printf("\e[33m%s\e[m: ", name);
-+ break;
-+ case FSINFO_FLAGS_N:
-+ printf("\e[33m%s{%u}\e[m: ", name, params->Nth);
-+ break;
-+ case FSINFO_FLAGS_NM:
-+ printf("\e[33m%s{%u,%u}\e[m: ", name, params->Nth, params->Mth);
-+ break;
-+ }
-+
-+ switch (attr_info->type) {
-+ case FSINFO_TYPE_STRING:
-+ if (size == 0 || ((char *)r)[size - 1] != 0)
-+ bad_value("Unterminated string",
-+ params, attr, attr_info, r, size);
-+ case FSINFO_TYPE_VSTRUCT:
-+ case FSINFO_TYPE_OPAQUE:
-+ dump_value(params->request, attr, attr_info, r, size);
-+ free(r);
-+ return 0;
-+
-+ case FSINFO_TYPE_LIST:
-+ dump_list(params->request, attr, attr_info, r, size);
-+ free(r);
-+ return 0;
-+
-+ default:
-+ bad_value("Fishy type", params, attr, attr_info, r, size);
-+ }
-+}
-+
-+static int cmp_u32(const void *a, const void *b)
-+{
-+ return *(const int *)a - *(const int *)b;
-+}
-+
-+/*
-+ *
-+ */
-+int main(int argc, char **argv)
-+{
-+ struct fsinfo_attribute_info attr_info;
-+ struct fsinfo_params params = {
-+ .at_flags = AT_SYMLINK_NOFOLLOW,
-+ .flags = FSINFO_FLAGS_QUERY_PATH,
-+ };
-+ unsigned int *attrs, ret, nr, i;
-+ bool meta = false;
-+ int raw = 0, opt, Nth, Mth;
-+
-+ while ((opt = getopt(argc, argv, "Madlr"))) {
-+ switch (opt) {
-+ case 'M':
-+ meta = true;
-+ continue;
-+ case 'a':
-+ params.at_flags |= AT_NO_AUTOMOUNT;
-+ params.flags = FSINFO_FLAGS_QUERY_PATH;
-+ continue;
-+ case 'd':
-+ debug = true;
-+ continue;
-+ case 'l':
-+ params.at_flags &= ~AT_SYMLINK_NOFOLLOW;
-+ params.flags = FSINFO_FLAGS_QUERY_PATH;
-+ continue;
-+ case 'r':
-+ raw = 1;
-+ continue;
-+ }
-+ break;
-+ }
-+
-+ argc -= optind;
-+ argv += optind;
-+
-+ if (argc != 1) {
-+ printf("Format: test-fsinfo [-Madlr] <path>\n");
-+ exit(2);
-+ }
-+
-+ /* Retrieve a list of supported attribute IDs */
-+ params.request = FSINFO_ATTR_FSINFO_ATTRIBUTES;
-+ params.Nth = 0;
-+ params.Mth = 0;
-+ ret = get_fsinfo(argv[0], "attributes", ¶ms, (void **)&attrs);
-+ if (ret == -1) {
-+ fprintf(stderr, "Unable to get attribute list: %m\n");
-+ exit(1);
-+ }
-+
-+ if (ret % sizeof(attrs[0])) {
-+ fprintf(stderr, "Bad length of attribute list (0x%x)\n", ret);
-+ exit(2);
-+ }
-+
-+ nr = ret / sizeof(attrs[0]);
-+ qsort(attrs, nr, sizeof(attrs[0]), cmp_u32);
-+
-+ if (meta) {
-+ printf("ATTR ID TYPE FLAGS SIZE NAME\n");
-+ printf("======== ============ ======== ===== =========\n");
-+ for (i = 0; i < nr; i++) {
-+ params.request = FSINFO_ATTR_FSINFO_ATTRIBUTE_INFO;
-+ params.Nth = attrs[i];
-+ params.Mth = 0;
-+ ret = fsinfo(AT_FDCWD, argv[0],
-+ ¶ms, sizeof(params),
-+ &attr_info, sizeof(attr_info));
-+ if (ret == -1) {
-+ fprintf(stderr, "Can't get info for attribute %x: %m\n", attrs[i]);
-+ exit(1);
-+ }
-+
-+ dump_attribute_info(&attr_info, ret);
-+ }
-+ exit(0);
-+ }
-+
-+ for (i = 0; i < nr; i++) {
-+ params.request = FSINFO_ATTR_FSINFO_ATTRIBUTE_INFO;
-+ params.Nth = attrs[i];
-+ params.Mth = 0;
-+ ret = fsinfo(AT_FDCWD, argv[0],
-+ ¶ms, sizeof(params),
-+ &attr_info, sizeof(attr_info));
-+ if (ret == -1) {
-+ fprintf(stderr, "Can't get info for attribute %x: %m\n", attrs[i]);
-+ exit(1);
-+ }
-+
-+ if (attrs[i] == FSINFO_ATTR_FSINFO_ATTRIBUTE_INFO ||
-+ attrs[i] == FSINFO_ATTR_FSINFO_ATTRIBUTES)
-+ continue;
-+
-+ if (attrs[i] != attr_info.attr_id) {
-+ fprintf(stderr, "ID for %03x returned %03x\n",
-+ attrs[i], attr_info.attr_id);
-+ break;
-+ }
-+ Nth = 0;
-+ do {
-+ Mth = 0;
-+ do {
-+ params.request = attrs[i];
-+ params.Nth = Nth;
-+ params.Mth = Mth;
-+
-+ switch (try_one(argv[0], ¶ms, &attr_info, raw)) {
-+ case 0:
-+ continue;
-+ case 1:
-+ goto done_M;
-+ case 2:
-+ goto done_N;
-+ }
-+ } while (++Mth < 100);
-+
-+ done_M:
-+ if (Mth >= 100) {
-+ fprintf(stderr, "Fishy: Mth %x[%u][%u]\n", attrs[i], Nth, Mth);
-+ break;
-+ }
-+
-+ } while (++Nth < 100);
-+
-+ done_N:
-+ if (Nth >= 100) {
-+ fprintf(stderr, "Fishy: Nth %x[%u]\n", attrs[i], Nth);
-+ break;
-+ }
-+ }
-+
-+ return 0;
-+}
---
-2.25.1
-
diff --git a/third_party/linux/external/0003-fsinfo-Allow-retrieval-of-superblock-devname-options.patch b/third_party/linux/external/0003-fsinfo-Allow-retrieval-of-superblock-devname-options.patch
deleted file mode 100644
index d05bff4..0000000
--- a/third_party/linux/external/0003-fsinfo-Allow-retrieval-of-superblock-devname-options.patch
+++ /dev/null
@@ -1,183 +0,0 @@
-From 69b33d464bcadd6c60018f5d0bde8ad3e7530dc7 Mon Sep 17 00:00:00 2001
-From: David Howells <dhowells@redhat.com>
-Date: Tue, 3 Mar 2020 14:29:27 +0000
-Subject: [PATCH 3/3] fsinfo: Allow retrieval of superblock devname, options
- and stats
-
-Provide fsinfo() attributes to retrieve superblock device name, options,
-and statistics in string form. The following attributes are defined:
-
- FSINFO_ATTR_SOURCE - Mount-specific device name
- FSINFO_ATTR_CONFIGURATION - Mount options
- FSINFO_ATTR_FS_STATISTICS - Filesystem statistics
-
-FSINFO_ATTR_SOURCE could be made indexable by params->Nth to handle the
-case where there is more than one source (e.g. the bcachefs filesystem).
-
-Signed-off-by: David Howells <dhowells@redhat.com>
----
- fs/fsinfo.c | 39 +++++++++++++++++++++++++++++++++++
- fs/internal.h | 2 ++
- fs/namespace.c | 41 +++++++++++++++++++++++++++++++++++++
- include/uapi/linux/fsinfo.h | 3 +++
- samples/vfs/test-fsinfo.c | 4 ++++
- 5 files changed, 89 insertions(+)
-
-diff --git a/fs/fsinfo.c b/fs/fsinfo.c
-index 7d9c73e9cbdef..7e2d871eb5dfe 100644
---- a/fs/fsinfo.c
-+++ b/fs/fsinfo.c
-@@ -198,6 +198,42 @@ static int fsinfo_generic_volume_id(struct path *path, struct fsinfo_context *ct
- return fsinfo_string(path->dentry->d_sb->s_id, ctx);
- }
-
-+/*
-+ * Retrieve the superblock configuration (mount options) as a comma-separated
-+ * string. The initial comma is stripped off and NUL termination is added.
-+ */
-+static int fsinfo_generic_seq_read(struct path *path, struct fsinfo_context *ctx)
-+{
-+ struct super_block *sb = path->dentry->d_sb;
-+ struct seq_file m = {
-+ .buf = ctx->buffer,
-+ .size = ctx->buf_size - 1,
-+ };
-+ int ret = 0;
-+
-+ switch (ctx->requested_attr) {
-+ case FSINFO_ATTR_CONFIGURATION:
-+ seq_puts(&m, sb_rdonly(sb) ? "ro" : "rw");
-+ ret = security_sb_show_options(&m, sb);
-+ if (!ret && sb->s_op->show_options)
-+ ret = sb->s_op->show_options(&m, path->mnt->mnt_root);
-+ break;
-+
-+ case FSINFO_ATTR_FS_STATISTICS:
-+ if (sb->s_op->show_stats)
-+ ret = sb->s_op->show_stats(&m, path->mnt->mnt_root);
-+ break;
-+ }
-+
-+ if (ret < 0)
-+ return ret;
-+ if (seq_has_overflowed(&m))
-+ return ctx->buf_size + PAGE_SIZE;
-+
-+ ((char *)ctx->buffer)[ctx->skip + m.count] = 0;
-+ return m.count + 1;
-+}
-+
- static const struct fsinfo_attribute fsinfo_common_attributes[] = {
- FSINFO_VSTRUCT (FSINFO_ATTR_STATFS, fsinfo_generic_statfs),
- FSINFO_VSTRUCT (FSINFO_ATTR_IDS, fsinfo_generic_ids),
-@@ -206,6 +242,9 @@ static const struct fsinfo_attribute fsinfo_common_attributes[] = {
- FSINFO_VSTRUCT (FSINFO_ATTR_TIMESTAMP_INFO, fsinfo_generic_timestamp_info),
- FSINFO_STRING (FSINFO_ATTR_VOLUME_ID, fsinfo_generic_volume_id),
- FSINFO_VSTRUCT (FSINFO_ATTR_VOLUME_UUID, fsinfo_generic_volume_uuid),
-+ FSINFO_STRING (FSINFO_ATTR_SOURCE, fsinfo_generic_mount_source),
-+ FSINFO_STRING (FSINFO_ATTR_CONFIGURATION, fsinfo_generic_seq_read),
-+ FSINFO_STRING (FSINFO_ATTR_FS_STATISTICS, fsinfo_generic_seq_read),
-
- FSINFO_LIST (FSINFO_ATTR_FSINFO_ATTRIBUTES, (void *)123UL),
- FSINFO_VSTRUCT_N(FSINFO_ATTR_FSINFO_ATTRIBUTE_INFO, (void *)123UL),
-diff --git a/fs/internal.h b/fs/internal.h
-index 1b7460f055a3b..a2a529da7e673 100644
---- a/fs/internal.h
-+++ b/fs/internal.h
-@@ -98,6 +98,8 @@ int path_mount(const char *dev_name, struct path *path,
- const char *type_page, unsigned long flags, void *data_page);
- int path_umount(struct path *path, int flags);
-
-+extern int fsinfo_generic_mount_source(struct path *, struct fsinfo_context *);
-+
- /*
- * fs_struct.c
- */
-diff --git a/fs/namespace.c b/fs/namespace.c
-index cebaa3e817940..33218f67ad5b1 100644
---- a/fs/namespace.c
-+++ b/fs/namespace.c
-@@ -30,6 +30,7 @@
- #include <uapi/linux/mount.h>
- #include <linux/fs_context.h>
- #include <linux/shmem_fs.h>
-+#include <linux/fsinfo.h>
-
- #include "pnode.h"
- #include "internal.h"
-@@ -4105,3 +4106,43 @@ const struct proc_ns_operations mntns_operations = {
- .install = mntns_install,
- .owner = mntns_owner,
- };
-+
-+#ifdef CONFIG_FSINFO
-+static inline void mangle(struct seq_file *m, const char *s)
-+{
-+ seq_escape(m, s, " \t\n\\");
-+}
-+
-+/*
-+ * Return the mount source/device name as seen from this mountpoint. Shared
-+ * mounts may vary here and the filesystem is permitted to substitute its own
-+ * rendering.
-+ */
-+int fsinfo_generic_mount_source(struct path *path, struct fsinfo_context *ctx)
-+{
-+ struct super_block *sb = path->mnt->mnt_sb;
-+ struct mount *mnt = real_mount(path->mnt);
-+ struct seq_file m = {
-+ .buf = ctx->buffer,
-+ .size = ctx->buf_size - 1,
-+ };
-+ int ret;
-+
-+ if (sb->s_op->show_devname) {
-+ ret = sb->s_op->show_devname(&m, mnt->mnt.mnt_root);
-+ if (ret < 0)
-+ return ret;
-+ } else {
-+ if (!mnt->mnt_devname)
-+ return fsinfo_string("none", ctx);
-+ mangle(&m, mnt->mnt_devname);
-+ }
-+
-+ if (seq_has_overflowed(&m))
-+ return ctx->buf_size + PAGE_SIZE;
-+
-+ ((char *)ctx->buffer)[m.count] = 0;
-+ return m.count + 1;
-+}
-+
-+#endif /* CONFIG_FSINFO */
-diff --git a/include/uapi/linux/fsinfo.h b/include/uapi/linux/fsinfo.h
-index 65892239ba86c..45d9f4b758787 100644
---- a/include/uapi/linux/fsinfo.h
-+++ b/include/uapi/linux/fsinfo.h
-@@ -23,6 +23,9 @@
- #define FSINFO_ATTR_VOLUME_ID 0x05 /* Volume ID (string) */
- #define FSINFO_ATTR_VOLUME_UUID 0x06 /* Volume UUID (LE uuid) */
- #define FSINFO_ATTR_VOLUME_NAME 0x07 /* Volume name (string) */
-+#define FSINFO_ATTR_SOURCE 0x09 /* Superblock source/device name (string) */
-+#define FSINFO_ATTR_CONFIGURATION 0x0a /* Superblock configuration/options (string) */
-+#define FSINFO_ATTR_FS_STATISTICS 0x0b /* Superblock filesystem statistics (string) */
-
- #define FSINFO_ATTR_FSINFO_ATTRIBUTE_INFO 0x100 /* Information about attr N (for path) */
- #define FSINFO_ATTR_FSINFO_ATTRIBUTES 0x101 /* List of supported attrs (for path) */
-diff --git a/samples/vfs/test-fsinfo.c b/samples/vfs/test-fsinfo.c
-index 934b25399ffed..cf849c9778f71 100644
---- a/samples/vfs/test-fsinfo.c
-+++ b/samples/vfs/test-fsinfo.c
-@@ -294,6 +294,10 @@ static const struct fsinfo_attribute fsinfo_attributes[] = {
- FSINFO_STRING (FSINFO_ATTR_VOLUME_ID, string),
- FSINFO_VSTRUCT (FSINFO_ATTR_VOLUME_UUID, fsinfo_generic_volume_uuid),
- FSINFO_STRING (FSINFO_ATTR_VOLUME_NAME, string),
-+ FSINFO_STRING (FSINFO_ATTR_SOURCE, string),
-+ FSINFO_STRING (FSINFO_ATTR_CONFIGURATION, string),
-+ FSINFO_STRING (FSINFO_ATTR_FS_STATISTICS, string),
-+
- FSINFO_VSTRUCT_N(FSINFO_ATTR_FSINFO_ATTRIBUTE_INFO, fsinfo_meta_attribute_info),
- FSINFO_LIST (FSINFO_ATTR_FSINFO_ATTRIBUTES, fsinfo_meta_attributes),
- {}
---
-2.25.1
-
diff --git a/third_party/linux/linux-metropolis.config b/third_party/linux/linux-metropolis.config
index fc89494..4144ffe 100644
--- a/third_party/linux/linux-metropolis.config
+++ b/third_party/linux/linux-metropolis.config
@@ -1,17 +1,21 @@
#
# Automatically generated file; DO NOT EDIT.
-# Linux/x86 5.10.4 Kernel Configuration
+# Linux/x86 5.15.2 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=90300
-CONFIG_LD_VERSION=234000000
CONFIG_CLANG_VERSION=0
+CONFIG_AS_IS_GNU=y
+CONFIG_AS_VERSION=23400
+CONFIG_LD_IS_BFD=y
+CONFIG_LD_VERSION=23400
CONFIG_LLD_VERSION=0
CONFIG_CC_CAN_LINK=y
CONFIG_CC_CAN_LINK_STATIC=y
CONFIG_CC_HAS_ASM_GOTO=y
CONFIG_CC_HAS_ASM_INLINE=y
+CONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y
CONFIG_IRQ_WORK=y
CONFIG_BUILDTIME_TABLE_SORT=y
CONFIG_THREAD_INFO_IN_TASK=y
@@ -21,6 +25,7 @@
#
CONFIG_INIT_ENV_ARG_LIMIT=32
# CONFIG_COMPILE_TEST is not set
+# CONFIG_WERROR is not set
CONFIG_LOCALVERSION="-metropolis"
CONFIG_LOCALVERSION_AUTO=y
CONFIG_BUILD_SALT=""
@@ -94,9 +99,21 @@
CONFIG_HIGH_RES_TIMERS=y
# end of Timers subsystem
+CONFIG_BPF=y
+CONFIG_HAVE_EBPF_JIT=y
+CONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y
+
+#
+# BPF subsystem
+#
+# CONFIG_BPF_SYSCALL is not set
+CONFIG_USERMODE_DRIVER=y
+# end of BPF subsystem
+
CONFIG_PREEMPT_NONE=y
# CONFIG_PREEMPT_VOLUNTARY is not set
# CONFIG_PREEMPT is not set
+CONFIG_SCHED_CORE=y
#
# CPU/Task time and stats accounting
@@ -132,6 +149,7 @@
CONFIG_LOG_BUF_SHIFT=17
CONFIG_LOG_CPU_MAX_BUF_SHIFT=12
CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13
+# CONFIG_PRINTK_INDEX is not set
CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y
#
@@ -163,6 +181,7 @@
CONFIG_CGROUP_DEVICE=y
CONFIG_CGROUP_CPUACCT=y
CONFIG_CGROUP_PERF=y
+CONFIG_CGROUP_MISC=y
# CONFIG_CGROUP_DEBUG is not set
CONFIG_NAMESPACES=y
CONFIG_UTS_NS=y
@@ -191,7 +210,6 @@
CONFIG_SYSCTL=y
CONFIG_SYSCTL_EXCEPTION_TRACE=y
CONFIG_HAVE_PCSPKR_PLATFORM=y
-CONFIG_BPF=y
# CONFIG_EXPERT is not set
CONFIG_MULTIUSER=y
CONFIG_SGETMASK_SYSCALL=y
@@ -199,7 +217,6 @@
CONFIG_FHANDLE=y
CONFIG_POSIX_TIMERS=y
CONFIG_PRINTK=y
-CONFIG_PRINTK_NMI=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_PCSPKR_PLATFORM=y
@@ -219,9 +236,6 @@
# CONFIG_KALLSYMS_ALL is not set
CONFIG_KALLSYMS_ABSOLUTE_PERCPU=y
CONFIG_KALLSYMS_BASE_RELATIVE=y
-# CONFIG_BPF_SYSCALL is not set
-CONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y
-CONFIG_USERMODE_DRIVER=y
# CONFIG_USERFAULTFD is not set
CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y
CONFIG_RSEQ=y
@@ -268,17 +282,15 @@
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_ARCH_HAS_CPU_RELAX=y
-CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
CONFIG_ARCH_HAS_FILTER_PGPROT=y
CONFIG_HAVE_SETUP_PER_CPU_AREA=y
CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y
CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+CONFIG_ARCH_NR_GPIO=1024
CONFIG_ARCH_SUSPEND_POSSIBLE=y
CONFIG_ARCH_WANT_GENERAL_HUGETLB=y
-CONFIG_ZONE_DMA32=y
CONFIG_AUDIT_ARCH=y
-CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
CONFIG_X86_64_SMP=y
CONFIG_ARCH_SUPPORTS_UPROBES=y
CONFIG_FIX_EARLYCON_MEM=y
@@ -289,7 +301,6 @@
#
# Processor type and features
#
-CONFIG_ZONE_DMA=y
CONFIG_SMP=y
CONFIG_X86_FEATURE_NAMES=y
CONFIG_X86_X2APIC=y
@@ -311,14 +322,15 @@
CONFIG_X86_HV_CALLBACK_VECTOR=y
CONFIG_XEN=y
CONFIG_XEN_PV=y
+CONFIG_XEN_512GB=y
CONFIG_XEN_PV_SMP=y
-# CONFIG_XEN_DOM0 is not set
CONFIG_XEN_PVHVM=y
CONFIG_XEN_PVHVM_SMP=y
-CONFIG_XEN_512GB=y
+CONFIG_XEN_PVHVM_GUEST=y
CONFIG_XEN_SAVE_RESTORE=y
# CONFIG_XEN_DEBUG_FS is not set
CONFIG_XEN_PVH=y
+# CONFIG_XEN_DOM0 is not set
CONFIG_KVM_GUEST=y
CONFIG_ARCH_CPUIDLE_HALTPOLL=y
CONFIG_PVH=y
@@ -369,7 +381,6 @@
CONFIG_X86_MCE_AMD=y
CONFIG_X86_MCE_THRESHOLD=y
# CONFIG_X86_MCE_INJECT is not set
-CONFIG_X86_THERMAL_VECTOR=y
#
# Performance monitoring
@@ -378,6 +389,7 @@
CONFIG_PERF_EVENTS_INTEL_RAPL=y
CONFIG_PERF_EVENTS_INTEL_CSTATE=y
# CONFIG_PERF_EVENTS_AMD_POWER is not set
+CONFIG_PERF_EVENTS_AMD_UNCORE=y
# end of Performance monitoring
CONFIG_X86_16BIT=y
@@ -407,7 +419,6 @@
CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
# CONFIG_X86_PMEM_LEGACY is not set
# CONFIG_X86_CHECK_BIOS_CORRUPTION is not set
-CONFIG_X86_RESERVE_LOW=64
CONFIG_MTRR=y
CONFIG_MTRR_SANITIZER=y
CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT=0
@@ -421,6 +432,7 @@
CONFIG_X86_INTEL_TSX_MODE_OFF=y
# CONFIG_X86_INTEL_TSX_MODE_ON is not set
# CONFIG_X86_INTEL_TSX_MODE_AUTO is not set
+# CONFIG_X86_SGX is not set
CONFIG_EFI=y
CONFIG_EFI_STUB=y
# CONFIG_EFI_MIXED is not set
@@ -447,17 +459,14 @@
# CONFIG_LEGACY_VSYSCALL_EMULATE is not set
# CONFIG_LEGACY_VSYSCALL_XONLY is not set
CONFIG_LEGACY_VSYSCALL_NONE=y
-CONFIG_CMDLINE_BOOL=n
-CONFIG_CMDLINE=""
-CONFIG_CMDLINE_OVERRIDE=y
+# CONFIG_CMDLINE_BOOL is not set
CONFIG_MODIFY_LDT_SYSCALL=y
CONFIG_HAVE_LIVEPATCH=y
# end of Processor type and features
CONFIG_ARCH_HAS_ADD_PAGES=y
-CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
+CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y
CONFIG_USE_PERCPU_NUMA_NODE_ID=y
-CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=y
#
# Power management and ACPI options
@@ -480,6 +489,7 @@
CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT=y
# CONFIG_ACPI_DEBUGGER is not set
CONFIG_ACPI_SPCR_TABLE=y
+CONFIG_ACPI_FPDT=y
CONFIG_ACPI_LPIT=y
CONFIG_ACPI_REV_OVERRIDE_POSSIBLE=y
# CONFIG_ACPI_EC_DEBUGFS is not set
@@ -522,7 +532,7 @@
CONFIG_ACPI_CONFIGFS=y
CONFIG_PMIC_OPREGION=y
CONFIG_X86_PM_TIMER=y
-# CONFIG_SFI is not set
+CONFIG_ACPI_PRMT=y
#
# CPU Frequency scaling
@@ -582,7 +592,6 @@
CONFIG_MMCONF_FAM10H=y
CONFIG_ISA_DMA_API=y
CONFIG_AMD_NB=y
-# CONFIG_X86_SYSFB is not set
# end of Bus options (PCI etc.)
#
@@ -592,50 +601,6 @@
# CONFIG_X86_X32 is not set
# end of Binary Emulations
-#
-# Firmware Drivers
-#
-# CONFIG_EDD is not set
-CONFIG_FIRMWARE_MEMMAP=y
-CONFIG_DMIID=y
-CONFIG_DMI_SYSFS=y
-CONFIG_DMI_SCAN_MACHINE_NON_EFI_FALLBACK=y
-# CONFIG_ISCSI_IBFT is not set
-CONFIG_FW_CFG_SYSFS=y
-# CONFIG_FW_CFG_SYSFS_CMDLINE is not set
-# CONFIG_GOOGLE_FIRMWARE is not set
-
-#
-# EFI (Extensible Firmware Interface) Support
-#
-CONFIG_EFI_VARS=y
-CONFIG_EFI_ESRT=y
-CONFIG_EFI_VARS_PSTORE=y
-# CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE is not set
-# CONFIG_EFI_FAKE_MEMMAP is not set
-CONFIG_EFI_SOFT_RESERVE=y
-CONFIG_EFI_RUNTIME_WRAPPERS=y
-CONFIG_EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER=y
-CONFIG_EFI_BOOTLOADER_CONTROL=y
-# CONFIG_EFI_CAPSULE_LOADER is not set
-# CONFIG_EFI_TEST is not set
-# CONFIG_APPLE_PROPERTIES is not set
-CONFIG_RESET_ATTACK_MITIGATION=y
-# CONFIG_EFI_RCI2_TABLE is not set
-# CONFIG_EFI_DISABLE_PCI_DMA is not set
-# end of EFI (Extensible Firmware Interface) Support
-
-CONFIG_UEFI_CPER=y
-CONFIG_UEFI_CPER_X86=y
-CONFIG_EFI_EARLYCON=y
-CONFIG_EFI_CUSTOM_SSDT_OVERLAYS=y
-
-#
-# Tegra firmware driver
-#
-# end of Tegra firmware driver
-# end of Firmware Drivers
-
CONFIG_HAVE_KVM=y
CONFIG_HAVE_KVM_IRQCHIP=y
CONFIG_HAVE_KVM_IRQFD=y
@@ -650,11 +615,13 @@
CONFIG_HAVE_KVM_IRQ_BYPASS=y
CONFIG_HAVE_KVM_NO_POLL=y
CONFIG_KVM_XFER_TO_GUEST_WORK=y
+CONFIG_HAVE_KVM_PM_NOTIFIER=y
CONFIG_VIRTUALIZATION=y
CONFIG_KVM=y
CONFIG_KVM_INTEL=y
CONFIG_KVM_AMD=y
CONFIG_KVM_AMD_SEV=y
+# CONFIG_KVM_XEN is not set
# CONFIG_KVM_MMU_AUDIT is not set
CONFIG_AS_AVX512=y
CONFIG_AS_SHA1_NI=y
@@ -666,8 +633,6 @@
#
CONFIG_HOTPLUG_SMT=y
CONFIG_GENERIC_ENTRY=y
-CONFIG_HAVE_OPROFILE=y
-CONFIG_OPROFILE_NMI_TIMER=y
CONFIG_JUMP_LABEL=y
# CONFIG_STATIC_KEYS_SELFTEST is not set
# CONFIG_STATIC_CALL_SELFTEST is not set
@@ -682,6 +647,7 @@
CONFIG_HAVE_KPROBES_ON_FTRACE=y
CONFIG_HAVE_FUNCTION_ERROR_INJECTION=y
CONFIG_HAVE_NMI=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
CONFIG_HAVE_ARCH_TRACEHOOK=y
CONFIG_HAVE_DMA_CONTIGUOUS=y
CONFIG_GENERIC_SMP_IDLE_THREAD=y
@@ -690,6 +656,7 @@
CONFIG_ARCH_HAS_SET_DIRECT_MAP=y
CONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y
CONFIG_ARCH_WANTS_DYNAMIC_TASK_STRUCT=y
+CONFIG_ARCH_WANTS_NO_INSTR=y
CONFIG_HAVE_ASM_MODVERSIONS=y
CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
CONFIG_HAVE_RSEQ=y
@@ -713,14 +680,20 @@
CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
CONFIG_SECCOMP=y
CONFIG_SECCOMP_FILTER=y
+# CONFIG_SECCOMP_CACHE_DEBUG is not set
CONFIG_HAVE_ARCH_STACKLEAK=y
CONFIG_HAVE_STACKPROTECTOR=y
CONFIG_STACKPROTECTOR=y
CONFIG_STACKPROTECTOR_STRONG=y
+CONFIG_ARCH_SUPPORTS_LTO_CLANG=y
+CONFIG_ARCH_SUPPORTS_LTO_CLANG_THIN=y
+CONFIG_LTO_NONE=y
CONFIG_HAVE_ARCH_WITHIN_STACK_FRAMES=y
CONFIG_HAVE_CONTEXT_TRACKING=y
+CONFIG_HAVE_CONTEXT_TRACKING_OFFSTACK=y
CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y
+CONFIG_HAVE_MOVE_PUD=y
CONFIG_HAVE_MOVE_PMD=y
CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y
CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD=y
@@ -729,6 +702,8 @@
CONFIG_HAVE_ARCH_SOFT_DIRTY=y
CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
CONFIG_MODULES_USE_ELF_RELA=y
+CONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK=y
+CONFIG_HAVE_SOFTIRQ_ON_OWN_STACK=y
CONFIG_ARCH_HAS_ELF_RANDOMIZE=y
CONFIG_HAVE_ARCH_MMAP_RND_BITS=y
CONFIG_HAVE_EXIT_THREAD=y
@@ -738,6 +713,8 @@
# CONFIG_COMPAT_32BIT_TIME is not set
CONFIG_HAVE_ARCH_VMAP_STACK=y
CONFIG_VMAP_STACK=y
+CONFIG_HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET=y
+# CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT is not set
CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y
CONFIG_STRICT_KERNEL_RWX=y
CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y
@@ -747,7 +724,11 @@
CONFIG_ARCH_HAS_MEM_ENCRYPT=y
CONFIG_HAVE_STATIC_CALL=y
CONFIG_HAVE_STATIC_CALL_INLINE=y
+CONFIG_HAVE_PREEMPT_DYNAMIC=y
CONFIG_ARCH_WANT_LD_ORPHAN_WARN=y
+CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
+CONFIG_ARCH_HAS_ELFCORE_COMPAT=y
+CONFIG_ARCH_HAS_PARANOID_L1D_FLUSH=y
#
# GCOV-based kernel profiling
@@ -764,17 +745,16 @@
# CONFIG_MODULES is not set
CONFIG_MODULES_TREE_LOOKUP=y
CONFIG_BLOCK=y
-CONFIG_BLK_SCSI_REQUEST=y
-CONFIG_BLK_DEV_BSG=y
+CONFIG_BLK_DEV_BSG_COMMON=y
# CONFIG_BLK_DEV_BSGLIB is not set
CONFIG_BLK_DEV_INTEGRITY=y
CONFIG_BLK_DEV_INTEGRITY_T10=y
# CONFIG_BLK_DEV_ZONED is not set
# CONFIG_BLK_DEV_THROTTLING is not set
-# CONFIG_BLK_CMDLINE_PARSER is not set
# CONFIG_BLK_WBT is not set
# CONFIG_BLK_CGROUP_IOLATENCY is not set
# CONFIG_BLK_CGROUP_IOCOST is not set
+CONFIG_BLK_CGROUP_IOPRIO=y
CONFIG_BLK_DEBUG_FS=y
# CONFIG_BLK_SED_OPAL is not set
# CONFIG_BLK_INLINE_ENCRYPTION is not set
@@ -807,6 +787,7 @@
CONFIG_BLK_MQ_PCI=y
CONFIG_BLK_MQ_VIRTIO=y
CONFIG_BLK_PM=y
+CONFIG_BLOCK_HOLDER_DEPRECATED=y
#
# IO Schedulers
@@ -854,20 +835,20 @@
CONFIG_SELECT_MEMORY_MODEL=y
CONFIG_SPARSEMEM_MANUAL=y
CONFIG_SPARSEMEM=y
-CONFIG_NEED_MULTIPLE_NODES=y
CONFIG_SPARSEMEM_EXTREME=y
CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
CONFIG_SPARSEMEM_VMEMMAP=y
CONFIG_HAVE_FAST_GUP=y
+CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
# CONFIG_MEMORY_HOTPLUG is not set
CONFIG_SPLIT_PTLOCK_CPUS=4
+CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=y
CONFIG_MEMORY_BALLOON=y
CONFIG_BALLOON_COMPACTION=y
CONFIG_COMPACTION=y
CONFIG_PAGE_REPORTING=y
CONFIG_MIGRATION=y
CONFIG_PHYS_ADDR_T_64BIT=y
-CONFIG_BOUNCE=y
CONFIG_VIRT_TO_BUS=y
CONFIG_MMU_NOTIFIER=y
# CONFIG_KSM is not set
@@ -879,17 +860,26 @@
# CONFIG_CLEANCACHE is not set
# CONFIG_CMA is not set
# CONFIG_ZPOOL is not set
-# CONFIG_ZBUD is not set
# CONFIG_ZSMALLOC is not set
CONFIG_GENERIC_EARLY_IOREMAP=y
# CONFIG_DEFERRED_STRUCT_PAGE_INIT is not set
# CONFIG_IDLE_PAGE_TRACKING is not set
+CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
CONFIG_ARCH_HAS_PTE_DEVMAP=y
+CONFIG_ZONE_DMA=y
+CONFIG_ZONE_DMA32=y
CONFIG_ARCH_USES_HIGH_VMA_FLAGS=y
CONFIG_ARCH_HAS_PKEYS=y
# CONFIG_PERCPU_STATS is not set
-# CONFIG_GUP_BENCHMARK is not set
+# CONFIG_GUP_TEST is not set
CONFIG_ARCH_HAS_PTE_SPECIAL=y
+CONFIG_SECRETMEM=y
+
+#
+# Data Access Monitoring
+#
+# CONFIG_DAMON is not set
+# end of Data Access Monitoring
# end of Memory Management options
CONFIG_NET=y
@@ -902,6 +892,7 @@
CONFIG_PACKET_DIAG=y
CONFIG_UNIX=y
CONFIG_UNIX_SCM=y
+CONFIG_AF_UNIX_OOB=y
CONFIG_UNIX_DIAG=y
# CONFIG_TLS is not set
# CONFIG_XFRM_USER is not set
@@ -968,6 +959,7 @@
# CONFIG_IPV6_SEG6_LWTUNNEL is not set
# CONFIG_IPV6_SEG6_HMAC is not set
# CONFIG_IPV6_RPL_LWTUNNEL is not set
+# CONFIG_IPV6_IOAM6_LWTUNNEL is not set
# CONFIG_NETLABEL is not set
# CONFIG_MPTCP is not set
# CONFIG_NETWORK_SECMARK is not set
@@ -982,12 +974,13 @@
#
CONFIG_NETFILTER_INGRESS=y
CONFIG_NETFILTER_NETLINK=y
+# CONFIG_NETFILTER_NETLINK_HOOK is not set
CONFIG_NETFILTER_NETLINK_ACCT=y
CONFIG_NETFILTER_NETLINK_QUEUE=y
CONFIG_NETFILTER_NETLINK_LOG=y
CONFIG_NETFILTER_NETLINK_OSF=y
CONFIG_NF_CONNTRACK=y
-# CONFIG_NF_LOG_NETDEV is not set
+# CONFIG_NF_LOG_SYSLOG is not set
CONFIG_NETFILTER_CONNCOUNT=y
CONFIG_NF_CONNTRACK_MARK=y
CONFIG_NF_CONNTRACK_ZONES=y
@@ -1047,6 +1040,7 @@
CONFIG_NFT_DUP_NETDEV=y
CONFIG_NFT_FWD_NETDEV=y
# CONFIG_NFT_FIB_NETDEV is not set
+CONFIG_NFT_REJECT_NETDEV=y
CONFIG_NF_FLOW_TABLE_INET=y
CONFIG_NF_FLOW_TABLE=y
# CONFIG_NETFILTER_XTABLES is not set
@@ -1113,7 +1107,7 @@
CONFIG_BRIDGE=y
CONFIG_BRIDGE_IGMP_SNOOPING=y
# CONFIG_BRIDGE_MRP is not set
-CONFIG_HAVE_NET_DSA=y
+# CONFIG_BRIDGE_CFM is not set
# CONFIG_NET_DSA is not set
# CONFIG_VLAN_8021Q is not set
# CONFIG_DECNET is not set
@@ -1139,8 +1133,10 @@
# CONFIG_NET_L3_MASTER_DEV is not set
# CONFIG_QRTR is not set
# CONFIG_NET_NCSI is not set
+CONFIG_PCPU_DEV_REFCNT=y
CONFIG_RPS=y
CONFIG_RFS_ACCEL=y
+CONFIG_SOCK_RX_QUEUE_MAPPING=y
CONFIG_XPS=y
# CONFIG_CGROUP_NET_PRIO is not set
# CONFIG_CGROUP_NET_CLASSID is not set
@@ -1161,8 +1157,8 @@
# CONFIG_BT is not set
# CONFIG_AF_RXRPC is not set
# CONFIG_AF_KCM is not set
+# CONFIG_MCTP is not set
# CONFIG_WIRELESS is not set
-# CONFIG_WIMAX is not set
# CONFIG_RFKILL is not set
# CONFIG_NET_9P is not set
# CONFIG_CAIF is not set
@@ -1173,11 +1169,11 @@
# CONFIG_LWTUNNEL is not set
CONFIG_DST_CACHE=y
CONFIG_GRO_CELLS=y
+CONFIG_NET_SELFTESTS=y
CONFIG_NET_DEVLINK=y
CONFIG_PAGE_POOL=y
CONFIG_FAILOVER=y
CONFIG_ETHTOOL_NETLINK=y
-CONFIG_HAVE_EBPF_JIT=y
#
# Device Drivers
@@ -1199,7 +1195,6 @@
CONFIG_PCIE_PME=y
# CONFIG_PCIE_DPC is not set
# CONFIG_PCIE_PTM is not set
-# CONFIG_PCIE_BW is not set
CONFIG_PCI_MSI=y
CONFIG_PCI_MSI_IRQ_DOMAIN=y
CONFIG_PCI_QUIRKS=y
@@ -1251,12 +1246,14 @@
# CONFIG_PCI_SW_SWITCHTEC is not set
# end of PCI switch controller drivers
+# CONFIG_CXL_BUS is not set
# CONFIG_PCCARD is not set
# CONFIG_RAPIDIO is not set
#
# Generic Driver Options
#
+CONFIG_AUXILIARY_BUS=y
# CONFIG_UEVENT_HELPER is not set
CONFIG_DEVTMPFS=y
# CONFIG_DEVTMPFS_MOUNT is not set
@@ -1290,6 +1287,59 @@
# end of Bus devices
# CONFIG_CONNECTOR is not set
+
+#
+# Firmware Drivers
+#
+
+#
+# ARM System Control and Management Interface Protocol
+#
+# end of ARM System Control and Management Interface Protocol
+
+# CONFIG_EDD is not set
+CONFIG_FIRMWARE_MEMMAP=y
+CONFIG_DMIID=y
+CONFIG_DMI_SYSFS=y
+CONFIG_DMI_SCAN_MACHINE_NON_EFI_FALLBACK=y
+# CONFIG_ISCSI_IBFT is not set
+CONFIG_FW_CFG_SYSFS=y
+# CONFIG_FW_CFG_SYSFS_CMDLINE is not set
+CONFIG_SYSFB=y
+# CONFIG_SYSFB_SIMPLEFB is not set
+# CONFIG_GOOGLE_FIRMWARE is not set
+
+#
+# EFI (Extensible Firmware Interface) Support
+#
+CONFIG_EFI_VARS=y
+CONFIG_EFI_ESRT=y
+CONFIG_EFI_VARS_PSTORE=y
+# CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE is not set
+# CONFIG_EFI_FAKE_MEMMAP is not set
+CONFIG_EFI_SOFT_RESERVE=y
+CONFIG_EFI_RUNTIME_WRAPPERS=y
+CONFIG_EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER=y
+CONFIG_EFI_BOOTLOADER_CONTROL=y
+# CONFIG_EFI_CAPSULE_LOADER is not set
+# CONFIG_EFI_TEST is not set
+# CONFIG_APPLE_PROPERTIES is not set
+CONFIG_RESET_ATTACK_MITIGATION=y
+# CONFIG_EFI_RCI2_TABLE is not set
+# CONFIG_EFI_DISABLE_PCI_DMA is not set
+# end of EFI (Extensible Firmware Interface) Support
+
+CONFIG_UEFI_CPER=y
+CONFIG_UEFI_CPER_X86=y
+CONFIG_EFI_EARLYCON=y
+CONFIG_EFI_CUSTOM_SSDT_OVERLAYS=y
+
+#
+# Tegra firmware driver
+#
+# end of Tegra firmware driver
+# end of Firmware Drivers
+
# CONFIG_GNSS is not set
# CONFIG_MTD is not set
# CONFIG_OF is not set
@@ -1306,13 +1356,11 @@
# CONFIG_BLK_DEV_NULL_BLK is not set
# CONFIG_BLK_DEV_FD is not set
# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set
-# CONFIG_BLK_DEV_UMEM is not set
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_LOOP_MIN_COUNT=0
# CONFIG_BLK_DEV_CRYPTOLOOP is not set
# CONFIG_BLK_DEV_DRBD is not set
# CONFIG_BLK_DEV_NBD is not set
-# CONFIG_BLK_DEV_SKD is not set
# CONFIG_BLK_DEV_SX8 is not set
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=1
@@ -1356,9 +1404,9 @@
# CONFIG_HMC6352 is not set
# CONFIG_DS1682 is not set
# CONFIG_SRAM is not set
+# CONFIG_DW_XDATA_PCIE is not set
# CONFIG_PCI_ENDPOINT_TEST is not set
# CONFIG_XILINX_SDFEC is not set
-CONFIG_PVPANIC=y
# CONFIG_C2PORT is not set
#
@@ -1387,20 +1435,22 @@
# CONFIG_VMWARE_VMCI is not set
# CONFIG_GENWQE is not set
# CONFIG_ECHO is not set
+# CONFIG_BCM_VK is not set
# CONFIG_MISC_ALCOR_PCI is not set
# CONFIG_MISC_RTSX_PCI is not set
# CONFIG_HABANA_AI is not set
# CONFIG_UACCE is not set
+CONFIG_PVPANIC=y
+# CONFIG_PVPANIC_MMIO is not set
+CONFIG_PVPANIC_PCI=y
# end of Misc devices
-CONFIG_HAVE_IDE=y
-# CONFIG_IDE is not set
-
#
# SCSI device support
#
CONFIG_SCSI_MOD=y
# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI_COMMON=y
CONFIG_SCSI=y
CONFIG_SCSI_DMA=y
CONFIG_SCSI_PROC_FS=y
@@ -1412,6 +1462,7 @@
# CONFIG_CHR_DEV_ST is not set
# CONFIG_BLK_DEV_SR is not set
# CONFIG_CHR_DEV_SG is not set
+CONFIG_BLK_DEV_BSG=y
# CONFIG_CHR_DEV_SCH is not set
# CONFIG_SCSI_CONSTANTS is not set
# CONFIG_SCSI_LOGGING is not set
@@ -1455,6 +1506,7 @@
# CONFIG_MEGARAID_SAS is not set
# CONFIG_SCSI_MPT3SAS is not set
# CONFIG_SCSI_MPT2SAS is not set
+# CONFIG_SCSI_MPI3MR is not set
# CONFIG_SCSI_SMARTPQI is not set
# CONFIG_SCSI_UFSHCD is not set
# CONFIG_SCSI_HPTIOP is not set
@@ -1467,7 +1519,6 @@
# CONFIG_SCSI_SNIC is not set
# CONFIG_SCSI_DMX3191D is not set
# CONFIG_SCSI_FDOMAIN_PCI is not set
-# CONFIG_SCSI_GDTH is not set
# CONFIG_SCSI_ISCI is not set
# CONFIG_SCSI_IPS is not set
# CONFIG_SCSI_INITIO is not set
@@ -1572,12 +1623,6 @@
CONFIG_VIRTIO_NET=y
# CONFIG_NLMON is not set
# CONFIG_ARCNET is not set
-
-#
-# Distributed Switch Architecture drivers
-#
-# end of Distributed Switch Architecture drivers
-
CONFIG_ETHERNET=y
CONFIG_MDIO=y
CONFIG_NET_VENDOR_3COM=y
@@ -1599,7 +1644,6 @@
CONFIG_AQTION=y
CONFIG_NET_VENDOR_ARC=y
# CONFIG_NET_VENDOR_ATHEROS is not set
-# CONFIG_NET_VENDOR_AURORA is not set
CONFIG_NET_VENDOR_BROADCOM=y
# CONFIG_B44 is not set
# CONFIG_BCMGENET is not set
@@ -1647,7 +1691,9 @@
CONFIG_ICE=y
CONFIG_FM10K=y
CONFIG_IGC=y
+CONFIG_NET_VENDOR_MICROSOFT=y
# CONFIG_JME is not set
+CONFIG_NET_VENDOR_LITEX=y
# CONFIG_NET_VENDOR_MARVELL is not set
CONFIG_NET_VENDOR_MELLANOX=y
CONFIG_MLX4_EN=y
@@ -1661,6 +1707,7 @@
CONFIG_MLX5_EN_RXNFC=y
CONFIG_MLX5_MPFS=y
CONFIG_MLX5_CORE_IPOIB=y
+# CONFIG_MLX5_SF is not set
# CONFIG_MLXSW_CORE is not set
CONFIG_MLXFW=y
# CONFIG_NET_VENDOR_MICREL is not set
@@ -1727,7 +1774,8 @@
# CONFIG_HIPPI is not set
# CONFIG_NET_SB1000 is not set
CONFIG_PHYLIB=y
-# CONFIG_FIXED_PHY is not set
+CONFIG_SWPHY=y
+CONFIG_FIXED_PHY=y
#
# MII PHY device drivers
@@ -1751,11 +1799,16 @@
# CONFIG_LSI_ET1011C_PHY is not set
# CONFIG_MARVELL_PHY is not set
# CONFIG_MARVELL_10G_PHY is not set
+# CONFIG_MARVELL_88X2222_PHY is not set
+CONFIG_MAXLINEAR_GPHY=y
+CONFIG_MEDIATEK_GE_PHY=y
CONFIG_MICREL_PHY=y
# CONFIG_MICROCHIP_PHY is not set
# CONFIG_MICROCHIP_T1_PHY is not set
# CONFIG_MICROSEMI_PHY is not set
+CONFIG_MOTORCOMM_PHY=y
# CONFIG_NATIONAL_PHY is not set
+CONFIG_NXP_C45_TJA11XX_PHY=y
# CONFIG_NXP_TJA11XX_PHY is not set
# CONFIG_AT803X_PHY is not set
# CONFIG_QSEMI_PHY is not set
@@ -1774,6 +1827,8 @@
# CONFIG_XILINX_GMII2RGMII is not set
CONFIG_MDIO_DEVICE=y
CONFIG_MDIO_BUS=y
+CONFIG_FWNODE_MDIO=y
+CONFIG_ACPI_MDIO=y
CONFIG_MDIO_DEVRES=y
# CONFIG_MDIO_BITBANG is not set
# CONFIG_MDIO_BCM_UNIMAC is not set
@@ -1797,11 +1852,14 @@
# Host-side USB support is needed for USB Network Adapter support
#
# CONFIG_WLAN is not set
+# CONFIG_WAN is not set
#
-# Enable WiMAX (Networking options) to see the WiMAX drivers
+# Wireless WAN
#
-# CONFIG_WAN is not set
+# CONFIG_WWAN is not set
+# end of Wireless WAN
+
CONFIG_XEN_NETDEV_FRONTEND=y
# CONFIG_VMXNET3 is not set
# CONFIG_FUJITSU_ES is not set
@@ -1809,14 +1867,12 @@
# CONFIG_NETDEVSIM is not set
CONFIG_NET_FAILOVER=y
# CONFIG_ISDN is not set
-# CONFIG_NVM is not set
#
# Input device support
#
CONFIG_INPUT=y
CONFIG_INPUT_FF_MEMLESS=y
-# CONFIG_INPUT_POLLDEV is not set
# CONFIG_INPUT_SPARSEKMAP is not set
# CONFIG_INPUT_MATRIXKMAP is not set
@@ -1924,6 +1980,7 @@
# CONFIG_SERIAL_LANTIQ is not set
# CONFIG_SERIAL_SCCNXP is not set
# CONFIG_SERIAL_SC16IS7XX is not set
+# CONFIG_SERIAL_BCM63XX is not set
# CONFIG_SERIAL_ALTERA_JTAGUART is not set
# CONFIG_SERIAL_ALTERA_UART is not set
# CONFIG_SERIAL_ARC is not set
@@ -1937,7 +1994,6 @@
# CONFIG_N_GSM is not set
# CONFIG_NOZOMI is not set
# CONFIG_NULL_TTY is not set
-# CONFIG_TRACE_SINK is not set
CONFIG_HVC_DRIVER=y
CONFIG_HVC_IRQ=y
CONFIG_HVC_XEN=y
@@ -1964,9 +2020,7 @@
# CONFIG_APPLICOM is not set
# CONFIG_MWAVE is not set
# CONFIG_DEVMEM is not set
-# CONFIG_DEVKMEM is not set
# CONFIG_NVRAM is not set
-# CONFIG_RAW_DRIVER is not set
CONFIG_DEVPORT=y
# CONFIG_HPET is not set
CONFIG_HANGCHECK_TIMER=y
@@ -1974,6 +2028,7 @@
CONFIG_HW_RANDOM_TPM=y
CONFIG_TCG_TIS_CORE=y
CONFIG_TCG_TIS=y
+CONFIG_TCG_TIS_I2C_CR50=y
# CONFIG_TCG_TIS_I2C_ATMEL is not set
# CONFIG_TCG_TIS_I2C_INFINEON is not set
# CONFIG_TCG_TIS_I2C_NUVOTON is not set
@@ -1986,10 +2041,9 @@
# CONFIG_TCG_TIS_ST33ZP24_I2C is not set
# CONFIG_TELCLOCK is not set
# CONFIG_XILLYBUS is not set
-# end of Character devices
-
# CONFIG_RANDOM_TRUST_CPU is not set
# CONFIG_RANDOM_TRUST_BOOTLOADER is not set
+# end of Character devices
#
# I2C support
@@ -2053,6 +2107,7 @@
# Other I2C/SMBus bus drivers
#
# CONFIG_I2C_MLXCPLD is not set
+# CONFIG_I2C_VIRTIO is not set
# end of I2C Hardware Bus support
# CONFIG_I2C_SLAVE is not set
@@ -2071,6 +2126,7 @@
# PTP clock support
#
# CONFIG_PTP_1588_CLOCK is not set
+CONFIG_PTP_1588_CLOCK_OPTIONAL=y
# end of PTP clock support
# CONFIG_PINCTRL is not set
@@ -2096,9 +2152,12 @@
# CONFIG_CHARGER_MAX8903 is not set
# CONFIG_CHARGER_LP8727 is not set
# CONFIG_CHARGER_MANAGER is not set
+# CONFIG_CHARGER_LTC4162L is not set
# CONFIG_CHARGER_BQ2415X is not set
# CONFIG_CHARGER_SMB347 is not set
# CONFIG_BATTERY_GAUGE_LTC2941 is not set
+# CONFIG_BATTERY_GOLDFISH is not set
+# CONFIG_BATTERY_RT5033 is not set
# CONFIG_CHARGER_BD99954 is not set
CONFIG_HWMON=y
# CONFIG_HWMON_DEBUG_CHIP is not set
@@ -2122,18 +2181,19 @@
# CONFIG_SENSORS_ADT7462 is not set
# CONFIG_SENSORS_ADT7470 is not set
# CONFIG_SENSORS_ADT7475 is not set
+# CONFIG_SENSORS_AHT10 is not set
# CONFIG_SENSORS_AS370 is not set
# CONFIG_SENSORS_ASC7621 is not set
# CONFIG_SENSORS_AXI_FAN_CONTROL is not set
# CONFIG_SENSORS_K8TEMP is not set
# CONFIG_SENSORS_K10TEMP is not set
# CONFIG_SENSORS_FAM15H_POWER is not set
-# CONFIG_SENSORS_AMD_ENERGY is not set
# CONFIG_SENSORS_APPLESMC is not set
# CONFIG_SENSORS_ASB100 is not set
# CONFIG_SENSORS_ASPEED is not set
# CONFIG_SENSORS_ATXP1 is not set
# CONFIG_SENSORS_CORSAIR_CPRO is not set
+# CONFIG_SENSORS_CORSAIR_PSU is not set
# CONFIG_SENSORS_DRIVETEMP is not set
# CONFIG_SENSORS_DS620 is not set
# CONFIG_SENSORS_DS1621 is not set
@@ -2165,6 +2225,7 @@
# CONFIG_SENSORS_LTC4245 is not set
# CONFIG_SENSORS_LTC4260 is not set
# CONFIG_SENSORS_LTC4261 is not set
+# CONFIG_SENSORS_MAX127 is not set
# CONFIG_SENSORS_MAX16065 is not set
# CONFIG_SENSORS_MAX1619 is not set
# CONFIG_SENSORS_MAX1668 is not set
@@ -2178,6 +2239,7 @@
# CONFIG_SENSORS_MAX31790 is not set
# CONFIG_SENSORS_MCP3021 is not set
# CONFIG_SENSORS_TC654 is not set
+# CONFIG_SENSORS_TPS23861 is not set
# CONFIG_SENSORS_MR75203 is not set
# CONFIG_SENSORS_LM63 is not set
# CONFIG_SENSORS_LM73 is not set
@@ -2203,8 +2265,11 @@
# CONFIG_SENSORS_NPCM7XX is not set
# CONFIG_SENSORS_PCF8591 is not set
# CONFIG_PMBUS is not set
+# CONFIG_SENSORS_SBTSI is not set
+# CONFIG_SENSORS_SBRMI is not set
# CONFIG_SENSORS_SHT21 is not set
# CONFIG_SENSORS_SHT3x is not set
+# CONFIG_SENSORS_SHT4x is not set
# CONFIG_SENSORS_SHTC1 is not set
# CONFIG_SENSORS_SIS5595 is not set
# CONFIG_SENSORS_DME1737 is not set
@@ -2270,6 +2335,7 @@
# Intel thermal drivers
#
# CONFIG_INTEL_POWERCLAMP is not set
+CONFIG_X86_THERMAL_VECTOR=y
CONFIG_X86_PKG_TEMP_THERMAL=y
# CONFIG_INTEL_SOC_DTS_THERMAL is not set
@@ -2280,6 +2346,8 @@
# end of ACPI INT340X thermal drivers
# CONFIG_INTEL_PCH_THERMAL is not set
+# CONFIG_INTEL_TCC_COOLING is not set
+# CONFIG_INTEL_MENLOW is not set
# end of Intel thermal drivers
# CONFIG_WATCHDOG is not set
@@ -2312,6 +2380,7 @@
# CONFIG_MFD_INTEL_LPSS_ACPI is not set
# CONFIG_MFD_INTEL_LPSS_PCI is not set
# CONFIG_MFD_INTEL_PMC_BXT is not set
+# CONFIG_MFD_INTEL_PMT is not set
# CONFIG_MFD_IQS62X is not set
# CONFIG_MFD_JANZ_CMODIO is not set
# CONFIG_MFD_KEMPLD is not set
@@ -2331,13 +2400,12 @@
# CONFIG_MFD_RETU is not set
# CONFIG_MFD_PCF50633 is not set
# CONFIG_MFD_RDC321X is not set
+# CONFIG_MFD_RT4831 is not set
# CONFIG_MFD_RT5033 is not set
# CONFIG_MFD_RC5T583 is not set
-# CONFIG_MFD_SEC_CORE is not set
# CONFIG_MFD_SI476X_CORE is not set
# CONFIG_MFD_SM501 is not set
# CONFIG_MFD_SKY81452 is not set
-# CONFIG_ABX500_CORE is not set
# CONFIG_MFD_SYSCON is not set
# CONFIG_MFD_TI_AM335X_TSCADC is not set
# CONFIG_MFD_LP3943 is not set
@@ -2363,6 +2431,7 @@
# CONFIG_MFD_WM831X_I2C is not set
# CONFIG_MFD_WM8350_I2C is not set
# CONFIG_MFD_WM8994 is not set
+# CONFIG_MFD_ATC260X_I2C is not set
# end of Multifunction device drivers
CONFIG_REGULATOR=y
@@ -2387,17 +2456,21 @@
# CONFIG_REGULATOR_MAX1586 is not set
# CONFIG_REGULATOR_MAX8649 is not set
# CONFIG_REGULATOR_MAX8660 is not set
+# CONFIG_REGULATOR_MAX8893 is not set
# CONFIG_REGULATOR_MAX8952 is not set
# CONFIG_REGULATOR_MAX77826 is not set
# CONFIG_REGULATOR_MP8859 is not set
# CONFIG_REGULATOR_MT6311 is not set
# CONFIG_REGULATOR_PCA9450 is not set
-# CONFIG_REGULATOR_PFUZE100 is not set
# CONFIG_REGULATOR_PV88060 is not set
# CONFIG_REGULATOR_PV88080 is not set
# CONFIG_REGULATOR_PV88090 is not set
# CONFIG_REGULATOR_RT4801 is not set
+# CONFIG_REGULATOR_RT6160 is not set
+# CONFIG_REGULATOR_RT6245 is not set
+# CONFIG_REGULATOR_RTQ2134 is not set
# CONFIG_REGULATOR_RTMV20 is not set
+# CONFIG_REGULATOR_RTQ6752 is not set
# CONFIG_REGULATOR_SLG51000 is not set
# CONFIG_REGULATOR_TPS51632 is not set
# CONFIG_REGULATOR_TPS62360 is not set
@@ -2421,8 +2494,6 @@
#
# end of ARM devices
-# CONFIG_DRM_XEN is not set
-
#
# Frame buffer Devices
#
@@ -2504,9 +2575,11 @@
# CONFIG_HID_PETALYNX is not set
# CONFIG_HID_PICOLCD is not set
# CONFIG_HID_PLANTRONICS is not set
+# CONFIG_HID_PLAYSTATION is not set
# CONFIG_HID_PRIMAX is not set
# CONFIG_HID_SAITEK is not set
# CONFIG_HID_SAMSUNG is not set
+# CONFIG_HID_SEMITEK is not set
# CONFIG_HID_SPEEDLINK is not set
# CONFIG_HID_STEAM is not set
# CONFIG_HID_STEELSERIES is not set
@@ -2517,7 +2590,6 @@
# CONFIG_HID_SMARTJOYPLUS is not set
# CONFIG_HID_TIVO is not set
# CONFIG_HID_TOPSEED is not set
-# CONFIG_HID_THRUSTMASTER is not set
# CONFIG_HID_UDRAW_PS3 is not set
# CONFIG_HID_XINMO is not set
# CONFIG_HID_ZEROPLUS is not set
@@ -2529,7 +2601,7 @@
#
# I2C HID support
#
-# CONFIG_I2C_HID is not set
+# CONFIG_I2C_HID_ACPI is not set
# end of I2C HID support
#
@@ -2537,6 +2609,12 @@
#
# CONFIG_INTEL_ISH_HID is not set
# end of Intel ISH HID support
+
+#
+# AMD SFH HID Support
+#
+# CONFIG_AMD_SFH_HID is not set
+# end of AMD SFH HID Support
# end of HID support
CONFIG_USB_OHCI_LITTLE_ENDIAN=y
@@ -2630,6 +2708,7 @@
# CONFIG_RTC_DRV_DS3232 is not set
# CONFIG_RTC_DRV_PCF2127 is not set
# CONFIG_RTC_DRV_RV3029C2 is not set
+# CONFIG_RTC_DRV_RX6110 is not set
#
# Platform RTC drivers
@@ -2658,13 +2737,13 @@
#
# HID Sensor RTC drivers
#
+# CONFIG_RTC_DRV_GOLDFISH is not set
# CONFIG_DMADEVICES is not set
#
# DMABUF options
#
# CONFIG_SYNC_FILE is not set
-# CONFIG_DMABUF_MOVE_NOTIFY is not set
# CONFIG_DMABUF_HEAPS is not set
# end of DMABUF options
@@ -2684,6 +2763,8 @@
CONFIG_IRQ_BYPASS_MANAGER=y
# CONFIG_VIRT_DRIVERS is not set
CONFIG_VIRTIO=y
+CONFIG_ARCH_HAS_RESTRICTED_VIRTIO_MEMORY_ACCESS=y
+CONFIG_VIRTIO_PCI_LIB=y
CONFIG_VIRTIO_MENU=y
CONFIG_VIRTIO_PCI=y
CONFIG_VIRTIO_PCI_LEGACY=y
@@ -2729,27 +2810,39 @@
# end of Xen driver support
# CONFIG_GREYBUS is not set
+# CONFIG_COMEDI is not set
# CONFIG_STAGING is not set
CONFIG_X86_PLATFORM_DEVICES=y
# CONFIG_ACPI_WMI is not set
# CONFIG_ACERHDF is not set
# CONFIG_ACER_WIRELESS is not set
+CONFIG_AMD_PMC=y
+# CONFIG_ADV_SWBUTTON is not set
# CONFIG_ASUS_WIRELESS is not set
-# CONFIG_DCDBAS is not set
-# CONFIG_DELL_SMBIOS is not set
-# CONFIG_DELL_RBU is not set
-# CONFIG_DELL_SMO8800 is not set
+# CONFIG_X86_PLATFORM_DRIVERS_DELL is not set
# CONFIG_FUJITSU_TABLET is not set
# CONFIG_GPD_POCKET_FAN is not set
# CONFIG_HP_ACCEL is not set
-# CONFIG_HP_WIRELESS is not set
+# CONFIG_WIRELESS_HOTKEY is not set
# CONFIG_IBM_RTL is not set
# CONFIG_SENSORS_HDAPS is not set
+CONFIG_X86_PLATFORM_DRIVERS_INTEL=y
+# CONFIG_INTEL_SAR_INT1092 is not set
+# CONFIG_INTEL_PMC_CORE is not set
+
+#
+# Intel Speed Select Technology interface support
+#
+# CONFIG_INTEL_SPEED_SELECT_INTERFACE is not set
+# end of Intel Speed Select Technology interface support
+
# CONFIG_INTEL_HID_EVENT is not set
-# CONFIG_INTEL_MENLOW is not set
# CONFIG_INTEL_VBTN is not set
-# CONFIG_SURFACE_3_POWER_OPREGION is not set
-# CONFIG_SURFACE_PRO3_BUTTON is not set
+# CONFIG_INTEL_PUNIT_IPC is not set
+# CONFIG_INTEL_RST is not set
+# CONFIG_INTEL_SMARTCONNECT is not set
+# CONFIG_INTEL_TURBO_MAX_3 is not set
+# CONFIG_INTEL_UNCORE_FREQ_CONTROL is not set
# CONFIG_SAMSUNG_Q10 is not set
# CONFIG_TOSHIBA_BT_RFKILL is not set
# CONFIG_TOSHIBA_HAPS is not set
@@ -2758,34 +2851,30 @@
# CONFIG_TOPSTAR_LAPTOP is not set
# CONFIG_I2C_MULTI_INSTANTIATE is not set
# CONFIG_INTEL_IPS is not set
-# CONFIG_INTEL_RST is not set
-# CONFIG_INTEL_SMARTCONNECT is not set
-
-#
-# Intel Speed Select Technology interface support
-#
-# CONFIG_INTEL_SPEED_SELECT_INTERFACE is not set
-# end of Intel Speed Select Technology interface support
-
-# CONFIG_INTEL_TURBO_MAX_3 is not set
-# CONFIG_INTEL_UNCORE_FREQ_CONTROL is not set
-# CONFIG_INTEL_PMC_CORE is not set
-# CONFIG_INTEL_PUNIT_IPC is not set
# CONFIG_INTEL_SCU_PCI is not set
# CONFIG_INTEL_SCU_PLATFORM is not set
CONFIG_PMC_ATOM=y
# CONFIG_CHROME_PLATFORMS is not set
# CONFIG_MELLANOX_PLATFORM is not set
+# CONFIG_SURFACE_PLATFORMS is not set
CONFIG_HAVE_CLK=y
-CONFIG_CLKDEV_LOOKUP=y
CONFIG_HAVE_CLK_PREPARE=y
CONFIG_COMMON_CLK=y
+
+#
+# Clock driver for ARM Reference designs
+#
+# CONFIG_ICST is not set
+# CONFIG_CLK_SP810 is not set
+# end of Clock driver for ARM Reference designs
+
# CONFIG_COMMON_CLK_MAX9485 is not set
# CONFIG_COMMON_CLK_SI5341 is not set
# CONFIG_COMMON_CLK_SI5351 is not set
# CONFIG_COMMON_CLK_SI544 is not set
# CONFIG_COMMON_CLK_CDCE706 is not set
# CONFIG_COMMON_CLK_CS2000_CP is not set
+# CONFIG_XILINX_VCU is not set
CONFIG_HWSPINLOCK=y
#
@@ -2806,9 +2895,12 @@
#
# Generic IOMMU Pagetable Support
#
+CONFIG_IOMMU_IO_PGTABLE=y
# end of Generic IOMMU Pagetable Support
# CONFIG_IOMMU_DEBUGFS is not set
+# CONFIG_IOMMU_DEFAULT_DMA_STRICT is not set
+CONFIG_IOMMU_DEFAULT_DMA_LAZY=y
# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set
CONFIG_IOMMU_DMA=y
CONFIG_AMD_IOMMU=y
@@ -2816,6 +2908,7 @@
# CONFIG_INTEL_IOMMU is not set
# CONFIG_IRQ_REMAP is not set
CONFIG_HYPERV_IOMMU=y
+# CONFIG_VIRTIO_IOMMU is not set
#
# Remoteproc drivers
@@ -2842,11 +2935,6 @@
# end of Amlogic SoC drivers
#
-# Aspeed SoC drivers
-#
-# end of Aspeed SoC drivers
-
-#
# Broadcom SoC drivers
#
# end of Broadcom SoC drivers
@@ -2862,6 +2950,11 @@
# end of i.MX SoC drivers
#
+# Enable LiteX SoC Builder specific drivers
+#
+# end of Enable LiteX SoC Builder specific drivers
+
+#
# Qualcomm SoC drivers
#
# end of Qualcomm SoC drivers
@@ -2871,7 +2964,6 @@
#
# Xilinx SoC drivers
#
-# CONFIG_XILINX_VCU is not set
# end of Xilinx SoC drivers
# end of SOC (System On Chip) specific Drivers
@@ -2884,6 +2976,7 @@
# CONFIG_EXTCON_FSA9480 is not set
# CONFIG_EXTCON_RT8973A is not set
# CONFIG_EXTCON_SM5502 is not set
+# CONFIG_EXTCON_USBC_TUSB320 is not set
# CONFIG_MEMORY is not set
# CONFIG_IIO is not set
# CONFIG_NTB is not set
@@ -2903,6 +2996,7 @@
#
# CONFIG_GENERIC_PHY is not set
CONFIG_USB_LGM_PHY=y
+# CONFIG_PHY_CAN_TRANSCEIVER is not set
# CONFIG_BCM_KONA_USB2_PHY is not set
# CONFIG_PHY_PXA_28NM_HSIC is not set
# CONFIG_PHY_PXA_28NM_USB2 is not set
@@ -2930,6 +3024,7 @@
# CONFIG_DAX is not set
CONFIG_NVMEM=y
CONFIG_NVMEM_SYSFS=y
+# CONFIG_NVMEM_RMEM is not set
#
# HW tracing support
@@ -2953,7 +3048,6 @@
#
CONFIG_DCACHE_WORD_ACCESS=y
# CONFIG_VALIDATE_FS_PARSER is not set
-CONFIG_FSINFO=y
CONFIG_FS_IOMAP=y
# CONFIG_EXT2_FS is not set
# CONFIG_EXT3_FS is not set
@@ -2985,7 +3079,6 @@
CONFIG_EXPORTFS=y
# CONFIG_EXPORTFS_BLOCK_OPS is not set
CONFIG_FILE_LOCKING=y
-CONFIG_MANDATORY_FILE_LOCKING=y
# CONFIG_FS_ENCRYPTION is not set
CONFIG_FS_VERITY=y
# CONFIG_FS_VERITY_DEBUG is not set
@@ -3035,6 +3128,7 @@
# CONFIG_FAT_DEFAULT_UTF8 is not set
# CONFIG_EXFAT_FS is not set
# CONFIG_NTFS_FS is not set
+# CONFIG_NTFS3_FS is not set
# end of DOS/FAT/EXFAT/NT Filesystems
#
@@ -3080,6 +3174,7 @@
# CONFIG_QNX6FS_FS is not set
# CONFIG_ROMFS_FS is not set
CONFIG_PSTORE=y
+CONFIG_PSTORE_DEFAULT_KMSG_BYTES=10240
# CONFIG_PSTORE_DEFLATE_COMPRESS is not set
# CONFIG_PSTORE_LZO_COMPRESS is not set
# CONFIG_PSTORE_LZ4_COMPRESS is not set
@@ -3093,11 +3188,6 @@
# CONFIG_PSTORE_PMSG is not set
# CONFIG_PSTORE_FTRACE is not set
# CONFIG_PSTORE_RAM is not set
-CONFIG_PSTORE_ZONE=y
-CONFIG_PSTORE_BLK=y
-CONFIG_PSTORE_BLK_BLKDEV=""
-CONFIG_PSTORE_BLK_KMSG_SIZE=64
-CONFIG_PSTORE_BLK_MAX_REASON=2
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set
CONFIG_EROFS_FS=y
@@ -3106,7 +3196,6 @@
CONFIG_EROFS_FS_POSIX_ACL=y
CONFIG_EROFS_FS_SECURITY=y
CONFIG_EROFS_FS_ZIP=y
-CONFIG_EROFS_FS_CLUSTER_PAGE_LIMIT=1
# CONFIG_NETWORK_FILESYSTEMS is not set
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
@@ -3180,7 +3269,7 @@
CONFIG_SECURITYFS=y
# CONFIG_SECURITY_NETWORK is not set
CONFIG_PAGE_TABLE_ISOLATION=y
-# CONFIG_SECURITY_PATH is not set
+CONFIG_SECURITY_PATH=y
CONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y
CONFIG_HARDENED_USERCOPY=y
CONFIG_HARDENED_USERCOPY_FALLBACK=y
@@ -3197,6 +3286,7 @@
CONFIG_LOCK_DOWN_KERNEL_FORCE_NONE=y
# CONFIG_LOCK_DOWN_KERNEL_FORCE_INTEGRITY is not set
# CONFIG_LOCK_DOWN_KERNEL_FORCE_CONFIDENTIALITY is not set
+CONFIG_SECURITY_LANDLOCK=y
CONFIG_INTEGRITY=y
# CONFIG_INTEGRITY_SIGNATURE is not set
CONFIG_IMA=y
@@ -3215,6 +3305,7 @@
CONFIG_IMA_MEASURE_ASYMMETRIC_KEYS=y
CONFIG_IMA_QUEUE_EARLY_BOOT_KEYS=y
# CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT is not set
+# CONFIG_IMA_DISABLE_HTABLE is not set
CONFIG_EVM=y
CONFIG_EVM_ATTR_FSUUID=y
# CONFIG_EVM_ADD_XATTRS is not set
@@ -3270,7 +3361,6 @@
CONFIG_CRYPTO_CRYPTD=y
CONFIG_CRYPTO_AUTHENC=y
CONFIG_CRYPTO_SIMD=y
-CONFIG_CRYPTO_GLUE_HELPER_X86=y
CONFIG_CRYPTO_ENGINE=y
#
@@ -3280,6 +3370,7 @@
# CONFIG_CRYPTO_DH is not set
CONFIG_CRYPTO_ECC=y
CONFIG_CRYPTO_ECDH=y
+CONFIG_CRYPTO_ECDSA=y
# CONFIG_CRYPTO_ECRDSA is not set
# CONFIG_CRYPTO_SM2 is not set
CONFIG_CRYPTO_CURVE25519=y
@@ -3342,10 +3433,7 @@
# CONFIG_CRYPTO_MD4 is not set
CONFIG_CRYPTO_MD5=y
# CONFIG_CRYPTO_MICHAEL_MIC is not set
-# CONFIG_CRYPTO_RMD128 is not set
# CONFIG_CRYPTO_RMD160 is not set
-# CONFIG_CRYPTO_RMD256 is not set
-# CONFIG_CRYPTO_RMD320 is not set
CONFIG_CRYPTO_SHA1=y
CONFIG_CRYPTO_SHA1_SSSE3=y
CONFIG_CRYPTO_SHA256_SSSE3=y
@@ -3355,7 +3443,6 @@
# CONFIG_CRYPTO_SHA3 is not set
# CONFIG_CRYPTO_SM3 is not set
# CONFIG_CRYPTO_STREEBOG is not set
-# CONFIG_CRYPTO_TGR192 is not set
# CONFIG_CRYPTO_WP512 is not set
CONFIG_CRYPTO_GHASH_CLMUL_NI_INTEL=y
@@ -3378,7 +3465,6 @@
# CONFIG_CRYPTO_DES is not set
# CONFIG_CRYPTO_DES3_EDE_X86_64 is not set
# CONFIG_CRYPTO_FCRYPT is not set
-# CONFIG_CRYPTO_SALSA20 is not set
CONFIG_CRYPTO_CHACHA20=y
CONFIG_CRYPTO_CHACHA20_X86_64=y
# CONFIG_CRYPTO_SERPENT is not set
@@ -3386,6 +3472,8 @@
# CONFIG_CRYPTO_SERPENT_AVX_X86_64 is not set
# CONFIG_CRYPTO_SERPENT_AVX2_X86_64 is not set
# CONFIG_CRYPTO_SM4 is not set
+# CONFIG_CRYPTO_SM4_AESNI_AVX_X86_64 is not set
+# CONFIG_CRYPTO_SM4_AESNI_AVX2_X86_64 is not set
# CONFIG_CRYPTO_TWOFISH is not set
# CONFIG_CRYPTO_TWOFISH_X86_64 is not set
# CONFIG_CRYPTO_TWOFISH_X86_64_3WAY is not set
@@ -3446,6 +3534,7 @@
# CONFIG_CRYPTO_DEV_QAT_DH895xCC is not set
# CONFIG_CRYPTO_DEV_QAT_C3XXX is not set
# CONFIG_CRYPTO_DEV_QAT_C62X is not set
+# CONFIG_CRYPTO_DEV_QAT_4XXX is not set
# CONFIG_CRYPTO_DEV_QAT_DH895xCCVF is not set
# CONFIG_CRYPTO_DEV_QAT_C3XXXVF is not set
# CONFIG_CRYPTO_DEV_QAT_C62XVF is not set
@@ -3542,6 +3631,7 @@
CONFIG_SWIOTLB=y
CONFIG_DMA_COHERENT_POOL=y
# CONFIG_DMA_API_DEBUG is not set
+# CONFIG_DMA_MAP_BENCHMARK is not set
CONFIG_SGL_ALLOC=y
CONFIG_CPU_RMAP=y
CONFIG_DQL=y
@@ -3567,10 +3657,10 @@
CONFIG_ARCH_HAS_COPY_MC=y
CONFIG_ARCH_STACKWALK=y
CONFIG_SBITMAP=y
-# CONFIG_STRING_SELFTEST is not set
# end of Library routines
CONFIG_PLDMFW=y
+CONFIG_ASN1_ENCODER=y
#
# Kernel hacking
@@ -3581,6 +3671,7 @@
#
CONFIG_PRINTK_TIME=y
# CONFIG_PRINTK_CALLER is not set
+CONFIG_STACKTRACE_BUILD_ID=y
CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7
CONFIG_CONSOLE_LOGLEVEL_QUIET=4
CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4
@@ -3595,7 +3686,6 @@
# Compile-time checks and compiler options
#
# CONFIG_DEBUG_INFO is not set
-CONFIG_ENABLE_MUST_CHECK=y
CONFIG_FRAME_WARN=2048
# CONFIG_STRIP_ASM_SYMS is not set
# CONFIG_READABLE_ASM is not set
@@ -3652,11 +3742,18 @@
# CONFIG_DEBUG_VIRTUAL is not set
CONFIG_DEBUG_MEMORY_INIT=y
# CONFIG_DEBUG_PER_CPU_MAPS is not set
+CONFIG_ARCH_SUPPORTS_KMAP_LOCAL_FORCE_MAP=y
+# CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP is not set
CONFIG_HAVE_ARCH_KASAN=y
CONFIG_HAVE_ARCH_KASAN_VMALLOC=y
CONFIG_CC_HAS_KASAN_GENERIC=y
CONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y
# CONFIG_KASAN is not set
+CONFIG_HAVE_ARCH_KFENCE=y
+CONFIG_KFENCE=y
+CONFIG_KFENCE_SAMPLE_INTERVAL=100
+CONFIG_KFENCE_NUM_OBJECTS=255
+CONFIG_KFENCE_STRESS_TEST_FAULTS=0
# end of Memory Debugging
# CONFIG_DEBUG_SHIRQ is not set
@@ -3715,6 +3812,7 @@
CONFIG_TRACE_IRQFLAGS=y
CONFIG_TRACE_IRQFLAGS_NMI=y
+# CONFIG_DEBUG_IRQFLAGS is not set
CONFIG_STACKTRACE=y
# CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set
# CONFIG_DEBUG_KOBJECT is not set
@@ -3743,7 +3841,6 @@
# end of RCU Debugging
# CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set
-# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
# CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set
# CONFIG_LATENCYTOP is not set
CONFIG_USER_STACKTRACE_SUPPORT=y
@@ -3753,9 +3850,11 @@
CONFIG_HAVE_DYNAMIC_FTRACE=y
CONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y
CONFIG_HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS=y
+CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS=y
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
CONFIG_HAVE_FENTRY=y
+CONFIG_HAVE_OBJTOOL_MCOUNT=y
CONFIG_HAVE_C_RECORDMCOUNT=y
CONFIG_TRACER_MAX_TRACE=y
CONFIG_TRACE_CLOCK=y
@@ -3774,11 +3873,14 @@
CONFIG_DYNAMIC_FTRACE=y
CONFIG_DYNAMIC_FTRACE_WITH_REGS=y
CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS=y
+CONFIG_DYNAMIC_FTRACE_WITH_ARGS=y
# CONFIG_FUNCTION_PROFILER is not set
# CONFIG_STACK_TRACER is not set
CONFIG_IRQSOFF_TRACER=y
CONFIG_SCHED_TRACER=y
CONFIG_HWLAT_TRACER=y
+# CONFIG_OSNOISE_TRACER is not set
+# CONFIG_TIMERLAT_TRACER is not set
# CONFIG_MMIOTRACE is not set
CONFIG_FTRACE_SYSCALLS=y
CONFIG_TRACER_SNAPSHOT=y
@@ -3790,14 +3892,17 @@
CONFIG_DYNAMIC_EVENTS=y
CONFIG_PROBE_EVENTS=y
CONFIG_FTRACE_MCOUNT_RECORD=y
+CONFIG_FTRACE_MCOUNT_USE_CC=y
# CONFIG_SYNTH_EVENTS is not set
# CONFIG_HIST_TRIGGERS is not set
# CONFIG_TRACE_EVENT_INJECT is not set
# CONFIG_TRACEPOINT_BENCHMARK is not set
# CONFIG_RING_BUFFER_BENCHMARK is not set
# CONFIG_TRACE_EVAL_MAP_FILE is not set
+# CONFIG_FTRACE_RECORD_RECURSION is not set
# CONFIG_FTRACE_STARTUP_TEST is not set
# CONFIG_RING_BUFFER_STARTUP_TEST is not set
+# CONFIG_RING_BUFFER_VALIDATE_TIME_DELTAS is not set
# CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set
# CONFIG_SAMPLES is not set
CONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y
@@ -3806,7 +3911,6 @@
#
# x86 Debugging
#
-CONFIG_TRACE_IRQFLAGS_SUPPORT=y
CONFIG_TRACE_IRQFLAGS_NMI_SUPPORT=y
CONFIG_X86_VERBOSE_BOOTUP=y
CONFIG_EARLY_PRINTK=y
@@ -3841,19 +3945,20 @@
# CONFIG_KCOV is not set
CONFIG_RUNTIME_TESTING_MENU=y
# CONFIG_LKDTM is not set
-# CONFIG_TEST_LIST_SORT is not set
# CONFIG_TEST_MIN_HEAP is not set
-# CONFIG_TEST_SORT is not set
+# CONFIG_TEST_DIV64 is not set
# CONFIG_BACKTRACE_SELF_TEST is not set
# CONFIG_RBTREE_TEST is not set
# CONFIG_REED_SOLOMON_TEST is not set
# CONFIG_INTERVAL_TREE_TEST is not set
# CONFIG_ATOMIC64_SELFTEST is not set
# CONFIG_TEST_HEXDUMP is not set
+# CONFIG_STRING_SELFTEST is not set
# CONFIG_TEST_STRING_HELPERS is not set
# CONFIG_TEST_STRSCPY is not set
# CONFIG_TEST_KSTRTOX is not set
# CONFIG_TEST_PRINTF is not set
+# CONFIG_TEST_SCANF is not set
# CONFIG_TEST_BITMAP is not set
# CONFIG_TEST_UUID is not set
# CONFIG_TEST_XARRAY is not set
@@ -3870,6 +3975,8 @@
# CONFIG_TEST_MEMINIT is not set
# CONFIG_TEST_FREE_PAGES is not set
# CONFIG_TEST_FPU is not set
+# CONFIG_TEST_CLOCKSOURCE_WATCHDOG is not set
+CONFIG_ARCH_USE_MEMTEST=y
# CONFIG_MEMTEST is not set
# CONFIG_HYPERV_TESTING is not set
# end of Kernel Testing and Coverage