29 Nov, 2016

1 commit

  • The files "sampleip_kern.c" and "trace_event_kern.c" directly access
    "ctx->regs.ip" which is not available on s390x. Fix this and use the
    PT_REGS_IP() macro instead.

    Also fix the macro for s390x and use "psw.addr" from "pt_regs".

    Reported-by: Zvonko Kosic
    Signed-off-by: Michael Holzheu
    Acked-by: Alexei Starovoitov
    Signed-off-by: David S. Miller

    Michael Holzheu
     

13 Nov, 2016

1 commit

  • The test creates two netns, ns1 and ns2. The host (the default netns)
    has an ipip or ip6tnl dev configured for tunneling traffic to the ns2.

    ping VIPS from ns1 host ns2 (VIPs at loopback)

    The test is to have ns1 pinging VIPs configured at the loopback
    interface in ns2.

    The VIPs are 10.10.1.102 and 2401:face::66 (which are configured
    at lo@ns2). [Note: 0x66 => 102].

    At ns1, the VIPs are routed _via_ the host.

    At the host, bpf programs are installed at the veth to redirect packets
    from a veth to the ipip/ip6tnl. The test is configured in a way so
    that both ingress and egress can be tested.

    At ns2, the ipip/ip6tnl dev is configured with the local and remote address
    specified. The return path is routed to the dev ipip/ip6tnl.

    During egress test, the host also locally tests pinging the VIPs to ensure
    that bpf_redirect at egress also works for the direct egress (i.e. not
    forwarding from dev ve1 to ve2).

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

    Martin KaFai Lau
     

30 Oct, 2016

2 commits

  • Pull networking fixes from David Miller:
    "Lots of fixes, mostly drivers as is usually the case.

    1) Don't treat zero DMA address as invalid in vmxnet3, from Alexey
    Khoroshilov.

    2) Fix element timeouts in netfilter's nft_dynset, from Anders K.
    Pedersen.

    3) Don't put aead_req crypto struct on the stack in mac80211, from
    Ard Biesheuvel.

    4) Several uninitialized variable warning fixes from Arnd Bergmann.

    5) Fix memory leak in cxgb4, from Colin Ian King.

    6) Fix bpf handling of VLAN header push/pop, from Daniel Borkmann.

    7) Several VRF semantic fixes from David Ahern.

    8) Set skb->protocol properly in ip6_tnl_xmit(), from Eli Cooper.

    9) Socket needs to be locked in udp_disconnect(), from Eric Dumazet.

    10) Div-by-zero on 32-bit fix in mlx4 driver, from Eugenia Emantayev.

    11) Fix stale link state during failover in NCSCI driver, from Gavin
    Shan.

    12) Fix netdev lower adjacency list traversal, from Ido Schimmel.

    13) Propvide proper handle when emitting notifications of filter
    deletes, from Jamal Hadi Salim.

    14) Memory leaks and big-endian issues in rtl8xxxu, from Jes Sorensen.

    15) Fix DESYNC_FACTOR handling in ipv6, from Jiri Bohac.

    16) Several routing offload fixes in mlxsw driver, from Jiri Pirko.

    17) Fix broadcast sync problem in TIPC, from Jon Paul Maloy.

    18) Validate chunk len before using it in SCTP, from Marcelo Ricardo
    Leitner.

    19) Revert a netns locking change that causes regressions, from Paul
    Moore.

    20) Add recursion limit to GRO handling, from Sabrina Dubroca.

    21) GFP_KERNEL in irq context fix in ibmvnic, from Thomas Falcon.

    22) Avoid accessing stale vxlan/geneve socket in data path, from
    Pravin Shelar"

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (189 commits)
    geneve: avoid using stale geneve socket.
    vxlan: avoid using stale vxlan socket.
    qede: Fix out-of-bound fastpath memory access
    net: phy: dp83848: add dp83822 PHY support
    enic: fix rq disable
    tipc: fix broadcast link synchronization problem
    ibmvnic: Fix missing brackets in init_sub_crq_irqs
    ibmvnic: Fix releasing of sub-CRQ IRQs in interrupt context
    Revert "ibmvnic: Fix releasing of sub-CRQ IRQs in interrupt context"
    arch/powerpc: Update parameters for csum_tcpudp_magic & csum_tcpudp_nofold
    net/mlx4_en: Save slave ethtool stats command
    net/mlx4_en: Fix potential deadlock in port statistics flow
    net/mlx4: Fix firmware command timeout during interrupt test
    net/mlx4_core: Do not access comm channel if it has not yet been initialized
    net/mlx4_en: Fix panic during reboot
    net/mlx4_en: Process all completions in RX rings after port goes up
    net/mlx4_en: Resolve dividing by zero in 32-bit system
    net/mlx4_core: Change the default value of enable_qos
    net/mlx4_core: Avoid setting ports to auto when only one port type is supported
    net/mlx4_core: Fix the resource-type enum in res tracker to conform to FW spec
    ...

    Linus Torvalds
     
  • Some of the sample files are causing issues when they are loaded with tc
    and cls_bpf, meaning tc bails out while trying to parse the resulting ELF
    file as program/map/etc sections are not present, which can be easily
    spotted with readelf(1).

    Currently, BPF samples are including some of the kernel headers and mid
    term we should change them to refrain from this, really. When dynamic
    debugging is enabled, we bail out due to undeclared KBUILD_MODNAME, which
    is easily overlooked in the build as clang spills this along with other
    noisy warnings from various header includes, and llc still generates an
    ELF file with mentioned characteristics. For just playing around with BPF
    examples, this can be a bit of a hurdle to take.

    Just add a fake KBUILD_MODNAME as a band-aid to fix the issue, same is
    done in xdp*_kern samples already.

    Fixes: 65d472fb007d ("samples/bpf: add 'pointer to packet' tests")
    Fixes: 6afb1e28b859 ("samples/bpf: Add tunnel set/get tests.")
    Fixes: a3f74617340b ("cgroup: bpf: Add an example to do cgroup checking in BPF")
    Reported-by: Chandrasekar Kannan
    Signed-off-by: Daniel Borkmann
    Acked-by: Alexei Starovoitov
    Signed-off-by: David S. Miller

    Daniel Borkmann
     

15 Oct, 2016

1 commit

  • …/kernel/git/shuah/linux-kselftest

    Pull kselftest updates from Shuah Khan:
    "This update consists of:

    - Fixes and improvements to existing tests

    - Moving code from Documentation to selftests, samples, and tools:

    * Moves dnotify_test, prctl, ptp, vDSO, ia64, watchdog, and
    networking tests from Documentation to selftests.

    * Moves mic/mpssd, misc-devices/mei, timers, watchdog, auxdisplay,
    and blackfin examples from Documentation to samples.

    * Moves accounting, laptops/dslm, and pcmcia/crc32hash tools from
    Documentation to tools.

    * Deletes BUILD_DOCSRC and its dependencies"

    * tag 'linux-kselftest-4.9-rc1-update' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (21 commits)
    selftests/futex: Check ANSI terminal color support
    Doc: update 00-INDEX files to reflect the runnable code move
    samples: move blackfin gptimers-example from Documentation
    tools: move pcmcia crc32hash tool from Documentation
    tools: move laptops dslm tool from Documentation
    tools: move accounting tool from Documentation
    samples: move auxdisplay example code from Documentation
    samples: move watchdog example code from Documentation
    samples: move timers example code from Documentation
    samples: move misc-devices/mei example code from Documentation
    samples: move mic/mpssd example code from Documentation
    selftests: Move networking/timestamping from Documentation
    selftests: move watchdog tests from Documentation/watchdog
    selftests: move ia64 tests from Documentation/ia64
    selftests: move vDSO tests from Documentation/vDSO
    selftests: move ptp tests from Documentation/ptp
    selftests: move prctl tests from Documentation/prctl
    selftests: move dnotify_test from Documentation/filesystems
    selftests/timers: Add missing error code assignment before test
    selftests/zram: replace ZRAM_LZ4_COMPRESS
    ...

    Linus Torvalds
     

10 Oct, 2016

1 commit

  • Move blackfin gptimers-example to samples and remove it from Documentation
    Makefile. Update samples Kconfig and Makefile to build gptimers-example.

    blackfin is the last CONFIG_BUILD_DOCSRC target in Documentation/Makefile.
    Hence this patch also includes changes to remove CONFIG_BUILD_DOCSRC from
    Makefile and lib/Kconfig.debug and updates VIDEO_PCI_SKELETON dependency
    on BUILD_DOCSRC.

    Documentation/Makefile is not deleted to avoid braking make htmldocs and
    make distclean.

    Acked-by: Michal Marek
    Acked-by: Jonathan Corbet
    Reviewed-by: Kees Cook
    Reported-by: Valentin Rothberg
    Reported-by: Paul Gortmaker
    Signed-off-by: Shuah Khan

    Shuah Khan
     

07 Oct, 2016

1 commit

  • Pull rpmsg updates from Bjorn Andersson:
    "The bulk of these patches involve splitting the rpmsg implementation
    into a framework/API part and a virtio specific backend part. It then
    adds the Qualcomm Shared Memory Device (SMD) as an additional
    supported wire format.

    Also included is a set of code style cleanups that have been lingering
    for a while"

    * tag 'rpmsg-v4.9' of git://github.com/andersson/remoteproc: (26 commits)
    rpmsg: smd: fix dependency on QCOM_SMD=n
    rpmsg: Introduce Qualcomm SMD backend
    rpmsg: Allow callback to return errors
    rpmsg: Move virtio specifics from public header
    rpmsg: virtio: Hide vrp pointer from the public API
    rpmsg: Hide rpmsg indirection tables
    rpmsg: Split rpmsg core and virtio backend
    rpmsg: Split off generic tail of create_channel()
    rpmsg: Move helper for finding rpmsg devices to core
    rpmsg: Move endpoint related interface to rpmsg core
    rpmsg: Indirection table for rpmsg_endpoint operations
    rpmsg: Move rpmsg_device API to new file
    rpmsg: Introduce indirection table for rpmsg_device operations
    rpmsg: Clean up rpmsg device vs channel naming
    rpmsg: Make rpmsg_create_ept() take channel_info struct
    rpmsg: rpmsg_send() operations takes rpmsg_endpoint
    rpmsg: Name rpmsg devices based on channel id
    rpmsg: Enable matching devices with drivers based on DT
    rpmsg: Drop prototypes for non-existing functions
    samples/rpmsg: add support for multiple instances
    ...

    Linus Torvalds
     

29 Sep, 2016

1 commit

  • Suppose you have a map array value that is something like this

    struct foo {
    unsigned iter;
    int array[SOME_CONSTANT];
    };

    You can easily insert this into an array, but you cannot modify the contents of
    foo->array[] after the fact. This is because we have no way to verify we won't
    go off the end of the array at verification time. This patch provides a start
    for this work. We accomplish this by keeping track of a minimum and maximum
    value a register could be while we're checking the code. Then at the time we
    try to do an access into a MAP_VALUE we verify that the maximum offset into that
    region is a valid access into that memory region. So in practice, code such as
    this

    unsigned index = 0;

    if (foo->iter >= SOME_CONSTANT)
    foo->iter = index;
    else
    index = foo->iter++;
    foo->array[index] = bar;

    would be allowed, as we can verify that index will always be between 0 and
    SOME_CONSTANT-1. If you wish to use signed values you'll have to have an extra
    check to make sure the index isn't less than 0, or do something like index %=
    SOME_CONSTANT.

    Signed-off-by: Josef Bacik
    Acked-by: Alexei Starovoitov
    Signed-off-by: David S. Miller

    Josef Bacik
     

27 Sep, 2016

2 commits


24 Sep, 2016

4 commits

  • Move auxdisplay examples to samples and remove it from Documentation
    Makefile. Create a new Makefile to build auxdisplay. It can be built
    from top level directory or from auxdisplay directory:

    Run make -C samples/auxdisplay or cd samples/auxdisplay; make

    Acked-by: Jonathan Corbet
    Signed-off-by: Shuah Khan

    Shuah Khan
     
  • Move watchdog examples to samples and remove it from Documentation
    Makefile. Create a new Makefile to build watchdog. It can be built
    from top level directory or from watchdog directory:

    Run make -C samples/watchdog or cd samples/watchdog; make

    Acked-by: Jonathan Corbet
    Signed-off-by: Shuah Khan

    Shuah Khan
     
  • Move timers examples to samples and remove it from Documentation
    Makefile. Create a new Makefile to build timers. It can be built
    from top level directory or from timers directory:

    Run make -C samples/timers or cd samples/timers; make

    Acked-by: Jonathan Corbet
    Acked-by: Clemens Ladisch
    Signed-off-by: Shuah Khan

    Shuah Khan
     
  • Move misc-devices/mei examples to samples/mei and remove it from
    Documentation Makefile. Delete misc-devices/Makefile.

    Create a new Makefile to build samples/mei. It can be built from top
    level directory or from mei directory:

    Run make -C samples/mei or cd samples/mei; make

    Acked-by: Jonathan Corbet
    Acked-by: Greg Kroah-Hartman
    Acked-by: Tomas Winkler
    Signed-off-by: Shuah Khan

    Shuah Khan
     

21 Sep, 2016

2 commits

  • Add couple of test cases for direct write and the negative size issue, and
    also adjust the direct packet access test4 since it asserts that writes are
    not possible, but since we've just added support for writes, we need to
    invert the verdict to ACCEPT, of course. Summary: 133 PASSED, 0 FAILED.

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

    Daniel Borkmann
     
  • Move mic/mpssd examples to samples and remove it from Documentation
    Makefile. Create a new Makefile to build mic/mpssd. It can be built
    from top level directory or from mic/mpssd directory:

    Run make -C samples/mic/mpssd or cd samples/mic/mpssd; make

    Acked-by: Jonathan Corbet
    Signed-off-by: Shuah Khan

    Shuah Khan
     

17 Sep, 2016

2 commits

  • the test creates 3 namespaces with veth connected via bridge.
    First two namespaces simulate two different hosts with the same
    IPv4 and IPv6 addresses configured on the tunnel interface and they
    communicate with outside world via standard tunnels.
    Third namespace creates collect_md tunnel that is driven by BPF
    program which selects different remote host (either first or
    second namespace) based on tcp dest port number while tcp dst
    ip is the same.
    This scenario is rough approximation of load balancer use case.
    The tests check both traditional tunnel configuration and collect_md mode.

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

    Alexei Starovoitov
     
  • extend existing tests for vxlan, geneve, gre to include IPIP tunnel.
    It tests both traditional tunnel configuration and
    dynamic via bpf helpers.

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

    Alexei Starovoitov
     

09 Sep, 2016

4 commits

  • Some rpmsg backends support holding on to and redelivering messages upon
    failed handling of them, so provide a way for the callback to report and
    error and allow the backends to handle this.

    Signed-off-by: Bjorn Andersson

    Bjorn Andersson
     
  • The rpmsg device representing struct is called rpmsg_channel and the
    variable name used throughout is rpdev, with the communication happening
    on endpoints it's clearer to just call this a "device" in a public API.

    Signed-off-by: Bjorn Andersson

    Bjorn Andersson
     
  • The rpmsg_send() operations has been taking a rpmsg_device, but this
    forces users of secondary rpmsg_endpoints to use the rpmsg_sendto()
    interface - by extracting source and destination from the given data
    structures. If we instead pass the rpmsg_endpoint to these functions a
    service can use rpmsg_sendto() to respond to messages, even on secondary
    endpoints.

    In addition this would allow us to support operations on multiple
    channels in future backends that does not support off-channel
    operations.

    Signed-off-by: Bjorn Andersson

    Bjorn Andersson
     
  • LLVM can generate code that tests for direct packet access via
    skb->data/data_end in a way that currently gets rejected by the
    verifier, example:

    [...]
    7: (61) r3 = *(u32 *)(r6 +80)
    8: (61) r9 = *(u32 *)(r6 +76)
    9: (bf) r2 = r9
    10: (07) r2 += 54
    11: (3d) if r3 >= r2 goto pc+12
    R1=inv R2=pkt(id=0,off=54,r=0) R3=pkt_end R4=inv R6=ctx
    R9=pkt(id=0,off=0,r=0) R10=fp
    12: (18) r4 = 0xffffff7a
    14: (05) goto pc+430
    [...]

    from 11 to 24: R1=inv R2=pkt(id=0,off=54,r=0) R3=pkt_end R4=inv
    R6=ctx R9=pkt(id=0,off=0,r=0) R10=fp
    24: (7b) *(u64 *)(r10 -40) = r1
    25: (b7) r1 = 0
    26: (63) *(u32 *)(r6 +56) = r1
    27: (b7) r2 = 40
    28: (71) r8 = *(u8 *)(r9 +20)
    invalid access to packet, off=20 size=1, R9(id=0,off=0,r=0)

    The reason why this gets rejected despite a proper test is that we
    currently call find_good_pkt_pointers() only in case where we detect
    tests like rX > pkt_end, where rX is of type pkt(id=Y,off=Z,r=0) and
    derived, for example, from a register of type pkt(id=Y,off=0,r=0)
    pointing to skb->data. find_good_pkt_pointers() then fills the range
    in the current branch to pkt(id=Y,off=0,r=Z) on success.

    For above case, we need to extend that to recognize pkt_end >= rX
    pattern and mark the other branch that is taken on success with the
    appropriate pkt(id=Y,off=0,r=Z) type via find_good_pkt_pointers().
    Since eBPF operates on BPF_JGT (>) and BPF_JGE (>=), these are the
    only two practical options to test for from what LLVM could have
    generated, since there's no such thing as BPF_JLT (= r2 goto pc+12
    R1=inv R2=pkt(id=0,off=54,r=0) R3=pkt_end R4=inv R6=ctx
    R9=pkt(id=0,off=0,r=0) R10=fp
    12: (18) r4 = 0xffffff7a
    14: (05) goto pc+430
    [...]

    from 11 to 24: R1=inv R2=pkt(id=0,off=54,r=54) R3=pkt_end R4=inv
    R6=ctx R9=pkt(id=0,off=0,r=54) R10=fp
    24: (7b) *(u64 *)(r10 -40) = r1
    25: (b7) r1 = 0
    26: (63) *(u32 *)(r6 +56) = r1
    27: (b7) r2 = 40
    28: (71) r8 = *(u8 *)(r9 +20)
    29: (bf) r1 = r8
    30: (25) if r8 > 0x3c goto pc+47
    R1=inv56 R2=imm40 R3=pkt_end R4=inv R6=ctx R8=inv56
    R9=pkt(id=0,off=0,r=54) R10=fp
    31: (b7) r1 = 1
    [...]

    Verifier test cases are also added in this work, one that demonstrates
    the mentioned example here and one that tries a bad packet access for
    the current/fall-through branch (the one with types pkt(id=X,off=Y,r=0),
    pkt(id=X,off=0,r=0)), then a case with good and bad accesses, and two
    with both test variants (>, >=).

    Fixes: 969bf05eb3ce ("bpf: direct packet access")
    Signed-off-by: Daniel Borkmann
    Acked-by: Alexei Starovoitov
    Signed-off-by: David S. Miller

    Daniel Borkmann
     

03 Sep, 2016

2 commits

  • sample instruction pointer and frequency count in a BPF map

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

    Brendan Gregg
     
  • The bpf program is called 50 times a second and does hashmap[kern&user_stackid]++
    It's primary purpose to check that key bpf helpers like map lookup, update,
    get_stackid, trace_printk and ctx access are all working.
    It checks:
    - PERF_COUNT_HW_CPU_CYCLES on all cpus
    - PERF_COUNT_HW_CPU_CYCLES for current process and inherited perf_events to children
    - PERF_COUNT_SW_CPU_CLOCK on all cpus
    - PERF_COUNT_SW_CPU_CLOCK for current process

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

    Alexei Starovoitov
     

20 Aug, 2016

1 commit

  • The patch creates sample code exercising bpf_skb_{set,get}_tunnel_key,
    and bpf_skb_{set,get}_tunnel_opt for GRE, VXLAN, and GENEVE. A native
    tunnel device is created in a namespace to interact with a lwtunnel
    device out of the namespace, with metadata enabled. The bpf_skb_set_*
    program is attached to tc egress and bpf_skb_get_* is attached to egress
    qdisc. A ping between two tunnels is used to verify correctness and
    the result of bpf_skb_get_* printed by bpf_trace_printk.

    Signed-off-by: William Tu
    Signed-off-by: David S. Miller

    William Tu
     

18 Aug, 2016

2 commits

  • Minor overlapping changes for both merge conflicts.

    Resolution work done by Stephen Rothwell was used
    as a reference.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Pull networking fixes from David Miller:

    1) Buffers powersave frame test is reversed in cfg80211, fix from Felix
    Fietkau.

    2) Remove bogus WARN_ON in openvswitch, from Jarno Rajahalme.

    3) Fix some tg3 ethtool logic bugs, and one that would cause no
    interrupts to be generated when rx-coalescing is set to 0. From
    Satish Baddipadige and Siva Reddy Kallam.

    4) QLCNIC mailbox corruption and napi budget handling fix from Manish
    Chopra.

    5) Fix fib_trie logic when walking the trie during /proc/net/route
    output than can access a stale node pointer. From David Forster.

    6) Several sctp_diag fixes from Phil Sutter.

    7) PAUSE frame handling fixes in mlxsw driver from Ido Schimmel.

    8) Checksum fixup fixes in bpf from Daniel Borkmann.

    9) Memork leaks in nfnetlink, from Liping Zhang.

    10) Use after free in rxrpc, from David Howells.

    11) Use after free in new skb_array code of macvtap driver, from Jason
    Wang.

    12) Calipso resource leak, from Colin Ian King.

    13) mediatek bug fixes (missing stats sync init, etc.) from Sean Wang.

    14) Fix bpf non-linear packet write helpers, from Daniel Borkmann.

    15) Fix lockdep splats in macsec, from Sabrina Dubroca.

    16) hv_netvsc bug fixes from Vitaly Kuznetsov, mostly to do with VF
    handling.

    17) Various tc-action bug fixes, from CONG Wang.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (116 commits)
    net_sched: allow flushing tc police actions
    net_sched: unify the init logic for act_police
    net_sched: convert tcf_exts from list to pointer array
    net_sched: move tc offload macros to pkt_cls.h
    net_sched: fix a typo in tc_for_each_action()
    net_sched: remove an unnecessary list_del()
    net_sched: remove the leftover cleanup_a()
    mlxsw: spectrum: Allow packets to be trapped from any PG
    mlxsw: spectrum: Unmap 802.1Q FID before destroying it
    mlxsw: spectrum: Add missing rollbacks in error path
    mlxsw: reg: Fix missing op field fill-up
    mlxsw: spectrum: Trap loop-backed packets
    mlxsw: spectrum: Add missing packet traps
    mlxsw: spectrum: Mark port as active before registering it
    mlxsw: spectrum: Create PVID vPort before registering netdevice
    mlxsw: spectrum: Remove redundant errors from the code
    mlxsw: spectrum: Don't return upon error in removal path
    i40e: check for and deal with non-contiguous TCs
    ixgbe: Re-enable ability to toggle VLAN filtering
    ixgbe: Force VLNCTRL.VFE to be set in all VMDq paths
    ...

    Linus Torvalds
     

13 Aug, 2016

4 commits

  • test various corner cases of the helper function access to the packet
    via crafted XDP programs.

    Signed-off-by: Aaron Yue
    Signed-off-by: Alexei Starovoitov
    Acked-by: Daniel Borkmann
    Signed-off-by: David S. Miller

    Aaron Yue
     
  • While hashing out BPF's current_task_under_cgroup helper bits, it came
    to discussion that the skb_in_cgroup helper name was suboptimally chosen.

    Tejun says:

    So, I think in_cgroup should mean that the object is in that
    particular cgroup while under_cgroup in the subhierarchy of that
    cgroup. Let's rename the other subhierarchy test to under too. I
    think that'd be a lot less confusing going forward.

    [...]

    It's more intuitive and gives us the room to implement the real
    "in" test if ever necessary in the future.

    Since this touches uapi bits, we need to change this as long as v4.8
    is not yet officially released. Thus, change the helper enum and rename
    related bits.

    Fixes: 4a482f34afcc ("cgroup: bpf: Add bpf_skb_in_cgroup_proto")
    Reference: http://patchwork.ozlabs.org/patch/658500/
    Suggested-by: Sargun Dhillon
    Suggested-by: Tejun Heo
    Signed-off-by: Daniel Borkmann
    Acked-by: Alexei Starovoitov

    Daniel Borkmann
     
  • This test has a BPF program which writes the last known pid to call the
    sync syscall within a given cgroup to a map.

    The user mode program creates its own mount namespace, and mounts the
    cgroupsv2 hierarchy in there, as on all current test systems
    (Ubuntu 16.04, Debian), the cgroupsv2 vfs is unmounted by default.
    Once it does this, it proceeds to test.

    The test checks for positive and negative condition. It ensures that
    when it's part of a given cgroup, its pid is captured in the map,
    and that when it leaves the cgroup, this doesn't happen.

    It populate a cgroups arraymap prior to execution in userspace. This means
    that the program must be run in the same cgroups namespace as the programs
    that are being traced.

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

    Sargun Dhillon
     
  • The current rpmsg_client_sample is a very simple example and
    is not designed to handle multiple instances. Add support for
    multiple instances, so that the same number of pings are sent
    to each instance. The instances can be on one or multiple
    remote processors.

    Signed-off-by: Suman Anna
    Signed-off-by: Bjorn Andersson

    Anna, Suman
     

11 Aug, 2016

1 commit

  • The commit 555c8a8623a3 ("bpf: avoid stack copy and use skb ctx for event output")
    started using 20 of initially reserved upper 32-bits of 'flags' argument
    in bpf_perf_event_output(). Adjust corresponding prototype in samples/bpf/bpf_helpers.h

    Signed-off-by: Adam Barth
    Signed-off-by: Alexei Starovoitov
    Acked-by: Daniel Borkmann
    Signed-off-by: David S. Miller

    Adam Barth
     

07 Aug, 2016

1 commit


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

1 commit

  • 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