Commit a106009b authored by Andi Kleen's avatar Andi Kleen Committed by Andi Kleen

[PATCH] x86-64: Print type and size correctly for unknown compat ioctls

Signed-off-by: default avatarAndi Kleen <ak@suse.de>
parent c812d6c1
...@@ -371,13 +371,14 @@ static void compat_ioctl_error(struct file *filp, unsigned int fd, ...@@ -371,13 +371,14 @@ static void compat_ioctl_error(struct file *filp, unsigned int fd,
fn = "?"; fn = "?";
} }
sprintf(buf,"'%c'", (cmd>>24) & 0x3f); sprintf(buf,"'%c'", (cmd>>_IOC_TYPESHIFT) & _IOC_TYPEMASK);
if (!isprint(buf[1])) if (!isprint(buf[1]))
sprintf(buf, "%02x", buf[1]); sprintf(buf, "%02x", buf[1]);
compat_printk("ioctl32(%s:%d): Unknown cmd fd(%d) " compat_printk("ioctl32(%s:%d): Unknown cmd fd(%d) "
"cmd(%08x){%s} arg(%08x) on %s\n", "cmd(%08x){t:%s;sz:%u} arg(%08x) on %s\n",
current->comm, current->pid, current->comm, current->pid,
(int)fd, (unsigned int)cmd, buf, (int)fd, (unsigned int)cmd, buf,
(cmd >> _IOC_SIZESHIFT) & _IOC_SIZEMASK,
(unsigned int)arg, fn); (unsigned int)arg, fn);
if (path) if (path)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment