04 Nov, 2017

1 commit


02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

25 Oct, 2017

1 commit

  • This patch enables multiple bpf attachments for a
    kprobe/uprobe/tracepoint single trace event.
    Each trace_event keeps a list of attached perf events.
    When an event happens, all attached bpf programs will
    be executed based on the order of attachment.

    A global bpf_event_mutex lock is introduced to protect
    prog_array attaching and detaching. An alternative will
    be introduce a mutex lock in every trace_event_call
    structure, but it takes a lot of extra memory.
    So a global bpf_event_mutex lock is a good compromise.

    The bpf prog detachment involves allocation of memory.
    If the allocation fails, a dummy do-nothing program
    will replace to-be-detached program in-place.

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

    Yonghong Song
     

16 Jul, 2016

1 commit

  • __get_str(str)'s definition includes a (char *) operator
    overloading that is not protected with outer ().

    This patch adds () around __get_str()'s definition, enabling
    some code cleanup.

    Link: http://lkml.kernel.org/r/20ac1a10c2ec4ccd23e4a8ef34101fb6e4157d37.1467407618.git.bristot@redhat.com

    Cc: Trond Myklebust
    Cc: Anna Schumaker
    Cc: Ingo Molnar
    Suggested-by: Steven Rostedt
    Reviewed-by: Steven Rostedt
    Signed-off-by: Daniel Bristot de Oliveira
    Signed-off-by: Steven Rostedt

    Daniel Bristot de Oliveira
     

22 Apr, 2016

1 commit

  • move trace_call_bpf() into helper function to minimize the size
    of perf_trace_*() tracepoint handlers.
    text data bss dec hex filename
    10541679 5526646 2945024 19013349 1221ee5 vmlinux_before
    10509422 5526646 2945024 18981092 121a0e4 vmlinux_after

    It may seem that perf_fetch_caller_regs() can also be moved,
    but that is incorrect, since ip/sp will be wrong.

    bpf+tracepoint performance is not affected, since
    perf_swevent_put_recursion_context() is now inlined.
    export_symbol_gpl can also be dropped.

    No measurable change in normal perf tracepoints.

    Suggested-by: Steven Rostedt
    Signed-off-by: Alexei Starovoitov
    Acked-by: Peter Zijlstra (Intel)
    Acked-by: Steven Rostedt
    Signed-off-by: David S. Miller

    Alexei Starovoitov
     

08 Apr, 2016

3 commits

  • introduce BPF_PROG_TYPE_TRACEPOINT program type and allow it to be attached
    to the perf tracepoint handler, which will copy the arguments into
    the per-cpu buffer and pass it to the bpf program as its first argument.
    The layout of the fields can be discovered by doing
    'cat /sys/kernel/debug/tracing/events/sched/sched_switch/format'
    prior to the compilation of the program with exception that first 8 bytes
    are reserved and not accessible to the program. This area is used to store
    the pointer to 'struct pt_regs' which some of the bpf helpers will use:
    +---------+
    | 8 bytes | hidden 'struct pt_regs *' (inaccessible to bpf program)
    +---------+
    | N bytes | static tracepoint fields defined in tracepoint/format (bpf readonly)
    +---------+
    | dynamic | __dynamic_array bytes of tracepoint (inaccessible to bpf yet)
    +---------+

    Not that all of the fields are already dumped to user space via perf ring buffer
    and broken application access it directly without consulting tracepoint/format.
    Same rule applies here: static tracepoint fields should only be accessed
    in a format defined in tracepoint/format. The order of fields and
    field sizes are not an ABI.

    Signed-off-by: Alexei Starovoitov
    Acked-by: Peter Zijlstra (Intel)
    Signed-off-by: David S. Miller

    Alexei Starovoitov
     
  • split allows to move expensive update of 'struct trace_entry' to later phase.
    Repurpose unused 1st argument of perf_tp_event() to indicate event type.

    While splitting use temp variable 'rctx' instead of '*rctx' to avoid
    unnecessary loads done by the compiler due to -fno-strict-aliasing

    Signed-off-by: Alexei Starovoitov
    Acked-by: Peter Zijlstra (Intel)
    Signed-off-by: David S. Miller

    Alexei Starovoitov
     
  • now all calls to perf_trace_buf_submit() pass 0 as 4th
    argument which will be repurposed in the next patch which will
    change the meaning of 1st arg of perf_tp_event() to event_type

    Signed-off-by: Alexei Starovoitov
    Acked-by: Peter Zijlstra (Intel)
    Signed-off-by: David S. Miller

    Alexei Starovoitov
     

23 Sep, 2015

1 commit


14 May, 2015

13 commits