lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <977e1b58-b1f3-01bf-2dfd-5b9a7f1e74d4@linux.ibm.com>
Date:   Thu, 28 Jan 2021 23:15:18 +0530
From:   Ritesh Harjani <riteshh@...ux.ibm.com>
To:     bugzilla-daemon@...zilla.kernel.org, linux-ext4@...r.kernel.org
Cc:     "Theodore Ts'o" <tytso@....edu>
Subject: Re: [Bug 211315] New: [aarch64][xfstests/ext3 generic/472] swapon:
 Invalid argument

Hello,

Thanks for reporting this.
Ok, so earlier I thought I tested this on Power (pagesize=64K).
But it seems I had only tested with 1K blocksize but not with 2K.
On retrying it again with ext3 with 2K blocksize, I see it could be 
reproduced on latest kernel on Power as well (where pagesize is 64K).
(gcc version 8.4.0)

I will look more into what is causing this, but it seems it may be
coming from below path :-

static int setup_swap_map_and_extents()
<...>

	if (!nr_good_pages) {
		pr_warn("Empty swap-file\n");
		return -EINVAL;
	}
<...>


BTW, is ext3 with 2K bs some default configuration you use often on 
arch64. Or was it mostly for testing purpose only?

-ritesh


On 1/22/21 4:19 PM, bugzilla-daemon@...zilla.kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=211315
> 
>              Bug ID: 211315
>             Summary: [aarch64][xfstests/ext3 generic/472] swapon: Invalid
>                      argument
>             Product: File System
>             Version: 2.5
>      Kernel Version: 5.11.0-0.rc4.20210120git45dfb8a5659a.131.eln108.aarch6
>                      4
>            Hardware: ARM
>                  OS: Linux
>                Tree: Mainline
>              Status: NEW
>            Severity: normal
>            Priority: P1
>           Component: ext3
>            Assignee: fs_ext3@...nel-bugs.osdl.org
>            Reporter: neolorry+bugzilla.kernel.org@...glemail.com
>          Regression: No
> 
> xfstests generic/472 fails on ext3 on the latest kernel
> (kernel-5.11.0-0.rc4.20210120git45dfb8a5659a.131.eln108.aarch64 from
> https://koji.fedoraproject.org/koji/buildinfo?buildID=1671933). This only
> happens on aarch64 and ext3 with 2048 block size. I can reproduce it on
> kernel-4.18 based RHEL-8 kernel as well.
> 
> log
> ```
> # ./check -d -T generic/472
> FSTYP         -- ext3
> PLATFORM      -- Linux/aarch64 15-vm-16
> 5.11.0-0.rc4.20210120git45dfb8a5659a.131.eln108.aarch64 #1 SMP Wed Jan 20
> 23:39:54 UTC 2021
> MKFS_OPTIONS  -- -b 2048 /dev/vda3
> MOUNT_OPTIONS -- -o rw,relatime,seclabel -o context=system_u:object_r:root_t:s0
> /dev/vda3 /scratch
> 
> generic/472 103s ...    [05:31:22]QA output created by 472
> regular swap
> too long swap
> tiny swap
> swapon: Invalid argument
>   [05:32:15]- output mismatch (see
> /tmp/tmp.6xoJizCZKc/repo_xfstests/results//generic/472.out.bad)
>      --- tests/generic/472.out   2021-01-22 01:31:23.045484313 -0500
>      +++ /tmp/tmp.6xoJizCZKc/repo_xfstests/results//generic/472.out.bad
> 2021-01-22 05:32:15.217684365 -0500
>      @@ -2,3 +2,4 @@
>       regular swap
>       too long swap
>       tiny swap
>      +swapon: Invalid argument
>      ...
>      (Run 'diff -u /tmp/tmp.6xoJizCZKc/repo_xfstests/tests/generic/472.out
> /tmp/tmp.6xoJizCZKc/repo_xfstests/results//generic/472.out.bad'  to see the
> entire diff)
> Ran: generic/472
> Failures: generic/472
> Failed 1 of 1 tests
> ```
> 
> 472.full
> ```
> # cat /tmp/tmp.6xoJizCZKc/repo_xfstests/results//generic/472.full
> Creating filesystem with 5767168 2k blocks and 720896 inodes
> Filesystem UUID: 97619060-f6ec-4ed0-8984-01b4aefe86f8
> Superblock backups stored on blocks:
>          16384, 49152, 81920, 114688, 147456, 409600, 442368, 802816, 1327104,
>          2048000, 3981312, 5619712
> 
> Allocating group tables: done
> Writing inode tables: done
> Creating journal (32768 blocks): done
> Writing superblocks and filesystem accounting information: done
> 
> regular swap
> /usr/bin/chattr: Operation not supported while setting flags on /scratch/swap
> wrote 2097152/2097152 bytes at offset 0
> 2 MiB, 512 ops; 0.1898 sec (10.534 MiB/sec and 2696.7097 ops/sec)
> too long swap
> /usr/bin/chattr: Operation not supported while setting flags on /scratch/swap
> wrote 2097155/2097155 bytes at offset 0
> 2 MiB, 513 ops; 0.1231 sec (16.241 MiB/sec and 4165.7531 ops/sec)
> tiny swap
> /usr/bin/chattr: Operation not supported while setting flags on /scratch/swap
> wrote 196608/196608 bytes at offset 0
> 192 KiB, 48 ops; 0.0130 sec (14.338 MiB/sec and 3670.5666 ops/sec)
> swapoff: /scratch/swap: swapoff failed: Invalid argument
> ```
> 
> xfstests local.config
> ```
> FSTYP="ext3"
> TEST_DIR="/test"
> TEST_DEV="/dev/vda4"
> SCRATCH_MNT="/scratch"
> SCRATCH_DEV="/dev/vda3"
> LOGWRITES_MNT="/logwrites"
> LOGWRITES_DEV="/dev/vda6"
> MKFS_OPTIONS="-b 2048"
> MOUNT_OPTIONS="-o rw,relatime,seclabel"
> TEST_FS_MOUNT_OPTS="-o rw,relatime,seclabel"
> ```
> 
> 64k page size
> ```
> # getconf PAGESIZE
> 65536
> ```
> 
> fdisk -l
> ```
> # fdisk -l /dev/vda
> Disk /dev/vda: 100 GiB, 107374182400 bytes, 209715200 sectors
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> Disklabel type: gpt
> ```
> 
> xfstests version
> ```
> # git rev-parse HEAD
> 4767884aff19e042ee3be51c88cf2c27a111707e
> # cat .git/config
> [core]
>          repositoryformatversion = 0
>          filemode = true
>          bare = false
>          logallrefupdates = true
> [remote "origin"]
>          url = git://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git
>          fetch = +refs/heads/*:refs/remotes/origin/*
> [branch "master"]
>          remote = origin
>          merge = refs/heads/master
> ```
> 
> e2fsprogs version
> ```
> # rpm -q e2fsprogs
> e2fsprogs-1.45.6-1.el8.aarch64
> ```
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ