aboutsummaryrefslogtreecommitdiffstats
path: root/security (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2008-04-26x86: change x86 to use generic find_next_bitAlexander van Heukelum8-157/+12
The versions with inline assembly are in fact slower on the machines I tested them on (in userspace) (Athlon XP 2800+, p4-like Xeon 2.8GHz, AMD Opteron 270). The i386-version needed a fix similar to 06024f21 to avoid crashing the benchmark. Benchmark using: gcc -fomit-frame-pointer -Os. For each bitmap size 1...512, for each possible bitmap with one bit set, for each possible offset: find the position of the first bit starting at offset. If you follow ;). Times include setup of the bitmap and checking of the results. Athlon Xeon Opteron 32/64bit x86-specific: 0m3.692s 0m2.820s 0m3.196s / 0m2.480s generic: 0m2.622s 0m1.662s 0m2.100s / 0m1.572s If the bitmap size is not a multiple of BITS_PER_LONG, and no set (cleared) bit is found, find_next_bit (find_next_zero_bit) returns a value outside of the range [0, size]. The generic version always returns exactly size. The generic version also uses unsigned long everywhere, while the x86 versions use a mishmash of int, unsigned (int), long and unsigned long. Using the generic version does give a slightly bigger kernel, though. defconfig: text data bss dec hex filename x86-specific: 4738555 481232 626688 5846475 5935cb vmlinux (32 bit) generic: 4738621 481232 626688 5846541 59360d vmlinux (32 bit) x86-specific: 5392395 846568 724424 6963387 6a40bb vmlinux (64 bit) generic: 5392458 846568 724424 6963450 6a40fa vmlinux (64 bit) Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-26uml: Kconfig cleanupIngo Molnar1-0/+7
pointed out by Linus: arch/um/Kconfig.x86_64 should include arch/x86/Kconfig.cpu instead of defining those symbols itself. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-26uml: fix build errorIngo Molnar1-0/+1
fix: arch/um/os-Linux/helper.c: In function 'run_helper': arch/um/os-Linux/helper.c:73: error: 'PATH_MAX' undeclared (first use in this function) Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-26x86 PAT: decouple from nonpromisc devmemIngo Molnar1-2/+2
Linus pointed it out that PAT should not depend on NONPROMISC_DEVMEM. Also make PAT non-default. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-26Fix uninitialized 'copy' in unshare_filesAl Viro1-1/+1
Arrgghhh... Sorry about that, I'd been sure I'd folded that one, but it actually got lost. Please apply - that breaks execve(). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Tested-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-26generic: make optimized inlining arch-opt-inIngo Molnar2-1/+5
Stephen Rothwell reported that linux-next did not build on powerpc64. make optimized inlining dependent on architecture opt-in. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-26x86: add optimized inliningIngo Molnar4-3/+24
add CONFIG_OPTIMIZE_INLINING=y. allow gcc to optimize the kernel image's size by uninlining functions that have been marked 'inline'. Previously gcc was forced by Linux to always-inline these functions via a gcc attribute: #define inline inline __attribute__((always_inline)) Especially when the user has already selected CONFIG_OPTIMIZE_FOR_SIZE=y this can make a huge difference in kernel image size (using a standard Fedora .config): text data bss dec hex filename 5613924 562708 3854336 10030968 990f78 vmlinux.before 5486689 562708 3854336 9903733 971e75 vmlinux.after that's a 2.3% text size reduction (!). Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-26ide: sanitize handling of IDE_HFLAG_NO_SET_MODE host flagBartlomiej Zolnierkiewicz4-10/+13
* Check for IDE_HFLAG_NO_SET_MODE host flag in ide_set_pio(), ide_set_[pio,dma]_mode(), ide_set_xfer_rate() and set_pio_mode(). * Remove no longer needed IDE_HFLAG_NO_SET_MODE host flag checking from ide_tune_dma(). * Remove superfluous ->set_pio_mode checking from do_special(). This is a part of preparations for adding 'struct ide_port_ops'. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26sis5513: fail early for unsupported chipsetsBartlomiej Zolnierkiewicz1-15/+15
* Factor out chipset family detection from init_chipset_sis5513() to sis_find_family(). * Use sis_find_family() in sis5513_init_one() to fail early if the chipset is unsupported. * Keep a local copy sis5513_chipset in sis5513_init_one() and set .udma_mask according to chipset family. * Remove no longer need ->ultra_mask setting from init_hwif_sis5513(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26it821x: fix kzalloc() failure handlingBartlomiej Zolnierkiewicz1-6/+18
Allocate 'struct it821x_dev' objects for both ports in it821x_init_one(). Fixes potential OOPS in it821x_quirkproc() (uses 'itdev' unconditionally) and other problems ('itdev' is needed for correct operation of the driver). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26qd65xx: use IDE_HFLAG_SINGLE host flagBartlomiej Zolnierkiewicz2-21/+15
* Set IDE_HFLAG_SINGLE host flag in qd_probe() for QD6500 and QD6580 with the second port disabled. * Check for IDE_HFLAG_SINGLE in qd6580_port_init_devs() instead of using cached value of QD6580 Control register. * Don't cache QD6580 Control register value in hwif->config_data (bits 8-15) and remove no longer needed QD_CONTROL() macro. * Cache QD65xx base address in hwif->config_data (bits 8-15) instead of hwif->select_data. * Set hwif->config_data in qd_probe() and remove qd_setup() helper. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26qd65xx: always use ->selectproc methodBartlomiej Zolnierkiewicz1-27/+10
qd_select() checks itself whether timings should be reprogrammed so remove superfluous qd_timing_ok() and always use ->selectproc method (rename qd_select() to qd65xx_select() while at it). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26ide-cd: put proc-related functions together under single ifdefBorislav Petkov1-13/+10
[bart: ported it over Paolo's patch] Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26ide-cd: Replace __FUNCTION__ with __func__Paolo Ciarrocchi1-5/+5
[bart: md5sum checked] Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26IDE: Coding Style fixes to drivers/ide/ide-cd.cPaolo Ciarrocchi1-124/+134
Before: total: 43 errors, 66 warnings, 2183 lines checked After: total: 0 errors, 36 warnings, 2192 lines checked I didn't (and I don't plan to) fix the warnings: WARNING: line over 80 characters [bart: minor fixes, md5sum checked (modulo s/"ignore = NULL;"/"ignore;"/ fix)] Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26IDE: Coding Style fixes to drivers/ide/pci/cy82c693.cPaolo Ciarrocchi1-37/+37
Before: total: 34 errors, 14 warnings, 456 lines checked After: total: 0 errors, 8 warnings, 456 lines checked [bart: md5sum checked] Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26IDE: Coding Style fixes to drivers/ide/pci/it8213.cPaolo Ciarrocchi1-5/+4
File is now error free, only a few WARNING: line over 80 characters are left. Compile tested. [bart: md5sum checked] Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26IDE: Coding Style fixes to drivers/ide/ide-floppy.cPaolo Ciarrocchi1-8/+8
File is now error free. Compile tested. [bart: minor fixes, md5sum checked] Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26IDE: Coding Style fixes to drivers/ide/legacy/ali14xx.cPaolo Ciarrocchi1-5/+6
File is now error free, 2 warnings left. Compile tested. [bart: md5sum checked] Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26IDE: Coding Style fixes to drivers/ide/legacy/hd.cPaolo Ciarrocchi1-38/+40
Fix a lot of errors and warnings. Compile tested. [bart: some fixes, md5sum checked] Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26IDE: Coding Style fixes to drivers/ide/pci/cmd640.cPaolo Ciarrocchi1-46/+48
Fix all the errors and a few warnings. Compile tested. [bart: some fixes, md5sum checked] Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26IDE: Coding Style fixes to drivers/ide/pci/opti621.cPaolo Ciarrocchi1-25/+30
Compile tested. [bart: some fixes, md5sum checked] Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26IDE: Coding Style fixes to drivers/ide/ide-pnp.cPaolo Ciarrocchi1-5/+5
File is now error free. Compile tested. [bart: md5sum checked] Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26IDE: Coding Style fixes to drivers/ide/ide-proc.cPaolo Ciarrocchi1-80/+75
Lot of errors and warnings removed. Compile tested. [bart: minor fixes, md5sum checked] Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26IDE: Coding Style fixes to drivers/ide/legacy/ide-4drives.cPaolo Ciarrocchi1-1/+1
File is now error and warning free. Compile tested. [bart: md5sum checked] Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26IDE: Coding Style fixes to drivers/ide/legacy/umc8672.cPaolo Ciarrocchi1-29/+29
File is now error free. Compile tested. [bart: minor fixes, md5sum checked] Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26IDE: Coding Style fixes to drivers/ide/pci/generic.cPaolo Ciarrocchi1-2/+2
File is now error free. Compile tested. [bart: fix issues noticed by Adrian Bunk & Cyrill Gorcunov, md5sum checked] Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26IDE: Coding Style fixes to drivers/ide/pci/jmicron.cPaolo Ciarrocchi1-2/+1
File is now error free. Compile tested. [bart: md5sum checked] Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26IDE: Coding Style fixes to drivers/ide/pci/sis5513.cPaolo Ciarrocchi1-100/+98
About 300 errors and warnings fixed. File is now error free. Compile tested. [bart: minor fixes, md5sum checked] Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26IDE: Coding Style fixes to drivers/ide/pci/slc90e66.cPaolo Ciarrocchi1-3/+3
File is now error free, only 1 warning left. Compile tested. [bart: md5sum checked] Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26IDE: Coding Style fixes to drivers/ide/pci/tc86c001.cPaolo Ciarrocchi1-14/+14
File is now error and warning free. Compile tested. [bart: md5sum checked] Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26IDE: Coding Style fixes to drivers/ide/setup-pci.cPaolo Ciarrocchi1-17/+12
File is now error free. Compile tested. [bart: minor fixes, md5sum checked] Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26ide: remove hwif->straight8 flagBartlomiej Zolnierkiewicz2-26/+11
All host drivers now either set hwif->mmio or reserve continuous I/O resources so remove no longer needed hwif->straight8 flag and never reached code for 'hwif->straight8 == 0' case. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26ide: remove IDE_HFLAG_CY82C693 host flagBartlomiej Zolnierkiewicz3-11/+3
Sergei suggested that it shouldn't be necessary + it had no effect anyway since ide_id_dma_bug() is called earlier in ide_tune_dma(). Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26falconide: fix resources reservation (take 2)Bartlomiej Zolnierkiewicz1-0/+7
* Tell IDE layer to not manage resources by setting hwif->mmio flag and request resources in falconide_init(). * Use request_mem_region() for resources reservation. * Use driver name for resources reservation. v2: * Fix missing printk() parameter. (Noticed by Geert Uytterhoeven) Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Michael Schmitz <schmitz@debian.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26ide-mpc8xx: fix resources reservationBartlomiej Zolnierkiewicz1-1/+17
* Tell IDE layer to not manage resources by setting hwif->mmio flag and request resources in m8xx_ide_init_ports(). * Use request_mem_region() for resources reservation. * Use driver name for resources reservation. Cc: Vitaly Bordug <vitb@kernel.crashing.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26ide-mpc8xx: make m8xx_ide_init_ports() return an error valueBartlomiej Zolnierkiewicz1-15/+25
* Make m8xx_ide_init_ports() return an error value. * Update mpc8xx_ide_probe() to setup/probe only ports for which m8xx_ide_init_ports() succedded. Cc: Vitaly Bordug <vitb@kernel.crashing.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26bast-ide: fix resources reservationBartlomiej Zolnierkiewicz1-0/+10
* Tell IDE layer to not manage resources by setting hwif->mmio flag and request resources in bastide_init(). * Use request_mem_region() for resources reservation. * Use driver name for resources reservation. Cc: Ben Dooks <support@simtec.co.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26delkin_cb: fix resources handlingBartlomiej Zolnierkiewicz1-1/+3
Tell IDE layer to not manage resources by setting hwif->mmio flag. Cc: Mark Lord <mlord@pobox.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26ide_platform: fix resources handlingBartlomiej Zolnierkiewicz1-3/+2
Tell IDE layer to not manage resources by always setting hwif->mmio flag (resources are handled by a platform device). Cc: Anton Vorontsov <avorontsov@ru.mvista.com> Cc: Vitaly Bordug <vitb@kernel.crashing.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26remove include/linux/hdsmart.hAdrian Bunk2-127/+0
include/linux/hdsmart.h is not used by the kernel and should therefore be removed. Signed-off-by: Adrian Bunk <bunk@kernel.org> Cc: "Robert P. J. Day" <rpjday@crashcourse.ca>, Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26ide-cd: remove the internal 64k bufferBorislav Petkov2-123/+4
This removes the internal ide-cd buffer and falls back to read-ahead block layer capabilities. Thorough testing (cd burning, dvd read, raw read) gives with the bufferless mode marginally better performance in addition to simplified code. bufferless: dd: reading `/dev/hdc': Input/output error 6238+0 records in 6238+0 records out 204406784 bytes (204 MB) copied, 259.891 s, 787 kB/s real 4m21.598s user 0m0.014s sys 0m0.744s with the old buffer (2.6.25-rc1): dd: reading `/dev/hdc': Input/output error 6238+0 records in 6238+0 records out 204406784 bytes (204 MB) copied, 262.893 s, 778 kB/s real 4m22.938s user 0m0.009s sys 0m0.771s Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26ide-disk: fix issues found by checkpatch.plBartlomiej Zolnierkiewicz1-50/+70
There are no changes to the resulting drivers/ide/ide-disk.o binary file (md5sum-s after and before the patch match). Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26ide-disk: add proc_idedisk_read_smart() helperBartlomiej Zolnierkiewicz1-22/+17
* Factor out common code from proc_idedisk_read_smart_{thresholds,values}() to proc_idedisk_read_smart() helper. * Rename proc_idedisk_read_smart_thresholds() to proc_idedisk_read_st() and proc_idedisk_read_smart_values() to proc_idedisk_read_sv(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26ide: unexport ide_hwifs[]Bartlomiej Zolnierkiewicz1-5/+0
All modular users have been fixed to not reference ide_hwifs[] directly. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26ide-generic: use ide_find_port() (take 3)Bartlomiej Zolnierkiewicz1-2/+12
There should be no functional changes caused by this patch. v2: * Fix comment (noticed by Sergei Shtylyov). v3: * Fix no initalization of idx in some case. (Johann Felix Soden) Cc: Johann Felix Soden <johfel@users.sourceforge.net> Cc: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26ide: use ide_find_port() in legacy VLB host drivers (take 2)Bartlomiej Zolnierkiewicz8-81/+122
* Add IDE_HFLAG_QD_2ND_PORT host flag to indicate the need of skipping first ide_hwifs[] slot for the second port of QD65xx controller. * Handle this new host flag in ide_find_port_slot(). * Convert legacy VLB host drivers to use ide_find_port(). While at it: * Fix couple of printk()-s in qd65xx host driver to not use hwif->name. v2: * Fix qd65xx. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26ide: merge ide_match_hwif() and ide_find_port()Bartlomiej Zolnierkiewicz4-63/+54
* Change ide_match_hwif() argument from 'u8 bootable' to 'struct ide_port_info *d'. * Move ide_match_hwif() to ide-probe.c from setup-pci.c and rename it to ide_find_port_slot(). Update some comments while at it. * ide_find_port() can be now just a wrapper for ide_find_port_slot(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26ide: remove PIO "downgrade" quirkBartlomiej Zolnierkiewicz5-15/+0
No need for it nowadays so remove quirk code from ide_get_best_pio_mode() and IDE_HFLAG_PIO_DOWNGRADE host flag. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26ide: use DIV_ROUND_UPJulia Lawall2-16/+16
The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) / (d)) but is perhaps more readable. An extract of the semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @haskernel@ @@ #include <linux/kernel.h> @depends on haskernel@ expression n,d; @@ ( - (n + d - 1) / d + DIV_ROUND_UP(n,d) | - (n + (d - 1)) / d + DIV_ROUND_UP(n,d) ) @depends on haskernel@ expression n,d; @@ - DIV_ROUND_UP((n),d) + DIV_ROUND_UP(n,d) @depends on haskernel@ expression n,d; @@ - DIV_ROUND_UP(n,(d)) + DIV_ROUND_UP(n,d) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>