[GIT PULL] fs updates for v6.3

From: Christian Brauner
Date: Fri Feb 17 2023 - 03:08:25 EST


Hey Linus,

/* Summary */
Jan pointed out that during shutdown both filp_close() and super block
destruction will use basic printk logging when bugs are detected. This
causes issues in a few scenarios:

* Tools like syzkaller cannot figure out that the logged message
indicates a bug.
* Users that explicitly opt in to have the kernel bug on data corruption
by selecting CONFIG_BUG_ON_DATA_CORRUPTION should see the kernel crash
when they did actually select that option.
* When there are busy inodes after the superblock is shut down later
access to such a busy inodes walks through freed memory. It would be
better to cleanly crash instead.

All of this can be addressed by using the already existing
CHECK_DATA_CORRUPTION() macro in these places when kernel bugs are
detected. Its logging improvement is useful for all users.

Otherwise this only has a meaningful behavioral effect when users do
select CONFIG_BUG_ON_DATA_CORRUPTION which means this is backward
compatible for regular users.

/* Testing */
clang: Ubuntu clang version 15.0.2-1
gcc: gcc (Ubuntu 12.2.0-3ubuntu1) 12.2.0

All patches are based on v6.2-rc1 and have been sitting in linux-next.
No build failures or warnings were observed. All old and new tests in
fstests, selftests, and LTP pass without regressions.

/* Conflicts */
At the time of creating this PR no merge conflicts were reported from
linux-next and no merge conflicts showed up doing a test-merge with
current mainline.

The following changes since commit 1b929c02afd37871d5afb9d498426f83432e71c2:

Linux 6.2-rc1 (2022-12-25 13:41:39 -0800)

are available in the Git repository at:

ssh://git@xxxxxxxxxxxxxxxxxxx/pub/scm/linux/kernel/git/vfs/idmapping.git tags/fs.v6.3

for you to fetch changes up to 47d586913f2abec4d240bae33417f537fda987ec:

fs: Use CHECK_DATA_CORRUPTION() when kernel bugs are detected (2023-01-27 14:17:22 +0100)

Please consider pulling these changes from the signed fs.v6.3 tag.

I'm on vacation until v6.2 is released this Sunday but Amir or Seth know
how to reach me quite easily before that in case anything goes wrong.

Thanks!
Christian

----------------------------------------------------------------
fs.v6.3

----------------------------------------------------------------
Jann Horn (1):
fs: Use CHECK_DATA_CORRUPTION() when kernel bugs are detected

fs/open.c | 5 +++--
fs/super.c | 21 +++++++++++++++++----
include/linux/poison.h | 3 +++
3 files changed, 23 insertions(+), 6 deletions(-)