Hello, I fiddled around with btrfs this evening and need some further insight into this error. During compilation this error occurs: /home/runtema/btrfs_build/kernel-9da425337329/file.c: In Funktion »btrfs_file_write«: /home/runtema/btrfs_build/kernel-9da425337329/file.c:851: Warnung: Übergabe des Arguments 1 von »remove_suid« von inkompatiblem Zeigertyp As you see, I used a newer release from kernel.org to build btrfs. The german error message nearly translates into: "Warning: Handover of argument 1 of »remove_suid« is of incompatible pointertype." Rest of compilation is OK. Compilation of brtfs-progs is OK. After that, a write try on an loop mounted btrfs file(-system) leads to a kernel oops: #modprobe libcrc32c -> OK #insmod /lib/modules/2.6.22-15-generic/extra/btrfs.ko -> OK #diff /home/runtema/btrfs_build/kernel-9da425337329/btrfs.ko /lib/modules/2.6.22-15-generic/extra/btrfs.ko -> $ret = 0 $dd if=/dev/urandom of=/home/runtema/test bs=1024 count=1000000 $/home/runtema/btrfs_build/kernel-9da425337329/mkfs.btrfs /home/runtema/test ->OK $sudo mkdir /mnt/btrfs-test $sudo mount -t btrfs -o loop /home/runtema/test /mnt/btrfs-test ->OK! $sudo touch /mnt/btrfs-test -> still OK! #date >> /mnt/btrfs-test/otto -> leads to oops: [ 3977.384000] device fsid da43617984b1c492-9501950cbfd6d589 devid 1 transid 22 /dev/loop0 [ 4001.664000] BUG: unable to handle kernel NULL pointer dereference at virtual address 00000014 [ 4001.664000] printing eip: [ 4001.664000] c015e4d1 [ 4001.664000] *pde = 00000000 [ 4001.664000] Oops: 0000 [#2] [ 4001.664000] SMP [ 4001.664000] Modules linked in: btrfs libcrc32c loop xt_TCPMSS xt_tcpmss xt_tcpudp iptable_filter ip_tables x_tables pppoe pppox af_packet ppp_generic slhc rfcomm l2cap bluetooth vboxdrv ppdev powernow_k8 cpufreq_userspace cpufreq_stats cpufreq_powersave cpufreq_ondemand freq_table cpufreq_conservative video sbs button dock container ac battery ext2 parport_pc lp parport snd_hda_intel snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_dummy snd_seq_oss snd_seq_midi snd_rawmidi fglrx(P) psmouse snd_seq_midi_event agpgart serio_raw k8temp snd_seq snd_timer snd_seq_device snd soundcore i2c_nforce2 pcspkr snd_page_alloc shpchp i2c_core pci_hotplug ipv6 evdev ext3 jbd mbcache sg sr_mod sd_mod cdrom usbhid hid sata_nv floppy ehci_hcd r8169 b44 mii ata_generic libata scsi_mod ohci_hcd usbcore raid10 raid456 xor raid1 raid0 multipath linear md_mod dm_mirror dm_snapshot dm_mod thermal processor fan capability commoncap fuse [ 4001.664000] CPU: 1 [ 4001.664000] EIP: 0060:[<c015e4d1>] Tainted: P VLI [ 4001.664000] EFLAGS: 00010206 (2.6.22-15-generic #1) [ 4001.664000] EIP is at should_remove_suid+0x1/0x50 [ 4001.664000] eax: 00000008 ebx: f4d22bb0 ecx: ffffffff edx: e0aae480 [ 4001.664000] esi: db41e5d0 edi: 0000001e ebp: 0000001e esp: dceb9eac [ 4001.664000] ds: 007b es: 007b fs: 00d8 gs: 0033 ss: 0068 [ 4001.664000] Process date (pid: 13142, ti=dceb8000 task=f78d4f90 task.ti=dceb8000) [ 4001.664000] Stack: f4d22bb0 c015e52b db41e650 f9e5f55f 00000000 000000b6 f4cb8000 c018a9c7 [ 4001.664000] dcf6f244 00000287 dceb9ef0 c01ff210 b7c7c000 e0aae480 dceb9f50 00000000 [ 4001.664000] 00000000 00000812 db41e650 f4228200 0098c01a 000081a4 00000001 00000000 [ 4001.664000] Call Trace: [ 4001.664000] [<c015e52b>] remove_suid+0xb/0x20 [ 4001.664000] [<f9e5f55f>] btrfs_file_write+0x1ef/0x9b0 [btrfs] [ 4001.664000] [<c018a9c7>] do_path_lookup+0x97/0x1d0 [ 4001.664000] [<c01ff210>] copy_to_user+0x30/0x60 [ 4001.664000] [<c0180d0e>] vfs_write+0xbe/0x170 [ 4001.664000] [<f9e5f370>] btrfs_file_write+0x0/0x9b0 [btrfs] [ 4001.664000] [<c0181421>] sys_write+0x41/0x70 [ 4001.664000] [<c01041d2>] sysenter_past_esp+0x6b/0xa9 [ 4001.664000] ======================[ 4001.664000] Code: 8d 76 00 8d bc 27 00 00 00 00 53 80 ce 02 83 ec 34 89 c3 89 14 24 8b 13 89 e1 8b 40 04 e8 d8 71 03 00 83 c4 34 5b c3 8d 76 00 53 <8b> 40 0c 0f b7 50 6a 89 d0 25 00 08 00 00 83 f8 01 19 db 81 e2 [ 4001.664000] EIP: [<c015e4d1>] should_remove_suid+0x1/0x50 SS:ESP 0068:dceb9eac My System: cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=7.10 DISTRIB_CODENAME=gutsy DISTRIB_DESCRIPTION="Ubuntu 7.10" My Kernel: 2.6.22-15-generic #1 SMP Fri Jul 11 19:25:33 UTC 2008 i686, dpgk-list says this is 2.6.22-15.56 make and ggc version used during build process: GNU Make 3.81, gcc (GCC) 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2) Am I overlooking something? Any help appreciated. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
2008/7/31 Marcel Runte <marcel.runte@web.de>:> Hello, > > I fiddled around with btrfs this evening and need some further insight into this error. > > During compilation this error occurs: > > /home/runtema/btrfs_build/kernel-9da425337329/file.c: In Funktion »btrfs_file_write«: > /home/runtema/btrfs_build/kernel-9da425337329/file.c:851: Warnung: Übergabe des Arguments 1 von »remove_suid« von inkompatiblem Zeigertyp > > As you see, I used a newer release from kernel.org to build btrfs. The german error message nearly translates into: "Warning: Handover of argument 1 of »remove_suid« is of incompatible pointertype." > > Rest of compilation is OK. Compilation of brtfs-progs is OK. >This is a known issue caused by AppArmor. See following URL. http://oss.oracle.com/pipermail/btrfs-devel/2008-February/000491.html Regards YZ -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, 2008-07-31 at 00:44 +0200, Marcel Runte wrote:> Hello, > > I fiddled around with btrfs this evening and need some further insight into this error. > > During compilation this error occurs: > > /home/runtema/btrfs_build/kernel-9da425337329/file.c: In Funktion »btrfs_file_write«: > /home/runtema/btrfs_build/kernel-9da425337329/file.c:851: Warnung: Übergabe des Arguments 1 von »remove_suid« von inkompatiblem Zeigertyp >Btrfs should compile without warnings, in general any warning is a bug. The incompatible pointer argument warnings are almost always bugs. In this case, the ubuntu kernel has a patch that changes the arguments of the remove_suid call, and btrfs needs to call it differently. But, recent versions of Btrfs should be doing the right thing. Which version are you running? -chris -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Chris Mason asked Marcel Runte:> > But, recent versions of Btrfs should be doing the right thing. Which > version are you running? >Hi Chris, I pulled it from here: http://www.kernel.org/hg/index.cgi/btrfs/kernel/ with latest changeset: http://www.kernel.org/hg/index.cgi/btrfs/kernel/archive/9da425337329.tar.bz2 So it must be v0.15 with your last patches included... - Marcel -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Yan Zheng wrote Marcel:> > This is a known issue caused by AppArmor. See following URL. > > http://oss.oracle.com/pipermail/btrfs-devel/2008-February/000491.html > > Regards > YZYZ, patch described in your link is included in http://www.kernel.org/hg/index.cgi/btrfs/kernel/rev/9da425337329, which I used for compilation. Even putting an alias like "alias gcc = ''gcc -DREMOVE_SUID_PATH''" or doing a "CC=''gcc -DREMOVE_SUID_PATH''; make"leads to same error message when compiling file.c -Marcel -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
2008/8/1 Marcel Runte <marcel.runte@web.de>:> patch described in your link is included in http://www.kernel.org/hg/index.cgi/btrfs/kernel/rev/9da425337329, which I used for compilation. Even putting an alias like "alias gcc = ''gcc -DREMOVE_SUID_PATH''" or doing a "CC=''gcc -DREMOVE_SUID_PATH''; make"leads to same error message when compiling file.c >Linux kernel uses its own building system, putting alias has no effect. Please try modify the code directly. YZ -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi YZ, hi Chris, I tried the whole build process on Kubuntu Hardy Heron (kernel 2.6.24-19-generic) and there ist was OK, so I think it has something to do with the difference in include of kernel-headers-2.6.22-15 on Gutsy... Unfortunately new release leads to same error... But for testing purpose for me its enough that this working on a higher kernel version... Best regards, Marcel> -----Ursprüngliche Nachricht----- > Von: "Yan Zheng" <zheng.yan@oracle.com> > Gesendet: 01.08.08 05:01:13 > An: "Marcel Runte" <marcel.runte@web.de> > CC: linux-btrfs@vger.kernel.org > Betreff: Re: Kernel oops after compile error> 2008/8/1 Marcel Runte <marcel.runte@web.de>: > > patch described in your link is included in http://www.kernel.org/hg/index.cgi/btrfs/kernel/rev/9da425337329, which I used for compilation. Even putting an alias like "alias gcc = ''gcc -DREMOVE_SUID_PATH''" or doing a "CC=''gcc -DREMOVE_SUID_PATH''; make"leads to same error message when compiling file.c > > > > Linux kernel uses its own building system, putting alias has no > effect. Please try modify the code directly. > > YZ >-- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html