diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-05 17:55:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-05 17:55:20 -0400 |
commit | ea62ccd00fd0b6720b033adfc9984f31130ce195 (patch) | |
tree | 9837b797b2466fffcb0af96c388b06eae9c3df18 /fs | |
parent | 886a0768affe9a32f18c45f8e1393bca9ece5392 (diff) | |
parent | 35060b6a9a4e1c89bc6fbea61090e302dbc61847 (diff) |
Merge branch 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6
* 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6: (231 commits)
[PATCH] i386: Don't delete cpu_devs data to identify different x86 types in late_initcall
[PATCH] i386: type may be unused
[PATCH] i386: Some additional chipset register values validation.
[PATCH] i386: Add missing !X86_PAE dependincy to the 2G/2G split.
[PATCH] x86-64: Don't exclude asm-offsets.c in Documentation/dontdiff
[PATCH] i386: avoid redundant preempt_disable in __unlazy_fpu
[PATCH] i386: white space fixes in i387.h
[PATCH] i386: Drop noisy e820 debugging printks
[PATCH] x86-64: Fix allnoconfig error in genapic_flat.c
[PATCH] x86-64: Shut up warnings for vfat compat ioctls on other file systems
[PATCH] x86-64: Share identical video.S between i386 and x86-64
[PATCH] x86-64: Remove CONFIG_REORDER
[PATCH] x86-64: Print type and size correctly for unknown compat ioctls
[PATCH] i386: Remove copy_*_user BUG_ONs for (size < 0)
[PATCH] i386: Little cleanups in smpboot.c
[PATCH] x86-64: Don't enable NUMA for a single node in K8 NUMA scanning
[PATCH] x86: Use RDTSCP for synchronous get_cycles if possible
[PATCH] i386: Add X86_FEATURE_RDTSCP
[PATCH] i386: Implement X86_FEATURE_SYNC_RDTSC on i386
[PATCH] i386: Implement alternative_io for i386
...
Fix up trivial conflict in include/linux/highmem.h manually.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/compat.c | 5 | ||||
-rw-r--r-- | fs/compat_ioctl.c | 19 | ||||
-rw-r--r-- | fs/proc/vmcore.c | 2 |
3 files changed, 23 insertions, 3 deletions
diff --git a/fs/compat.c b/fs/compat.c index 040a8be38a48..72e5e6923828 100644 --- a/fs/compat.c +++ b/fs/compat.c | |||
@@ -371,13 +371,14 @@ static void compat_ioctl_error(struct file *filp, unsigned int fd, | |||
371 | fn = "?"; | 371 | fn = "?"; |
372 | } | 372 | } |
373 | 373 | ||
374 | sprintf(buf,"'%c'", (cmd>>24) & 0x3f); | 374 | sprintf(buf,"'%c'", (cmd>>_IOC_TYPESHIFT) & _IOC_TYPEMASK); |
375 | if (!isprint(buf[1])) | 375 | if (!isprint(buf[1])) |
376 | sprintf(buf, "%02x", buf[1]); | 376 | sprintf(buf, "%02x", buf[1]); |
377 | compat_printk("ioctl32(%s:%d): Unknown cmd fd(%d) " | 377 | compat_printk("ioctl32(%s:%d): Unknown cmd fd(%d) " |
378 | "cmd(%08x){%s} arg(%08x) on %s\n", | 378 | "cmd(%08x){t:%s;sz:%u} arg(%08x) on %s\n", |
379 | current->comm, current->pid, | 379 | current->comm, current->pid, |
380 | (int)fd, (unsigned int)cmd, buf, | 380 | (int)fd, (unsigned int)cmd, buf, |
381 | (cmd >> _IOC_SIZESHIFT) & _IOC_SIZEMASK, | ||
381 | (unsigned int)arg, fn); | 382 | (unsigned int)arg, fn); |
382 | 383 | ||
383 | if (path) | 384 | if (path) |
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index c68b055fa26e..464c04a9541d 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c | |||
@@ -2396,6 +2396,14 @@ lp_timeout_trans(unsigned int fd, unsigned int cmd, unsigned long arg) | |||
2396 | #define ULONG_IOCTL(cmd) \ | 2396 | #define ULONG_IOCTL(cmd) \ |
2397 | { (cmd), (ioctl_trans_handler_t)sys_ioctl }, | 2397 | { (cmd), (ioctl_trans_handler_t)sys_ioctl }, |
2398 | 2398 | ||
2399 | /* ioctl should not be warned about even if it's not implemented. | ||
2400 | Valid reasons to use this: | ||
2401 | - It is implemented with ->compat_ioctl on some device, but programs | ||
2402 | call it on others too. | ||
2403 | - The ioctl is not implemented in the native kernel, but programs | ||
2404 | call it commonly anyways. | ||
2405 | Most other reasons are not valid. */ | ||
2406 | #define IGNORE_IOCTL(cmd) COMPATIBLE_IOCTL(cmd) | ||
2399 | 2407 | ||
2400 | struct ioctl_trans ioctl_start[] = { | 2408 | struct ioctl_trans ioctl_start[] = { |
2401 | #include <linux/compat_ioctl.h> | 2409 | #include <linux/compat_ioctl.h> |
@@ -2594,6 +2602,8 @@ HANDLE_IOCTL(SIOCGIWENCODEEXT, do_wireless_ioctl) | |||
2594 | HANDLE_IOCTL(SIOCSIWPMKSA, do_wireless_ioctl) | 2602 | HANDLE_IOCTL(SIOCSIWPMKSA, do_wireless_ioctl) |
2595 | HANDLE_IOCTL(SIOCSIFBR, old_bridge_ioctl) | 2603 | HANDLE_IOCTL(SIOCSIFBR, old_bridge_ioctl) |
2596 | HANDLE_IOCTL(SIOCGIFBR, old_bridge_ioctl) | 2604 | HANDLE_IOCTL(SIOCGIFBR, old_bridge_ioctl) |
2605 | /* Not implemented in the native kernel */ | ||
2606 | IGNORE_IOCTL(SIOCGIFCOUNT) | ||
2597 | HANDLE_IOCTL(RTC_IRQP_READ32, rtc_ioctl) | 2607 | HANDLE_IOCTL(RTC_IRQP_READ32, rtc_ioctl) |
2598 | HANDLE_IOCTL(RTC_IRQP_SET32, rtc_ioctl) | 2608 | HANDLE_IOCTL(RTC_IRQP_SET32, rtc_ioctl) |
2599 | HANDLE_IOCTL(RTC_EPOCH_READ32, rtc_ioctl) | 2609 | HANDLE_IOCTL(RTC_EPOCH_READ32, rtc_ioctl) |
@@ -2617,6 +2627,15 @@ COMPATIBLE_IOCTL(LPRESET) | |||
2617 | /*LPGETSTATS not implemented, but no kernels seem to compile it in anyways*/ | 2627 | /*LPGETSTATS not implemented, but no kernels seem to compile it in anyways*/ |
2618 | COMPATIBLE_IOCTL(LPGETFLAGS) | 2628 | COMPATIBLE_IOCTL(LPGETFLAGS) |
2619 | HANDLE_IOCTL(LPSETTIMEOUT, lp_timeout_trans) | 2629 | HANDLE_IOCTL(LPSETTIMEOUT, lp_timeout_trans) |
2630 | |||
2631 | /* fat 'r' ioctls. These are handled by fat with ->compat_ioctl, | ||
2632 | but we don't want warnings on other file systems. So declare | ||
2633 | them as compatible here. */ | ||
2634 | #define VFAT_IOCTL_READDIR_BOTH32 _IOR('r', 1, struct compat_dirent[2]) | ||
2635 | #define VFAT_IOCTL_READDIR_SHORT32 _IOR('r', 2, struct compat_dirent[2]) | ||
2636 | |||
2637 | IGNORE_IOCTL(VFAT_IOCTL_READDIR_BOTH32) | ||
2638 | IGNORE_IOCTL(VFAT_IOCTL_READDIR_SHORT32) | ||
2620 | }; | 2639 | }; |
2621 | 2640 | ||
2622 | int ioctl_table_size = ARRAY_SIZE(ioctl_start); | 2641 | int ioctl_table_size = ARRAY_SIZE(ioctl_start); |
diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c index d96050728c43..523e1098ae88 100644 --- a/fs/proc/vmcore.c +++ b/fs/proc/vmcore.c | |||
@@ -514,7 +514,7 @@ static int __init parse_crash_elf64_headers(void) | |||
514 | /* Do some basic Verification. */ | 514 | /* Do some basic Verification. */ |
515 | if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0 || | 515 | if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0 || |
516 | (ehdr.e_type != ET_CORE) || | 516 | (ehdr.e_type != ET_CORE) || |
517 | !elf_check_arch(&ehdr) || | 517 | !vmcore_elf_check_arch(&ehdr) || |
518 | ehdr.e_ident[EI_CLASS] != ELFCLASS64 || | 518 | ehdr.e_ident[EI_CLASS] != ELFCLASS64 || |
519 | ehdr.e_ident[EI_VERSION] != EV_CURRENT || | 519 | ehdr.e_ident[EI_VERSION] != EV_CURRENT || |
520 | ehdr.e_version != EV_CURRENT || | 520 | ehdr.e_version != EV_CURRENT || |