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
     

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)
     

28 Apr, 2016

2 commits

  • A small bug with the new autoksyms support showed that there are
    two kernel modules in the Documentation directory that qualify
    as samples, while all other samples are in the samples/ directory.

    This patch was originally meant as a workaround for that bug, but
    it has now been solved in a different way. However, I still think
    it makes sense as a cleanup to consolidate all sample code in
    one place.

    Signed-off-by: Arnd Bergmann
    Acked-by: Hans Verkuil
    Acked-by: Mauro Carvalho Chehab
    Signed-off-by: Jonathan Corbet

    Arnd Bergmann
     
  • A small bug with the new autoksyms support showed that there are
    two kernel modules in the Documentation directory that qualify
    as samples, while all other samples are in the samples/ directory.

    This patch was originally meant as a workaround for that bug, but
    it has now been solved in a different way. However, I still think
    it makes sense as a cleanup to consolidate all sample code in
    one place.

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Jonathan Corbet

    Arnd Bergmann
     

14 Oct, 2015

1 commit

  • Remove the old show_attribute and store_attribute methods and update
    the documentation. Also replace the two C samples with a single new
    one in the proper samples directory where people expect to find it.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Nicholas Bellinger

    Christoph Hellwig
     

22 Dec, 2014

1 commit


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
     

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
     

22 Mar, 2011

1 commit


30 Oct, 2010

1 commit


11 Aug, 2010

1 commit

  • Add four examples to the kernel sample directory.

    It shows how to handle:
    - a byte stream fifo
    - a integer type fifo
    - a dynamic record sized fifo
    - the fifo DMA functions

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Stefani Seibold
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stefani Seibold
     

18 Oct, 2009

1 commit


19 Sep, 2009

1 commit

  • Now that the last users of markers have migrated to the event
    tracer we can kill off the (now orphan) support code.

    Signed-off-by: Christoph Hellwig
    Acked-by: Mathieu Desnoyers
    Cc: Steven Rostedt
    Cc: Frederic Weisbecker
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Christoph Hellwig
     

03 Jun, 2009

1 commit


15 Apr, 2009

1 commit


14 Oct, 2008

1 commit


05 Mar, 2008

1 commit

  • Move kprobes examples from Documentation/kprobes.txt to under samples/.
    Patch originally by Randy Dunlap.

    o Updated the patch to apply on 2.6.25-rc3
    o Modified examples code to build on multiple architectures. Currently,
    the kprobe and jprobe examples code works for x86 and powerpc
    o Cleaned up unneeded #includes
    o Cleaned up Kconfig per Sam Ravnborg's suggestions to fix build break
    on archs that don't have kretprobes
    o Implemented suggestions by Mathieu Desnoyers on CONFIG_KRETPROBES
    o Included Andrew Morton's cleanup based on x86-git
    o Modified kretprobe_example to act as a arch-agnostic module to
    determine routine execution times:
    Use 'modprobe kretprobe_example func=' to determine
    execution time of func_name in nanoseconds.

    Signed-off-by: Randy Dunlap
    Signed-off-by: Ananth N Mavinakayanahalli
    Acked-by: Mathieu Desnoyers
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ananth N Mavinakayanahalli
     

25 Jan, 2008

1 commit


20 Oct, 2007

1 commit