summaryrefslogtreecommitdiffstats
path: root/samples/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* Documentation: prctl/seccomp_filterWill Drewry2012-04-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <eparis@redhat.com> Signed-off-by: Will Drewry <wad@chromium.org> Acked-by: Kees Cook <keescook@chromium.org> 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 <james.l.morris@oracle.com>
* samples/rpmsg: add an rpmsg driver sampleOhad Ben-Cohen2012-02-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <swetland@google.com>. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Cc: Brian Swetland <swetland@google.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Tony Lindgren <tony@atomide.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Greg KH <greg@kroah.com> Cc: Stephen Boyd <sboyd@codeaurora.org>
* HID: Documentation for hidrawAlan Ott2011-03-221-1/+1
| | | | | | | Documenation for the hidraw driver, with sample program. Signed-off-by: Alan Ott <alan@signal11.us> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* kdb: Add kdb kernel module sampleJason Wessel2010-10-291-1/+1
| | | | | | | Add an example of how to add a dynamic kdb shell command via a kernel module. Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
* kfifo: add example files to the kernel sample directoryStefani Seibold2010-08-111-1/+1
| | | | | | | | | | | | | | | | 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 <stefani@seibold.net> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge commit 'perf/core' into perf/hw-breakpointFrederic Weisbecker2009-10-181-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: kernel/Makefile kernel/trace/Makefile kernel/trace/trace.h samples/Makefile Merge reason: We need to be uptodate with the perf events development branch because we plan to rewrite the breakpoints API on top of perf events.
| * tracing: Remove markersChristoph Hellwig2009-09-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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 <hch@lst.de> Acked-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <20090917173527.GA1699@lst.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | hw-breakpoints: sample HW breakpoint over kernel data addressK.Prasad2009-06-021-1/+2
|/ | | | | | | | | This patch introduces a sample kernel module to demonstrate the use of Hardware Breakpoint feature. It places a breakpoint over the kernel variable 'pid_max' to monitor all write operations and emits a function-backtrace when done. Signed-off-by: K.Prasad <prasad@linux.vnet.ibm.com> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
* tracing/events: add trace-events-sampleSteven Rostedt2009-04-141-1/+1
| | | | | | | This patch adds a sample to the samples directory on how to create and use TRACE_EVENT trace points. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* tracing: tracepoints, samplesMathieu Desnoyers2008-10-141-1/+1
| | | | | | | | Tracepoint example code under samples/. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Acked-by: 'Peter Zijlstra' <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* Kprobes: move kprobe examples to samples/Ananth N Mavinakayanahalli2008-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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=<func_name>' to determine execution time of func_name in nanoseconds. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Acked-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* kobject: add sample code for how to use kobjects in a simple manner.Greg Kroah-Hartman2008-01-241-1/+1
| | | | | | | | | This is a simple kobject module, showing how to use kobj_attributes in basic and more complex ways. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Linux Kernel Markers - SamplesMathieu Desnoyers2007-10-191-0/+3
Module example showing how to use the Linux Kernel Markers. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>