22 Oct, 2014

1 commit

  • while comparing for verifier state equivalency the comparison
    was missing a check for uninitialized register.
    Make sure it does so and add a testcase.

    Fixes: f1bca824dabb ("bpf: add search pruning optimization to verifier")
    Cc: Hannes Frederic Sowa
    Signed-off-by: Alexei Starovoitov
    Acked-by: Hannes Frederic Sowa
    Signed-off-by: David S. Miller

    Alexei Starovoitov
     

09 Oct, 2014

1 commit

  • Pull networking updates from David Miller:
    "Most notable changes in here:

    1) By far the biggest accomplishment, thanks to a large range of
    contributors, is the addition of multi-send for transmit. This is
    the result of discussions back in Chicago, and the hard work of
    several individuals.

    Now, when the ->ndo_start_xmit() method of a driver sees
    skb->xmit_more as true, it can choose to defer the doorbell
    telling the driver to start processing the new TX queue entires.

    skb->xmit_more means that the generic networking is guaranteed to
    call the driver immediately with another SKB to send.

    There is logic added to the qdisc layer to dequeue multiple
    packets at a time, and the handling mis-predicted offloads in
    software is now done with no locks held.

    Finally, pktgen is extended to have a "burst" parameter that can
    be used to test a multi-send implementation.

    Several drivers have xmit_more support: i40e, igb, ixgbe, mlx4,
    virtio_net

    Adding support is almost trivial, so export more drivers to
    support this optimization soon.

    I want to thank, in no particular or implied order, Jesper
    Dangaard Brouer, Eric Dumazet, Alexander Duyck, Tom Herbert, Jamal
    Hadi Salim, John Fastabend, Florian Westphal, Daniel Borkmann,
    David Tat, Hannes Frederic Sowa, and Rusty Russell.

    2) PTP and timestamping support in bnx2x, from Michal Kalderon.

    3) Allow adjusting the rx_copybreak threshold for a driver via
    ethtool, and add rx_copybreak support to enic driver. From
    Govindarajulu Varadarajan.

    4) Significant enhancements to the generic PHY layer and the bcm7xxx
    driver in particular (EEE support, auto power down, etc.) from
    Florian Fainelli.

    5) Allow raw buffers to be used for flow dissection, allowing drivers
    to determine the optimal "linear pull" size for devices that DMA
    into pools of pages. The objective is to get exactly the
    necessary amount of headers into the linear SKB area pre-pulled,
    but no more. The new interface drivers use is eth_get_headlen().
    From WANG Cong, with driver conversions (several had their own
    by-hand duplicated implementations) by Alexander Duyck and Eric
    Dumazet.

    6) Support checksumming more smoothly and efficiently for
    encapsulations, and add "foo over UDP" facility. From Tom
    Herbert.

    7) Add Broadcom SF2 switch driver to DSA layer, from Florian
    Fainelli.

    8) eBPF now can load programs via a system call and has an extensive
    testsuite. Alexei Starovoitov and Daniel Borkmann.

    9) Major overhaul of the packet scheduler to use RCU in several major
    areas such as the classifiers and rate estimators. From John
    Fastabend.

    10) Add driver for Intel FM10000 Ethernet Switch, from Alexander
    Duyck.

    11) Rearrange TCP_SKB_CB() to reduce cache line misses, from Eric
    Dumazet.

    12) Add Datacenter TCP congestion control algorithm support, From
    Florian Westphal.

    13) Reorganize sk_buff so that __copy_skb_header() is significantly
    faster. From Eric Dumazet"

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1558 commits)
    netlabel: directly return netlbl_unlabel_genl_init()
    net: add netdev_txq_bql_{enqueue, complete}_prefetchw() helpers
    net: description of dma_cookie cause make xmldocs warning
    cxgb4: clean up a type issue
    cxgb4: potential shift wrapping bug
    i40e: skb->xmit_more support
    net: fs_enet: Add NAPI TX
    net: fs_enet: Remove non NAPI RX
    r8169:add support for RTL8168EP
    net_sched: copy exts->type in tcf_exts_change()
    wimax: convert printk to pr_foo()
    af_unix: remove 0 assignment on static
    ipv6: Do not warn for informational ICMP messages, regardless of type.
    Update Intel Ethernet Driver maintainers list
    bridge: Save frag_max_size between PRE_ROUTING and POST_ROUTING
    tipc: fix bug in multicast congestion handling
    net: better IFF_XMIT_DST_RELEASE support
    net/mlx4_en: remove NETDEV_TX_BUSY
    3c59x: fix bad split of cpu_to_le32(pci_map_single())
    net: bcmgenet: fix Tx ring priority programming
    ...

    Linus Torvalds
     

02 Oct, 2014

1 commit


27 Sep, 2014

1 commit

  • 1.
    the library includes a trivial set of BPF syscall wrappers:
    int bpf_create_map(int key_size, int value_size, int max_entries);
    int bpf_update_elem(int fd, void *key, void *value);
    int bpf_lookup_elem(int fd, void *key, void *value);
    int bpf_delete_elem(int fd, void *key);
    int bpf_get_next_key(int fd, void *key, void *next_key);
    int bpf_prog_load(enum bpf_prog_type prog_type,
    const struct sock_filter_int *insns, int insn_len,
    const char *license);
    bpf_prog_load() stores verifier log into global bpf_log_buf[] array

    and BPF_*() macros to build instructions

    2.
    test stubs configure eBPF infra with 'unspec' map and program types.
    These are fake types used by user space testsuite only.

    3.
    verifier tests valid and invalid programs and expects predefined
    error log messages from kernel.
    40 tests so far.

    $ sudo ./test_verifier
    #0 add+sub+mul OK
    #1 unreachable OK
    #2 unreachable2 OK
    #3 out of range jump OK
    #4 out of range jump2 OK
    #5 test1 ld_imm64 OK
    ...

    Signed-off-by: Alexei Starovoitov
    Signed-off-by: David S. Miller

    Alexei Starovoitov
     

26 Sep, 2014

1 commit

  • In commit e80d666 "flagday: kill pt_regs argument of do_fork()", the
    arguments to do_fork() changed.

    The example code in jprobe_example.c was not updated to match, so the
    arguments inside the jprobe handler do not match reality.

    Fix it by updating the arguments to match do_fork(). While we're at it
    use pr_info() for brevity, and print stack_start as well for interest.

    Signed-off-by: Michael Ellerman
    Acked-by: Masami Hiramatsu
    Signed-off-by: Jiri Kosina

    Michael Ellerman
     

01 Jul, 2014

1 commit

  • Strings should be copied with strlcpy instead of strncpy when they will
    later be printed via %s. This guarantees that they terminate with a
    NUL '\0' character and do not run pass the end of the allocated string.

    This is only for sample code, but it should stil represent a good
    role model.

    Link: http://lkml.kernel.org/p/51C2E204.1080501@huawei.com

    Signed-off-by: Zhao Hongjiang
    Signed-off-by: Steven Rostedt

    Zhao Hongjiang
     

21 Jun, 2014

1 commit

  • Currently the __field() macro in TRACE_EVENT is only good for primitive
    values, such as integers and pointers, but it fails on complex data types
    such as structures or unions. This is because the __field() macro
    determines if the variable is signed or not with the test of:

    (((type)(-1)) < (type)1)

    Unfortunately, that fails when type is a structure.

    Since trace events should support structures as fields a new macro
    is created for such a case called __field_struct() which acts exactly
    the same as __field() does but it does not do the signed type check
    and just uses a constant false for that answer.

    Cc: Tony Luck
    Signed-off-by: Steven Rostedt

    Steven Rostedt
     

14 May, 2014

1 commit


04 Apr, 2014

1 commit

  • The Makefile is designed to use the host toolchain so it may be unsafe
    to build the tests if the kernel has been configured and built for
    another architecture. This fixes a build problem when the kernel has
    been configured and built for the MIPS architecture but the host is not
    MIPS (cross-compiled). The MIPS syscalls are only defined if one of the
    following is true:

    1) _MIPS_SIM == _MIPS_SIM_ABI64
    2) _MIPS_SIM == _MIPS_SIM_ABI32
    3) _MIPS_SIM == _MIPS_SIM_NABI32

    Of course, none of these make sense on a non-MIPS toolchain and the
    following build problem occurs when building on a non-MIPS host.

    linux/usr/include/linux/kexec.h:50: userspace cannot reference function or variable defined in the kernel
    samples/seccomp/bpf-direct.c: In function `emulator':
    samples/seccomp/bpf-direct.c:76:17: error: `__NR_write' undeclared (first use in this function)

    Signed-off-by: Markos Chandras
    Reported-by: Paul Gortmaker
    Cc: Ralf Baechle
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Markos Chandras
     

04 Dec, 2013

1 commit


15 Nov, 2013

1 commit

  • This patch enhances the type safety for the kfifo API. It is now safe
    to put const data into a non const FIFO and the API will now generate a
    compiler warning when reading from the fifo where the destination
    address is pointing to a const variable.

    As a side effect the kfifo_put() does now expect the value of an element
    instead a pointer to the element. This was suggested Russell King. It
    make the handling of the kfifo_put easier since there is no need to
    create a helper variable for getting the address of a pointer or to pass
    integers of different sizes.

    IMHO the API break is okay, since there are currently only six users of
    kfifo_put().

    The code is also cleaner by kicking out the "if (0)" expressions.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Stefani Seibold
    Cc: Russell King
    Cc: Hauke Mehrtens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stefani Seibold
     

07 Sep, 2013

1 commit

  • Pull Tile arch updates from Chris Metcalf:
    "These changes bring in a bunch of new functionality that has been
    maintained internally at Tilera over the last year, plus other stray
    bits of work that I've taken into the tile tree from other folks.

    The changes include some PCI root complex work, interrupt-driven
    console support, support for performing fast-path unaligned data
    fixups by kernel-based JIT code generation, CONFIG_PREEMPT support,
    vDSO support for gettimeofday(), a serial driver for the tilegx
    on-chip UART, KGDB support, more optimized string routines, support
    for ftrace and kprobes, improved ASLR, and many bug fixes.

    We also remove support for the old TILE64 chip, which is no longer
    buildable"

    * git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: (85 commits)
    tile: refresh tile defconfig files
    tile: rework
    tile PCI RC: make default consistent DMA mask 32-bit
    tile: add null check for kzalloc in tile/kernel/setup.c
    tile: make __write_once a synonym for __read_mostly
    tile: remove support for TILE64
    tile: use asm-generic/bitops/builtin-*.h
    tile: eliminate no-op "noatomichash" boot argument
    tile: use standard tile_bundle_bits type in traps.c
    tile: simplify code referencing hypervisor API addresses
    tile: change to in comments
    tile: mark pcibios_init() as __init
    tile: check for correct compiler earlier in asm-offsets.c
    tile: use standard 'generic-y' model for
    tile: use asm-generic version of
    tile PCI RC: add comment about "PCI hole" problem
    tile: remove DEBUG_EXTRA_FLAGS kernel config option
    tile: add virt_to_kpte() API and clean up and document behavior
    tile: support FRAME_POINTER
    tile: support reporting Tilera hypervisor statistics
    ...

    Linus Torvalds
     

06 Sep, 2013

1 commit


04 Sep, 2013

1 commit

  • This extends the uhid example client. It properly documents the built-in
    report-descriptor an adds explicit report-numbers.

    Furthermore, LED output reports are added to utilize the new UHID output
    reports of the kernel. Support for 3 basic LEDs is added and a small
    report-parser to print debug messages if output reports were received.

    To test this, simply write the EV_LED+LED_CAPSL+1 event to the evdev
    device-node of the uhid-device and the kernel will forward it to your uhid
    client.

    Signed-off-by: David Herrmann
    Signed-off-by: Jiri Kosina

    David Herrmann
     

30 Aug, 2013

1 commit


20 Aug, 2013

1 commit


28 Mar, 2013

1 commit


20 Feb, 2013

1 commit

  • Pull perf changes from Ingo Molnar:
    "There are lots of improvements, the biggest changes are:

    Main kernel side changes:

    - Improve uprobes performance by adding 'pre-filtering' support, by
    Oleg Nesterov.

    - Make some POWER7 events available in sysfs, equivalent to what was
    done on x86, from Sukadev Bhattiprolu.

    - tracing updates by Steve Rostedt - mostly misc fixes and smaller
    improvements.

    - Use perf/event tracing to report PCI Express advanced errors, by
    Tony Luck.

    - Enable northbridge performance counters on AMD family 15h, by Jacob
    Shin.

    - This tracing commit:

    tracing: Remove the extra 4 bytes of padding in events

    changes the ABI. All involved parties (PowerTop in particular)
    seem to agree that it's safe to do now with the introduction of
    libtraceevent, but the devil is in the details ...

    Main tooling side changes:

    - Add 'event group view', from Namyung Kim:

    To use it, 'perf record' should group events when recording. And
    then perf report parses the saved group relation from file header
    and prints them together if --group option is provided. You can
    use the 'perf evlist' command to see event group information:

    $ perf record -e '{ref-cycles,cycles}' noploop 1
    [ perf record: Woken up 2 times to write data ]
    [ perf record: Captured and wrote 0.385 MB perf.data (~16807 samples) ]

    $ perf evlist --group
    {ref-cycles,cycles}

    With this example, default perf report will show you each event
    separately.

    You can use --group option to enable event group view:

    $ perf report --group
    ...
    # group: {ref-cycles,cycles}
    # ========
    # Samples: 7K of event 'anon group { ref-cycles, cycles }'
    # Event count (approx.): 6876107743
    #
    # Overhead Command Shared Object Symbol
    # ................ ....... ................. ..........................
    99.84% 99.76% noploop noploop [.] main
    0.07% 0.00% noploop ld-2.15.so [.] strcmp
    0.03% 0.00% noploop [kernel.kallsyms] [k] timerqueue_del
    0.03% 0.03% noploop [kernel.kallsyms] [k] sched_clock_cpu
    0.02% 0.00% noploop [kernel.kallsyms] [k] account_user_time
    0.01% 0.00% noploop [kernel.kallsyms] [k] __alloc_pages_nodemask
    0.00% 0.00% noploop [kernel.kallsyms] [k] native_write_msr_safe
    0.00% 0.11% noploop [kernel.kallsyms] [k] _raw_spin_lock
    0.00% 0.06% noploop [kernel.kallsyms] [k] find_get_page
    0.00% 0.02% noploop [kernel.kallsyms] [k] rcu_check_callbacks
    0.00% 0.02% noploop [kernel.kallsyms] [k] __current_kernel_time

    As you can see the Overhead column now contains both of ref-cycles
    and cycles and header line shows group information also - 'anon
    group { ref-cycles, cycles }'. The output is sorted by period of
    group leader first.

    - Initial GTK+ annotate browser, from Namhyung Kim.

    - Add option for runtime switching perf data file in perf report,
    just press 's' and a menu with the valid files found in the current
    directory will be presented, from Feng Tang.

    - Add support to display whole group data for raw columns, from Jiri
    Olsa.

    - Add per processor socket count aggregation in perf stat, from
    Stephane Eranian.

    - Add interval printing in 'perf stat', from Stephane Eranian.

    - 'perf test' improvements

    - Add support for wildcards in tracepoint system name, from Jiri
    Olsa.

    - Add anonymous huge page recognition, from Joshua Zhu.

    - perf build-id cache now can show DSOs present in a perf.data file
    that are not in the cache, to integrate with build-id servers being
    put in place by organizations such as Fedora.

    - perf top now shares more of the evsel config/creation routines with
    'record', paving the way for further integration like 'top'
    snapshots, etc.

    - perf top now supports DWARF callchains.

    - Fix mmap limitations on 32-bit, fix from David Miller.

    - 'perf bench numa mem' NUMA performance measurement suite

    - ... and lots of fixes, performance improvements, cleanups and other
    improvements I failed to list - see the shortlog and git log for
    details."

    * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (270 commits)
    perf/x86/amd: Enable northbridge performance counters on AMD family 15h
    perf/hwbp: Fix cleanup in case of kzalloc failure
    perf tools: Fix build with bison 2.3 and older.
    perf tools: Limit unwind support to x86 archs
    perf annotate: Make it to be able to skip unannotatable symbols
    perf gtk/annotate: Fail early if it can't annotate
    perf gtk/annotate: Show source lines with gray color
    perf gtk/annotate: Support multiple event annotation
    perf ui/gtk: Implement basic GTK2 annotation browser
    perf annotate: Fix warning message on a missing vmlinux
    perf buildid-cache: Add --update option
    uprobes/perf: Avoid uprobe_apply() whenever possible
    uprobes/perf: Teach trace_uprobe/perf code to use UPROBE_HANDLER_REMOVE
    uprobes/perf: Teach trace_uprobe/perf code to pre-filter
    uprobes/perf: Teach trace_uprobe/perf code to track the active perf_event's
    uprobes: Introduce uprobe_apply()
    perf: Introduce hw_perf_event->tp_target and ->tp_list
    uprobes/perf: Always increment trace_uprobe->nhit
    uprobes/tracing: Kill uprobe_trace_consumer, embed uprobe_consumer into trace_uprobe
    uprobes/tracing: Introduce is_trace_uprobe_enabled()
    ...

    Linus Torvalds
     

05 Feb, 2013

1 commit

  • The seccomp filters are currently built for the build host, not for the
    machine that they are going to run on, but they are also built for with
    the -m32 flag if the kernel is built for a 32 bit machine, both of which
    seems rather odd.

    It broke allyesconfig on my machine, which is x86-64, but building for
    32 bit ARM, with this error message:

    In file included from /usr/include/stdio.h:28:0,
    from samples/seccomp/bpf-fancy.c:15:
    /usr/include/features.h:324:26: fatal error: bits/predefs.h: No such file or directory

    because there are no 32 bit libc headers installed on this machine. We
    should really be building all the samples for the target machine rather
    than the build host, but since the infrastructure for that appears to be
    missing right now, let's be a little bit smarter and not pass the '-m32'
    flag to the HOSTCC when cross- compiling.

    Signed-off-by: Arnd Bergmann
    Acked-by: Kees Cook
    Cc: Heiko Carstens
    Cc: James Morris
    Acked-by: Will Drewry
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arnd Bergmann
     

26 Jan, 2013

1 commit

  • The tracepoint sample code was used to teach developers how to
    create their own tracepoints. But now the trace_events have been
    added as a higher level that is used directly by developers today.

    Only the trace_event code should use the tracepoint interface
    directly and no new tracepoints should be added.

    Besides, the example had a race condition with the use of the
    ->d_name.name dentry field, as pointed out by Al Viro.

    Best just to remove the code so it wont be used by other developers.

    Link: http://lkml.kernel.org/r/20130123225523.GY4939@ZenIV.linux.org.uk

    Cc: Al Viro
    Acked-by: Mathieu Desnoyers
    Signed-off-by: Steven Rostedt

    Steven Rostedt
     

04 Jan, 2013

1 commit

  • CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
    markings need to be removed.

    This change removes the last of the __dev* markings from the kernel from
    a variety of different, tiny, places.

    Based on patches originally written by Bill Pemberton, but redone by me
    in order to handle some of the coding style issues better, by hand.

    Cc: Bill Pemberton
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

12 Sep, 2012

1 commit

  • On s390 the flag to force 31 builds is -m31 instead of -m32 unlike
    on all (?) other architectures.

    Fixes this compile error:

    HOSTCC samples/seccomp/bpf-direct.o
    cc1: error: unrecognized command line option "-m32"
    make[2]: *** [samples/seccomp/bpf-direct.o] Error 1

    Signed-off-by: Heiko Carstens
    Acked-by: Kees Cook
    Signed-off-by: James Morris

    Heiko Carstens
     

17 Aug, 2012

1 commit


03 Aug, 2012

1 commit

  • The LO_ARG define needs to consider endianness also for 32 bit builds.

    The "bpf_fancy" test case didn't work on s390 in 32 bit and compat mode
    because the LO_ARG define resulted in a BPF program which read the upper
    halve of the 64 bit system call arguments instead of the lower halves.

    Signed-off-by: Heiko Carstens
    Acked-by: Kees Cook
    Signed-off-by: James Morris

    Heiko Carstens
     

25 Jul, 2012

1 commit

  • Pull HID updates from Jiri Kosina:
    "The list of changes worth pointing out explicitly:

    - We are getting 'UHID', which is a new framework for implementing HID
    transport drivers in userspace (this is different from HIDRAW, which
    is transport-independent and provides report parsing facilities;
    uhid is for the other (transport) part of the pipeline).

    It's needed for (and currently being used by) Bluetooth-LowEnergy,
    as its specification mandates things we don't want in the kernel.

    Written by David Herrmann.

    - there have been quite a few bugs in runtime suspend/resume paths
    (probably never reported to actually happen in the wild, but still).
    Alan Stern fixed those.

    - a few other driver updates and fixes and random new device support."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (45 commits)
    HID: add ASUS AIO keyboard model AK1D
    HID: add support for Cypress barcode scanner 04B4:ED81
    HID: Allow drivers to be their own listener
    HID: usbhid: fix error paths in suspend
    HID: usbhid: check for suspend or reset before restarting
    HID: usbhid: replace HID_REPORTED_IDLE with HID_SUSPENDED
    HID: usbhid: inline some simple routines
    HID: usbhid: fix autosuspend calls
    HID: usbhid: fix use-after-free bug
    HID: hid-core: optimize in case of hidraw
    HID: hidraw: fix list->buffer memleak
    HID: uhid: Fix sending events with invalid data
    HID: roccat: added sensor sysfs attribute for Savu
    HID: Add driver for Holtek based keyboards with broken HID
    HID: Add suport for the brightness control keys on HP keyboards
    HID: magicmouse: Implement Multi-touch Protocol B (MT-B)
    HID: magicmouse: Removing report_touches switch
    HID: roccat: rename roccat_common functions to roccat_common2
    HID: roccat: fix wrong hid_err usage on struct usb_device
    HID: roccat: move functionality to roccat-common
    ...

    Linus Torvalds
     

28 Jun, 2012

1 commit


18 Jun, 2012

1 commit

  • This adds an example user-space program that emulates a 3 button mouse
    with wheel. It detects keyboard presses and moves the mouse accordingly.

    It register a fake HID device to feed the raw HID reports into the kernel.
    In this example, you could use uinput to get the same result, but this
    shows how to get the same behavior with uhid so you don't need HID parsers
    in user-space.

    Signed-off-by: David Herrmann
    Signed-off-by: Jiri Kosina

    David Herrmann
     

19 Apr, 2012

1 commit

  • This change fixes the compilation error triggered here for
    i386 allmodconfig in linux-next:
    http://kisskb.ellerman.id.au/kisskb/buildresult/6123842/

    Logic attempting to predict the host architecture has been
    removed from the Makefile. Instead, the bpf-direct sample
    should now compile on any architecture, but if the architecture
    is not supported, it will compile a minimal main() function.

    This change also ensures the samples are not compiled when
    there is no seccomp filter support.

    (Note, I wasn't able to reproduce the error locally, but
    the existing approach was clearly flawed. This tweak
    should resolve your issue and avoid other future weirdness.)

    Reported-by: Paul Gortmaker
    Suggested-by: Kees Cook
    Signed-off-by: Will Drewry
    Signed-off-by: James Morris

    Will Drewry
     

14 Apr, 2012

1 commit

  • Documents how system call filtering using Berkeley Packet
    Filter programs works and how it may be used.
    Includes an example for x86 and a semi-generic
    example using a macro-based code generator.

    Acked-by: Eric Paris
    Signed-off-by: Will Drewry
    Acked-by: Kees Cook

    v18: - added acked by
    - update no new privs numbers
    v17: - remove @compat note and add Pitfalls section for arch checking
    (keescook@chromium.org)
    v16: -
    v15: -
    v14: - rebase/nochanges
    v13: - rebase on to 88ebdda6159ffc15699f204c33feb3e431bf9bdc
    v12: - comment on the ptrace_event use
    - update arch support comment
    - note the behavior of SECCOMP_RET_DATA when there are multiple filters
    (keescook@chromium.org)
    - lots of samples/ clean up incl 64-bit bpf-direct support
    (markus@chromium.org)
    - rebase to linux-next
    v11: - overhaul return value language, updates (keescook@chromium.org)
    - comment on do_exit(SIGSYS)
    v10: - update for SIGSYS
    - update for new seccomp_data layout
    - update for ptrace option use
    v9: - updated bpf-direct.c for SIGILL
    v8: - add PR_SET_NO_NEW_PRIVS to the samples.
    v7: - updated for all the new stuff in v7: TRAP, TRACE
    - only talk about PR_SET_SECCOMP now
    - fixed bad JLE32 check (coreyb@linux.vnet.ibm.com)
    - adds dropper.c: a simple system call disabler
    v6: - tweak the language to note the requirement of
    PR_SET_NO_NEW_PRIVS being called prior to use. (luto@mit.edu)
    v5: - update sample to use system call arguments
    - adds a "fancy" example using a macro-based generator
    - cleaned up bpf in the sample
    - update docs to mention arguments
    - fix prctl value (eparis@redhat.com)
    - language cleanup (rdunlap@xenotime.net)
    v4: - update for no_new_privs use
    - minor tweaks
    v3: - call out BPF Berkeley Packet Filter (rdunlap@xenotime.net)
    - document use of tentative always-unprivileged
    - guard sample compilation for i386 and x86_64
    v2: - move code to samples (corbet@lwn.net)
    Signed-off-by: James Morris

    Will Drewry
     

09 Feb, 2012

1 commit

  • Add an rpmsg driver sample, which demonstrates how to communicate with
    an AMP-configured remote processor over the rpmsg bus.

    Note how once probed, the driver can immediately start sending messages
    using the rpmsg_send() API, without having to worry about creating endpoints
    or allocating rpmsg addresses: all that work is done by the rpmsg bus,
    and the required information is already embedded in the rpmsg channel
    that the driver is probed with.

    In this sample, the driver simply sends a "Hello World!" message to the remote
    processor repeatedly.

    Designed with Brian Swetland .

    Signed-off-by: Ohad Ben-Cohen
    Cc: Brian Swetland
    Cc: Arnd Bergmann
    Cc: Grant Likely
    Cc: Tony Lindgren
    Cc: Russell King
    Cc: Rusty Russell
    Cc: Andrew Morton
    Cc: Greg KH
    Cc: Stephen Boyd

    Ohad Ben-Cohen
     

01 Nov, 2011

1 commit


01 Jul, 2011

2 commits

  • The perf_event overflow handler does not receive any caller-derived
    argument, so many callers need to resort to looking up the perf_event
    in their local data structure. This is ugly and doesn't scale if a
    single callback services many perf_events.

    Fix by adding a context parameter to perf_event_create_kernel_counter()
    (and derived hardware breakpoints APIs) and storing it in the perf_event.
    The field can be accessed from the callback as event->overflow_handler_context.
    All callers are updated.

    Signed-off-by: Avi Kivity
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1309362157-6596-2-git-send-email-avi@redhat.com
    Signed-off-by: Ingo Molnar

    Avi Kivity
     
  • The nmi parameter indicated if we could do wakeups from the current
    context, if not, we would set some state and self-IPI and let the
    resulting interrupt do the wakeup.

    For the various event classes:

    - hardware: nmi=0; PMI is in fact an NMI or we run irq_work_run from
    the PMI-tail (ARM etc.)
    - tracepoint: nmi=0; since tracepoint could be from NMI context.
    - software: nmi=[0,1]; some, like the schedule thing cannot
    perform wakeups, and hence need 0.

    As one can see, there is very little nmi=1 usage, and the down-side of
    not using it is that on some platforms some software events can have a
    jiffy delay in wakeup (when arch_irq_work_raise isn't implemented).

    The up-side however is that we can remove the nmi parameter and save a
    bunch of conditionals in fast paths.

    Signed-off-by: Peter Zijlstra
    Cc: Michael Cree
    Cc: Will Deacon
    Cc: Deng-Cheng Zhu
    Cc: Anton Blanchard
    Cc: Eric B Munson
    Cc: Heiko Carstens
    Cc: Paul Mundt
    Cc: David S. Miller
    Cc: Frederic Weisbecker
    Cc: Jason Wessel
    Cc: Don Zickus
    Link: http://lkml.kernel.org/n/tip-agjev8eu666tvknpb3iaj0fg@git.kernel.org
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

23 May, 2011

1 commit


21 Apr, 2011

1 commit

  • samples/hid-example.o needs some Kconfig and Makefile additions in order
    to build. It should use headers from the build tree, so use
    HEADERS_CHECK to require that those header files be present.

    Change the kconfig symbol from tristate to bool since userspace cannot be
    built as loadable modules.

    However, I don't understand why the userspace header files are not present
    as reported in Andrew's build log, since it builds OK on x86_64 without
    any of these changes.

    Signed-off-by: Randy Dunlap
    Cc: Alan Ott
    Cc: Jiri Kosina
    Signed-off-by: Andrew Morton
    Signed-off-by: Jiri Kosina

    Randy Dunlap
     

09 Apr, 2011

1 commit

  • On systems where userspace doesn't have new hidraw.h populated to
    /usr/include, the hidraw sample won't compile as it's missing the new
    ioctl defitions.

    Introduce temporary ugly workaround to define the ioctls "manually"
    in such cases, just to avoid miscompilation in allmodconfig cases.

    Reported-by: Stephen Rothwell
    Signed-off-by: Jiri Kosina

    Jiri Kosina
     

31 Mar, 2011

1 commit


22 Mar, 2011

1 commit


30 Oct, 2010

1 commit


23 Oct, 2010

1 commit

  • * 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl:
    vfs: make no_llseek the default
    vfs: don't use BKL in default_llseek
    llseek: automatically add .llseek fop
    libfs: use generic_file_llseek for simple_attr
    mac80211: disallow seeks in minstrel debug code
    lirc: make chardev nonseekable
    viotape: use noop_llseek
    raw: use explicit llseek file operations
    ibmasmfs: use generic_file_llseek
    spufs: use llseek in all file operations
    arm/omap: use generic_file_llseek in iommu_debug
    lkdtm: use generic_file_llseek in debugfs
    net/wireless: use generic_file_llseek in debugfs
    drm: use noop_llseek

    Linus Torvalds