kernel-5.16.15-1

* Thu Mar 17 2022 Justin M. Forbes <jforbes@fedoraproject.org> [5.16.15-1]
- Back out the nfs workaround and just revert the query for fs_location (Justin M. Forbes)
Resolves: rhbz#

Signed-off-by: Justin M. Forbes <jforbes@fedoraproject.org>
This commit is contained in:
Justin M. Forbes 2022-03-17 00:20:07 -05:00
parent 37ca87224b
commit 84896a7c5f
No known key found for this signature in database
GPG Key ID: B8FA7924A4B1C140
5 changed files with 230 additions and 30 deletions

View File

@ -12,7 +12,7 @@ RHEL_MINOR = 99
#
# Use this spot to avoid future merge conflicts.
# Do not trim this comment.
RHEL_RELEASE = 0
RHEL_RELEASE = 1
#
# Early y+1 numbering

View File

@ -1,3 +1,6 @@
https://gitlab.com/cki-project/kernel-ark/-/commit/dd24222299c0cc5a6a118f2265fcf3f769a7cfb4
dd24222299c0cc5a6a118f2265fcf3f769a7cfb4 Back out the nfs workaround and just revert the query for fs_location
https://gitlab.com/cki-project/kernel-ark/-/commit/c6295fc9bb25d3684c10aaa89e00f5e12ccd4dd2
c6295fc9bb25d3684c10aaa89e00f5e12ccd4dd2 nfc: st21nfca: Fix potential buffer overflows in EVT_TRANSACTION

View File

@ -87,7 +87,7 @@ Summary: The Linux kernel
# the --with-release option overrides this setting.)
%define debugbuildsenabled 1
%global distro_build 200
%global distro_build 201
%if 0%{?fedora}
%define secure_boot_arch x86_64
@ -132,13 +132,13 @@ Summary: The Linux kernel
%define rpmversion 5.16.15
%define patchversion 5.16
%define pkgrelease 200
%define pkgrelease 201
# This is needed to do merge window version magic
%define patchlevel 16
# allow pkg_release to have configurable %%{?dist} tag
%define specrelease 200%{?buildid}%{?dist}
%define specrelease 201%{?buildid}%{?dist}
%define pkg_release %{specrelease}
@ -2985,6 +2985,9 @@ fi
#
#
%changelog
* Thu Mar 17 2022 Justin M. Forbes <jforbes@fedoraproject.org> [5.16.15-1]
- Back out the nfs workaround and just revert the query for fs_location (Justin M. Forbes)
* Wed Mar 16 2022 Justin M. Forbes <jforbes@fedoraproject.org> [5.16.15-0]
- nfc: st21nfca: Fix potential buffer overflows in EVT_TRANSACTION (Jordy Zomer)
- Restrict FS_LOCATIONS to NFS v4.2+ to work around Qnap knfsd-3.4.6 bug (Justin M. Forbes)

View File

@ -32,10 +32,14 @@
drivers/pci/msi.c | 13 +--
drivers/pci/quirks.c | 24 ++++
drivers/usb/core/hub.c | 7 ++
fs/nfs/nfs4proc.c | 7 +-
fs/nfs/client.c | 7 --
fs/nfs/nfs4_fs.h | 9 +-
fs/nfs/nfs4proc.c | 76 ++-----------
fs/nfs/nfs4state.c | 3 +-
include/linux/efi.h | 22 ++--
include/linux/lsm_hook_defs.h | 2 +
include/linux/lsm_hooks.h | 6 +
include/linux/nfs_xdr.h | 1 -
include/linux/random.h | 7 ++
include/linux/rmi.h | 1 +
include/linux/security.h | 5 +
@ -49,7 +53,7 @@
security/lockdown/lockdown.c | 1 +
security/security.c | 6 +
tools/testing/selftests/netfilter/nft_nat.sh | 5 +-
51 files changed, 810 insertions(+), 206 deletions(-)
55 files changed, 821 insertions(+), 284 deletions(-)
diff --git a/Makefile b/Makefile
index 8675dd2a9cc8..fae0fa3f7ed5 100644
@ -1617,31 +1621,209 @@ index ac6c5ccfe1cb..ec784479eece 100644
/* Lock the device, then check to see if we were
* disconnected while waiting for the lock to succeed. */
usb_lock_device(hdev);
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index a1e87419f3a4..2d2f2c091c65 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -860,13 +860,6 @@ static int nfs_probe_fsinfo(struct nfs_server *server, struct nfs_fh *mntfh, str
server->namelen = pathinfo.max_namelen;
}
- if (clp->rpc_ops->discover_trunking != NULL &&
- (server->caps & NFS_CAP_FS_LOCATIONS)) {
- error = clp->rpc_ops->discover_trunking(server, mntfh);
- if (error < 0)
- return error;
- }
-
return 0;
}
diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h
index 85c5d08dfa9c..2364661a6a08 100644
--- a/fs/nfs/nfs4_fs.h
+++ b/fs/nfs/nfs4_fs.h
@@ -260,8 +260,8 @@ struct nfs4_state_maintenance_ops {
};
struct nfs4_mig_recovery_ops {
- int (*get_locations)(struct nfs_server *, struct nfs_fh *,
- struct nfs4_fs_locations *, struct page *, const struct cred *);
+ int (*get_locations)(struct inode *, struct nfs4_fs_locations *,
+ struct page *, const struct cred *);
int (*fsid_present)(struct inode *, const struct cred *);
};
@@ -303,9 +303,8 @@ extern int nfs4_do_close(struct nfs4_state *state, gfp_t gfp_mask, int wait);
extern int nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *fhandle);
extern int nfs4_proc_fs_locations(struct rpc_clnt *, struct inode *, const struct qstr *,
struct nfs4_fs_locations *, struct page *);
-extern int nfs4_proc_get_locations(struct nfs_server *, struct nfs_fh *,
- struct nfs4_fs_locations *,
- struct page *page, const struct cred *);
+extern int nfs4_proc_get_locations(struct inode *, struct nfs4_fs_locations *,
+ struct page *page, const struct cred *);
extern int nfs4_proc_fsid_present(struct inode *, const struct cred *);
extern struct rpc_clnt *nfs4_proc_lookup_mountpoint(struct inode *,
struct dentry *,
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 0abbbf5d2bdf..c216bbf7ee75 100644
index 0abbbf5d2bdf..ba3aa4575d25 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -3859,8 +3859,8 @@ static int _nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *f
res.attr_bitmask[2] &= FATTR4_WORD2_NFS42_MASK;
}
memcpy(server->attr_bitmask, res.attr_bitmask, sizeof(server->attr_bitmask));
- server->caps &= ~(NFS_CAP_ACLS | NFS_CAP_HARDLINKS |
- NFS_CAP_SYMLINKS| NFS_CAP_SECURITY_LABEL);
+ server->caps &= ~(NFS_CAP_ACLS | NFS_CAP_HARDLINKS | NFS_CAP_SYMLINKS
+ | NFS_CAP_SECURITY_LABEL | NFS_CAP_FS_LOCATIONS);
server->fattr_valid = NFS_ATTR_FATTR_V4;
if (res.attr_bitmask[0] & FATTR4_WORD0_ACL &&
res.acl_bitmask & ACL4_SUPPORT_ALLOW_ACL)
@@ -3873,7 +3873,8 @@ static int _nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *f
if (res.attr_bitmask[2] & FATTR4_WORD2_SECURITY_LABEL)
server->caps |= NFS_CAP_SECURITY_LABEL;
#endif
- if (res.attr_bitmask[0] & FATTR4_WORD0_FS_LOCATIONS)
+ /* Restrict FS_LOCATIONS to NFS v4.2+ to work around Qnap knfsd-3.4.6 bug */
+ if (res.attr_bitmask[0] & FATTR4_WORD0_FS_LOCATIONS && minorversion >= 2)
server->caps |= NFS_CAP_FS_LOCATIONS;
if (!(res.attr_bitmask[0] & FATTR4_WORD0_FILEID))
server->fattr_valid &= ~NFS_ATTR_FATTR_FILEID;
@@ -3933,60 +3933,6 @@ int nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *fhandle)
return err;
}
-static int _nfs4_discover_trunking(struct nfs_server *server,
- struct nfs_fh *fhandle)
-{
- struct nfs4_fs_locations *locations = NULL;
- struct page *page;
- const struct cred *cred;
- struct nfs_client *clp = server->nfs_client;
- const struct nfs4_state_maintenance_ops *ops =
- clp->cl_mvops->state_renewal_ops;
- int status = -ENOMEM;
-
- cred = ops->get_state_renewal_cred(clp);
- if (cred == NULL) {
- cred = nfs4_get_clid_cred(clp);
- if (cred == NULL)
- return -ENOKEY;
- }
-
- page = alloc_page(GFP_KERNEL);
- locations = kmalloc(sizeof(struct nfs4_fs_locations), GFP_KERNEL);
- if (page == NULL || locations == NULL)
- goto out;
-
- status = nfs4_proc_get_locations(server, fhandle, locations, page,
- cred);
- if (status)
- goto out;
-out:
- if (page)
- __free_page(page);
- kfree(locations);
- return status;
-}
-
-static int nfs4_discover_trunking(struct nfs_server *server,
- struct nfs_fh *fhandle)
-{
- struct nfs4_exception exception = {
- .interruptible = true,
- };
- struct nfs_client *clp = server->nfs_client;
- int err = 0;
-
- if (!nfs4_has_session(clp))
- goto out;
- do {
- err = nfs4_handle_exception(server,
- _nfs4_discover_trunking(server, fhandle),
- &exception);
- } while (exception.retry);
-out:
- return err;
-}
-
static int _nfs4_lookup_root(struct nfs_server *server, struct nfs_fh *fhandle,
struct nfs_fsinfo *info)
{
@@ -7873,18 +7819,18 @@ int nfs4_proc_fs_locations(struct rpc_clnt *client, struct inode *dir,
* appended to this compound to identify the client ID which is
* performing recovery.
*/
-static int _nfs40_proc_get_locations(struct nfs_server *server,
- struct nfs_fh *fhandle,
+static int _nfs40_proc_get_locations(struct inode *inode,
struct nfs4_fs_locations *locations,
struct page *page, const struct cred *cred)
{
+ struct nfs_server *server = NFS_SERVER(inode);
struct rpc_clnt *clnt = server->client;
u32 bitmask[2] = {
[0] = FATTR4_WORD0_FSID | FATTR4_WORD0_FS_LOCATIONS,
};
struct nfs4_fs_locations_arg args = {
.clientid = server->nfs_client->cl_clientid,
- .fh = fhandle,
+ .fh = NFS_FH(inode),
.page = page,
.bitmask = bitmask,
.migration = 1, /* skip LOOKUP */
@@ -7930,17 +7876,17 @@ static int _nfs40_proc_get_locations(struct nfs_server *server,
* When the client supports GETATTR(fs_locations_info), it can
* be plumbed in here.
*/
-static int _nfs41_proc_get_locations(struct nfs_server *server,
- struct nfs_fh *fhandle,
+static int _nfs41_proc_get_locations(struct inode *inode,
struct nfs4_fs_locations *locations,
struct page *page, const struct cred *cred)
{
+ struct nfs_server *server = NFS_SERVER(inode);
struct rpc_clnt *clnt = server->client;
u32 bitmask[2] = {
[0] = FATTR4_WORD0_FSID | FATTR4_WORD0_FS_LOCATIONS,
};
struct nfs4_fs_locations_arg args = {
- .fh = fhandle,
+ .fh = NFS_FH(inode),
.page = page,
.bitmask = bitmask,
.migration = 1, /* skip LOOKUP */
@@ -7989,11 +7935,11 @@ static int _nfs41_proc_get_locations(struct nfs_server *server,
* -NFS4ERR_LEASE_MOVED is returned if the server still has leases
* from this client that require migration recovery.
*/
-int nfs4_proc_get_locations(struct nfs_server *server,
- struct nfs_fh *fhandle,
+int nfs4_proc_get_locations(struct inode *inode,
struct nfs4_fs_locations *locations,
struct page *page, const struct cred *cred)
{
+ struct nfs_server *server = NFS_SERVER(inode);
struct nfs_client *clp = server->nfs_client;
const struct nfs4_mig_recovery_ops *ops =
clp->cl_mvops->mig_recovery_ops;
@@ -8006,11 +7952,10 @@ int nfs4_proc_get_locations(struct nfs_server *server,
(unsigned long long)server->fsid.major,
(unsigned long long)server->fsid.minor,
clp->cl_hostname);
- nfs_display_fhandle(fhandle, __func__);
+ nfs_display_fhandle(NFS_FH(inode), __func__);
do {
- status = ops->get_locations(server, fhandle, locations, page,
- cred);
+ status = ops->get_locations(inode, locations, page, cred);
if (status != -NFS4ERR_DELAY)
break;
nfs4_handle_exception(server, status, &exception);
@@ -10479,7 +10424,6 @@ const struct nfs_rpc_ops nfs_v4_clientops = {
.free_client = nfs4_free_client,
.create_server = nfs4_create_server,
.clone_server = nfs_clone_server,
- .discover_trunking = nfs4_discover_trunking,
};
static const struct xattr_handler nfs4_xattr_nfs4_acl_handler = {
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 499bef9fe118..f3265575c28d 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -2098,8 +2098,7 @@ static int nfs4_try_migration(struct nfs_server *server, const struct cred *cred
}
inode = d_inode(server->super->s_root);
- result = nfs4_proc_get_locations(server, NFS_FH(inode), locations,
- page, cred);
+ result = nfs4_proc_get_locations(inode, locations, page, cred);
if (result) {
dprintk("<-- %s: failed to retrieve fs_locations: %d\n",
__func__, result);
diff --git a/include/linux/efi.h b/include/linux/efi.h
index ef8dbc0a1522..836a5dfc6156 100644
--- a/include/linux/efi.h
@ -1740,6 +1922,18 @@ index d45b6f6e27fd..70622b506461 100644
* Security hooks for perf events
*
* @perf_event_open:
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index 695fa84611b6..967a0098f0a9 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -1795,7 +1795,6 @@ struct nfs_rpc_ops {
struct nfs_server *(*create_server)(struct fs_context *);
struct nfs_server *(*clone_server)(struct nfs_server *, struct nfs_fh *,
struct nfs_fattr *, rpc_authflavor_t);
- int (*discover_trunking)(struct nfs_server *, struct nfs_fh *);
};
/*
diff --git a/include/linux/random.h b/include/linux/random.h
index f45b8be3e3c4..7ccdec68b789 100644
--- a/include/linux/random.h

View File

@ -1,3 +1,3 @@
SHA512 (linux-5.16.15.tar.xz) = 2bb60417bfcff772de12419a4279eb21139871cad5cd800e295832b646f75b2e751115dda1ceb8344465a1f263a782f7e6dc45362433caf7bab3c164b7f78d7f
SHA512 (kernel-abi-stablelists-5.16.15-200.tar.bz2) = 7ae55b8772bbae9970bc2c7b740f6cb84d9e6eda9e0041f1dee3d5107ecb2586f7080d714b15383c07f44290192e96d9d640825cf652afa8aee6692e77855040
SHA512 (kernel-kabi-dw-5.16.15-200.tar.bz2) = 7a07aa18af068537bd31ed63bdd796d3bc7510ad29bb5428546bbaa93a866aea193ba127058904f9fc257c01b2fb072b8d27f2ac8b845e483d7e92b0e4f4deca
SHA512 (kernel-abi-stablelists-5.16.15-201.tar.bz2) = be6d7dbcbbcca55fb70375fe9838e1504fee9d79dfc21dceeb0c5a5bf81573d9058e6ef6267c425fa922dfa077710c1388c13c62490552affc31c66f6482e406
SHA512 (kernel-kabi-dw-5.16.15-201.tar.bz2) = 7a07aa18af068537bd31ed63bdd796d3bc7510ad29bb5428546bbaa93a866aea193ba127058904f9fc257c01b2fb072b8d27f2ac8b845e483d7e92b0e4f4deca