09 Feb, 2014

1 commit


06 Feb, 2014

1 commit

  • This changes 'do_execve()' to get the executable name as a 'struct
    filename', and to free it when it is done. This is what the normal
    users want, and it simplifies and streamlines their error handling.

    The controlled lifetime of the executable name also fixes a
    use-after-free problem with the trace_sched_process_exec tracepoint: the
    lifetime of the passed-in string for kernel users was not at all
    obvious, and the user-mode helper code used UMH_WAIT_EXEC to serialize
    the pathname allocation lifetime with the execve() having finished,
    which in turn meant that the trace point that happened after
    mm_release() of the old process VM ended up using already free'd memory.

    To solve the kernel string lifetime issue, this simply introduces
    "getname_kernel()" that works like the normal user-space getname()
    function, except with the source coming from kernel memory.

    As Oleg points out, this also means that we could drop the tcomm[] array
    from 'struct linux_binprm', since the pathname lifetime now covers
    setup_new_exec(). That would be a separate cleanup.

    Reported-by: Igor Zhbanov
    Tested-by: Steven Rostedt
    Cc: Oleg Nesterov
    Cc: Al Viro
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

05 Feb, 2014

1 commit

  • The generic_chip.c uses interfaces from irq_domain.c which is
    controlled by the IRQ_DOMAIN config option, but there is no Kconfig
    dependency so the build can fail:

    linux/kernel/irq/generic-chip.c:400:11: error:
    'irq_domain_xlate_onetwocell' undeclared here (not in a function)

    Select IRQ_DOMAIN when GENERIC_IRQ_CHIP is selected.

    Signed-off-by: Nitin A Kamble
    Link: http://lkml.kernel.org/r/1391129410-54548-2-git-send-email-nitin.a.kamble@intel.com
    Signed-off-by: Thomas Gleixner
    Cc: stable@vger.kernel.org # 3.11+

    Nitin A Kamble
     

01 Feb, 2014

3 commits

  • Pull timer/dynticks updates from Ingo Molnar:
    "This tree contains misc dynticks updates: a fix and three cleanups"

    * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    sched/nohz: Fix overflow error in scheduler_tick_max_deferment()
    nohz_full: fix code style issue of tick_nohz_full_stop_tick
    nohz: Get timekeeping max deferment outside jiffies_lock
    tick: Rename tick_check_idle() to tick_irq_enter()

    Linus Torvalds
     
  • Pull scheduler fixes from Ingo Molnar:
    "A crash fix and documentation updates"

    * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    sched: Make sched_class::get_rr_interval() optional
    sched/deadline: Add sched_dl documentation
    sched: Fix docbook parameter annotation error in wait.h

    Linus Torvalds
     
  • Pull core debug changes from Ingo Molnar:
    "This contains mostly kernel debugging related updates:

    - make hung_task detection more configurable to distros
    - add final bits for x86 UV NMI debugging, with related KGDB changes
    - update the mailing-list of MAINTAINERS entries I'm involved with"

    * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    hung_task: Display every hung task warning
    sysctl: Add neg_one as a standard constraint
    x86/uv/nmi, kgdb/kdb: Fix UV NMI handler when KDB not configured
    x86/uv/nmi: Fix Sparse warnings
    kgdb/kdb: Fix no KDB config problem
    MAINTAINERS: Restore "L: linux-kernel@vger.kernel.org" entries

    Linus Torvalds
     

31 Jan, 2014

3 commits

  • After commit 9a46ad6d6df3 ("smp: make smp_call_function_many() use logic
    similar to smp_call_function_single()"), cfd->cpumask is accessed only
    in smp_call_function_many(). So there is no more need to copy it into
    cfd->cpumask_ipi before putting csd into the list. The cpumask_ipi
    field is obsolete and can be removed.

    Signed-off-by: Roman Gushchin
    Cc: Ingo Molnar
    Cc: Christoph Hellwig
    Cc: Wang YanQing
    Cc: Xie XiuQi
    Cc: Shaohua Li
    Cc: Peter Zijlstra
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Gushchin
     
  • Make smp_call_function_single and friends more efficient by using a
    lockless list.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Jan Kara
    Cc: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     
  • Pull core block IO changes from Jens Axboe:
    "The major piece in here is the immutable bio_ve series from Kent, the
    rest is fairly minor. It was supposed to go in last round, but
    various issues pushed it to this release instead. The pull request
    contains:

    - Various smaller blk-mq fixes from different folks. Nothing major
    here, just minor fixes and cleanups.

    - Fix for a memory leak in the error path in the block ioctl code
    from Christian Engelmayer.

    - Header export fix from CaiZhiyong.

    - Finally the immutable biovec changes from Kent Overstreet. This
    enables some nice future work on making arbitrarily sized bios
    possible, and splitting more efficient. Related fixes to immutable
    bio_vecs:

    - dm-cache immutable fixup from Mike Snitzer.
    - btrfs immutable fixup from Muthu Kumar.

    - bio-integrity fix from Nic Bellinger, which is also going to stable"

    * 'for-3.14/core' of git://git.kernel.dk/linux-block: (44 commits)
    xtensa: fixup simdisk driver to work with immutable bio_vecs
    block/blk-mq-cpu.c: use hotcpu_notifier()
    blk-mq: for_each_* macro correctness
    block: Fix memory leak in rw_copy_check_uvector() handling
    bio-integrity: Fix bio_integrity_verify segment start bug
    block: remove unrelated header files and export symbol
    blk-mq: uses page->list incorrectly
    blk-mq: use __smp_call_function_single directly
    btrfs: fix missing increment of bi_remaining
    Revert "block: Warn and free bio if bi_end_io is not set"
    block: Warn and free bio if bi_end_io is not set
    blk-mq: fix initializing request's start time
    block: blk-mq: don't export blk_mq_free_queue()
    block: blk-mq: make blk_sync_queue support mq
    block: blk-mq: support draining mq queue
    dm cache: increment bi_remaining when bi_end_io is restored
    block: fixup for generic bio chaining
    block: Really silence spurious compiler warnings
    block: Silence spurious compiler warnings
    block: Kill bio_pair_split()
    ...

    Linus Torvalds
     

29 Jan, 2014

1 commit

  • Pull vfs updates from Al Viro:
    "Assorted stuff; the biggest pile here is Christoph's ACL series. Plus
    assorted cleanups and fixes all over the place...

    There will be another pile later this week"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (43 commits)
    __dentry_path() fixes
    vfs: Remove second variable named error in __dentry_path
    vfs: Is mounted should be testing mnt_ns for NULL or error.
    Fix race when checking i_size on direct i/o read
    hfsplus: remove can_set_xattr
    nfsd: use get_acl and ->set_acl
    fs: remove generic_acl
    nfs: use generic posix ACL infrastructure for v3 Posix ACLs
    gfs2: use generic posix ACL infrastructure
    jfs: use generic posix ACL infrastructure
    xfs: use generic posix ACL infrastructure
    reiserfs: use generic posix ACL infrastructure
    ocfs2: use generic posix ACL infrastructure
    jffs2: use generic posix ACL infrastructure
    hfsplus: use generic posix ACL infrastructure
    f2fs: use generic posix ACL infrastructure
    ext2/3/4: use generic posix ACL infrastructure
    btrfs: use generic posix ACL infrastructure
    fs: make posix_acl_create more useful
    fs: make posix_acl_chmod more useful
    ...

    Linus Torvalds
     

28 Jan, 2014

7 commits

  • Not all classes implement (or can implement) a useful get_rr_interval()
    function, default to a 0 time-slice for them.

    This fixes a crash reported by Tommi Rantala.

    Reported-by: Tommi Rantala
    Cc: Dave Jones
    Cc: Tommi Rantala
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20140127105413.GC11314@laptop.programming.kicks-ass.net
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Add in Documentation/scheduler/ some hints about the design
    choices, the usage and the future possible developments of the
    sched_dl scheduling class and of the SCHED_DEADLINE policy.

    Reviewed-by: Henrik Austad
    Signed-off-by: Dario Faggioli
    Signed-off-by: Juri Lelli
    [ Re-wrote sections 2 and 3. ]
    Signed-off-by: Luca Abeni
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1390821615-23247-1-git-send-email-juri.lelli@gmail.com
    Signed-off-by: Ingo Molnar

    Dario Faggioli
     
  • Reduce data size a little.
    Reduce checkpatch noise.

    $ size kernel/softirq.o*
    text data bss dec hex filename
    11554 6013 4008 21575 5447 kernel/softirq.o.new
    11474 6093 4008 21575 5447 kernel/softirq.o.old

    Signed-off-by: Joe Perches
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Use a more current logging style.

    Signed-off-by: Joe Perches
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Possible speed improvement of __do_softirq() by using ffs() instead of
    using a while loop with an & 1 test then single bit shift.

    Signed-off-by: Joe Perches
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • vsnprintf() may let 'r' larger than sizeof(buf), in this case, if 'r' is
    also less than "vmcoreinfo_max_size - vmcoreinfo_size" (left size of
    destination buffer), next memcpy() will read the unexpected addresses.

    Signed-off-by: Chen Gang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chen Gang
     
  • Pull tracing fixes from Steven Rostedt:
    "The first two patches fix the debugfs README file to reflect better
    the new features added to 3.14.

    The third patch is a minor bugfix to the trace_puts() functions that
    will crash the system if a developer adds one before the tracing
    system is setup. It also affects trace_printk() if it has no
    arguments, as the code will convert it to a trace_puts() as well.

    Note, this bug will not affect unmodified kernels, as trace_printk()
    and trace_puts() should only be used by developers for testing"

    * tag 'trace-fixes-3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
    tracing: Check if tracing is enabled in trace_puts()
    tracing: Fix formatting of trace README file
    tracing/README: Add event file usage to tracing mini-HOWTO

    Linus Torvalds
     

26 Jan, 2014

1 commit


25 Jan, 2014

6 commits

  • When khungtaskd detects hung tasks, it prints out
    backtraces from a number of those tasks.

    Limiting the number of backtraces being printed
    out can result in the user not seeing the information
    necessary to debug the issue. The hung_task_warnings
    sysctl controls this feature.

    This patch makes it possible for hung_task_warnings
    to accept a special value to print an unlimited
    number of backtraces when khungtaskd detects hung
    tasks.

    The special value is -1. To use this value it is
    necessary to change types from ulong to int.

    Signed-off-by: Aaron Tomlin
    Reviewed-by: Rik van Riel
    Acked-by: David Rientjes
    Cc: oleg@redhat.com
    Link: http://lkml.kernel.org/r/1390239253-24030-3-git-send-email-atomlin@redhat.com
    [ Build warning fix. ]
    Signed-off-by: Ingo Molnar

    Aaron Tomlin
     
  • rcu_dereference_check_fdtable() looks very wrong,

    1. rcu_my_thread_group_empty() was added by 844b9a8707f1 "vfs: fix
    RCU-lockdep false positive due to /proc" but it doesn't really
    fix the problem. A CLONE_THREAD (without CLONE_FILES) task can
    hit the same race with get_files_struct().

    And otoh rcu_my_thread_group_empty() can suppress the correct
    warning if the caller is the CLONE_FILES (without CLONE_THREAD)
    task.

    2. files->count == 1 check is not really right too. Even if this
    files_struct is not shared it is not safe to access it lockless
    unless the caller is the owner.

    Otoh, this check is sub-optimal. files->count == 0 always means
    it is safe to use it lockless even if files != current->files,
    but put_files_struct() has to take rcu_read_lock(). See the next
    patch.

    This patch removes the buggy checks and turns fcheck_files() into
    __fcheck_files() which uses rcu_dereference_raw(), the "unshared"
    callers, fget_light() and fget_raw_light(), can use it to avoid
    the warning from RCU-lockdep.

    fcheck_files() is trivially reimplemented as rcu_lockdep_assert()
    plus __fcheck_files().

    Signed-off-by: Oleg Nesterov
    Signed-off-by: Al Viro

    Oleg Nesterov
     
  • Add neg_one to the list of standard constraints - will be used by the next patch.

    Signed-off-by: Aaron Tomlin
    Acked-by: Rik van Riel
    Acked-by: David Rientjes
    Cc: oleg@redhat.com
    Link: http://lkml.kernel.org/r/1390239253-24030-2-git-send-email-atomlin@redhat.com
    Signed-off-by: Ingo Molnar

    Aaron Tomlin
     
  • Some code added to the debug_core module had KDB dependencies
    that it shouldn't have. Move the KDB dependent REASON back to
    the caller to remove the dependency in the debug core code.

    Update the call from the UV NMI handler to conform to the new
    interface.

    Signed-off-by: Mike Travis
    Reviewed-by: Hedi Berriche
    Cc: Russ Anderson
    Cc: Jason Wessel
    Cc: Peter Zijlstra
    Cc: Paul Mackerras
    Cc: Arnaldo Carvalho de Melo
    Link: http://lkml.kernel.org/r/20140114162551.318251993@asylum.americas.sgi.com
    Signed-off-by: Ingo Molnar

    Mike Travis
     
  • …eric/linux-dynticks into timers/urgent

    Pull dynticks cleanups from Frederic Weisbecker.

    Signed-off-by: Ingo Molnar <mingo@kernel.org>

    Ingo Molnar
     
  • Pull ACPI and power management updates from Rafael Wysocki:
    "As far as the number of commits goes, the top spot belongs to ACPI
    this time with cpufreq in the second position and a handful of PM
    core, PNP and cpuidle updates. They are fixes and cleanups mostly, as
    usual, with a couple of new features in the mix.

    The most visible change is probably that we will create struct
    acpi_device objects (visible in sysfs) for all devices represented in
    the ACPI tables regardless of their status and there will be a new
    sysfs attribute under those objects allowing user space to check that
    status via _STA.

    Consequently, ACPI device eject or generally hot-removal will not
    delete those objects, unless the table containing the corresponding
    namespace nodes is unloaded, which is extremely rare. Also ACPI
    container hotplug will be handled quite a bit differently and cpufreq
    will support CPU boost ("turbo") generically and not only in the
    acpi-cpufreq driver.

    Specifics:

    - ACPI core changes to make it create a struct acpi_device object for
    every device represented in the ACPI tables during all namespace
    scans regardless of the current status of that device. In
    accordance with this, ACPI hotplug operations will not delete those
    objects, unless the underlying ACPI tables go away.

    - On top of the above, new sysfs attribute for ACPI device objects
    allowing user space to check device status by triggering the
    execution of _STA for its ACPI object. From Srinivas Pandruvada.

    - ACPI core hotplug changes reducing code duplication, integrating
    the PCI root hotplug with the core and reworking container hotplug.

    - ACPI core simplifications making it use ACPI_COMPANION() in the
    code "glueing" ACPI device objects to "physical" devices.

    - ACPICA update to upstream version 20131218. This adds support for
    the DBG2 and PCCT tables to ACPICA, fixes some bugs and improves
    debug facilities. From Bob Moore, Lv Zheng and Betty Dall.

    - Init code change to carry out the early ACPI initialization
    earlier. That should allow us to use ACPI during the timekeeping
    initialization and possibly to simplify the EFI initialization too.
    From Chun-Yi Lee.

    - Clenups of the inclusions of ACPI headers in many places all over
    from Lv Zheng and Rashika Kheria (work in progress).

    - New helper for ACPI _DSM execution and rework of the code in
    drivers that uses _DSM to execute it via the new helper. From
    Jiang Liu.

    - New Win8 OSI blacklist entries from Takashi Iwai.

    - Assorted ACPI fixes and cleanups from Al Stone, Emil Goode, Hanjun
    Guo, Lan Tianyu, Masanari Iida, Oliver Neukum, Prarit Bhargava,
    Rashika Kheria, Tang Chen, Zhang Rui.

    - intel_pstate driver updates, including proper Baytrail support,
    from Dirk Brandewie and intel_pstate documentation from Ramkumar
    Ramachandra.

    - Generic CPU boost ("turbo") support for cpufreq from Lukasz
    Majewski.

    - powernow-k6 cpufreq driver fixes from Mikulas Patocka.

    - cpufreq core fixes and cleanups from Viresh Kumar, Jane Li, Mark
    Brown.

    - Assorted cpufreq drivers fixes and cleanups from Anson Huang, John
    Tobias, Paul Bolle, Paul Walmsley, Sachin Kamat, Shawn Guo, Viresh
    Kumar.

    - cpuidle cleanups from Bartlomiej Zolnierkiewicz.

    - Support for hibernation APM events from Bin Shi.

    - Hibernation fix to avoid bringing up nonboot CPUs with ACPI EC
    disabled during thaw transitions from Bjørn Mork.

    - PM core fixes and cleanups from Ben Dooks, Leonardo Potenza, Ulf
    Hansson.

    - PNP subsystem fixes and cleanups from Dmitry Torokhov, Levente
    Kurusa, Rashika Kheria.

    - New tool for profiling system suspend from Todd E Brandt and a
    cpupower tool cleanup from One Thousand Gnomes"

    * tag 'pm+acpi-3.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (153 commits)
    thermal: exynos: boost: Automatic enable/disable of BOOST feature (at Exynos4412)
    cpufreq: exynos4x12: Change L0 driver data to CPUFREQ_BOOST_FREQ
    Documentation: cpufreq / boost: Update BOOST documentation
    cpufreq: exynos: Extend Exynos cpufreq driver to support boost
    cpufreq / boost: Kconfig: Support for software-managed BOOST
    acpi-cpufreq: Adjust the code to use the common boost attribute
    cpufreq: Add boost frequency support in core
    intel_pstate: Add trace point to report internal state.
    cpufreq: introduce cpufreq_generic_get() routine
    ARM: SA1100: Create dummy clk_get_rate() to avoid build failures
    cpufreq: stats: create sysfs entries when cpufreq_stats is a module
    cpufreq: stats: free table and remove sysfs entry in a single routine
    cpufreq: stats: remove hotplug notifiers
    cpufreq: stats: handle cpufreq_unregister_driver() and suspend/resume properly
    cpufreq: speedstep: remove unused speedstep_get_state
    platform: introduce OF style 'modalias' support for platform bus
    PM / tools: new tool for suspend/resume performance optimization
    ACPI: fix module autoloading for ACPI enumerated devices
    ACPI: add module autoloading support for ACPI enumerated devices
    ACPI: fix create_modalias() return value handling
    ...

    Linus Torvalds
     

24 Jan, 2014

14 commits

  • Merge second patch-bomb from Andrew Morton:
    - various misc bits
    - the rest of MM
    - add generic fixmap.h, use it
    - backlight updates
    - dynamic_debug updates
    - printk() updates
    - checkpatch updates
    - binfmt_elf
    - ramfs
    - init/
    - autofs4
    - drivers/rtc
    - nilfs
    - hfsplus
    - Documentation/
    - coredump
    - procfs
    - fork
    - exec
    - kexec
    - kdump
    - partitions
    - rapidio
    - rbtree
    - userns
    - memstick
    - w1
    - decompressors

    * emailed patches from Andrew Morton : (197 commits)
    lib/decompress_unlz4.c: always set an error return code on failures
    romfs: fix returm err while getting inode in fill_super
    drivers/w1/masters/w1-gpio.c: add strong pullup emulation
    drivers/memstick/host/rtsx_pci_ms.c: fix ms card data transfer bug
    userns: relax the posix_acl_valid() checks
    arch/sh/kernel/dwarf.c: use rbtree postorder iteration helper instead of solution using repeated rb_erase()
    fs-ext3-use-rbtree-postorder-iteration-helper-instead-of-opencoding-fix
    fs/ext3: use rbtree postorder iteration helper instead of opencoding
    fs/jffs2: use rbtree postorder iteration helper instead of opencoding
    fs/ext4: use rbtree postorder iteration helper instead of opencoding
    fs/ubifs: use rbtree postorder iteration helper instead of opencoding
    net/netfilter/ipset/ip_set_hash_netiface.c: use rbtree postorder iteration instead of opencoding
    rbtree/test: test rbtree_postorder_for_each_entry_safe()
    rbtree/test: move rb_node to the middle of the test struct
    rapidio: add modular rapidio core build into powerpc and mips branches
    partitions/efi: complete documentation of gpt kernel param purpose
    kdump: add /sys/kernel/vmcoreinfo ABI documentation
    kdump: fix exported size of vmcoreinfo note
    kexec: add sysctl to disable kexec_load
    fs/exec.c: call arch_pick_mmap_layout() only once
    ...

    Linus Torvalds
     
  • Pull crypto update from Herbert Xu:
    "Here is the crypto update for 3.14:

    - Improved crypto_memneq helper
    - Use cyprto_memneq in arch-specific crypto code
    - Replaced orphaned DCP driver with Freescale MXS DCP driver
    - Added AVX/AVX2 version of AESNI-GCM encode and decode
    - Added AMD Cryptographic Coprocessor (CCP) driver
    - Misc fixes"

    * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (41 commits)
    crypto: aesni - fix build on x86 (32bit)
    crypto: mxs - Fix sparse non static symbol warning
    crypto: ccp - CCP device enabled/disabled changes
    crypto: ccp - Cleanup hash invocation calls
    crypto: ccp - Change data length declarations to u64
    crypto: ccp - Check for caller result area before using it
    crypto: ccp - Cleanup scatterlist usage
    crypto: ccp - Apply appropriate gfp_t type to memory allocations
    crypto: drivers - Sort drivers/crypto/Makefile
    ARM: mxs: dts: Enable DCP for MXS
    crypto: mxs - Add Freescale MXS DCP driver
    crypto: mxs - Remove the old DCP driver
    crypto: ahash - Fully restore ahash request before completing
    crypto: aesni - fix build on x86 (32bit)
    crypto: talitos - Remove redundant dev_set_drvdata
    crypto: ccp - Remove redundant dev_set_drvdata
    crypto: crypto4xx - Remove redundant dev_set_drvdata
    crypto: caam - simplify and harden key parsing
    crypto: omap-sham - Fix Polling mode for larger blocks
    crypto: tcrypt - Added speed tests for AEAD crypto alogrithms in tcrypt test suite
    ...

    Linus Torvalds
     
  • Pull audit update from Eric Paris:
    "Again we stayed pretty well contained inside the audit system.
    Venturing out was fixing a couple of function prototypes which were
    inconsistent (didn't hurt anything, but we used the same value as an
    int, uint, u32, and I think even a long in a couple of places).

    We also made a couple of minor changes to when a couple of LSMs called
    the audit system. We hoped to add aarch64 audit support this go
    round, but it wasn't ready.

    I'm disappearing on vacation on Thursday. I should have internet
    access, but it'll be spotty. If anything goes wrong please be sure to
    cc rgb@redhat.com. He'll make fixing things his top priority"

    * git://git.infradead.org/users/eparis/audit: (50 commits)
    audit: whitespace fix in kernel-parameters.txt
    audit: fix location of __net_initdata for audit_net_ops
    audit: remove pr_info for every network namespace
    audit: Modify a set of system calls in audit class definitions
    audit: Convert int limit uses to u32
    audit: Use more current logging style
    audit: Use hex_byte_pack_upper
    audit: correct a type mismatch in audit_syscall_exit()
    audit: reorder AUDIT_TTY_SET arguments
    audit: rework AUDIT_TTY_SET to only grab spin_lock once
    audit: remove needless switch in AUDIT_SET
    audit: use define's for audit version
    audit: documentation of audit= kernel parameter
    audit: wait_for_auditd rework for readability
    audit: update MAINTAINERS
    audit: log task info on feature change
    audit: fix incorrect set of audit_sock
    audit: print error message when fail to create audit socket
    audit: fix dangling keywords in audit_log_set_loginuid() output
    audit: log on errors from filter user rules
    ...

    Linus Torvalds
     
  • Right now we seem to be exporting the max data size contained inside
    vmcoreinfo note. But this does not include the size of meta data around
    vmcore info data. Like name of the note and starting and ending elf_note.

    I think user space expects total size and that size is put in PT_NOTE elf
    header. Things seem to be fine so far because we are not using vmcoreinfo
    note to the maximum capacity. But as it starts filling up, to capacity,
    at some point of time, problem will be visible.

    I don't think user space will be broken with this change. So there is no
    need to introduce vmcoreinfo2. This change is safe and backward
    compatible. More explanation on why this change is safe is below.

    vmcoreinfo contains information about kernel which user space needs to
    know to do things like filtering. For example, various kernel config
    options or information about size or offset of some data structures etc.
    All this information is commmunicated to user space with an ELF note
    present in ELF /proc/vmcore file.

    Currently vmcoreinfo data size is 4096. With some elf note meta data
    around it, actual size is 4132 bytes. But we are using barely 25% of that
    size. Rest is empty. So even if we tell user space that size of ELf note
    is 4096 and not 4132, nothing will be broken becase after around 1000
    bytes, everything is zero anyway.

    But once we start filling up the note to the capacity, and not report the
    full size of note, bad things will start happening. Either some data will
    be lost or tools will be confused that they did not fine the zero note at
    the end.

    So I think this change is safe and should not break existing tools.

    Signed-off-by: Vivek Goyal
    Cc: Ken'ichi Ohmichi
    Cc: Dan Aloni
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vivek Goyal
     
  • For general-purpose (i.e. distro) kernel builds it makes sense to build
    with CONFIG_KEXEC to allow end users to choose what kind of things they
    want to do with kexec. However, in the face of trying to lock down a
    system with such a kernel, there needs to be a way to disable kexec_load
    (much like module loading can be disabled). Without this, it is too easy
    for the root user to modify kernel memory even when CONFIG_STRICT_DEVMEM
    and modules_disabled are set. With this change, it is still possible to
    load an image for use later, then disable kexec_load so the image (or lack
    of image) can't be altered.

    The intention is for using this in environments where "perfect"
    enforcement is hard. Without a verified boot, along with verified
    modules, and along with verified kexec, this is trying to give a system a
    better chance to defend itself (or at least grow the window of
    discoverability) against attack in the face of a privilege escalation.

    In my mind, I consider several boot scenarios:

    1) Verified boot of read-only verified root fs loading fd-based
    verification of kexec images.
    2) Secure boot of writable root fs loading signed kexec images.
    3) Regular boot loading kexec (e.g. kcrash) image early and locking it.
    4) Regular boot with no control of kexec image at all.

    1 and 2 don't exist yet, but will soon once the verified kexec series has
    landed. 4 is the state of things now. The gap between 2 and 4 is too
    large, so this change creates scenario 3, a middle-ground above 4 when 2
    and 1 are not possible for a system.

    Signed-off-by: Kees Cook
    Acked-by: Rik van Riel
    Cc: Vivek Goyal
    Cc: Eric Biederman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kees Cook
     
  • Change do_signal_stop() and do_sigaction() to avoid next_thread() and use
    while_each_thread() instead.

    Signed-off-by: Oleg Nesterov
    Cc: KOSAKI Motohiro
    Cc: Al Viro
    Cc: Kees Cook
    Reviewed-by: Sameer Nanda
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • Change k_getrusage() to use while_each_thread(), no changes in the
    compiled code.

    Signed-off-by: Oleg Nesterov
    Cc: KOSAKI Motohiro
    Cc: Al Viro
    Cc: Kees Cook
    Reviewed-by: Sameer Nanda
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • We can kill either task->did_exec or PF_FORKNOEXEC, they are mutually
    exclusive. The patch kills ->did_exec because it has a single user.

    Signed-off-by: Oleg Nesterov
    Acked-by: KOSAKI Motohiro
    Cc: Al Viro
    Cc: Kees Cook
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • current->mm doesn't need a NULL check in dup_mm(). Becasue dup_mm() is
    used only in copy_mm() and current->mm is checked whether it is NULL or
    not in copy_mm() before calling dup_mm().

    Signed-off-by: Daeseok Youn
    Acked-by: Oleg Nesterov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daeseok Youn
     
  • Fix errors reported by checkpatch.pl. One error is parentheses, the other
    is a whitespace issue.

    Signed-off-by: Daeseok Youn
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daeseok Youn
     
  • dup_mm() is used only in kernel/fork.c

    Signed-off-by: Daeseok Youn
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    DaeSeok Youn
     
  • An earlier newline was missing and current print is from different task.
    In this scenario flush the continuation line and store this line
    seperatly.

    This patch fix the below scenario of timestamp interleaving,
    [ 28.154370 ] read_word_reg : reg[0x 3], reg[0x 4] data [0x 642]
    [ 28.155428 ] uart disconnect
    [ 31.947341 ] dvfs[cpufreq.c]:plug-in cpu done
    [ 28.155445 ] UART detached : send switch state 201
    [ 32.014112 ] read_reg : reg[0x 3] data[0x21]

    [akpm@linux-foundation.org: simplify and condense the code]
    Signed-off-by: Arun KS
    Signed-off-by: Arun KS
    Cc: Joe Perches
    Cc: Tejun Heo
    Cc: Frederic Weisbecker
    Cc: Paul Gortmaker
    Cc: Kay Sievers
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arun KS
     
  • Add a working sysctl to enable/disable automatic numa memory balancing
    at runtime.

    This allows us to track down performance problems with this feature and
    is generally a good idea.

    This was possible earlier through debugfs, but only with special
    debugging options set. Also fix the boot message.

    [akpm@linux-foundation.org: s/sched_numa_balancing/sysctl_numa_balancing/]
    Signed-off-by: Andi Kleen
    Acked-by: Mel Gorman
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • If trace_puts() is used very early in boot up, it can crash the machine
    if it is called before the ring buffer is allocated. If a trace_printk()
    is used with no arguments, then it will be converted into a trace_puts()
    and suffer the same fate.

    Cc: stable@vger.kernel.org # 3.10+
    Fixes: 09ae72348ecc "tracing: Add trace_puts() for even faster trace_printk() tracing"
    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     

23 Jan, 2014

2 commits

  • The code would assume sched_clock_stable() and switch to !stable
    later, this switch brings a discontinuity in time.

    The discontinuity on switching from stable to unstable was always
    present, but previously we would set stable/unstable before
    initializing TSC and usually stick to the one we start out with.

    So the static_key bits brought an extra switch where there previously
    wasn't one.

    Things are further complicated by the fact that we cannot use
    static_key as early as we usually call set_sched_clock_stable().

    Fix things by tracking the stable state in a regular variable and only
    set the static_key to the right state on sched_clock_init(), which is
    ran right after late_time_init->tsc_init().

    Before this we would not be using the TSC anyway.

    Reported-and-Tested-by: Sasha Levin
    Reported-by: dyoung@redhat.com
    Fixes: 35af99e646c7 ("sched/clock, x86: Use a static_key for sched_clock_stable")
    Cc: jacob.jun.pan@linux.intel.com
    Cc: Mike Galbraith
    Cc: hpa@zytor.com
    Cc: paulmck@linux.vnet.ibm.com
    Cc: John Stultz
    Cc: Andy Lutomirski
    Cc: Arjan van de Ven
    Cc: lenb@kernel.org
    Cc: rjw@rjwysocki.net
    Cc: Eliezer Tamir
    Cc: rui.zhang@intel.com
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20140122115918.GG3694@twins.programming.kicks-ass.net
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • This reverts commit 282cf499f03ec1754b6c8c945c9674b02631fb0f.

    With the current implementation, the load average statistics of a sched entity
    change according to other activity on the CPU even if this activity is done
    between the running window of the sched entity and have no influence on the
    running duration of the task.

    When a task wakes up on the same CPU, we currently update last_runnable_update
    with the return of __synchronize_entity_decay without updating the
    runnable_avg_sum and runnable_avg_period accordingly. In fact, we have to sync
    the load_contrib of the se with the rq's blocked_load_contrib before removing
    it from the latter (with __synchronize_entity_decay) but we must keep
    last_runnable_update unchanged for updating runnable_avg_sum/period during the
    next update_entity_load_avg.

    Signed-off-by: Vincent Guittot
    Signed-off-by: Peter Zijlstra
    Reviewed-by: Ben Segall
    Cc: pjt@google.com
    Cc: alex.shi@linaro.org
    Link: http://lkml.kernel.org/r/1390376734-6800-1-git-send-email-vincent.guittot@linaro.org
    Signed-off-by: Ingo Molnar

    Vincent Guittot