04 Aug, 2016

4 commits

  • The regs_return_value() returns "unsigned long" or "long" value. But the
    retval is int type now, it may cause overflow, the log may becomes:

    [ 2911.078869] do_brk returned -2003877888 and took 4620 ns to execute

    This patch converts the retval to "unsigned long" type, and fixes the
    overflow issue.

    Link: http://lkml.kernel.org/r/1464143083-3877-4-git-send-email-shijie.huang@arm.com
    Signed-off-by: Huang Shijie
    Cc: Petr Mladek
    Cc: Steve Capper
    Cc: Ananth N Mavinakayanahalli
    Cc: Anil S Keshavamurthy
    Cc: Masami Hiramatsu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Huang Shijie
     
  • We prefer to use the pr_* to print out the log now, this patch converts
    the printk to pr_info. In the error path, use the pr_err to replace the
    printk.

    Link: http://lkml.kernel.org/r/1464143083-3877-3-git-send-email-shijie.huang@arm.com
    Signed-off-by: Huang Shijie
    Cc: Petr Mladek
    Cc: Steve Capper
    Cc: Ananth N Mavinakayanahalli
    Cc: Anil S Keshavamurthy
    Cc: Masami Hiramatsu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Huang Shijie
     
  • We prefer to use the pr_* to print out the log now, this patch converts
    the printk to pr_info. In the error path, use the pr_err to replace the
    printk.

    Link: http://lkml.kernel.org/r/1464143083-3877-2-git-send-email-shijie.huang@arm.com
    Signed-off-by: Huang Shijie
    Cc: Petr Mladek
    Cc: Steve Capper
    Cc: Ananth N Mavinakayanahalli
    Cc: Anil S Keshavamurthy
    Cc: Masami Hiramatsu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Huang Shijie
     
  • We prefer to use the pr_* to print out the log now, this patch converts
    the printk to pr_info. In the error path, use the pr_err to replace the
    printk.

    Link: http://lkml.kernel.org/r/1464143083-3877-1-git-send-email-shijie.huang@arm.com
    Signed-off-by: Huang Shijie
    Cc: Petr Mladek
    Cc: Steve Capper
    Cc: Ananth N Mavinakayanahalli
    Cc: Anil S Keshavamurthy
    Cc: Masami Hiramatsu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Huang Shijie
     

30 Jul, 2016

1 commit

  • Pull security subsystem updates from James Morris:
    "Highlights:

    - TPM core and driver updates/fixes
    - IPv6 security labeling (CALIPSO)
    - Lots of Apparmor fixes
    - Seccomp: remove 2-phase API, close hole where ptrace can change
    syscall #"

    * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (156 commits)
    apparmor: fix SECURITY_APPARMOR_HASH_DEFAULT parameter handling
    tpm: Add TPM 2.0 support to the Nuvoton i2c driver (NPCT6xx family)
    tpm: Factor out common startup code
    tpm: use devm_add_action_or_reset
    tpm2_i2c_nuvoton: add irq validity check
    tpm: read burstcount from TPM_STS in one 32-bit transaction
    tpm: fix byte-order for the value read by tpm2_get_tpm_pt
    tpm_tis_core: convert max timeouts from msec to jiffies
    apparmor: fix arg_size computation for when setprocattr is null terminated
    apparmor: fix oops, validate buffer size in apparmor_setprocattr()
    apparmor: do not expose kernel stack
    apparmor: fix module parameters can be changed after policy is locked
    apparmor: fix oops in profile_unpack() when policy_db is not present
    apparmor: don't check for vmalloc_addr if kvzalloc() failed
    apparmor: add missing id bounds check on dfa verification
    apparmor: allow SYS_CAP_RESOURCE to be sufficient to prlimit another task
    apparmor: use list_next_entry instead of list_entry_next
    apparmor: fix refcount race when finding a child profile
    apparmor: fix ref count leak when profile sha1 hash is read
    apparmor: check that xindex is in trans_table bounds
    ...

    Linus Torvalds
     

29 Jul, 2016

1 commit

  • Pull tracing updates from Steven Rostedt:
    "This is mostly clean ups and small fixes. Some of the more visible
    changes are:

    - The function pid code uses the event pid filtering logic
    - [ku]probe events have access to current->comm
    - trace_printk now has sample code
    - PCI devices now trace physical addresses
    - stack tracing has less unnessary functions traced"

    * tag 'trace-v4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
    printk, tracing: Avoiding unneeded blank lines
    tracing: Use __get_str() when manipulating strings
    tracing, RAS: Cleanup on __get_str() usage
    tracing: Use outer () on __get_str() definition
    ftrace: Reduce size of function graph entries
    tracing: Have HIST_TRIGGERS select TRACING
    tracing: Using for_each_set_bit() to simplify trace_pid_write()
    ftrace: Move toplevel init out of ftrace_init_tracefs()
    tracing/function_graph: Fix filters for function_graph threshold
    tracing: Skip more functions when doing stack tracing of events
    tracing: Expose CPU physical addresses (resource values) for PCI devices
    tracing: Show the preempt count of when the event was called
    tracing: Add trace_printk sample code
    tracing: Choose static tp_printk buffer by explicit nesting count
    tracing: expose current->comm to [ku]probe events
    ftrace: Have set_ftrace_pid use the bitmap like events do
    tracing: Move pid_list write processing into its own function
    tracing: Move the pid_list seq_file functions to be global
    tracing: Move filtered_pid helper functions into trace.c
    tracing: Make the pid filtering helper functions global

    Linus Torvalds
     

28 Jul, 2016

2 commits

  • Pull networking updates from David Miller:

    1) Unified UDP encapsulation offload methods for drivers, from
    Alexander Duyck.

    2) Make DSA binding more sane, from Andrew Lunn.

    3) Support QCA9888 chips in ath10k, from Anilkumar Kolli.

    4) Several workqueue usage cleanups, from Bhaktipriya Shridhar.

    5) Add XDP (eXpress Data Path), essentially running BPF programs on RX
    packets as soon as the device sees them, with the option to mirror
    the packet on TX via the same interface. From Brenden Blanco and
    others.

    6) Allow qdisc/class stats dumps to run lockless, from Eric Dumazet.

    7) Add VLAN support to b53 and bcm_sf2, from Florian Fainelli.

    8) Simplify netlink conntrack entry layout, from Florian Westphal.

    9) Add ipv4 forwarding support to mlxsw spectrum driver, from Ido
    Schimmel, Yotam Gigi, and Jiri Pirko.

    10) Add SKB array infrastructure and convert tun and macvtap over to it.
    From Michael S Tsirkin and Jason Wang.

    11) Support qdisc packet injection in pktgen, from John Fastabend.

    12) Add neighbour monitoring framework to TIPC, from Jon Paul Maloy.

    13) Add NV congestion control support to TCP, from Lawrence Brakmo.

    14) Add GSO support to SCTP, from Marcelo Ricardo Leitner.

    15) Allow GRO and RPS to function on macsec devices, from Paolo Abeni.

    16) Support MPLS over IPV4, from Simon Horman.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1622 commits)
    xgene: Fix build warning with ACPI disabled.
    be2net: perform temperature query in adapter regardless of its interface state
    l2tp: Correctly return -EBADF from pppol2tp_getname.
    net/mlx5_core/health: Remove deprecated create_singlethread_workqueue
    net: ipmr/ip6mr: update lastuse on entry change
    macsec: ensure rx_sa is set when validation is disabled
    tipc: dump monitor attributes
    tipc: add a function to get the bearer name
    tipc: get monitor threshold for the cluster
    tipc: make cluster size threshold for monitoring configurable
    tipc: introduce constants for tipc address validation
    net: neigh: disallow transition to NUD_STALE if lladdr is unchanged in neigh_update()
    MAINTAINERS: xgene: Add driver and documentation path
    Documentation: dtb: xgene: Add MDIO node
    dtb: xgene: Add MDIO node
    drivers: net: xgene: ethtool: Use phy_ethtool_gset and sset
    drivers: net: xgene: Use exported functions
    drivers: net: xgene: Enable MDIO driver
    drivers: net: xgene: Add backward compatibility
    drivers: net: phy: xgene: Add MDIO driver
    ...

    Linus Torvalds
     
  • Pull arm64 updates from Catalin Marinas:

    - Kexec support for arm64

    - Kprobes support

    - Expose MIDR_EL1 and REVIDR_EL1 CPU identification registers to sysfs

    - Trapping of user space cache maintenance operations and emulation in
    the kernel (CPU errata workaround)

    - Clean-up of the early page tables creation (kernel linear mapping,
    EFI run-time maps) to avoid splitting larger blocks (e.g. pmds) into
    smaller ones (e.g. ptes)

    - VDSO support for CLOCK_MONOTONIC_RAW in clock_gettime()

    - ARCH_HAS_KCOV enabled for arm64

    - Optimise IP checksum helpers

    - SWIOTLB optimisation to only allocate/initialise the buffer if the
    available RAM is beyond the 32-bit mask

    - Properly handle the "nosmp" command line argument

    - Fix for the initialisation of the CPU debug state during early boot

    - vdso-offsets.h build dependency workaround

    - Build fix when RANDOMIZE_BASE is enabled with MODULES off

    * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (64 commits)
    arm64: arm: Fix-up the removal of the arm64 regs_query_register_name() prototype
    arm64: Only select ARM64_MODULE_PLTS if MODULES=y
    arm64: mm: run pgtable_page_ctor() on non-swapper translation table pages
    arm64: mm: make create_mapping_late() non-allocating
    arm64: Honor nosmp kernel command line option
    arm64: Fix incorrect per-cpu usage for boot CPU
    arm64: kprobes: Add KASAN instrumentation around stack accesses
    arm64: kprobes: Cleanup jprobe_return
    arm64: kprobes: Fix overflow when saving stack
    arm64: kprobes: WARN if attempting to step with PSTATE.D=1
    arm64: debug: remove unused local_dbg_{enable, disable} macros
    arm64: debug: remove redundant spsr manipulation
    arm64: debug: unmask PSTATE.D earlier
    arm64: localise Image objcopy flags
    arm64: ptrace: remove extra define for CPSR's E bit
    kprobes: Add arm64 case in kprobe example module
    arm64: Add kernel return probes support (kretprobes)
    arm64: Add trampoline code for kretprobes
    arm64: kprobes instruction simulation support
    arm64: Treat all entry code as non-kprobe-able
    ...

    Linus Torvalds
     

26 Jul, 2016

2 commits

  • This example shows using a kprobe to act as a dnat mechanism to divert
    traffic for arbitrary endpoints. It rewrite the arguments to a syscall
    while they're still in userspace, and before the syscall has a chance
    to copy the argument into kernel space.

    Although this is an example, it also acts as a test because the mapped
    address is 255.255.255.255:555 -> real address, and that's not a legal
    address to connect to. If the helper is broken, the example will fail
    on the intermediate steps, as well as the final step to verify the
    rewrite of userspace memory succeeded.

    Signed-off-by: Sargun Dhillon
    Cc: Alexei Starovoitov
    Cc: Daniel Borkmann
    Acked-by: Alexei Starovoitov
    Signed-off-by: David S. Miller

    Sargun Dhillon
     
  • This allows user memory to be written to during the course of a kprobe.
    It shouldn't be used to implement any kind of security mechanism
    because of TOC-TOU attacks, but rather to debug, divert, and
    manipulate execution of semi-cooperative processes.

    Although it uses probe_kernel_write, we limit the address space
    the probe can write into by checking the space with access_ok.
    We do this as opposed to calling copy_to_user directly, in order
    to avoid sleeping. In addition we ensure the threads's current fs
    / segment is USER_DS and the thread isn't exiting nor a kernel thread.

    Given this feature is meant for experiments, and it has a risk of
    crashing the system, and running programs, we print a warning on
    when a proglet that attempts to use this helper is installed,
    along with the pid and process name.

    Signed-off-by: Sargun Dhillon
    Cc: Alexei Starovoitov
    Cc: Daniel Borkmann
    Acked-by: Alexei Starovoitov
    Signed-off-by: David S. Miller

    Sargun Dhillon
     

21 Jul, 2016

2 commits

  • Add a '-6' option to the sample pktgen scripts for sending out
    IPv6 packets.

    [root@kerneldev010.prn1 ~/pktgen]# ./pktgen_sample03_burst_single_flow.sh -i eth0 -s 64 -d fe80::f652:14ff:fec2:a14c -m f4:52:14:c2:a1:4c -b 32 -6

    [root@kerneldev011.prn1 ~]# tcpdump -i eth0 -nn -c3 port 9
    tcpdump: WARNING: eth0: no IPv4 address assigned
    tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
    listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
    14:38:51.815297 IP6 fe80::f652:14ff:fec2:2ad2.9 > fe80::f652:14ff:fec2:a14c.9: UDP, length 16
    14:38:51.815311 IP6 fe80::f652:14ff:fec2:2ad2.9 > fe80::f652:14ff:fec2:a14c.9: UDP, length 16
    14:38:51.815313 IP6 fe80::f652:14ff:fec2:2ad2.9 > fe80::f652:14ff:fec2:a14c.9: UDP, length 16

    Signed-off-by: Martin KaFai Lau
    Acked-by: Alexei Starovoitov
    Signed-off-by: David S. Miller

    Martin KaFai Lau
     
  • The naming choice of index is not terribly descriptive, and dropcnt is
    in fact incorrect for xdp2. Pick better names for these: ipproto and
    rxcnt.

    Signed-off-by: Brenden Blanco
    Acked-by: Alexei Starovoitov
    Signed-off-by: David S. Miller

    Brenden Blanco
     

20 Jul, 2016

2 commits

  • Add a sample that rewrites and forwards packets out on the same
    interface. Observed single core forwarding performance of ~10Mpps.

    Since the mlx4 driver under test recycles every single packet page, the
    perf output shows almost exclusively just the ring management and bpf
    program work. Slowdowns are likely occurring due to cache misses.

    Signed-off-by: Brenden Blanco
    Acked-by: Alexei Starovoitov
    Signed-off-by: David S. Miller

    Brenden Blanco
     
  • Add a sample program that only drops packets at the BPF_PROG_TYPE_XDP_RX
    hook of a link. With the drop-only program, observed single core rate is
    ~20Mpps.

    Other tests were run, for instance without the dropcnt increment or
    without reading from the packet header, the packet rate was mostly
    unchanged.

    $ perf record -a samples/bpf/xdp1 $(
    Acked-by: Alexei Starovoitov
    Signed-off-by: David S. Miller

    Brenden Blanco
     

19 Jul, 2016

1 commit


15 Jul, 2016

3 commits

  • Removing the pktgen sample script pktgen.conf-1-1-rdos, because
    it does not contain anything that is not covered by the other and
    newer style sample scripts.

    Signed-off-by: Jesper Dangaard Brouer
    Signed-off-by: David S. Miller

    Jesper Dangaard Brouer
     
  • This pktgen sample script is useful for scalability testing a
    receiver. The script will simply generate one flow per
    thread (option -t N) using the thread number as part of the
    source IP-address.

    The single flow sample (pktgen_sample03_burst_single_flow.sh)
    have become quite popular, but it is important that developers
    also make sure to benchmark scalability of multiple receive
    queues.

    Signed-off-by: Jesper Dangaard Brouer
    Acked-by: Alexei Starovoitov
    Signed-off-by: David S. Miller

    Jesper Dangaard Brouer
     
  • Adding a pktgen sample script that demonstrates how to use pktgen
    for simulating flows. Script will generate a certain number of
    concurrent flows ($FLOWS) and each flow will contain $FLOWLEN
    packets, which will be send back-to-back, before switching to a
    new flow, due to flag FLOW_SEQ.

    This script obsoletes the old sample script 'pktgen.conf-1-1-flows',
    which is removed.

    Signed-off-by: Jesper Dangaard Brouer
    Signed-off-by: David S. Miller

    Jesper Dangaard Brouer
     

09 Jul, 2016

2 commits


08 Jul, 2016

1 commit

  • Add a separate Kconfig option for SAMPLES_SECCOMP.

    Main reason for this is that, just like other samples, it's forced to
    be a module.

    Without this, since the sample is a target only controlled by
    CONFIG_SECCOMP_FILTER, the samples will be built before include files are
    put in place properly. For example, from an arm64 allmodconfig built with
    "make -sk -j 32" (without specific target), the following happens:

    samples/seccomp/bpf-fancy.c:13:27: fatal error: linux/seccomp.h: No such file or directory
    samples/seccomp/bpf-helper.h:20:50: fatal error: linux/seccomp.h: No such file or directory
    samples/seccomp/dropper.c:20:27: fatal error: linux/seccomp.h: No such file or directory
    samples/seccomp/bpf-direct.c:21:27: fatal error: linux/seccomp.h: No such file or directory

    So, just stick to the same format as other samples.

    Signed-off-by: Olof Johansson
    Signed-off-by: Kees Cook

    Olof Johansson
     

05 Jul, 2016

1 commit


02 Jul, 2016

1 commit

  • test_cgrp2_array_pin.c:
    A userland program that creates a bpf_map (BPF_MAP_TYPE_GROUP_ARRAY),
    pouplates/updates it with a cgroup2's backed fd and pins it to a
    bpf-fs's file. The pinned file can be loaded by tc and then used
    by the bpf prog later. This program can also update an existing pinned
    array and it could be useful for debugging/testing purpose.

    test_cgrp2_tc_kern.c:
    A bpf prog which should be loaded by tc. It is to demonstrate
    the usage of bpf_skb_in_cgroup.

    test_cgrp2_tc.sh:
    A script that glues the test_cgrp2_array_pin.c and
    test_cgrp2_tc_kern.c together. The idea is like:
    1. Load the test_cgrp2_tc_kern.o by tc
    2. Use test_cgrp2_array_pin.c to populate a BPF_MAP_TYPE_CGROUP_ARRAY
    with a cgroup fd
    3. Do a 'ping -6 ff02::1%ve' to ensure the packet has been
    dropped because of a match on the cgroup

    Most of the lines in test_cgrp2_tc.sh is the boilerplate
    to setup the cgroup/bpf-fs/net-devices/netns...etc. It is
    not bulletproof on errors but should work well enough and
    give enough debug info if things did not go well.

    Signed-off-by: Martin KaFai Lau
    Cc: Alexei Starovoitov
    Cc: Daniel Borkmann
    Cc: Tejun Heo
    Acked-by: Alexei Starovoitov
    Signed-off-by: David S. Miller

    Martin KaFai Lau
     

26 Jun, 2016

1 commit


20 Jun, 2016

1 commit

  • Add sample code to test trace_printk(). The trace_printk() functions should
    never be used in production code. This makes testing it a bit more
    difficult. Having a sample module that can test use cases of trace_printk()
    can help out.

    Currently it just tests trace_printk() where it will be converted into:

    trace_bputs()
    trace_puts()
    trace_bprintk()

    as well as staying as the normal _trace_printk().

    It also tests its use in interrupt context as that will test the auxilery
    buffers.

    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     

21 May, 2016

3 commits

  • Print out the symbol name for the hooks, it makes the logs more
    readable.

    Link: http://lkml.kernel.org/r/1463535417-29637-2-git-send-email-shijie.huang@arm.com
    Signed-off-by: Huang Shijie
    Cc: Petr Mladek
    Cc: Steve Capper
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Huang Shijie
     
  • Add a new module parameter which can be used as the symbol name.

    Without this patch, we can only test the "_do_fork" function with this
    kernel module. With this patch, the module becomes more flexible; we
    can test any functions with this module with

    # insmod kprobe_example.ko symbol="xxx"

    Link: http://lkml.kernel.org/r/1463535417-29637-1-git-send-email-shijie.huang@arm.com
    Signed-off-by: Huang Shijie
    Cc: Petr Mladek
    Cc: Steve Capper
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Huang Shijie
     
  • Commit 3033f14ab78c ("clone: support passing tls argument via C rather
    than pt_regs magic") added the tls argument for _do_fork(). This patch
    adds the "tls" argument for j_do_fork to make it match _do_fork().

    Signed-off-by: Huang Shijie
    Acked-by: Steve Capper
    Reviewed-by: Josh Triplett
    Cc: Masami Hiramatsu
    Cc: Andy Lutomirski
    Cc: Thiago Macieira
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Huang Shijie
     

20 May, 2016

1 commit

  • Pull Documentation updates from Jon Corbet:
    "A bit busier this time around.

    The most interesting thing (IMO) this time around is some beginning
    infrastructural work to allow documents to be written using
    restructured text. Maybe someday, in a galaxy far far away, we'll be
    able to eliminate the DocBook dependency and have a much better
    integrated set of kernel docs. Someday.

    Beyond that, there's a new document on security hardening from Kees,
    the movement of some sample code over to samples/, a number of
    improvements to the serial docs from Geert, and the usual collection
    of corrections, typo fixes, etc"

    * tag 'docs-for-linus' of git://git.lwn.net/linux: (55 commits)
    doc: self-protection: provide initial details
    serial: doc: Use port->state instead of info
    serial: doc: Always refer to tty_port->mutex
    Documentation: vm: Spelling s/paltform/platform/g
    Documentation/memcg: update kmem limit doc as codes behavior
    docproc: print a comment about autogeneration for rst output
    docproc: add support for reStructuredText format via --rst option
    docproc: abstract terminating lines at first space
    docproc: abstract docproc directive detection
    docproc: reduce unnecessary indentation
    docproc: add variables for subcommand and filename
    kernel-doc: use rst C domain directives and references for types
    kernel-doc: produce RestructuredText output
    kernel-doc: rewrite usage description, remove duplicated comments
    Doc: correct the location of sysrq.c
    Documentation: fix common spelling mistakes
    samples: v4l: from Documentation to samples directory
    samples: connector: from Documentation to samples directory
    Documentation: xillybus: fix spelling mistake
    Documentation: x86: fix spelling mistakes
    ...

    Linus Torvalds
     

19 May, 2016

2 commits

  • Pull rpmsg updates from Bjorn Andersson:
    "Refactor rpmsg module registration to follow other subsystems; by
    introduction of module_rpmsg_driver and hiding of THIS_MODULE from
    clients"

    * tag 'rpmsg-v4.7' of git://github.com/andersson/remoteproc:
    rpmsg: use module_rpmsg_driver in existing drivers and examples
    rpmsg: add helper macro module_rpmsg_driver
    rpmsg: drop owner assignment from rpmsg_drivers
    rpmsg: add THIS_MODULE to rpmsg_driver in rpmsg core

    Linus Torvalds
     
  • Pull media updates from Mauro Carvalho Chehab:
    - added support for Intersil/Techwell TW686x-based video capture cards
    - v4l PCI skeleton driver moved to samples directory
    - Documentation cleanups and improvements
    - RC: reduced the memory footprint for IR raw events
    - tpg: Export the tpg code from vivid as a module
    - adv7180: Add device tree binding documentation
    - lots of driver improvements and fixes

    * tag 'media/v4.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (173 commits)
    [media] exynos-gsc: avoid build warning without CONFIG_OF
    [media] samples: v4l: from Documentation to samples directory
    [media] dib0700: add USB ID for another STK8096-PVR ref design based card
    [media] tvp5150: propagate I2C write error in .s_register callback
    [media] tvp5150: return I2C write operation failure to callers
    [media] em28xx: add support for Hauppauge WinTV-dualHD DVB tuner
    [media] em28xx: add missing USB IDs
    [media] update cx23885 and em28xx cardlists
    [media] media: au0828 fix au0828_v4l2_device_register() to not unlock and free
    [media] c8sectpfe: Rework firmware loading mechanism
    [media] c8sectpfe: Demote print to dev_dbg
    [media] c8sectpfe: Fix broken circular buffer wp management
    [media] media-device: Simplify compat32 logic
    [media] media: i2c: ths7303: remove redundant assignment on bt
    [media] dvb-usb: hide unused functions
    [media] xilinx-vipp: remove unnecessary of_node_put
    [media] drivers/media/media-devnode: clear private_data before put_device()
    [media] drivers/media/media-device: move debug log before _devnode_unregister()
    [media] drivers/media/rc: postpone kfree(rc_dev)
    [media] media/dvb-core: forward media_create_pad_links() return value
    ...

    Linus Torvalds
     

18 May, 2016

1 commit

  • Pull livepatching updates from Jiri Kosina:

    - remove of our own implementation of architecture-specific relocation
    code and leveraging existing code in the module loader to perform
    arch-dependent work, from Jessica Yu.

    The relevant patches have been acked by Rusty (for module.c) and
    Heiko (for s390).

    - live patching support for ppc64le, which is a joint work of Michael
    Ellerman and Torsten Duwe. This is coming from topic branch that is
    share between livepatching.git and ppc tree.

    - addition of livepatching documentation from Petr Mladek

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching:
    livepatch: make object/func-walking helpers more robust
    livepatch: Add some basic livepatch documentation
    powerpc/livepatch: Add live patching support on ppc64le
    powerpc/livepatch: Add livepatch stack to struct thread_info
    powerpc/livepatch: Add livepatch header
    livepatch: Allow architectures to specify an alternate ftrace location
    ftrace: Make ftrace_location_range() global
    livepatch: robustify klp_register_patch() API error checking
    Documentation: livepatch: outline Elf format and requirements for patch modules
    livepatch: reuse module loader code to write relocations
    module: s390: keep mod_arch_specific for livepatch modules
    module: preserve Elf information for livepatch modules
    Elf: add livepatch-specific Elf constants

    Linus Torvalds
     

10 May, 2016

1 commit

  • With the new autoksyms support, we can run into a situation where
    the v4l pci skeleton module is the only one using some exported
    symbols that get dropped because they are never referenced by
    the kernel otherwise, causing a build problem:

    ERROR: "vb2_dma_contig_memops" [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
    ERROR: "vb2_dma_contig_init_ctx_attrs" [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
    ERROR: "v4l2_match_dv_timings" [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
    ERROR: "v4l2_find_dv_timings_cap" [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
    ERROR: "v4l2_valid_dv_timings" [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
    ERROR: "v4l2_enum_dv_timings_cap" [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
    ERROR: "vb2_dma_contig_cleanup_ctx" [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!

    Specifically, we do look in the samples directory for users of
    symbols, but not the Documentation directory.

    This solves the build problem by moving the connector sample into
    the same directory as the other samples.

    Fixes: 23121ca2b56b ("kbuild: create/adjust generated/autoksyms.h")

    Signed-off-by: Arnd Bergmann

    Arnd Bergmann
     

07 May, 2016

4 commits

  • add few tests for "pointer to packet" logic of the verifier

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

    Alexei Starovoitov
     
  • parse_simple.c - packet parser exapmle with single length check that
    filters out udp packets for port 9

    parse_varlen.c - variable length parser that understand multiple vlan headers,
    ipip, ipip6 and ip options to filter out udp or tcp packets on port 9.
    The packet is parsed layer by layer with multitple length checks.

    parse_ldabs.c - classic style of packet parsing using LD_ABS instruction.
    Same functionality as parse_simple.

    simple = 24.1Mpps per core
    varlen = 22.7Mpps
    ldabs = 21.4Mpps

    Parser with LD_ABS instructions is slower than full direct access parser
    which does more packet accesses and checks.

    These examples demonstrate the choice bpf program authors can make between
    flexibility of the parser vs speed.

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

    Alexei Starovoitov
     
  • Existing drivers and examples are updated to use the
    module_rpmsg_driver helper macro.

    Signed-off-by: Andrew F. Davis
    Signed-off-by: Bjorn Andersson

    Andrew F. Davis
     
  • An rpmsg_driver does not need to set an owner, it will be populated by
    the driver core.

    Signed-off-by: Andrew F. Davis
    Signed-off-by: Bjorn Andersson

    Andrew F. Davis
     

04 May, 2016

1 commit


30 Apr, 2016

2 commits

  • Users are likely to manually compile both LLVM 'llc' and 'clang'
    tools. Thus, also allow redefining CLANG and verify command exist.

    Makefile implementation wise, the target that verify the command have
    been generalized.

    Signed-off-by: Jesper Dangaard Brouer
    Acked-by: Alexei Starovoitov
    Signed-off-by: David S. Miller

    Jesper Dangaard Brouer
     
  • It is not intuitive that 'make' must be run from the top level
    directory with argument "samples/bpf/" to compile these eBPF samples.

    Introduce a kbuild make file trick that allow make to be run from the
    "samples/bpf/" directory itself. It basically change to the top level
    directory and call "make samples/bpf/" with the "/" slash after the
    directory name.

    Also add a clean target that only cleans this directory, by taking
    advantage of the kbuild external module setting M=$PWD.

    Signed-off-by: Jesper Dangaard Brouer
    Acked-by: Alexei Starovoitov
    Signed-off-by: David S. Miller

    Jesper Dangaard Brouer