diff options
author | Thorsten Leemhuis <fedora@leemhuis.info> | 2021-03-07 13:25:32 +0100 |
---|---|---|
committer | Thorsten Leemhuis <fedora@leemhuis.info> | 2021-03-07 13:32:55 +0100 |
commit | fb72952d5b63e40f63bfa1e3a5bce2262c424197 (patch) | |
tree | d1a9bf30437653b57b398fd3b4f3fb4897ca29cd /tests/filesystem/ext4/freeze-protection-bypass/runtest.sh | |
parent | b9488a288ec844af97a516ac9ffe441221f6e67d (diff) | |
parent | 3422e04a2e31dba3e17af206f160d4fc409f4250 (diff) | |
download | kernel-fb72952d5b63e40f63bfa1e3a5bce2262c424197.tar.gz kernel-fb72952d5b63e40f63bfa1e3a5bce2262c424197.tar.xz kernel-fb72952d5b63e40f63bfa1e3a5bce2262c424197.zip |
:merge origin/stabilization and update to 5.10.4kernel-5.11.4-125.vanilla.1.fc33kernel-5.11.4-125.vanilla.1.fc32
Diffstat (limited to 'tests/filesystem/ext4/freeze-protection-bypass/runtest.sh')
-rwxr-xr-x | tests/filesystem/ext4/freeze-protection-bypass/runtest.sh | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/tests/filesystem/ext4/freeze-protection-bypass/runtest.sh b/tests/filesystem/ext4/freeze-protection-bypass/runtest.sh deleted file mode 100755 index b70c2b130..000000000 --- a/tests/filesystem/ext4/freeze-protection-bypass/runtest.sh +++ /dev/null @@ -1,86 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2018 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Author: Boyang Xue <bxue@redhat.com> - -PACKAGE=kernel - -. /usr/share/beakerlib/beakerlib.sh - -rlJournalStart - -WDIR=/tmp/TC_freeze-protection-bypass.tmp.workdir -ODIR=/tmp/TC_freeze-protection-bypass.tmp.oldmnt -NDIR=/tmp/TC_freeze-protection-bypass.tmp.newmnt -mkdir $ODIR $NDIR $WDIR - -cd $WDIR -fallocate -l 64M 64M.img -mkfs.ext4 -qF 64M.img -TDEV=$(losetup -f --show 64M.img) - -TRID=$RANDOM - -rlPhaseStartSetup - - # The following patch for this bug is integrated in kernel v4.18 - # - # vfs: add the sb_start_intwrite_trylock() helper - # ext4: factor out helper ext4_sample_last_mounted() - # ext4: do not update s_last_mounted of a frozen fs - KNVR=$(uname -r | cut -d '-' -f1) - rlCmpVersion $KNVR 4.18.0 >/dev/null - if [[ $? -eq 2 ]]; then - ISFIXED=0 - rlPass "Kernel version < 4.18, indicating it's vulnerable to this bug. Test skipped as pass." - exit 0 - else - ISFIXED=1 - fi - - rlRun "mount $TDEV $ODIR" - rlRun "echo TC_freeze-protection-bypass > $ODIR/TC_freeze-protection-bypass" - rlRun "umount $ODIR" -rlPhaseEnd - -rlPhaseStartTest - rlRun "echo \"run TC_freeze-protection-bypass#${TRID}\" >/dev/kmsg" - rlRun "mount $TDEV $NDIR" - rlLog "Run 'fsfreeze -f $NDIR &'" - fsfreeze -f $NDIR & - wait $! - rlRun "grep TC_freeze-protection-bypass $NDIR/TC_freeze-protection-bypass" - rlRun "! dmesg | tac | sed -ne \"0,\#run TC_freeze-protection-bypass\#${TRID}#p\" | tac | grep -E \"ext4_journal_check_start|ext4_journal_start_sb\"" - if [[ $? -eq 0 ]]; then - rlPass "The kernel warning isn't triggered. Test passes." - else - rlFail "The kernel warning is triggered. Test fails." - fi -rlPhaseEnd - -rlPhaseStartCleanup - rlRun "fsfreeze -u $NDIR" - rlRun "umount $TDEV" - rlRun "losetup -d $TDEV" - rlRun "rm -f 64M.img" - rlRun "rm -rf $NDIR" - rlRun "rm -rf $ODIR" - rlRun "rm -rf $WDIR" -rlPhaseEnd - -rlJournalPrintText -rlJournalEnd |