Bug 291981
Summary: | chattr / lsattr broken on 32bit userspace and 64bit kernel x86_64 w/ xfs | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Sami Farin <hvtaifwkbgefbaei> | ||||
Component: | kernel | Assignee: | Eric Sandeen <esandeen> | ||||
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | rawhide | Keywords: | Reopened | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | kernel-2_6_23-0_187_rc6_git7_fc8 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2007-09-18 21:10:06 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Sami Farin
2007-09-15 10:34:57 UTC
This works for me: [root@inode tmp]# ./chattr32 +i file [root@inode tmp]# file chattr32 chattr32: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped [root@inode tmp]# ./lsattr32 file ----i--------- file [root@inode tmp]# file lsattr32 lsattr32: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped [root@inode tmp]# uname -a Linux inode.lab.msp.redhat.com 2.6.23-0.184.rc6.git4.fc8 #1 SMP Fri Sep 14 17:11:26 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux those two binaries were built from e2fsprogs-1.40.2-5 on a 32-bit box, and rsynced to the x86_64 box. What kernel version are you using? /usr/bin/lsattr: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped Linux safari.finland.fbi 2.6.22.6-cfs-v20.5-64 #2 SMP Wed Sep 12 19:00:17 EEST 2007 x86_64 x86_64 x86_64 GNU/Linux > Linux safari.finland.fbi 2.6.22.6-cfs-v20.5-64 #2 SMP Wed Sep 12 19:00:17 EEST
2007 x86_64 x86_64 x86_64 GNU/Linux
That's not a fedora kernel.
If you can reproduce this on a fedora kernel, please re-open. This is most
likely a kernel problem, and you're not running a fedora kernel.
Thanks,
-Eric
Whoops, just realized you were trying this on xfs. Sorry. It is broken there. This should be working... I'll look into it. -Eric Created attachment 196721 [details]
patch to test
This should fix it. Care to test it, if you can rebuild xfs?
I'll send this to sgi.
-Eric
Thanks. Fix looks straightforward, other fs'es are also using FS_IOC32_GETFLAGS... I can rebuild+reboot inside a couple of days. This is not the only thing broken on XFS with 32bit compat. For example: # xfs_io -r -p xfs_bmap -c "bmap -v" /tmp/jee.txt xfs_bmap: can't get geometry ["/tmp/jee.txt"]: Invalid argument # /rh/BUILD/xfsprogs-2.9.4/io/xfs_io -r -p xfs_bmap -c "bmap -v" /tmp/jee.txt /tmp/jee.txt: EXT: FILE-OFFSET BLOCK-RANGE AG AG-OFFSET TOTAL 0: [0..719]: 24530448..24531167 10 (101648..102367) 720 Yep... we've never had all of the xfs ioctls working, though at least some were... and I thought lsattr was too. I'm not sure if something broke... I'll take a look when I get a chance. Don't sweat the test if you don't want to or can't, but the patch is there if you want it. I'll take a look at the rest of this and send a patch upstream. Thanks, -Eric Actually, what kernel message did you get out of the bmap command? this one actually does seem to be working for me :) and I don't see any obvious size or alignment problems in struct getbmap... -Eric bmap did not produce any kernel messages. very strange that bmap gives no messages. Maybe strace? Honestly, it does work for me here. :) Patch for GETXFLAGS, SETXFLAGS, and GETVERSION sent upstream: http://oss.sgi.com/archives/xfs/2007-09/msg00174.html When they ack and/or commit it, I can put it into the fedora kernel until it comes back via kernel.org. Thanks, -Eric strace is useless 20:03:14.953872 ioctl(3, 0x806c5864, 0xffcfbf88) = -1 EINVAL (Invalid argument) <0.000014> 32bit version works with xfs_io -r -p xfs_bmap -c "bmap" /tmp/jee.txt but not with xfs_io -r -p xfs_bmap -c "bmap -v" /tmp/jee.txt Nice that you sent the patch, but you forgot to tell who found the bug. Sorry 'bout that. Will follow up. Dunno... [root@inode sbin]# ./xfs_io -r -p xfs_bmap -c "bmap -v" /obj/e2fsprogs-1.35.tar.gz /obj/e2fsprogs-1.35.tar.gz: EXT: FILE-OFFSET BLOCK-RANGE AG AG-OFFSET TOTAL FLAGS 0: [0..6159]: 18461096..18467255 0 (18461096..18467255) 6160 01111 [root@inode sbin]# file xfs_io xfs_io: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped [root@inode sbin]# uname -a Linux inode.lab.msp.redhat.com 2.6.23-rc1-git3 #7 SMP Fri Sep 7 16:51:19 CDT 2007 x86_64 x86_64 x86_64 GNU/Linux modified rawhide kernel, building now. |