no TIOCSBRK/TIOCCBRK in ia32 emulation on amd64
PATCH 1/1 no TIOCSBRK/TIOCCBRK in ia32 emulation on amd64
In ia32 emulation, the amd64 kernel refuses the ioctls TIOCSBRK and TIOCCBRK with EINVAL. I've attached a patch that adds them to the compatibility list.
Since all architectures have these ioctls ("m68knommu" inherits them from "m68k", "um" from its host) and use the same code, I think adding them to compat_ioctl.h is the correct choice (as opposed to adding them to arch/x86_64/ia32/ia32_ioctl.c).
The patch is for 2.6.9. I've observed the problem the first time in 2.6.7.
- Werner
---------------------------------- cut here -----------------------------------
include/linux/compat_ioctl.h renamed from include/linux/compat_ioctl.h.orig +2 -0
@@ -23,6 +23,8 @@ COMPATIBLE_IOCTL(TCSETSW) COMPATIBLE_IOCTL(TCSETSF) COMPATIBLE_IOCTL(TIOCLINUX) +COMPATIBLE_IOCTL(TIOCSBRK) +COMPATIBLE_IOCTL(TIOCCBRK) /* Little t */ COMPATIBLE_IOCTL(TIOCGETD) COMPATIBLE_IOCTL(TIOCSETD)
Signature · 3 lines
_________________________________________________________________________ / Werner Almesberger, Buenos Aires, Argentina [email protected] / /_http://www.almesberger.net/____________________________________________/
Quoted 11 lines · Werner Almesberger
In ia32 emulation, the amd64 kernel refuses the ioctls TIOCSBRK and TIOCCBRK with EINVAL. I've attached a patch that adds them to the compatibility list.
Since all architectures have these ioctls ("m68knommu" inherits them from "m68k", "um" from its host) and use the same code, I think adding them to
compat_ioctl.his the correct choice (as opposed to adding them toarch/x86_64/ia32/ia32_ioctl.c).The patch is for 2.6.9. I've observed the problem the first time in 2.6.7.
Thanks, looks good.
-Andi