26 May, 2010

1 commit

  • The commit 00b7c3395aec3df43de5bd02a3c5a099ca51169f
    "sysctl: refactor integer handling proc code"
    modified the behaviour of writing to /proc.
    Before the commit, write("1\n") to /proc/sys/kernel/printk succeeded. But
    now it returns EINVAL.

    This commit supports writing a single value to a multi-valued entry.

    Signed-off-by: J. R. Okajima
    Reviewed-and-tested-by: WANG Cong
    Signed-off-by: David S. Miller

    J. R. Okajima
     

21 May, 2010

2 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1674 commits)
    qlcnic: adding co maintainer
    ixgbe: add support for active DA cables
    ixgbe: dcb, do not tag tc_prio_control frames
    ixgbe: fix ixgbe_tx_is_paused logic
    ixgbe: always enable vlan strip/insert when DCB is enabled
    ixgbe: remove some redundant code in setting FCoE FIP filter
    ixgbe: fix wrong offset to fc_frame_header in ixgbe_fcoe_ddp
    ixgbe: fix header len when unsplit packet overflows to data buffer
    ipv6: Never schedule DAD timer on dead address
    ipv6: Use POSTDAD state
    ipv6: Use state_lock to protect ifa state
    ipv6: Replace inet6_ifaddr->dead with state
    cxgb4: notify upper drivers if the device is already up when they load
    cxgb4: keep interrupts available when the ports are brought down
    cxgb4: fix initial addition of MAC address
    cnic: Return SPQ credit to bnx2x after ring setup and shutdown.
    cnic: Convert cnic_local_flags to atomic ops.
    can: Fix SJA1000 command register writes on SMP systems
    bridge: fix build for CONFIG_SYSFS disabled
    ARCNET: Limit com20020 PCI ID matches for SOHARD cards
    ...

    Fix up various conflicts with pcmcia tree drivers/net/
    {pcmcia/3c589_cs.c, wireless/orinoco/orinoco_cs.c and
    wireless/orinoco/spectrum_cs.c} and feature removal
    (Documentation/feature-removal-schedule.txt).

    Also fix a non-content conflict due to pm_qos_requirement getting
    renamed in the PM tree (now pm_qos_request) in net/mac80211/scan.c

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (40 commits)
    Input: psmouse - small formatting changes to better follow coding style
    Input: synaptics - set dimensions as reported by firmware
    Input: elantech - relax signature checks
    Input: elantech - enforce common prefix on messages
    Input: wistron_btns - switch to using kmemdup()
    Input: usbtouchscreen - switch to using kmemdup()
    Input: do not force selecting i8042 on Moorestown
    Input: Documentation/sysrq.txt - update KEY_SYSRQ info
    Input: 88pm860x_onkey - remove invalid irq number assignment
    Input: i8042 - add a PNP entry to the aux device list
    Input: i8042 - add some extra PNP keyboard types
    Input: wm9712 - fix wm97xx_set_gpio() logic
    Input: add keypad driver for keys interfaced to TCA6416
    Input: remove obsolete {corgi,spitz,tosa}kbd.c
    Input: kbtab - do not advertise unsupported events
    Input: kbtab - simplify kbtab_disconnect()
    Input: kbtab - fix incorrect size parameter in usb_buffer_free
    Input: acecad - don't advertise mouse events
    Input: acecad - fix some formatting issues
    Input: acecad - simplify usb_acecad_disconnect()
    ...

    Trivial conflict in Documentation/feature-removal-schedule.txt

    Linus Torvalds
     

17 May, 2010

1 commit

  • The exception-trace facility on x86 and other architectures prints
    traces to dmesg whenever a user space application crashes.
    s390 has such a feature since ages however it is called
    userprocess_debug and is enabled differently.
    This patch makes sure that whenever one of the two procfs files

    /proc/sys/kernel/userprocess_debug
    /proc/sys/debug/exception-trace

    is modified the contents of the second one changes as well.
    That way we keep backwards compatibilty but also support the same
    interface like other architectures do.
    Besides that the output of the traces is improved since it will now
    also contain the corresponding filename of the vma (when available)
    where the process caused a fault or trap.

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     

16 May, 2010

2 commits

  • The new function can be used to read/write large bitmaps via /proc. A
    comma separated range format is used for compact output and input
    (e.g. 1,3-4,10-10).

    Writing into the file will first reset the bitmap then update it
    based on the given input.

    Signed-off-by: Octavian Purdila
    Signed-off-by: WANG Cong
    Cc: Eric W. Biederman
    Signed-off-by: David S. Miller

    Octavian Purdila
     
  • (Based on Octavian's work, and I modified a lot.)

    As we are about to add another integer handling proc function a little
    bit of cleanup is in order: add a few helper functions to improve code
    readability and decrease code duplication.

    In the process a bug is also fixed: if the user specifies a number
    with more then 20 digits it will be interpreted as two integers
    (e.g. 10000...13 will be interpreted as 100.... and 13).

    Behavior for EFAULT handling was changed as well. Previous to this
    patch, when an EFAULT error occurred in the middle of a write
    operation, although some of the elements were set, that was not
    acknowledged to the user (by shorting the write and returning the
    number of bytes accepted). EFAULT is now treated just like any other
    errors by acknowledging the amount of bytes accepted.

    Signed-off-by: Octavian Purdila
    Signed-off-by: WANG Cong
    Cc: Eric W. Biederman
    Signed-off-by: David S. Miller

    Amerigo Wang
     

14 Apr, 2010

1 commit

  • Instead of keeping SysRq support inside of legacy keyboard driver split
    it out into a separate input handler (filter). This stops most SysRq input
    events from leaking into evdev clients (some events, such as first SysRq
    scancode - not keycode - event, are still leaked into both legacy keyboard
    and evdev).

    [martinez.javier@gmail.com: fix compile error when CONFIG_MAGIC_SYSRQ is
    not defined]
    Signed-off-by: Dmitry Torokhov

    Dmitry Torokhov
     

13 Mar, 2010

8 commits

  • Extern declarations in sysctl.c should be moved to their own header file,
    and then include them in relavant .c files.

    Move lockdep extern declarations to linux/lockdep.h

    Signed-off-by: Dave Young
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Young
     
  • Extern declarations in sysctl.c should be moved to their own header file,
    and then include them in relavant .c files.

    Move max_lock_depth extern declaration to linux/rtmutex.h

    Signed-off-by: Dave Young
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Young
     
  • Extern declarations in sysctl.c should be moved to their own header file,
    and then include them in relavant .c files.

    Move acct_parm extern declaration to linux/acct.h

    Signed-off-by: Dave Young
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Young
     
  • Extern declarations in sysctl.c should be moved to their own header file,
    and then include them in relavant .c files.

    Move sg_big_buff extern declaration to scsi/sg.h

    Signed-off-by: Dave Young
    Acked-by: Doug Gilbert
    Cc: James Bottomley
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Young
     
  • Extern declarations in sysctl.c should be moved to their own header file,
    and then include them in relavant .c files.

    Move modprobe_path extern declaration to linux/kmod.h
    Move modules_disabled extern declaration to linux/module.h

    Signed-off-by: Dave Young
    Cc: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Young
     
  • Extern declarations in sysctl.c should be moved to their own header file,
    and then include them in relavant .c files.

    Move rcutorture_runnable extern declaration to linux/rcupdate.h

    Signed-off-by: Dave Young
    Acked-by: Josh Triplett
    Reviewed-by: "Paul E. McKenney"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Young
     
  • Extern declarations in sysctl.c should be moved to their own header file,
    and then include them in relavant .c files.

    Move print_fatal_signals extern declaration to linux/signal.h

    Signed-off-by: Dave Young
    Cc: Oleg Nesterov
    Cc: Roland McGrath
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Young
     
  • Extern declarations in sysctl.c should be moved to their own header file,
    and then include them in relavant .c files.

    Move C_A_D extern variable declaration to linux/reboot.h

    Signed-off-by: Dave Young
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Young
     

06 Mar, 2010

1 commit

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

    * 'perf-probes-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86: Issue at least one memory barrier in stop_machine_text_poke()
    perf probe: Correct probe syntax on command line help
    perf probe: Add lazy line matching support
    perf probe: Show more lines after last line
    perf probe: Check function address range strictly in line finder
    perf probe: Use libdw callback routines
    perf probe: Use elfutils-libdw for analyzing debuginfo
    perf probe: Rename probe finder functions
    perf probe: Fix bugs in line range finder
    perf probe: Update perf probe document
    perf probe: Do not show --line option without dwarf support
    kprobes: Add documents of jump optimization
    kprobes/x86: Support kprobes jump optimization on x86
    x86: Add text_poke_smp for SMP cross modifying code
    kprobes/x86: Cleanup save/restore registers
    kprobes/x86: Boost probes when reentering
    kprobes: Jump optimization sysctl interface
    kprobes: Introduce kprobes jump optimization
    kprobes: Introduce generic insn_slot framework
    kprobes/x86: Cleanup RELATIVEJUMP_INSTRUCTION to RELATIVEJUMP_OPCODE

    Linus Torvalds
     

01 Mar, 2010

1 commit


26 Feb, 2010

1 commit

  • Add /proc/sys/debug/kprobes-optimization sysctl which enables
    and disables kprobes jump optimization on the fly for debugging.

    Changes in v7:
    - Remove ctl_name = CTL_UNNUMBERED for upstream compatibility.

    Changes in v6:
    - Update comments and coding style.

    Signed-off-by: Masami Hiramatsu
    Cc: systemtap
    Cc: DLE
    Cc: Ananth N Mavinakayanahalli
    Cc: Jim Keniston
    Cc: Srikar Dronamraju
    Cc: Christoph Hellwig
    Cc: Steven Rostedt
    Cc: Frederic Weisbecker
    Cc: Anders Kaseorg
    Cc: Tim Abbott
    Cc: Andi Kleen
    Cc: Jason Baron
    Cc: Mathieu Desnoyers
    Cc: Frederic Weisbecker
    Cc: Ananth N Mavinakayanahalli
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Masami Hiramatsu
     

18 Dec, 2009

2 commits


17 Dec, 2009

1 commit

  • In NOMMU mode clamp dac_mmap_min_addr to zero to cause the tests on it to be
    skipped by the compiler. We do this as the minimum mmap address doesn't make
    any sense in NOMMU mode.

    mmap_min_addr and round_hint_to_min() can be discarded entirely in NOMMU mode.

    Signed-off-by: David Howells
    Acked-by: Eric Paris
    Signed-off-by: James Morris

    David Howells
     

16 Dec, 2009

2 commits

  • Jan Engelhardt reported we have this problem:

    setting max_map_count to a value large enough results in programs dying at
    first try. This is on 2.6.31.6:

    15:59 borg:/proc/sys/vm # echo $[1<max_map_count
    15:59 borg:/proc/sys/vm # cat max_map_count
    1073741824
    15:59 borg:/proc/sys/vm # echo $[1<max_map_count
    15:59 borg:/proc/sys/vm # cat max_map_count
    Killed

    This is because we have a chance to make 'max_map_count' negative. but
    it's meaningless. Make it only accept non-negative values.

    Reported-by: Jan Engelhardt
    Signed-off-by: WANG Cong
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: James Morris
    Cc: Alexey Dobriyan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Amerigo Wang
     
  • This patch derives a "nodes_allowed" node mask from the numa mempolicy of
    the task modifying the number of persistent huge pages to control the
    allocation, freeing and adjusting of surplus huge pages when the pool page
    count is modified via the new sysctl or sysfs attribute
    "nr_hugepages_mempolicy". The nodes_allowed mask is derived as follows:

    * For "default" [NULL] task mempolicy, a NULL nodemask_t pointer
    is produced. This will cause the hugetlb subsystem to use
    node_online_map as the "nodes_allowed". This preserves the
    behavior before this patch.
    * For "preferred" mempolicy, including explicit local allocation,
    a nodemask with the single preferred node will be produced.
    "local" policy will NOT track any internode migrations of the
    task adjusting nr_hugepages.
    * For "bind" and "interleave" policy, the mempolicy's nodemask
    will be used.
    * Other than to inform the construction of the nodes_allowed node
    mask, the actual mempolicy mode is ignored. That is, all modes
    behave like interleave over the resulting nodes_allowed mask
    with no "fallback".

    See the updated documentation [next patch] for more information
    about the implications of this patch.

    Examples:

    Starting with:

    Node 0 HugePages_Total: 0
    Node 1 HugePages_Total: 0
    Node 2 HugePages_Total: 0
    Node 3 HugePages_Total: 0

    Default behavior [with or without this patch] balances persistent
    hugepage allocation across nodes [with sufficient contiguous memory]:

    sysctl vm.nr_hugepages[_mempolicy]=32

    yields:

    Node 0 HugePages_Total: 8
    Node 1 HugePages_Total: 8
    Node 2 HugePages_Total: 8
    Node 3 HugePages_Total: 8

    Of course, we only have nr_hugepages_mempolicy with the patch,
    but with default mempolicy, nr_hugepages_mempolicy behaves the
    same as nr_hugepages.

    Applying mempolicy--e.g., with numactl [using '-m' a.k.a.
    '--membind' because it allows multiple nodes to be specified
    and it's easy to type]--we can allocate huge pages on
    individual nodes or sets of nodes. So, starting from the
    condition above, with 8 huge pages per node, add 8 more to
    node 2 using:

    numactl -m 2 sysctl vm.nr_hugepages_mempolicy=40

    This yields:

    Node 0 HugePages_Total: 8
    Node 1 HugePages_Total: 8
    Node 2 HugePages_Total: 16
    Node 3 HugePages_Total: 8

    The incremental 8 huge pages were restricted to node 2 by the
    specified mempolicy.

    Similarly, we can use mempolicy to free persistent huge pages
    from specified nodes:

    numactl -m 0,1 sysctl vm.nr_hugepages_mempolicy=32

    yields:

    Node 0 HugePages_Total: 4
    Node 1 HugePages_Total: 4
    Node 2 HugePages_Total: 16
    Node 3 HugePages_Total: 8

    The 8 huge pages freed were balanced over nodes 0 and 1.

    [rientjes@google.com: accomodate reworked NODEMASK_ALLOC]
    Signed-off-by: David Rientjes
    Signed-off-by: Lee Schermerhorn
    Acked-by: Mel Gorman
    Reviewed-by: Andi Kleen
    Cc: KAMEZAWA Hiroyuki
    Cc: Randy Dunlap
    Cc: Nishanth Aravamudan
    Cc: Adam Litke
    Cc: Andy Whitcroft
    Cc: Eric Whitney
    Cc: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Lee Schermerhorn
     

13 Dec, 2009

1 commit

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

    * 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (21 commits)
    sched: Remove forced2_migrations stats
    sched: Fix memory leak in two error corner cases
    sched: Fix build warning in get_update_sysctl_factor()
    sched: Update normalized values on user updates via proc
    sched: Make tunable scaling style configurable
    sched: Fix missing sched tunable recalculation on cpu add/remove
    sched: Fix task priority bug
    sched: cgroup: Implement different treatment for idle shares
    sched: Remove unnecessary RCU exclusion
    sched: Discard some old bits
    sched: Clean up check_preempt_wakeup()
    sched: Move update_curr() in check_preempt_wakeup() to avoid redundant call
    sched: Sanitize fork() handling
    sched: Clean up ttwu() rq locking
    sched: Remove rq->clock coupling from set_task_cpu()
    sched: Consolidate select_task_rq() callers
    sched: Remove sysctl.sched_features
    sched: Protect sched_rr_get_param() access to task->sched_class
    sched: Protect task->cpus_allowed access in sched_getaffinity()
    sched: Fix balance vs hotplug race
    ...

    Fixed up conflicts in kernel/sysctl.c (due to sysctl cleanup)

    Linus Torvalds
     

09 Dec, 2009

3 commits

  • The normalized values are also recalculated in case the scaling factor
    changes.

    This patch updates the internally used scheduler tuning values that are
    normalized to one cpu in case a user sets new values via sysfs.

    Together with patch 2 of this series this allows to let user configured
    values scale (or not) to cpu add/remove events taking place later.

    Signed-off-by: Christian Ehrhardt
    Signed-off-by: Peter Zijlstra
    LKML-Reference:
    [ v2: fix warning ]
    Signed-off-by: Ingo Molnar

    Christian Ehrhardt
     
  • As scaling now takes place on all kind of cpu add/remove events a user
    that configures values via proc should be able to configure if his set
    values are still rescaled or kept whatever happens.

    As the comments state that log2 was just a second guess that worked the
    interface is not just designed for on/off, but to choose a scaling type.
    Currently this allows none, log and linear, but more important it allwos
    us to keep the interface even if someone has an even better idea how to
    scale the values.

    Signed-off-by: Christian Ehrhardt
    Signed-off-by: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Christian Ehrhardt
     
  • Since we've had a much saner debugfs interface to this, remove the
    sysctl one.

    Signed-off-by: Peter Zijlstra
    LKML-Reference:
    [ v2: build fix ]
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

08 Dec, 2009

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/sysctl-2.6: (43 commits)
    security/tomoyo: Remove now unnecessary handling of security_sysctl.
    security/tomoyo: Add a special case to handle accesses through the internal proc mount.
    sysctl: Drop & in front of every proc_handler.
    sysctl: Remove CTL_NONE and CTL_UNNUMBERED
    sysctl: kill dead ctl_handler definitions.
    sysctl: Remove the last of the generic binary sysctl support
    sysctl net: Remove unused binary sysctl code
    sysctl security/tomoyo: Don't look at ctl_name
    sysctl arm: Remove binary sysctl support
    sysctl x86: Remove dead binary sysctl support
    sysctl sh: Remove dead binary sysctl support
    sysctl powerpc: Remove dead binary sysctl support
    sysctl ia64: Remove dead binary sysctl support
    sysctl s390: Remove dead sysctl binary support
    sysctl frv: Remove dead binary sysctl support
    sysctl mips/lasat: Remove dead binary sysctl support
    sysctl drivers: Remove dead binary sysctl support
    sysctl crypto: Remove dead binary sysctl support
    sysctl security/keys: Remove dead binary sysctl support
    sysctl kernel: Remove binary sysctl logic
    ...

    Linus Torvalds
     

06 Dec, 2009

1 commit


19 Nov, 2009

1 commit


12 Nov, 2009

1 commit


11 Nov, 2009

3 commits


06 Nov, 2009

1 commit


24 Sep, 2009

4 commits

  • * 'hwpoison' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-mce-2.6: (21 commits)
    HWPOISON: Enable error_remove_page on btrfs
    HWPOISON: Add simple debugfs interface to inject hwpoison on arbitary PFNs
    HWPOISON: Add madvise() based injector for hardware poisoned pages v4
    HWPOISON: Enable error_remove_page for NFS
    HWPOISON: Enable .remove_error_page for migration aware file systems
    HWPOISON: The high level memory error handler in the VM v7
    HWPOISON: Add PR_MCE_KILL prctl to control early kill behaviour per process
    HWPOISON: shmem: call set_page_dirty() with locked page
    HWPOISON: Define a new error_remove_page address space op for async truncation
    HWPOISON: Add invalidate_inode_page
    HWPOISON: Refactor truncate to allow direct truncating of page v2
    HWPOISON: check and isolate corrupted free pages v2
    HWPOISON: Handle hardware poisoned pages in try_to_unmap
    HWPOISON: Use bitmask/action code for try_to_unmap behaviour
    HWPOISON: x86: Add VM_FAULT_HWPOISON handling to x86 page fault handler v2
    HWPOISON: Add poison check to page fault handling
    HWPOISON: Add basic support for poisoned pages in fault handler v3
    HWPOISON: Add new SIGBUS error codes for hardware poison signals
    HWPOISON: Add support for poison swap entries v2
    HWPOISON: Export some rmap vma locking to outside world
    ...

    Linus Torvalds
     
  • It's unused.

    It isn't needed -- read or write flag is already passed and sysctl
    shouldn't care about the rest.

    It _was_ used in two places at arch/frv for some reason.

    Signed-off-by: Alexey Dobriyan
    Cc: David Howells
    Cc: "Eric W. Biederman"
    Cc: Al Viro
    Cc: Ralf Baechle
    Cc: Martin Schwidefsky
    Cc: Ingo Molnar
    Cc: "David S. Miller"
    Cc: James Morris
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • Introduce core pipe limiting sysctl.

    Since we can dump cores to pipe, rather than directly to the filesystem,
    we create a condition in which a user can create a very high load on the
    system simply by running bad applications.

    If the pipe reader specified in core_pattern is poorly written, we can
    have lots of ourstandig resources and processes in the system.

    This sysctl introduces an ability to limit that resource consumption.
    core_pipe_limit defines how many in-flight dumps may be run in parallel,
    dumps beyond this value are skipped and a note is made in the kernel log.
    A special value of 0 in core_pipe_limit denotes unlimited core dumps may
    be handled (this is the default value).

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Neil Horman
    Reported-by: Earl Chew
    Cc: Oleg Nesterov
    Cc: Andi Kleen
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Neil Horman
     
  • * remove asm/atomic.h inclusion from linux/utsname.h --
    not needed after kref conversion
    * remove linux/utsname.h inclusion from files which do not need it

    NOTE: it looks like fs/binfmt_elf.c do not need utsname.h, however
    due to some personality stuff it _is_ needed -- cowardly leave ELF-related
    headers and files alone.

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

23 Sep, 2009

1 commit

  • When syslog is not possible, at the same time there's no serial/net
    console available, it will be hard to read the printk messages. For
    example oops/panic/warning messages in shutdown phase.

    Add a printk delay feature, we can make each printk message delay some
    milliseconds.

    Setting the delay by proc/sysctl interface: /proc/sys/kernel/printk_delay

    The value range from 0 - 10000, default value is 0

    [akpm@linux-foundation.org: fix a few things]
    Signed-off-by: Dave Young
    Acked-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Young