05 Jan, 2009

1 commit

  • On 32bit (and sometimes 64bit) and with big kernel modules like xfs or
    ipv6 the relocation types R_PARISC_PCREL17F and R_PARISC_PCREL22F may
    fail to reach their PLT stub if we only create one big stub array for
    all sections at the beginning of the core or init section.

    With this patch we now instead add individual PLT stub entries
    directly in front of the code sections where the stubs are actually
    called. This reduces the distance between the PCREL location and the
    stub entry so that the relocations can be fulfilled.

    While calculating the final layout of the kernel module in memory, the
    kernel module loader calls arch_mod_section_prepend() to request the
    to be reserved amount of memory in front of each individual section.

    Tested with 32- and 64bit kernels.

    Signed-off-by: Helge Deller
    Signed-off-by: Rusty Russell

    Helge Deller
     

04 Jan, 2009

1 commit

  • …/git/tip/linux-2.6-tip

    * 'cpus4096-for-linus-3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (77 commits)
    x86: setup_per_cpu_areas() cleanup
    cpumask: fix compile error when CONFIG_NR_CPUS is not defined
    cpumask: use alloc_cpumask_var_node where appropriate
    cpumask: convert shared_cpu_map in acpi_processor* structs to cpumask_var_t
    x86: use cpumask_var_t in acpi/boot.c
    x86: cleanup some remaining usages of NR_CPUS where s/b nr_cpu_ids
    sched: put back some stack hog changes that were undone in kernel/sched.c
    x86: enable cpus display of kernel_max and offlined cpus
    ia64: cpumask fix for is_affinity_mask_valid()
    cpumask: convert RCU implementations, fix
    xtensa: define __fls
    mn10300: define __fls
    m32r: define __fls
    h8300: define __fls
    frv: define __fls
    cris: define __fls
    cpumask: CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS
    cpumask: zero extra bits in alloc_cpumask_var_node
    cpumask: replace for_each_cpu_mask_nr with for_each_cpu in kernel/time/
    cpumask: convert mm/
    ...

    Linus Torvalds
     

03 Jan, 2009

1 commit

  • …/git/tip/linux-2.6-tip

    * 'cpus4096-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (66 commits)
    x86: export vector_used_by_percpu_irq
    x86: use logical apicid in x2apic_cluster's x2apic_cpu_mask_to_apicid_and()
    sched: nominate preferred wakeup cpu, fix
    x86: fix lguest used_vectors breakage, -v2
    x86: fix warning in arch/x86/kernel/io_apic.c
    sched: fix warning in kernel/sched.c
    sched: move test_sd_parent() to an SMP section of sched.h
    sched: add SD_BALANCE_NEWIDLE at MC and CPU level for sched_mc>0
    sched: activate active load balancing in new idle cpus
    sched: bias task wakeups to preferred semi-idle packages
    sched: nominate preferred wakeup cpu
    sched: favour lower logical cpu number for sched_mc balance
    sched: framework for sched_mc/smt_power_savings=N
    sched: convert BALANCE_FOR_xx_POWER to inline functions
    x86: use possible_cpus=NUM to extend the possible cpus allowed
    x86: fix cpu_mask_to_apicid_and to include cpu_online_mask
    x86: update io_apic.c to the new cpumask code
    x86: Introduce topology_core_cpumask()/topology_thread_cpumask()
    x86: xen: use smp_call_function_many()
    x86: use work_on_cpu in x86/kernel/cpu/mcheck/mce_amd_64.c
    ...

    Fixed up trivial conflict in kernel/time/tick-sched.c manually

    Linus Torvalds
     

01 Jan, 2009

2 commits


30 Dec, 2008

1 commit


25 Dec, 2008

1 commit


24 Dec, 2008

1 commit

  • flush_tlb_mm's "optimized" uniprocessor case of allocating a new
    context for userspace is exposing a race where we can suddely return
    to a syscall with the protection id and space id out of sync, trapping
    on the next userspace access.

    Debugged-by: James Bottomley
    Tested-by: Helge Deller
    Signed-off-by: Kyle McMartin
    Signed-off-by: Linus Torvalds

    Kyle McMartin
     

13 Dec, 2008

2 commits

  • Impact: change existing irq_chip API

    Not much point with gentle transition here: the struct irq_chip's
    setaffinity method signature needs to change.

    Fortunately, not widely used code, but hits a few architectures.

    Note: In irq_select_affinity() I save a temporary in by mangling
    irq_desc[irq].affinity directly. Ingo, does this break anything?

    (Folded in fix from KOSAKI Motohiro)

    Signed-off-by: Rusty Russell
    Signed-off-by: Mike Travis
    Reviewed-by: Grant Grundler
    Acked-by: Ingo Molnar
    Cc: ralf@linux-mips.org
    Cc: grundler@parisc-linux.org
    Cc: jeremy@xensource.com
    Cc: KOSAKI Motohiro

    Rusty Russell
     
  • Impact: cleanup

    Each SMP arch defines these themselves. Move them to a central
    location.

    Twists:
    1) Some archs (m32, parisc, s390) set possible_map to all 1, so we add a
    CONFIG_INIT_ALL_POSSIBLE for this rather than break them.

    2) mips and sparc32 '#define cpu_possible_map phys_cpu_present_map'.
    Those archs simply have phys_cpu_present_map replaced everywhere.

    3) Alpha defined cpu_possible_map to cpu_present_map; this is tricky
    so I just manipulate them both in sync.

    4) IA64, cris and m32r have gratuitous 'extern cpumask_t cpu_possible_map'
    declarations.

    Signed-off-by: Rusty Russell
    Reviewed-by: Grant Grundler
    Tested-by: Tony Luck
    Acked-by: Ingo Molnar
    Cc: Mike Travis
    Cc: ink@jurassic.park.msu.ru
    Cc: rmk@arm.linux.org.uk
    Cc: starvik@axis.com
    Cc: tony.luck@intel.com
    Cc: takata@linux-m32r.org
    Cc: ralf@linux-mips.org
    Cc: grundler@parisc-linux.org
    Cc: paulus@samba.org
    Cc: schwidefsky@de.ibm.com
    Cc: lethal@linux-sh.org
    Cc: wli@holomorphy.com
    Cc: davem@davemloft.net
    Cc: jdike@addtoit.com
    Cc: mingo@redhat.com

    Rusty Russell
     

04 Dec, 2008

1 commit


01 Dec, 2008

2 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6:
    parisc: struct device - replace bus_id with dev_name(), dev_set_name()
    parisc: fix kernel crash when unwinding a userspace process
    parisc: __kernel_time_t is always long

    Linus Torvalds
     
  • All architectures now use the generic compat_sys_ptrace, as should every
    new architecture that needs 32bit compat (if we'll ever get another).

    Remove the now superflous __ARCH_WANT_COMPAT_SYS_PTRACE define, and also
    kill a comment about __ARCH_SYS_PTRACE that was added after
    __ARCH_SYS_PTRACE was already gone.

    Signed-off-by: Christoph Hellwig
    Acked-by: David S. Miller
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     

27 Nov, 2008

3 commits

  • (I did not compile or test it, please let me know, or help fixing
    it, if something is wrong with the conversion)

    This patch is part of a larger patch series which will remove
    the "char bus_id[20]" name string from struct device. The device
    name is managed in the kobject anyway, and without any size
    limitation, and just needlessly copied into "struct device".

    To set and read the device name dev_name(dev) and dev_set_name(dev)
    must be used. If your code uses static kobjects, which it shouldn't
    do, "const char *init_name" can be used to statically provide the
    name the registered device should have. At registration time, the
    init_name field is cleared, to enforce the use of dev_name(dev) to
    access the device name at a later time.

    We need to get rid of all occurrences of bus_id in the entire tree
    to be able to enable the new interface. Please apply this patch,
    and possibly convert any remaining remaining occurrences of bus_id.

    We want to submit a patch to -next, which will remove bus_id from
    "struct device", to find the remaining pieces to convert, and finally
    switch over to the new api, which will remove the 20 bytes array
    and does no longer have a size limitation.

    Thanks,
    Kay

    Cc: Matthew Wilcox
    Cc: linux-parisc@vger.kernel.org
    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Kay Sievers
    Signed-off-by: Kyle McMartin

    Kay Sievers
     
  • Any user on existing parisc 32- and 64bit-kernels can easily crash
    the kernel and as such enforce a DSO.
    A simple testcase is available here:
    http://gsyprf10.external.hp.com/~deller/crash.tgz

    The problem is introduced by the fact, that the handle_interruption()
    crash handler calls the show_regs() function, which in turn tries to
    unwind the stack by calling parisc_show_stack(). Since the stack contains
    userspace addresses, a try to unwind the stack is dangerous and useless
    and leads to the crash.

    The fix is trivial: For userspace processes
    a) avoid to unwind the stack, and
    b) avoid to resolve userspace addresses to kernel symbol names.

    While touching this code, I converted print_symbol() to %pS
    printk formats and made parisc_show_stack() static.

    An initial patch for this was written by Kyle McMartin back in August:
    http://marc.info/?l=linux-parisc&m=121805168830283&w=2

    Compile and run-tested with a 64bit parisc kernel.

    Signed-off-by: Helge Deller
    Cc: Grant Grundler
    Cc: Matthew Wilcox
    Cc: [2.6.25.x, 2.6.26.x, 2.6.27.x, earlier...]
    Signed-off-by: Andrew Morton
    Signed-off-by: Kyle McMartin

    Helge Deller
     
  • __kernel_time_t is always long on PA-RISC, irrespective of CONFIG_64BIT,
    hence move it out of the #ifdef CONFIG_64BIT / #else / #endif block.

    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Kyle McMartin

    Geert Uytterhoeven
     

21 Nov, 2008

1 commit

  • Commit 81e192d6ce303b6792aa38ff35f41a1a7357f23a ("parisc: convert to
    generic compat_sys_ptrace") introduced a bug which segfaults the parisc
    64bit kernel when stracing 32bit applications:

    Kernel Fault: Code=15 regs=00000000bafa42b0 (Addr=00000001baf5ab57)
    YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI
    PSW: 00001000000001101111111100001011 Tainted: G W
    r00-03 000000ff0806ff0b 000000004068edc0 00000000401203f8 00000000fb3e2508
    r04-07 0000000040686dc0 00000000baf5a800 fffffffffffffffc fffffffffb3e2508
    r08-11 00000000baf5a800 000000000004b068 00000000000402b0 0000000000040d68
    r12-15 0000000000042a9c 0000000000040a9c 0000000000040d60 0000000000042e9c
    r16-19 000000000004b060 000000000004b058 0000000000042d9c ffffffffffffffff
    r20-23 000000000800000b 0000000000000000 000000000800000b fffffffffb3e2508
    r24-27 00000000fffffffc 0000000000000003 00000000fffffffc 0000000040686dc0
    r28-31 00000001baf5a7ff 00000000bafa4280 00000000bafa42b0 00000000000001d7
    sr00-03 0000000000fca000 0000000000000000 0000000000000000 0000000000fca000
    sr04-07 0000000000000000 0000000000000000 0000000000000000 0000000000000000

    IASQ: 0000000000000000 0000000000000000 IAOQ: 0000000040120400 0000000040120404
    IIR: 4b9a06b0 ISR: 0000000000000000 IOR: 00000001baf5ab57
    CPU: 0 CR30: 00000000bafa4000 CR31: 00000000d22344e0
    ORIG_R28: 00000000fb3e2248
    IAOQ[0]: compat_arch_ptrace+0xb8/0x160
    IAOQ[1]: compat_arch_ptrace+0xbc/0x160
    RP(r2): compat_arch_ptrace+0xb0/0x160
    Backtrace:
    [] compat_sys_ptrace+0x15c/0x180
    [] syscall_exit+0x0/0x14

    The problem is that compat_arch_ptrace() enters with an addr value of
    type compat_ulong_t and calls translate_usr_offset() to translate the
    address offset into a struct pt_regs offset like this:

    addr = translate_usr_offset(addr)

    this means that any return value of translate_usr_offset() is stored
    back as compat_ulong_t type into the addr variable.

    But since translate_usr_offset() returns -1 for invalid offsets, addr
    can now get the value 0xffffffff which then fails the next return-value
    sanity check and thus the kernel tries to access invalid memory:

    if (addr < 0)
    break;

    Fix this bug by modifying translate_usr_offset() to take and return
    values of type compat_ulong_t, and by returning the value
    "sizeof(struct pt_regs)" as an error indicator.

    Additionally change the sanity check to check for return values
    for >= sizeof(struct pt_regs).

    This patch survived my compile and run-tests.

    Signed-off-by: Helge Deller
    Signed-off-by: Linus Torvalds

    Helge Deller
     

14 Nov, 2008

3 commits

  • Conflicts:
    security/keys/internal.h
    security/keys/process_keys.c
    security/keys/request_key.c

    Fixed conflicts above by using the non 'tsk' versions.

    Signed-off-by: James Morris

    James Morris
     
  • Wrap access to task credentials so that they can be separated more easily from
    the task_struct during the introduction of COW creds.

    Change most current->(|e|s|fs)[ug]id to current_(|e|s|fs)[ug]id().

    Change some task->e?[ug]id to task_e?[ug]id(). In some places it makes more
    sense to use RCU directly rather than a convenient wrapper; these will be
    addressed by later patches.

    Signed-off-by: David Howells
    Reviewed-by: James Morris
    Acked-by: Serge Hallyn
    Acked-by: Kyle McMartin
    Cc: Matthew Wilcox
    Cc: Grant Grundler
    Cc: linux-parisc@vger.kernel.org
    Signed-off-by: James Morris

    David Howells
     
  • Commit 2d3854a37e8b767a51aba38ed6d22817b0631e33 ("cpumask: introduce new
    API, without changing anything") introduced a build breakage on parisc.

    This trivial patch fixes it.

    Signed-off-by: Helge Deller
    Cc: Rusty Russell
    Cc: Andrew Morton
    Cc: Kyle Mc Martin
    Signed-off-by: Linus Torvalds

    Helge Deller
     

24 Oct, 2008

2 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (46 commits)
    [PATCH] fs: add a sanity check in d_free
    [PATCH] i_version: remount support
    [patch] vfs: make security_inode_setattr() calling consistent
    [patch 1/3] FS_MBCACHE: don't needlessly make it built-in
    [PATCH] move executable checking into ->permission()
    [PATCH] fs/dcache.c: update comment of d_validate()
    [RFC PATCH] touch_mnt_namespace when the mount flags change
    [PATCH] reiserfs: add missing llseek method
    [PATCH] fix ->llseek for more directories
    [PATCH vfs-2.6 6/6] vfs: add LOOKUP_RENAME_TARGET intent
    [PATCH vfs-2.6 5/6] vfs: remove LOOKUP_PARENT from non LOOKUP_PARENT lookup
    [PATCH vfs-2.6 4/6] vfs: remove unnecessary fsnotify_d_instantiate()
    [PATCH vfs-2.6 3/6] vfs: add __d_instantiate() helper
    [PATCH vfs-2.6 2/6] vfs: add d_ancestor()
    [PATCH vfs-2.6 1/6] vfs: replace parent == dentry->d_parent by IS_ROOT()
    [PATCH] get rid of on-stack dentry in udf
    [PATCH 2/2] anondev: switch to IDA
    [PATCH 1/2] anondev: init IDR statically
    [JFFS2] Use d_splice_alias() not d_add() in jffs2_lookup()
    [PATCH] Optimise NFS readdir hack slightly.
    ...

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile: (21 commits)
    OProfile: Fix buffer synchronization for IBS
    oprofile: hotplug cpu fix
    oprofile: fixing whitespaces in arch/x86/oprofile/*
    oprofile: fixing whitespaces in arch/x86/oprofile/*
    oprofile: fixing whitespaces in drivers/oprofile/*
    x86/oprofile: add the logic for enabling additional IBS bits
    x86/oprofile: reordering functions in nmi_int.c
    x86/oprofile: removing unused function parameter in add_ibs_begin()
    oprofile: more whitespace fixes
    oprofile: whitespace fixes
    OProfile: Rename IBS sysfs dir into "ibs_op"
    OProfile: Rework string handling in setup_ibs_files()
    OProfile: Rework oprofile_add_ibs_sample() function
    oprofile: discover counters for op ppro too
    oprofile: Implement Intel architectural perfmon support
    oprofile: Don't report Nehalem as core_2
    oprofile: drop const in num counters field
    Revert "Oprofile Multiplexing Patch"
    x86, oprofile: BUG: using smp_processor_id() in preemptible code
    x86/oprofile: fix on_each_cpu build error
    ...

    Manually fixed trivial conflicts in
    drivers/oprofile/{cpu_buffer.c,event_buffer.h}

    Linus Torvalds
     

23 Oct, 2008

1 commit


21 Oct, 2008

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6:
    parisc: convert to generic compat_sys_ptrace
    parisc: add rtc platform driver
    parisc: initialize unwinder much earlier
    parisc: add new syscalls
    parisc: hijack jump to start_kernel
    parisc: add pdc_coproc_cfg_unlocked and set_firmware_width_unlocked
    parisc: move include/asm-parisc to arch/parisc/include/asm
    parisc: move pdc_result to real2.S
    parisc: unify CCIO_COLLECT_STATS implementation
    parisc: add arch/parisc/kernel/.gitignore
    parisc: ropes.h - fix ->
    parisc: parisc-agp - fix ->

    Resolve remove/rename conflict: include/asm-parisc/a.out.h is no longer
    relevant.

    Linus Torvalds
     

20 Oct, 2008

1 commit

  • This patch implements a new freezer subsystem in the control groups
    framework. It provides a way to stop and resume execution of all tasks in
    a cgroup by writing in the cgroup filesystem.

    The freezer subsystem in the container filesystem defines a file named
    freezer.state. Writing "FROZEN" to the state file will freeze all tasks
    in the cgroup. Subsequently writing "RUNNING" will unfreeze the tasks in
    the cgroup. Reading will return the current state.

    * Examples of usage :

    # mkdir /containers/freezer
    # mount -t cgroup -ofreezer freezer /containers
    # mkdir /containers/0
    # echo $some_pid > /containers/0/tasks

    to get status of the freezer subsystem :

    # cat /containers/0/freezer.state
    RUNNING

    to freeze all tasks in the container :

    # echo FROZEN > /containers/0/freezer.state
    # cat /containers/0/freezer.state
    FREEZING
    # cat /containers/0/freezer.state
    FROZEN

    to unfreeze all tasks in the container :

    # echo RUNNING > /containers/0/freezer.state
    # cat /containers/0/freezer.state
    RUNNING

    This is the basic mechanism which should do the right thing for user space
    task in a simple scenario.

    It's important to note that freezing can be incomplete. In that case we
    return EBUSY. This means that some tasks in the cgroup are busy doing
    something that prevents us from completely freezing the cgroup at this
    time. After EBUSY, the cgroup will remain partially frozen -- reflected
    by freezer.state reporting "FREEZING" when read. The state will remain
    "FREEZING" until one of these things happens:

    1) Userspace cancels the freezing operation by writing "RUNNING" to
    the freezer.state file
    2) Userspace retries the freezing operation by writing "FROZEN" to
    the freezer.state file (writing "FREEZING" is not legal
    and returns EIO)
    3) The tasks that blocked the cgroup from entering the "FROZEN"
    state disappear from the cgroup's set of tasks.

    [akpm@linux-foundation.org: coding-style fixes]
    [akpm@linux-foundation.org: export thaw_process]
    Signed-off-by: Cedric Le Goater
    Signed-off-by: Matt Helsley
    Acked-by: Serge E. Hallyn
    Tested-by: Matt Helsley
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matt Helsley
     

18 Oct, 2008

1 commit


17 Oct, 2008

3 commits

  • * 'personality' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
    [PATCH] remove unused ibcs2/PER_SVR4 in SET_PERSONALITY

    Linus Torvalds
     
  • Nothing arch specific in get/settimeofday. The details of the timeval
    conversion varied a little from arch to arch, but all with the same
    results.

    Also add an extern declaration for sys_tz to linux/time.h because externs
    in .c files are fowned upon. I'll kill the externs in various other files
    in a sparate patch.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Christoph Hellwig
    Acked-by: David S. Miller [ sparc bits ]
    Cc: "Luck, Tony"
    Cc: Ralf Baechle
    Acked-by: Kyle McMartin
    Cc: Matthew Wilcox
    Cc: Grant Grundler
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     
  • struct stat / compat_stat is the same on all architectures, so
    cp_compat_stat should be, too.

    Turns out it is, except that various architectures have slightly and some
    high2lowuid/high2lowgid or the direct assignment instead of the
    SET_UID/SET_GID that expands to the correct one anyway.

    This patch replaces the arch-specific cp_compat_stat implementations with
    a common one based on the x86-64 one.

    Signed-off-by: Christoph Hellwig
    Acked-by: David S. Miller [ sparc bits ]
    Acked-by: Kyle McMartin [ parisc bits ]
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     

16 Oct, 2008

2 commits


14 Oct, 2008

1 commit


11 Oct, 2008

8 commits