[Bug 281489] linux: unsupported ioctl TIOCGPTPERR / linux_ioctl_fallback cmd=0x5441 ('T',65) and cmd=0x541c ('T',28) is not implemented..
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281489 Mark Linimon changed: What|Removed |Added Assignee|b...@freebsd.org|emulat...@freebsd.org -- You are receiving this mail because: You are the assignee for the bug.
[Bug 126232] [linux] Linux ioctl TCGETS (0x5401) always fails
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=126232 Dmitry Chagin changed: What|Removed |Added Resolution|--- |Not A Bug CC||dcha...@freebsd.org Status|In Progress |Closed -- You are receiving this mail because: You are the assignee for the bug. ___ freebsd-emulation@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-emulation To unsubscribe, send any mail to "freebsd-emulation-unsubscr...@freebsd.org"
[Bug 218627] [PATCH] add Evdev ioctl handler to the Linux compat layer
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218627 Dmitry Chagin changed: What|Removed |Added CC||dcha...@freebsd.org Status|New |In Progress Assignee|emulat...@freebsd.org |dcha...@freebsd.org --- Comment #4 from Dmitry Chagin --- grab -- You are receiving this mail because: You are the assignee for the bug. ___ freebsd-emulation@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-emulation To unsubscribe, send any mail to "freebsd-emulation-unsubscr...@freebsd.org"
[Bug 218627] [PATCH] add Evdev ioctl handler to the Linux compat layer
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218627 --- Comment #3 from commit-h...@freebsd.org --- A commit references this bug: Author: dchagin Date: Sun Apr 23 07:43:51 UTC 2017 New revision: 317323 URL: https://svnweb.freebsd.org/changeset/base/317323 Log: Add Evdev ioctl handler to the Linuxulator. PR: 218627 Submitted by: Jan Kokem?ller Reported by: Jan Kokem?ller MFC after:1 week Changes: head/sys/compat/linux/linux_ioctl.c head/sys/compat/linux/linux_ioctl.h -- You are receiving this mail because: You are the assignee for the bug. ___ freebsd-emulation@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-emulation To unsubscribe, send any mail to "freebsd-emulation-unsubscr...@freebsd.org"
[Bug 218627] [PATCH] add Evdev ioctl handler to the Linux compat layer
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218627 Vladimir Kondratyev changed: What|Removed |Added CC||vladi...@kondratyev.su --- Comment #2 from Vladimir Kondratyev --- There are 3 more ioctls with directions defined in Linux and FreeBSD differently: ioctlLinux FreeBSD EVIOCGKEYCODE(2) _IOR _IOWR EVIOCGMASK _IOR _IOW They are not supported in in-kernel evdev driver yet, but should work in webcamd cuse-backed driver -- You are receiving this mail because: You are the assignee for the bug. ___ freebsd-emulation@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-emulation To unsubscribe, send any mail to "freebsd-emulation-unsubscr...@freebsd.org"
[Bug 218627] [PATCH] add Evdev ioctl handler to the Linux compat layer
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218627 Jan Kokemüller changed: What|Removed |Added Attachment #181754|0 |1 is obsolete|| --- Comment #1 from Jan Kokemüller --- Created attachment 181846 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=181846&action=edit add an Evdev ioctl handler to the Linux compat layer - v2 I've updated the patch. Some comments are clarified and EVIOCRMFF (which is another IOWINT ioctl like EVIOCGRAB and EVIOCREVOKE) is now also translated. Changing the definition of EVIOCGRAB and EVIOCREVOKE is not needed as I've learned (see bug 218625). EVIOCRMFF is untested as it's related to force feedback (unsupported on FreeBSD for now). -- You are receiving this mail because: You are the assignee for the bug. ___ freebsd-emulation@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-emulation To unsubscribe, send any mail to "freebsd-emulation-unsubscr...@freebsd.org"
[Bug 218627] [PATCH] add Evdev ioctl handler to the Linux compat layer
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218627 Mark Linimon changed: What|Removed |Added Assignee|freebsd-b...@freebsd.org|emulat...@freebsd.org -- You are receiving this mail because: You are the assignee for the bug. ___ freebsd-emulation@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-emulation To unsubscribe, send any mail to "freebsd-emulation-unsubscr...@freebsd.org"
Re: ioctl
On Thu, Sep 15, 2016 at 01:37:22PM +0200, Erik Cederstrand wrote: > > > Den 15. sep. 2016 kl. 10.40 skrev Erik Cederstrand : > > > > Hi folks, > > > > I managed to get a 64-bit Oracle instantclient running under 64-bit Linux > > so I can connect to an Oracle database using the Oracle client "sqlplus". > > > > Now, whenever I run sqlplus, I get this message in /var/log/messages: > > > > kernel: linux: pid 92000 (sqlplus): ioctl fd=3, cmd=0x1268 ('',104) is > > not implemented > > > > 0x1268 is BLKSSZGET according to linux_ioctl.h. > > > > The message is harmless as sqlplus seems to be working correctly, but I > > would like to get rid of it and learn new things along the way. > > > > I think the message comes from this code: > > https://github.com/freebsd/freebsd/blob/master/sys/compat/linux/linux_ioctl.c#L3606 > > > > Apparently, the Linux compat code does not implement the ioctl() system > > call at all. Is this a deliberate choice? > > Well, that was a pretty bad analysis. I found that the linux_ioctl_disk() > method handles disk ioctl's, but not BLKSSZGET, so here's a patch (I still > barely know what I'm doing): > > --- sys/compat/linux/linux_ioctl.c.orig 2016-09-15 13:09:59.747254000 > +0200 > +++ sys/compat/linux/linux_ioctl.c2016-09-15 13:15:59.382396000 +0200 > @@ -296,6 +296,15 @@ > return (copyout(§orsize, (void *)args->arg, > sizeof(sectorsize))); > break; > + case LINUX_BLKSSZGET: > + error = fo_ioctl(fp, DIOCGSECTORSIZE, > + (caddr_t)§orsize, td->td_ucred, td); > + fdrop(fp, td); > + if (error) > + return (error); > + return (copyout(§orsize, (void *)args->arg, > + sizeof(sectorsize))); > + break; > } > fdrop(fp, td); > return (ENOIOCTL); > looks ok to me, thanx ___ freebsd-emulation@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-emulation To unsubscribe, send any mail to "freebsd-emulation-unsubscr...@freebsd.org"
ioctl
Hi folks, I managed to get a 64-bit Oracle instantclient running under 64-bit Linux so I can connect to an Oracle database using the Oracle client "sqlplus". Now, whenever I run sqlplus, I get this message in /var/log/messages: kernel: linux: pid 92000 (sqlplus): ioctl fd=3, cmd=0x1268 ('',104) is not implemented 0x1268 is BLKSSZGET according to linux_ioctl.h. The message is harmless as sqlplus seems to be working correctly, but I would like to get rid of it and learn new things along the way. I think the message comes from this code: https://github.com/freebsd/freebsd/blob/master/sys/compat/linux/linux_ioctl.c#L3606 Apparently, the Linux compat code does not implement the ioctl() system call at all. Is this a deliberate choice? I have no idea how this code works, or the security implications of changing it, but it seems like a minor change to forward linux_ioctl_args to FreeBSD ioctl()? Erik ___ freebsd-emulation@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-emulation To unsubscribe, send any mail to "freebsd-emulation-unsubscr...@freebsd.org"
Re: ioctl
> Den 15. sep. 2016 kl. 10.40 skrev Erik Cederstrand : > > Hi folks, > > I managed to get a 64-bit Oracle instantclient running under 64-bit Linux so > I can connect to an Oracle database using the Oracle client "sqlplus". > > Now, whenever I run sqlplus, I get this message in /var/log/messages: > > kernel: linux: pid 92000 (sqlplus): ioctl fd=3, cmd=0x1268 ('',104) is not > implemented > > 0x1268 is BLKSSZGET according to linux_ioctl.h. > > The message is harmless as sqlplus seems to be working correctly, but I would > like to get rid of it and learn new things along the way. > > I think the message comes from this code: > https://github.com/freebsd/freebsd/blob/master/sys/compat/linux/linux_ioctl.c#L3606 > > Apparently, the Linux compat code does not implement the ioctl() system call > at all. Is this a deliberate choice? Well, that was a pretty bad analysis. I found that the linux_ioctl_disk() method handles disk ioctl's, but not BLKSSZGET, so here's a patch (I still barely know what I'm doing): --- sys/compat/linux/linux_ioctl.c.orig 2016-09-15 13:09:59.747254000 +0200 +++ sys/compat/linux/linux_ioctl.c 2016-09-15 13:15:59.382396000 +0200 @@ -296,6 +296,15 @@ return (copyout(§orsize, (void *)args->arg, sizeof(sectorsize))); break; + case LINUX_BLKSSZGET: + error = fo_ioctl(fp, DIOCGSECTORSIZE, + (caddr_t)§orsize, td->td_ucred, td); + fdrop(fp, td); + if (error) + return (error); + return (copyout(§orsize, (void *)args->arg, + sizeof(sectorsize))); + break; } fdrop(fp, td); return (ENOIOCTL); ... and the messages are gone. Is this an acceptable approach? Erik ___ freebsd-emulation@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-emulation To unsubscribe, send any mail to "freebsd-emulation-unsubscr...@freebsd.org"
ioctl
Hi folks, I managed to get a 64-bit Oracle instantclient running under 64-bit Linux so I can connect to an Oracle database using the Oracle client "sqlplus". Now, whenever I run sqlplus, I get this message in /var/log/messages: kernel: linux: pid 92000 (sqlplus): ioctl fd=3, cmd=0x1268 ('',104) is not implemented 0x1268 is BLKSSZGET according to linux_ioctl.h. The message is harmless as sqlplus seems to be working correctly, but I would like to get rid of it and learn new things along the way. I think the message comes from this code: https://github.com/freebsd/freebsd/blob/master/sys/compat/linux/linux_ioctl.c#L3606 Apparently, the Linux compat code does not implement the ioctl() system call at all. Is this a deliberate choice? I have no idea how this code works, or the security implications of changing it, but it seems like a minor change to forward linux_ioctl_args to FreeBSD ioctl()? Erik signature.asc Description: Message signed with OpenPGP using GPGMail
Re: Adding a linux ioctl translation
Hi, I solved the problem. The handler did a switch(...) on the lower 16bit of the cmd but the cmd value was still the long one so adding a & 0x solved the problem. Thank you, Martin ___ freebsd-emulation@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-emulation To unsubscribe, send any mail to "freebsd-emulation-unsubscr...@freebsd.org"
Adding a linux ioctl translation
Hi, I try to add some new ioctl in the linuxulator. These ioctls are for the joystick driver I am currently writing. I tried to modify the linux_ioctl.h and linux_ioctl.c in the kernel but up to know I had no success. I still get the dmesg output about unimplemented ioctls: inux: pid 2830 (linux_jstest): ioctl fd=3, cmd=0x6a01 ('j',1) is not implemented linux(2830): ioctl(3, 80016a11, *) linux: pid 2830 (linux_jstest): ioctl fd=3, cmd=0x6a11 ('j',17) is not implemented linux(2830): ioctl(3, 80016a12, *) linux: pid 2830 (linux_jstest): ioctl fd=3, cmd=0x6a12 ('j',18) is not implemented linux(2830): ioctl(3, 80806a13, *) linux: pid 2830 (linux_jstest): ioctl fd=3, cmd=0x6a13 ('j',19) is not implemented I did the following: 1. Add the original ioctls to the linux_ioctl.h #define LINUX_JSIOCGVERSION 0x6a01 /*0x80046a01*/ #define LINUX_JSIOCGAXES0x6a11 /*0x80016a11*/ #define LINUX_JSIOCGBUTTONS 0x6a12 /*0x80016a12*/ #define LINUX_JSIOCGNAME0x6a13 /*0x80006a13*/ #define LINUX_JS_MIN 0x6a01 #define LINUX_JS_MAX 0x6a13 2. Modified the linux_ioctl.c by adding: static linux_ioctl_function_t linux_ioctl_joystick; [...] static struct linux_ioctl_handler joystick_handler = {linux_ioctl_joystick, LINUX_JS_MIN, LINUX_JS_MAX }; [...] DATA_SET(linux_ioctl_handler_set, joystick_handler); static int linux_ioctl_joystick(struct thread *td, struct linux_ioctl_args *args) { int error; error = 0; printf(ARGS(ioctl, "%d, %04lx, *"), args->fd, \ (unsigned long)args->cmd); switch (args->cmd) { case LINUX_JSIOCGVERSION: args->cmd = JSIOCGVERSION; break; case LINUX_JSIOCGAXES: args->cmd = JSIOCGAXES; break; case LINUX_JSIOCGBUTTONS: args->cmd = JSIOCGBUTTONS; break; case LINUX_JSIOCGNAME: args->cmd = JSIOCGNAME(0); break; default:return (ENOIOCTL); } error = sys_ioctl(td, (struct ioctl_args *)args); return (error); } 3. Recompile linux.ko, restart the system Unfortunately this did not what it should. I still get the message about the unimplemented ioctl. What did I miss? Thank you, Martin Laabs ___ freebsd-emulation@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-emulation To unsubscribe, send any mail to "freebsd-emulation-unsubscr...@freebsd.org"
Re: kern/99068: [linux] [patch] Linux emulator crashed by java, when calling ioctl(fd, SIOCGIFINDEX, ...)
Synopsis: [linux] [patch] Linux emulator crashed by java, when calling ioctl(fd,SIOCGIFINDEX,...) State-Changed-From-To: feedback->closed State-Changed-By: arundel State-Changed-When: Sun Jan 30 08:07:54 UTC 2011 State-Changed-Why: 1) Feedback timeout. 2) Fixed in HEAD (r180768). 3) MFC'ed to stable/7 in r173628. http://www.freebsd.org/cgi/query-pr.cgi?pr=99068 ___ freebsd-emulation@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-emulation To unsubscribe, send any mail to "freebsd-emulation-unsubscr...@freebsd.org"
Re: kern/99068: [linux] [patch] Linux emulator crashed by java, when calling ioctl(fd, SIOCGIFINDEX, ...)
Synopsis: [linux] [patch] Linux emulator crashed by java, when calling ioctl(fd,SIOCGIFINDEX,...) Responsible-Changed-From-To: freebsd-bugs->freebsd-emulation Responsible-Changed-By: arundel Responsible-Changed-When: Tue Aug 17 19:57:01 UTC 2010 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=99068 ___ freebsd-emulation@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-emulation To unsubscribe, send any mail to "freebsd-emulation-unsubscr...@freebsd.org"
Re: WARNING pid ... (VBoxSVC): ioctl sign-extension ioctl ffffffffc4a81502
On Fri, 26 Mar 2010 11:14:49 +0200, Andriy Gapon wrote: > on 26/03/2010 10:59 Bernhard Froehlich said the following: >> >> I've had a talk to Alexander Eichner and they have already fixed that 2 >> months ago in r25953 on trunk. So VirtualBox 3.2.x will include this >> fix. >> >> http://www.virtualbox.org/changeset/25953 > > Thank you very much. > Sorry for not checking the upstream repository first. No problem. We will backport the fix and include it with the port update to 3.1.6. beat is currently testing it. -- Bernhard Fröhlich http://www.bluelife.at/ ___ freebsd-emulation@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-emulation To unsubscribe, send any mail to "freebsd-emulation-unsubscr...@freebsd.org"
Re: WARNING pid ... (VBoxSVC): ioctl sign-extension ioctl ffffffffc4a81502
on 26/03/2010 10:59 Bernhard Froehlich said the following: > > I've had a talk to Alexander Eichner and they have already fixed that 2 > months ago in r25953 on trunk. So VirtualBox 3.2.x will include this fix. > > http://www.virtualbox.org/changeset/25953 Thank you very much. Sorry for not checking the upstream repository first. -- Andriy Gapon ___ freebsd-emulation@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-emulation To unsubscribe, send any mail to "freebsd-emulation-unsubscr...@freebsd.org"
Re: WARNING pid ... (VBoxSVC): ioctl sign-extension ioctl ffffffffc4a81502
On Fri, 26 Mar 2010 01:41:21 +0200, Andriy Gapon wrote: > On VirtualBox startup the following messages are produced in system log: > WARNING pid ... (VBoxSVC): ioctl sign-extension ioctl c4a81502 > > This happens on amd64 platform. > > I think the reason for this is in RTFileIoCtl() helper function (in > VBox/Runtime/r3/posix/fileio-posix.cpp). > This function takes iRequest argument as 'int' and then passes it as the > second > parameter to ioctl(2). But on FreeBSD that parameter, request, is > expected to > be of type unsigned long. > Thus, a sufficiently large value of a request gets represented as a > negative > value in iRequest, which then leads to the warning. > > On the other hand, looking at how ioctl(2) is declared in other operating > systems, I am not sure who is right and who is wrong here. > Maybe we should a cast to unsigned int in RTFileIoCtl() for __FreeBSD__ > case. > Maybe FreeBSD should just suck it up and remove the noisy warning. > > I know too little to suggest a resolution. > > P.S. it seems that Mac OS X is in the same boat as FreeBSD, perhaps other > BSDs too. I've had a talk to Alexander Eichner and they have already fixed that 2 months ago in r25953 on trunk. So VirtualBox 3.2.x will include this fix. http://www.virtualbox.org/changeset/25953 -- Bernhard Fröhlich http://www.bluelife.at/ ___ freebsd-emulation@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-emulation To unsubscribe, send any mail to "freebsd-emulation-unsubscr...@freebsd.org"
WARNING pid ... (VBoxSVC): ioctl sign-extension ioctl ffffffffc4a81502
On VirtualBox startup the following messages are produced in system log: WARNING pid ... (VBoxSVC): ioctl sign-extension ioctl c4a81502 This happens on amd64 platform. I think the reason for this is in RTFileIoCtl() helper function (in VBox/Runtime/r3/posix/fileio-posix.cpp). This function takes iRequest argument as 'int' and then passes it as the second parameter to ioctl(2). But on FreeBSD that parameter, request, is expected to be of type unsigned long. Thus, a sufficiently large value of a request gets represented as a negative value in iRequest, which then leads to the warning. On the other hand, looking at how ioctl(2) is declared in other operating systems, I am not sure who is right and who is wrong here. Maybe we should a cast to unsigned int in RTFileIoCtl() for __FreeBSD__ case. Maybe FreeBSD should just suck it up and remove the noisy warning. I know too little to suggest a resolution. P.S. it seems that Mac OS X is in the same boat as FreeBSD, perhaps other BSDs too. -- Andriy Gapon ___ freebsd-emulation@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-emulation To unsubscribe, send any mail to "freebsd-emulation-unsubscr...@freebsd.org"