Date: Tue, 17 Aug 2021 00:55:39 +0000 From: bugzilla-noreply@freebsd.org To: fs@FreeBSD.org Subject: [Bug 251035] ZFS: Allow 64 bit ZFS to support 32 bit ioctls (Wine) Message-ID: <bug-251035-3630-2IeFgxOWQP@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-251035-3630@https.bugs.freebsd.org/bugzilla/> References: <bug-251035-3630@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D251035 --- Comment #4 from Damjan Jovanovic <damjan.jov@gmail.com> --- (In reply to Kubilay Kocak from comment #3) That code has changed a lot in FreeBSD 13 and upstream. 32 bit "zpool list" still crashes, as per truss: 21250: openat(AT_FDCWD,"/dev/zfs",O_RDWR,00) =3D 5 (0x5) 21250: ioctl(3,0xc0145a04 { IORW 0x5a('Z'), 4, 20 },0xffffb338) ERR#22 'Inv= alid argument' where /var/log/messages has: Aug 17 02:37:31 pc kernel: len 20 vecnum: 4 sizeof (zfs_cmd_t) 4528 probably from: if (len !=3D sizeof (zfs_iocparm_t)) { printf("len %d vecnum: %d sizeof (zfs_cmd_t) %ju\n", len, vecnum, (uintmax_t)sizeof (zfs_cmd_t)); return (EINVAL); } in sys/contrib/openzfs/module/os/freebsd/zfs/kmod_core.c That has another bug in logging, as zfs_iocparm_t and zfs_cmd_t are differe= nt structs. We should be printing sizeof(zfs_iocparm_t), not sizeof(zfs_cmd_t). This bug probably doesn't affect Linux, as it uses zfs_cmd_t directly, which has the same field sizes/alignments on 32 and 64 bit already. We wrap zfs_c= md_t in our zfs_iocparm_t, and add this bug in the process. It will take me a while to test a new patch. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-251035-3630-2IeFgxOWQP>