10 Feb, 2015

1 commit

  • Pull RCU updates from Ingo Molnar:
    "The main RCU changes in this cycle are:

    - Documentation updates.

    - Miscellaneous fixes.

    - Preemptible-RCU fixes, including fixing an old bug in the
    interaction of RCU priority boosting and CPU hotplug.

    - SRCU updates.

    - RCU CPU stall-warning updates.

    - RCU torture-test updates"

    * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (54 commits)
    rcu: Initialize tiny RCU stall-warning timeouts at boot
    rcu: Fix RCU CPU stall detection in tiny implementation
    rcu: Add GP-kthread-starvation checks to CPU stall warnings
    rcu: Make cond_resched_rcu_qs() apply to normal RCU flavors
    rcu: Optionally run grace-period kthreads at real-time priority
    ksoftirqd: Use new cond_resched_rcu_qs() function
    ksoftirqd: Enable IRQs and call cond_resched() before poking RCU
    rcutorture: Add more diagnostics in rcu_barrier() test failure case
    torture: Flag console.log file to prevent holdovers from earlier runs
    torture: Add "-enable-kvm -soundhw pcspk" to qemu command line
    rcutorture: Handle different mpstat versions
    rcutorture: Check from beginning to end of grace period
    rcu: Remove redundant rcu_batches_completed() declaration
    rcutorture: Drop rcu_torture_completed() and friends
    rcu: Provide rcu_batches_completed_sched() for TINY_RCU
    rcutorture: Use unsigned for Reader Batch computations
    rcutorture: Make build-output parsing correctly flag RCU's warnings
    rcu: Make _batches_completed() functions return unsigned long
    rcutorture: Issue warnings on close calls due to Reader Batch blows
    documentation: Fix smp typo in memory-barriers.txt
    ...

    Linus Torvalds
     

30 Jan, 2015

1 commit

  • Fixed commit added from64to32 under _#ifndef do_csum_ but used it
    under _#ifndef csum_tcpudp_nofold_, breaking some builds (Fengguang's
    robot reported TILEGX's). Move from64to32 under the latter.

    Fixes: 150ae0e94634 ("lib/checksum.c: fix carry in csum_tcpudp_nofold")
    Reported-by: kbuild test robot
    Signed-off-by: Karl Beldan
    Cc: Eric Dumazet
    Cc: David S. Miller
    Signed-off-by: David S. Miller

    karl beldan
     

29 Jan, 2015

1 commit

  • The carry from the 64->32bits folding was dropped, e.g with:
    saddr=0xFFFFFFFF daddr=0xFF0000FF len=0xFFFF proto=0 sum=1,
    csum_tcpudp_nofold returned 0 instead of 1.

    Signed-off-by: Karl Beldan
    Cc: Al Viro
    Cc: Eric Dumazet
    Cc: Arnd Bergmann
    Cc: Mike Frysinger
    Cc: netdev@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Cc: stable@vger.kernel.org
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    karl beldan
     

21 Jan, 2015

1 commit


16 Jan, 2015

1 commit


10 Jan, 2015

1 commit

  • Pull kgdb/kdb fixes from Jason Wessel:
    "These have been around since 3.17 and in kgdb-next for the last 9
    weeks and some will go back to -stable.

    Summary of changes:

    Cleanups
    - kdb: Remove unused command flags, repeat flags and KDB_REPEAT_NONE

    Fixes
    - kgdb/kdb: Allow access on a single core, if a CPU round up is
    deemed impossible, which will allow inspection of the now "trashed"
    kernel
    - kdb: Add enable mask for the command groups
    - kdb: access controls to restrict sensitive commands"

    * tag 'for_linus-3.19-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/kgdb:
    kernel/debug/debug_core.c: Logging clean-up
    kgdb: timeout if secondary CPUs ignore the roundup
    kdb: Allow access to sensitive commands to be restricted by default
    kdb: Add enable mask for groups of commands
    kdb: Categorize kdb commands (similar to SysRq categorization)
    kdb: Remove KDB_REPEAT_NONE flag
    kdb: Use KDB_REPEAT_* values as flags
    kdb: Rename kdb_register_repeat() to kdb_register_flags()
    kdb: Rename kdb_repeat_t to kdb_cmdflags_t, cmd_repeat to cmd_flags
    kdb: Remove currently unused kdbtab_t->cmd_flags

    Linus Torvalds
     

08 Jan, 2015

1 commit

  • Include rcupdate.h header to provide call_rcu() definition. This was implicitly
    being provided by slab.h file which include srcu.h somewhere in its include
    hierarchy which in-turn included rcupdate.h.

    Lately, tinification effort added support to remove srcu entirely because of
    which we are encountering build errors like

    lib/assoc_array.c: In function 'assoc_array_apply_edit':
    lib/assoc_array.c:1426:2: error: implicit declaration of function 'call_rcu' [-Werror=implicit-function-declaration]
    cc1: some warnings being treated as errors

    Fix these by including rcupdate.h explicitly.

    Signed-off-by: Pranith Kumar
    Reported-by: Scott Wood

    Pranith Kumar
     

07 Jan, 2015

2 commits

  • The RCU_CPU_STALL_INFO code has been in for quite some time, and has
    proven reliable. This commit therefore enables it by default.

    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • SRCU is not necessary to be compiled by default in all cases. For tinification
    efforts not compiling SRCU unless necessary is desirable.

    The current patch tries to make compiling SRCU optional by introducing a new
    Kconfig option CONFIG_SRCU which is selected when any of the components making
    use of SRCU are selected.

    If we do not select CONFIG_SRCU, srcu.o will not be compiled at all.

    text data bss dec hex filename
    2007 0 0 2007 7d7 kernel/rcu/srcu.o

    Size of arch/powerpc/boot/zImage changes from

    text data bss dec hex filename
    831552 64180 23944 919676 e087c arch/powerpc/boot/zImage : before
    829504 64180 23952 917636 e0084 arch/powerpc/boot/zImage : after

    so the savings are about ~2000 bytes.

    Signed-off-by: Pranith Kumar
    CC: Paul E. McKenney
    CC: Josh Triplett
    CC: Lai Jiangshan
    Signed-off-by: Paul E. McKenney
    [ paulmck: resolve conflict due to removal of arch/ia64/kvm/Kconfig. ]

    Pranith Kumar
     

19 Dec, 2014

2 commits

  • Pull module updates from Rusty Russell:
    "The exciting thing here is the getting rid of stop_machine on module
    removal. This is possible by using a simple atomic_t for the counter,
    rather than our fancy per-cpu counter: it turns out that no one is
    doing a module increment per net packet, so the slowdown should be in
    the noise"

    * tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
    param: do not set store func without write perm
    params: cleanup sysfs allocation
    kernel:module Fix coding style errors and warnings.
    module: Remove stop_machine from module unloading
    module: Replace module_ref with atomic_t refcnt
    lib/bug: Use RCU list ops for module_bug_list
    module: Unlink module with RCU synchronizing instead of stop_machine
    module: Wait for RCU synchronizing before releasing a module

    Linus Torvalds
     
  • Add cma reserved information which is currently shown as a part of total
    reserved only. This patch is continuation of our previous cma patches
    related to this.

    https://lkml.org/lkml/2014/10/20/64
    https://lkml.org/lkml/2014/10/22/383

    [akpm@linux-foundation.org: remove hopefully-unneeded ifdefs]
    Signed-off-by: Vishnu Pratap Singh
    Cc: David Rientjes
    Cc: KOSAKI Motohiro
    Cc: Mel Gorman
    Cc: Xishi Qiu
    Cc: Pintu Kumar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vishnu Pratap Singh
     

15 Dec, 2014

2 commits

  • Pull char/misc driver updates from Greg KH:
    "Here's the big char/misc driver update for 3.19-rc1

    Lots of little things all over the place in different drivers, and a
    new subsystem, "coresight" has been added. Full details are in the
    shortlog"

    * tag 'char-misc-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (73 commits)
    parport: parport_pc, do not remove parent devices early
    spmi: Remove shutdown/suspend/resume kernel-doc
    carma-fpga-program: drop videobuf dependency
    carma-fpga: drop videobuf dependency
    carma-fpga-program.c: fix compile errors
    i8k: Fix temperature bug handling in i8k_get_temp()
    cxl: Name interrupts in /proc/interrupt
    CXL: Return error to PSL if IRQ demultiplexing fails & print clearer warning
    coresight-replicator: remove .owner field for driver
    coresight: fixed comments in coresight.h
    coresight: fix typo in comment in coresight-priv.h
    coresight: bindings for coresight drivers
    coresight: Adding ABI documentation
    w1: support auto-load of w1_bq27000 module.
    w1: avoid potential u16 overflow
    cn: verify msg->len before making callback
    mei: export fw status registers through sysfs
    mei: read and print all six FW status registers
    mei: txe: add cherrytrail device id
    mei: kill cached host and me csr values
    ...

    Linus Torvalds
     
  • Pull driver core update from Greg KH:
    "Here's the set of driver core patches for 3.19-rc1.

    They are dominated by the removal of the .owner field in platform
    drivers. They touch a lot of files, but they are "simple" changes,
    just removing a line in a structure.

    Other than that, a few minor driver core and debugfs changes. There
    are some ath9k patches coming in through this tree that have been
    acked by the wireless maintainers as they relied on the debugfs
    changes.

    Everything has been in linux-next for a while"

    * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits)
    Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries"
    fs: debugfs: add forward declaration for struct device type
    firmware class: Deletion of an unnecessary check before the function call "vunmap"
    firmware loader: fix hung task warning dump
    devcoredump: provide a one-way disable function
    device: Add dev__once variants
    ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries
    ath: use seq_file api for ath9k debugfs files
    debugfs: add helper function to create device related seq_file
    drivers/base: cacheinfo: remove noisy error boot message
    Revert "core: platform: add warning if driver has no owner"
    drivers: base: support cpu cache information interface to userspace via sysfs
    drivers: base: add cpu_device_create to support per-cpu devices
    topology: replace custom attribute macros with standard DEVICE_ATTR*
    cpumask: factor out show_cpumap into separate helper function
    driver core: Fix unbalanced device reference in drivers_probe
    driver core: fix race with userland in device_add()
    sysfs/kernfs: make read requests on pre-alloc files use the buffer.
    sysfs/kernfs: allow attributes to request write buffer be pre-allocated.
    fs: sysfs: return EGBIG on write if offset is larger than file size
    ...

    Linus Torvalds
     

14 Dec, 2014

6 commits

  • Magic number of compress formats for kernel image is defined by two bytes.
    These numbers are written in hexadecimal number, nevertheless magic
    number for only gunzip is written in octal number. The formats should be
    consistent for readability. Therefore, magic numbers for gunzip are also
    defined by hexadecimal number.

    Signed-off-by: Haesung Kim
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Haesung Kim
     
  • "origPtr" is used as an offset into the bd->dbuf[] array. That array is
    allocated in start_bunzip() and has "bd->dbufSize" number of elements so
    the test here should be >= instead of >.

    Later we check "origPtr" again before using it as an offset so I don't
    know if this bug can be triggered in real life.

    Fixes: bc22c17e12c1 ('bzip2/lzma: library support for gzip, bzip2 and lzma decompression')
    Signed-off-by: Dan Carpenter
    Cc: Alain Knaff
    Cc: Yinghai Lu
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dan Carpenter
     
  • Current debug levels are not optimal. Especially if one want to provoke
    big numbers of faults(broken device simulator) then any verbose level will
    produce giant numbers of identical logging messages. Let's add ratelimit
    parameter for that purpose.

    Signed-off-by: Dmitry Monakhov
    Acked-by: Akinobu Mita
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dmitry Monakhov
     
  • This patchset adds execveat(2) for x86, and is derived from Meredydd
    Luff's patch from Sept 2012 (https://lkml.org/lkml/2012/9/11/528).

    The primary aim of adding an execveat syscall is to allow an
    implementation of fexecve(3) that does not rely on the /proc filesystem,
    at least for executables (rather than scripts). The current glibc version
    of fexecve(3) is implemented via /proc, which causes problems in sandboxed
    or otherwise restricted environments.

    Given the desire for a /proc-free fexecve() implementation, HPA suggested
    (https://lkml.org/lkml/2006/7/11/556) that an execveat(2) syscall would be
    an appropriate generalization.

    Also, having a new syscall means that it can take a flags argument without
    back-compatibility concerns. The current implementation just defines the
    AT_EMPTY_PATH and AT_SYMLINK_NOFOLLOW flags, but other flags could be
    added in future -- for example, flags for new namespaces (as suggested at
    https://lkml.org/lkml/2006/7/11/474).

    Related history:
    - https://lkml.org/lkml/2006/12/27/123 is an example of someone
    realizing that fexecve() is likely to fail in a chroot environment.
    - http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=514043 covered
    documenting the /proc requirement of fexecve(3) in its manpage, to
    "prevent other people from wasting their time".
    - https://bugzilla.redhat.com/show_bug.cgi?id=241609 described a
    problem where a process that did setuid() could not fexecve()
    because it no longer had access to /proc/self/fd; this has since
    been fixed.

    This patch (of 4):

    Add a new execveat(2) system call. execveat() is to execve() as openat()
    is to open(): it takes a file descriptor that refers to a directory, and
    resolves the filename relative to that.

    In addition, if the filename is empty and AT_EMPTY_PATH is specified,
    execveat() executes the file to which the file descriptor refers. This
    replicates the functionality of fexecve(), which is a system call in other
    UNIXen, but in Linux glibc it depends on opening "/proc/self/fd/" (and
    so relies on /proc being mounted).

    The filename fed to the executed program as argv[0] (or the name of the
    script fed to a script interpreter) will be of the form "/dev/fd/"
    (for an empty filename) or "/dev/fd//", effectively
    reflecting how the executable was found. This does however mean that
    execution of a script in a /proc-less environment won't work; also, script
    execution via an O_CLOEXEC file descriptor fails (as the file will not be
    accessible after exec).

    Based on patches by Meredydd Luff.

    Signed-off-by: David Drysdale
    Cc: Meredydd Luff
    Cc: Shuah Khan
    Cc: "Eric W. Biederman"
    Cc: Andy Lutomirski
    Cc: Alexander Viro
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Kees Cook
    Cc: Arnd Bergmann
    Cc: Rich Felker
    Cc: Christoph Hellwig
    Cc: Michael Kerrisk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Drysdale
     
  • This is the page owner tracking code which is introduced so far ago. It
    is resident on Andrew's tree, though, nobody tried to upstream so it
    remain as is. Our company uses this feature actively to debug memory leak
    or to find a memory hogger so I decide to upstream this feature.

    This functionality help us to know who allocates the page. When
    allocating a page, we store some information about allocation in extra
    memory. Later, if we need to know status of all pages, we can get and
    analyze it from this stored information.

    In previous version of this feature, extra memory is statically defined in
    struct page, but, in this version, extra memory is allocated outside of
    struct page. It enables us to turn on/off this feature at boottime
    without considerable memory waste.

    Although we already have tracepoint for tracing page allocation/free,
    using it to analyze page owner is rather complex. We need to enlarge the
    trace buffer for preventing overlapping until userspace program launched.
    And, launched program continually dump out the trace buffer for later
    analysis and it would change system behaviour with more possibility rather
    than just keeping it in memory, so bad for debug.

    Moreover, we can use page_owner feature further for various purposes. For
    example, we can use it for fragmentation statistics implemented in this
    patch. And, I also plan to implement some CMA failure debugging feature
    using this interface.

    I'd like to give the credit for all developers contributed this feature,
    but, it's not easy because I don't know exact history. Sorry about that.
    Below is people who has "Signed-off-by" in the patches in Andrew's tree.

    Contributor:
    Alexander Nyberg
    Mel Gorman
    Dave Hansen
    Minchan Kim
    Michal Nazarewicz
    Andrew Morton
    Jungsoo Son

    Signed-off-by: Joonsoo Kim
    Cc: Mel Gorman
    Cc: Johannes Weiner
    Cc: Minchan Kim
    Cc: Dave Hansen
    Cc: Michal Nazarewicz
    Cc: Jungsoo Son
    Cc: Ingo Molnar
    Cc: Joonsoo Kim
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joonsoo Kim
     
  • Add a bitmap_find_next_zero_area_off() function which works like
    bitmap_find_next_zero_area() function except it allows an offset to be
    specified when alignment is checked. This lets caller request a bit such
    that its number plus the offset is aligned according to the mask.

    [gregory.0xf0@gmail.com: Retrieved from https://patchwork.linuxtv.org/patch/6254/ and updated documentation]
    Signed-off-by: Michal Nazarewicz
    Signed-off-by: Kyungmin Park
    Signed-off-by: Marek Szyprowski
    Signed-off-by: Gregory Fong
    Cc: Joonsoo Kim
    Cc: Kukjin Kim
    Cc: Laurent Pinchart
    Cc: Laura Abbott
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michal Nazarewicz
     

12 Dec, 2014

1 commit

  • Pull networking updates from David Miller:

    1) New offloading infrastructure and example 'rocker' driver for
    offloading of switching and routing to hardware.

    This work was done by a large group of dedicated individuals, not
    limited to: Scott Feldman, Jiri Pirko, Thomas Graf, John Fastabend,
    Jamal Hadi Salim, Andy Gospodarek, Florian Fainelli, Roopa Prabhu

    2) Start making the networking operate on IOV iterators instead of
    modifying iov objects in-situ during transfers. Thanks to Al Viro
    and Herbert Xu.

    3) A set of new netlink interfaces for the TIPC stack, from Richard
    Alpe.

    4) Remove unnecessary looping during ipv6 routing lookups, from Martin
    KaFai Lau.

    5) Add PAUSE frame generation support to gianfar driver, from Matei
    Pavaluca.

    6) Allow for larger reordering levels in TCP, which are easily
    achievable in the real world right now, from Eric Dumazet.

    7) Add a variable of napi_schedule that doesn't need to disable cpu
    interrupts, from Eric Dumazet.

    8) Use a doubly linked list to optimize neigh_parms_release(), from
    Nicolas Dichtel.

    9) Various enhancements to the kernel BPF verifier, and allow eBPF
    programs to actually be attached to sockets. From Alexei
    Starovoitov.

    10) Support TSO/LSO in sunvnet driver, from David L Stevens.

    11) Allow controlling ECN usage via routing metrics, from Florian
    Westphal.

    12) Remote checksum offload, from Tom Herbert.

    13) Add split-header receive, BQL, and xmit_more support to amd-xgbe
    driver, from Thomas Lendacky.

    14) Add MPLS support to openvswitch, from Simon Horman.

    15) Support wildcard tunnel endpoints in ipv6 tunnels, from Steffen
    Klassert.

    16) Do gro flushes on a per-device basis using a timer, from Eric
    Dumazet. This tries to resolve the conflicting goals between the
    desired handling of bulk vs. RPC-like traffic.

    17) Allow userspace to ask for the CPU upon what a packet was
    received/steered, via SO_INCOMING_CPU. From Eric Dumazet.

    18) Limit GSO packets to half the current congestion window, from Eric
    Dumazet.

    19) Add a generic helper so that all drivers set their RSS keys in a
    consistent way, from Eric Dumazet.

    20) Add xmit_more support to enic driver, from Govindarajulu
    Varadarajan.

    21) Add VLAN packet scheduler action, from Jiri Pirko.

    22) Support configurable RSS hash functions via ethtool, from Eyal
    Perry.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1820 commits)
    Fix race condition between vxlan_sock_add and vxlan_sock_release
    net/macb: fix compilation warning for print_hex_dump() called with skb->mac_header
    net/mlx4: Add support for A0 steering
    net/mlx4: Refactor QUERY_PORT
    net/mlx4_core: Add explicit error message when rule doesn't meet configuration
    net/mlx4: Add A0 hybrid steering
    net/mlx4: Add mlx4_bitmap zone allocator
    net/mlx4: Add a check if there are too many reserved QPs
    net/mlx4: Change QP allocation scheme
    net/mlx4_core: Use tasklet for user-space CQ completion events
    net/mlx4_core: Mask out host side virtualization features for guests
    net/mlx4_en: Set csum level for encapsulated packets
    be2net: Export tunnel offloads only when a VxLAN tunnel is created
    gianfar: Fix dma check map error when DMA_API_DEBUG is enabled
    cxgb4/csiostor: Don't use MASTER_MUST for fw_hello call
    net: fec: only enable mdio interrupt before phy device link up
    net: fec: clear all interrupt events to support i.MX6SX
    net: fec: reset fep link status in suspend function
    net: sock: fix access via invalid file descriptor
    net: introduce helper macro for_each_cmsghdr
    ...

    Linus Torvalds
     

11 Dec, 2014

9 commits

  • Pull nmi-safe seq_buf printk update from Steven Rostedt:
    "This code is a fork from the trace-3.19 pull as it needed the
    trace_seq clean ups from that branch.

    This code solves the issue of performing stack dumps from NMI context.
    The issue is that printk() is not safe from NMI context as if the NMI
    were to trigger when a printk() was being performed, the NMI could
    deadlock from the printk() internal locks. This has been seen in
    practice.

    With lots of review from Petr Mladek, this code went through several
    iterations, and we feel that it is now at a point of quality to be
    accepted into mainline.

    Here's what is contained in this patch set:

    - Creates a "seq_buf" generic buffer utility that allows a descriptor
    to be passed around where functions can write their own "printk()"
    formatted strings into it. The generic version was pulled out of
    the trace_seq() code that was made specifically for tracing.

    - The seq_buf code was change to model the seq_file code. I have a
    patch (not included for 3.19) that converts the seq_file.c code
    over to use seq_buf.c like the trace_seq.c code does. This was
    done to make sure that seq_buf.c is compatible with seq_file.c. I
    may try to get that patch in for 3.20.

    - The seq_buf.c file was moved to lib/ to remove it from being
    dependent on CONFIG_TRACING.

    - The printk() was updated to allow for a per_cpu "override" of the
    internal calls. That is, instead of writing to the console, a call
    to printk() may do something else. This made it easier to allow
    the NMI to change what printk() does in order to call dump_stack()
    without needing to update that code as well.

    - Finally, the dump_stack from all CPUs via NMI code was converted to
    use the seq_buf code. The caller to trigger the NMI code would
    wait till all the NMIs finished, and then it would print the
    seq_buf data to the console safely from a non NMI context

    One added bonus is that this code also makes the NMI dump stack work
    on PREEMPT_RT kernels. As printk() includes sleeping locks on
    PREEMPT_RT, printk() only writes to console if the console does not
    use any rt_mutex converted spin locks. Which a lot do"

    * tag 'trace-seq-buf-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
    x86/nmi: Fix use of unallocated cpumask_var_t
    printk/percpu: Define printk_func when printk is not defined
    x86/nmi: Perform a safe NMI stack trace on all CPUs
    printk: Add per_cpu printk func to allow printk to be diverted
    seq_buf: Move the seq_buf code to lib/
    seq-buf: Make seq_buf_bprintf() conditional on CONFIG_BINARY_PRINTF
    tracing: Add seq_buf_get_buf() and seq_buf_commit() helper functions
    tracing: Have seq_buf use full buffer
    seq_buf: Add seq_buf_can_fit() helper function
    tracing: Add paranoid size check in trace_printk_seq()
    tracing: Use trace_seq_used() and seq_buf_used() instead of len
    tracing: Clean up tracing_fill_pipe_page()
    seq_buf: Create seq_buf_used() to find out how much was written
    tracing: Add a seq_buf_clear() helper and clear len and readpos in init
    tracing: Convert seq_buf fields to be like seq_file fields
    tracing: Convert seq_buf_path() to be like seq_path()
    tracing: Create seq_buf layer in trace_seq

    Linus Torvalds
     
  • Return the mathematically correct answer when an argument is 0.

    Signed-off-by: Rasmus Villemoes
    Cc: Martin K. Petersen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rasmus Villemoes
     
  • Ensure that lcm(a,b) returns the mathematically correct result, provided
    it fits in an unsigned long. The current version returns garbage if a*b
    overflows, even if the final result would fit.

    Signed-off-by: Rasmus Villemoes
    Cc: Martin K. Petersen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rasmus Villemoes
     
  • Use #defines instead of magic values.

    Signed-off-by: Joe Perches
    Acked-by: Greg Kroah-Hartman
    Cc: Jason Baron
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • dma_debug_init() is called by architecture specific code at different
    levels, but typically as a fs_initcall due to the debugfs initialization.
    Some platforms may have early callers of the DMA-API, running prior to the
    fs_initcall() level, which is not much of an issue unless
    CONFIG_DMA_API_DEBUG is set. When the DMA-API debugging facilities are
    turned on a caller will go through:

    debug_dma_map_{single,page}
    -> dma_mapping_error (inline function usually)
    -> debug_dma_mapping_error
    -> get_hash_bucket

    Calling get_hash_bucket() returns a valid hash value since we hash on high
    bits of the dma_addr cookie, but we will grab an unitialized spinlock,
    which typically won't crash but produce a warning, the real crash will
    however happen during the bucket list traversal because the list has not
    been initialized yet.

    An obvious solution is of course to move some of the offenders to run
    after the fs_initcall level, but since this might not always be an option,
    we add a flag "dma_debug_initialized" which is set to false by default,
    and set to true once dma_debug_init() has had a chance to run.

    The dma_debug_disabled() helper function previously introduced just needs
    to check for dma_debug_initialized to allow the caller to proceed or not.

    Signed-off-by: Florian Fainelli
    Cc: Dan Williams
    Cc: Jiri Kosina
    Cc: Horia Geanta
    Cc: Brian Norris
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Florian Fainelli
     
  • Add a helper function which returns whether the DMA debugging API is
    disabled, right now we only check for global_disable, but in order to
    accommodate early callers of the DMA-API, we will check for more
    initialization flags in the next patch.

    Signed-off-by: Florian Fainelli
    Cc: Dan Williams
    Cc: Jiri Kosina
    Cc: Horia Geanta
    Cc: Brian Norris
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Florian Fainelli
     
  • Conflicts:
    drivers/net/ethernet/amd/xgbe/xgbe-desc.c
    drivers/net/ethernet/renesas/sh_eth.c

    Overlapping changes in both conflict cases.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • As there are now no remaining users of arch_fast_hash(), lets kill
    it entirely.

    This basically reverts commit 71ae8aac3e19 ("lib: introduce arch
    optimized hash library") and follow-up work, that is f.e., commit
    237217546d44 ("lib: hash: follow-up fixups for arch hash"),
    commit e3fec2f74f7f ("lib: Add missing arch generic-y entries for
    asm-generic/hash.h") and last but not least commit 6a02652df511
    ("perf tools: Fix include for non x86 architectures").

    Cc: Francesco Fusco
    Cc: Thomas Graf
    Cc: Arnaldo Carvalho de Melo
    Signed-off-by: Daniel Borkmann
    Signed-off-by: David S. Miller

    Daniel Borkmann
     
  • This patch effectively reverts commit 500f80872645 ("net: ovs: use CRC32
    accelerated flow hash if available"), and other remaining arch_fast_hash()
    users such as from nfsd via commit 6282cd565553 ("NFSD: Don't hand out
    delegations for 30 seconds after recalling them.") where it has been used
    as a hash function for bloom filtering.

    While we think that these users are actually not much of concern, it has
    been requested to remove the arch_fast_hash() library bits that arose
    from [1] entirely as per recent discussion [2]. The main argument is that
    using it as a hash may introduce bias due to its linearity (see avalanche
    criterion) and thus makes it less clear (though we tried to document that)
    when this security/performance trade-off is actually acceptable for a
    general purpose library function.

    Lets therefore avoid any further confusion on this matter and remove it to
    prevent any future accidental misuse of it. For the time being, this is
    going to make hashing of flow keys a bit more expensive in the ovs case,
    but future work could reevaluate a different hashing discipline.

    [1] https://patchwork.ozlabs.org/patch/299369/
    [2] https://patchwork.ozlabs.org/patch/418756/

    Cc: Neil Brown
    Cc: Francesco Fusco
    Cc: Jesse Gross
    Cc: Thomas Graf
    Signed-off-by: Daniel Borkmann
    Signed-off-by: David S. Miller

    Daniel Borkmann
     

10 Dec, 2014

2 commits

  • Pull RCU updates from Ingo Molnar:
    "These are the main changes in this cycle:

    - Streamline RCU's use of per-CPU variables, shifting from "cpu"
    arguments to functions to "this_"-style per-CPU variable
    accessors.

    - signal-handling RCU updates.

    - real-time updates.

    - torture-test updates.

    - miscellaneous fixes.

    - documentation updates"

    * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (34 commits)
    rcu: Fix FIXME in rcu_tasks_kthread()
    rcu: More info about potential deadlocks with rcu_read_unlock()
    rcu: Optimize cond_resched_rcu_qs()
    rcu: Add sparse check for RCU_INIT_POINTER()
    documentation: memory-barriers.txt: Correct example for reorderings
    documentation: Add atomic_long_t to atomic_ops.txt
    documentation: Additional restriction for control dependencies
    documentation: Document RCU self test boot params
    rcutorture: Fix rcu_torture_cbflood() memory leak
    rcutorture: Remove obsolete kversion param in kvm.sh
    rcutorture: Remove stale test configurations
    rcutorture: Enable RCU self test in configs
    rcutorture: Add early boot self tests
    torture: Run Linux-kernel binary out of results directory
    cpu: Avoid puts_pending overflow
    rcu: Remove "cpu" argument to rcu_cleanup_after_idle()
    rcu: Remove "cpu" argument to rcu_prepare_for_idle()
    rcu: Remove "cpu" argument to rcu_needs_cpu()
    rcu: Remove "cpu" argument to rcu_note_context_switch()
    rcu: Remove "cpu" argument to rcu_preempt_check_callbacks()
    ...

    Linus Torvalds
     
  • no users left

    Signed-off-by: Al Viro

    Al Viro
     

09 Dec, 2014

1 commit


04 Dec, 2014

1 commit


03 Dec, 2014

1 commit


25 Nov, 2014

1 commit


22 Nov, 2014

1 commit

  • Conflicts:
    drivers/net/ieee802154/fakehard.c

    A bug fix went into 'net' for ieee802154/fakehard.c, which is removed
    in 'net-next'.

    Add build fix into the merge from Stephen Rothwell in openvswitch, the
    logging macros take a new initial 'log' argument, a new call was added
    in 'net' so when we merge that in here we have to explicitly add the
    new 'log' arg to it else the build fails.

    Signed-off-by: David S. Miller

    David S. Miller
     

20 Nov, 2014

2 commits

  • …/linux-rcu into core/rcu

    Pull RCU updates from Paul E. McKenney:

    - Streamline RCU's use of per-CPU variables, shifting from "cpu"
    arguments to functions to "this_"-style per-CPU variable accessors.

    - Signal-handling RCU updates.

    - Real-time updates.

    - Torture-test updates.

    - Miscellaneous fixes.

    - Documentation updates.

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

    Ingo Molnar
     
  • The seq_buf functions are rather useful outside of tracing. Instead
    of having it be dependent on CONFIG_TRACING, move the code into lib/
    and allow other users to have access to it even when tracing is not
    configured.

    The seq_buf utility is similar to the seq_file utility, but instead of
    writing sending data back up to userland, it writes it into a buffer
    defined at seq_buf_init(). This allows us to send a descriptor around
    that writes printf() formatted strings into it that can be retrieved
    later.

    It is currently used by the tracing facility for such things like trace
    events to convert its binary saved data in the ring buffer into an
    ASCII human readable context to be displayed in /sys/kernel/debug/trace.

    It can also be used for doing NMI prints safely from NMI context into
    the seq_buf and retrieved later and dumped to printk() safely. Doing
    printk() from an NMI context is dangerous because an NMI can preempt
    a current printk() and deadlock on it.

    Link: http://lkml.kernel.org/p/20140619213952.058255809@goodmis.org

    Tested-by: Jiri Kosina
    Acked-by: Jiri Kosina
    Reviewed-by: Petr Mladek
    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     

17 Nov, 2014

1 commit


15 Nov, 2014

1 commit

  • This reverts commit e5a2c899957659cd1a9f789bc462f9c0b35f5150.

    Commit e5a2c899 introduced an alternative_call, arch_fast_hash2,
    that selects between __jhash2 and __intel_crc4_2_hash based on the
    X86_FEATURE_XMM4_2.

    Unfortunately, the alternative_call system does not appear to be
    suitable for use with C functions, as register usage is not handled
    properly for the called functions. The __jhash2 function in particular
    clobbers registers that are not preserved when called via
    alternative_call, resulting in a panic for direct callers of
    arch_fast_hash2 on older CPUs lacking sse4_2. It is possible that
    __intel_crc4_2_hash works merely by chance because it uses fewer
    registers.

    This commit was suggested as the source of the problem by Jesse
    Gross .

    Signed-off-by: Jay Vosburgh
    Signed-off-by: David S. Miller

    Jay Vosburgh