07 Jan, 2011

1 commit

  • on building an uImage, I get:

    $ make uImage
    CHK include/linux/version.h
    CHK include/generated/utsrelease.h
    make[1]: `include/generated/mach-types.h' is up to date.
    CALL scripts/checksyscalls.sh
    CHK include/generated/compile.h
    Kernel: arch/arm/boot/Image is ready
    SHIPPED arch/arm/boot/compressed/lib1funcs.S
    AS arch/arm/boot/compressed/lib1funcs.o
    LD arch/arm/boot/compressed/vmlinux
    OBJCOPY arch/arm/boot/zImage
    Kernel: arch/arm/boot/zImage is ready
    UIMAGE arch/arm/boot/uImage
    "mkimage" command not found - U-Boot images will not be built
    Image arch/arm/boot/uImage is ready
    $

    I.e. it says: "uImage is ready" even though the uImage file doesn't
    exist because mkimage is missing.

    I propose the attached patch.

    Signed-off-by: Roland Stigge
    Signed-off-by: Michal Marek

    Roland Stigge
     

06 Jan, 2011

1 commit


29 Dec, 2010

1 commit

  • In usr/gen_init_cpio.c::cpio_mkfile() a call to stat() is made based on
    pathname, subsequently the file is open()'ed and then the value of the
    initial stat() call is used to allocate a buffer. This is not safe since
    the file may change between the call to stat() and the call to open().
    Safer to just open() the file and then do fstat() using the filedescriptor
    returned by open.

    Signed-off-by: Jesper Juhl
    Acked-by: Jeff Garzik
    Signed-off-by: Michal Marek

    Jesper Juhl
     

28 Dec, 2010

1 commit

  • This patch fixes a segfault in modpost that is observed when the gold
    linker is used to link the input objects.

    The problem is that reloc_location (modpost.c) is computing the
    address of the relocation target incorrectly. Here, elf->hdr points
    to the beginning of the ELF file in memory, sechdr points to the
    relocation section header, section is the index of the section
    being relocated, and sechdrs[section].sh_offset would be the offset
    of that section, relative to the beginning of the ELF file. Adding
    elf->hdr + sechdrs[section].sh_offset gives you the address of the
    beginning of the section, and adding r->r_offset to that gives you the
    address of the location to be relocated. You do not need to subtract
    sechdrs[section].sh_addr from that -- the result of this is an address
    outside the file, and causes the segfault when addend_386_rel tries to
    dereference it.

    This bug is not observed when GNU ld is used to link the inputs. The
    object file ubuntu/omnibook/omnibook.o is the result of an ld -r of
    several other files. When GNU ld does an ld -r, it sets the vaddr
    field for each section to 0, but gold lays out the section addresses
    sequentially instead:

    Section Headers:
    [Nr] Name Type Addr Off Size ES Flg Lk Inf Al
    [ 0] NULL 00000000 000000 000000 00 0 0 0
    [ 1] .text PROGBITS 00000000 000034 004794 00 AX 0 0 4
    [ 2] .data PROGBITS 0000b9d0 0047c8 0009c0 00 WA 0 0 4
    [ 3] .bss NOBITS 000162f8 005188 00013c 00 WA 0 0 4
    [ 4] .rodata.str1.1 PROGBITS 00004f2d 0052c4 001b1a 01 AMS 0 0 1
    [ 5] .init.text PROGBITS 00004794 006dde 0005fa 00 AX 0 0 1
    [ 6] .exit.text PROGBITS 00004d8e 0073d8 00018a 00 AX 0 0 1
    ...

    So the bug in the tool remained undiscovered because the section's vaddr
    always happened to be 0.

    Signed-off-by: Raymes Khoury
    Signed-off-by: Olof Johansson
    Signed-off-by: Michal Marek

    Olof Johansson
     

23 Dec, 2010

1 commit


20 Dec, 2010

1 commit

  • The usage help in the comments
    - refers to the wrong script name,
    - doesn't mention that $srctree must be set.

    Hence correct the script name, and derive the source tree path from the script
    path, so we no longer need to rely on $srctree being set by the caller.

    Signed-off-by: Geert Uytterhoeven
    Acked-by: Sam Ravnborg
    Signed-off-by: Michal Marek

    Geert Uytterhoeven
     

17 Dec, 2010

1 commit


15 Dec, 2010

4 commits


14 Dec, 2010

1 commit


02 Dec, 2010

1 commit

  • When we extracted the generated cpio archive using "cpio -id" command,
    it complained,

    cpio: Removing leading `/' from member names
    var/run
    cpio: Removing leading `/' from member names
    var/lib
    cpio: Removing leading `/' from member names
    var/lib/misc

    It is worse with the latest "cpio" or "pax", which tries to overwrite
    the host file system with the leading '/'.

    So the leading '/' of file names should be removed. This is consistent
    with the initramfs come with major distributions such as Fedora or
    Debian, etc.

    Signed-off-by: Thomas Chou
    Acked-by: Mike Frysinger
    Signed-off-by: Michal Marek

    Thomas Chou
     

25 Nov, 2010

1 commit


12 Nov, 2010

1 commit

  • I noticed fixdep uses ~2% of cpu time in kernel build, in function
    use_config()

    fixdep spends a lot of cpu cycles in linear searches in its internal
    string array. With about 400 stored strings per dep file, this begins to
    be noticeable.

    Convert fixdep to use a hash table.

    kbuild results on my x86_64 allmodconfig

    Before patch :

    real 10m30.414s
    user 61m51.456s
    sys 8m28.200s

    real 10m12.334s
    user 61m50.236s
    sys 8m30.448s

    real 10m42.947s
    user 61m50.028s
    sys 8m32.380s

    After:

    real 10m8.180s
    user 61m22.506s
    sys 8m32.384s

    real 10m35.039s
    user 61m21.654s
    sys 8m32.212s

    real 10m14.487s
    user 61m23.498s
    sys 8m32.312s

    Signed-off-by: Eric Dumazet
    Signed-off-by: Michal Marek

    Eric Dumazet
     

01 Nov, 2010

14 commits


31 Oct, 2010

11 commits

  • Signed-off-by: Joe Perches
    Signed-off-by: Dmitry Torokhov

    Joe Perches
     
  • This one was only used for a nasty hack in nfsd, which has recently
    been removed.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     
  • The caller allocated it, the caller should free it.

    The only issue so far is that we could change the flp pointer even on an
    error return if the fl_change callback failed. But we can simply move
    the flp assignment after the fl_change invocation, as the callers don't
    care about the flp return value if the setlease call failed.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     
  • Commit ffe8018c3424 ("initramfs: fix initramfs size calculation") broke
    32-bit big-endian arches like (on ARAnyM):

    VFS: Cannot open root device "hda1" or unknown-block(3,1)
    Please append a correct "root=" boot option; here are the available partitions:
    fe80 1059408 nfhd8 (driver?)
    fe81 921600 nfhd8p1 00000000-0000-0000-0000-000000000nfhd8p1
    fe82 137807 nfhd8p2 00000000-0000-0000-0000-000000000nfhd8p2
    0200 3280 fd0 (driver?)
    0201 3280 fd1 (driver?)
    0300 1059408 hda driver: ide-gd
    0301 921600 hda1 00000000-0000-0000-0000-000000000hda1
    0302 137807 hda2 00000000-0000-0000-0000-000000000hda2
    Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(3,1)

    As pointed out by Kerstin Jonsson , this
    is due to CONFIG_32BIT not being defined, so the initramfs size field is
    done as a 64-bit quad. On little-endian (like x86) this doesn matter,
    but on a big-endian machine the 32-bit reads will see the (zero) high
    bits.

    Only mips, s390, and score set CONFIG_32BIT for 32-bit builds, so fix it for
    all other 32-bit arches by inverting the logic and testing for CONFIG_64BIT,
    which should be defined on all 64-bit arches.

    Signed-off-by: Geert Uytterhoeven
    [ I think we should just make it "u64" on all architectures and get
    rid of the whole #ifdef CONFIG_xxBIT - Linus ]
    Signed-off-by: Linus Torvalds

    Geert Uytterhoeven
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
    isdn: mISDN: socket: fix information leak to userland
    netdev: can: Change mail address of Hans J. Koch
    pcnet_cs: add new_id
    net: Truncate recvfrom and sendto length to INT_MAX.
    RDS: Let rds_message_alloc_sgs() return NULL
    RDS: Copy rds_iovecs into kernel memory instead of rereading from userspace
    RDS: Clean up error handling in rds_cmsg_rdma_args
    RDS: Return -EINVAL if rds_rdma_pages returns an error
    net: fix rds_iovec page count overflow
    can: pch_can: fix section mismatch warning by using a whitelisted name
    can: pch_can: fix sparse warning
    netxen_nic: Fix the tx queue manipulation bug in netxen_nic_probe
    ip_gre: fix fallback tunnel setup
    vmxnet: trivial annotation of protocol constant
    vmxnet3: remove unnecessary byteswapping in BAR writing macros
    ipv6/udp: report SndbufErrors and RcvbufErrors
    phy/marvell: rename 88ec048 to 88e1318s and fix mscr1 addr

    Linus Torvalds
     
  • The NFSv4 server was initializing the dp->dl_flock pointer by the
    somewhat ridiculous method of a locks_copy_lock callback.

    Now that setlease uses the passed-in lock instead of doing a copy,
    dl_flock no longer gets set, resulting in the lock leaking on delegation
    release, and later possible hangs (among other problems).

    So, initialize dl_flock and get rid of the callback.

    Signed-off-by: J. Bruce Fields
    Acked-by: Arnd Bergmann
    Signed-off-by: Linus Torvalds

    J. Bruce Fields
     
  • We modified setlease to require the caller to allocate the new lease in
    the case of creating a new lease, but forgot to fix up the filesystem
    methods.

    Cc: Steven Whitehouse
    Cc: Steve French
    Cc: Trond Myklebust
    Signed-off-by: J. Bruce Fields
    Acked-by: Arnd Bergmann
    Signed-off-by: Linus Torvalds

    J. Bruce Fields
     
  • We're depending on setlease to free the passed-in lease on failure.

    Signed-off-by: J. Bruce Fields
    Acked-by: Arnd Bergmann
    Signed-off-by: Linus Torvalds

    J. Bruce Fields
     
  • Removing a lock shouldn't require any allocations; a failure due to
    ENOMEM leaves the caller with a choice between retrying or giving up and
    leaking an unused lease.

    Next we should split the other lease calls into add and delete cases.
    I wanted to start with just the bugfix.

    Signed-off-by: J. Bruce Fields
    Acked-by: Arnd Bergmann
    Signed-off-by: Linus Torvalds

    J. Bruce Fields
     
  • The input-large-scancode patches changed the binary search in
    drivers/media/IR/ir-keytable.c to use unsigned integers, but
    signed integers are actually necessary for the algorithm to work.

    Signed-off-by: David Härdeman
    Cc: Dmitry Torokhov
    Signed-off-by: Linus Torvalds

    David Härdeman
     
  • Structure mISDN_devinfo is copied to userland with the field "name"
    that has the last elements unitialized. It leads to leaking of
    contents of kernel stack memory.

    Signed-off-by: Vasiliy Kulikov
    Signed-off-by: David S. Miller

    Kulikov Vasiliy