- 15 Jan, 2019 1 commit
-
-
Christian Brauner authored
This adds a simple sample program mounting binderfs and adding, then removing a binder device. Hopefully, it will be helpful to users who want to know how binderfs is supposed to be used. Signed-off-by:
Christian Brauner <christian.brauner@ubuntu.com> Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
- 16 Mar, 2018 1 commit
-
-
Arnd Bergmann authored
The Analog Devices Blackfin port was added in 2007 and was rather active for a while, but all work on it has come to a standstill over time, as Analog have changed their product line-up. Aaron Wu confirmed that the architecture port is no longer relevant, and multiple people suggested removing blackfin independently because of some of its oddities like a non-working SMP port, and the amount of duplication between the chip variants, which cause extra work when doing cross-architecture changes. Link: https://docs.blackfin.uclinux.org/ Acked-by:
Aaron Wu <Aaron.Wu@analog.com> Acked-by:
Bryan Wu <cooloney@gmail.com> Cc: Steven Miao <realmz6@gmail.com> Cc: Mike Frysinger <vapier@chromium.org> Signed-off-by:
Arnd Bergmann <arnd@arndb.de>
-
- 13 Feb, 2018 1 commit
-
-
Bjorn Andersson authored
Introduce a sample driver that register for server notifications and spawn clients for each available test service (service 15). The spawned clients implements the interface for encoding "ping" and "data" requests and decode the responses from the remote. Acked-By:
Chris Lew <clew@codeaurora.org> Signed-off-by:
Bjorn Andersson <bjorn.andersson@linaro.org>
-
- 03 Mar, 2017 1 commit
-
-
David Howells authored
Add a system call to make extended file information available, including file creation and some attribute flags where available through the underlying filesystem. The getattr inode operation is altered to take two additional arguments: a u32 request_mask and an unsigned int flags that indicate the synchronisation mode. This change is propagated to the vfs_getattr*() function. Functions like vfs_stat() are now inline wrappers around new functions vfs_statx() and vfs_statx_fd() to reduce stack usage. ======== OVERVIEW ======== The idea was initially proposed as a set of xattrs that could be retrieved with getxattr(), but the general preference proved to be for a new syscall with an extended stat structure. A number of requests were gathered for features to be included. The following have been included: (1) Make the fields a consistent size on all arches and make them large. (2) Spare space, request flags and information flags are provi...
-
- 30 Dec, 2016 1 commit
-
-
Alex Williamson authored
This sample driver was originally under Documentation/ and was moved to samples, but build support was never adjusted for the new location. Signed-off-by:
Alex Williamson <alex.williamson@redhat.com> Reviewed-by:
Eric Auger <eric.auger@redhat.com> Tested-by:
Eric Auger <eric.auger@redhat.com> Reviewed-by:
Kirti Wankhede <kwankhede@nvidia.com>
-
- 10 Oct, 2016 1 commit
-
-
Shuah Khan authored
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 <mmarek@suse.com> Acked-by:
Jonathan Corbet <corbet@lwn.net> Reviewed-by:
Kees Cook <keescook@chromium.org> Reported-by:
Valentin Rothberg <valentinrothberg@gmail.com> Reported-by:
Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by:
Shuah Khan <shuahkh@osg.samsung.com>
-
- 20 Jun, 2016 1 commit
-
-
Steven Rostedt (Red Hat) authored
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 <rostedt@goodmis.org>
-
- 09 May, 2016 1 commit
-
-
Arnd Bergmann authored
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: 23121ca2 ("kbuild: create/adjust generated/autoksyms.h") Signed-off-by:
Arnd Bergmann <arnd@arndb.de>
-
- 28 Apr, 2016 2 commits
-
-
Arnd Bergmann authored
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 <arnd@arndb.de> Acked-by:
Hans Verkuil <hans.verkuil@cisco.com> Acked-by:
Mauro Carvalho Chehab <mchehab@osg.samsung.com> Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
Arnd Bergmann authored
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 <arnd@arndb.de> Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
- 14 Oct, 2015 1 commit
-
-
Christoph Hellwig authored
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 <hch@lst.de> Signed-off-by:
Nicholas Bellinger <nab@linux-iscsi.org>
-
- 22 Dec, 2014 1 commit
-
-
Seth Jennings authored
Add a sample live patching module. Signed-off-by:
Seth Jennings <sjenning@redhat.com> Reviewed-by:
Miroslav Benes <mbenes@suse.cz> Reviewed-by:
Petr Mladek <pmladek@suse.cz> Reviewed-by:
Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
- 25 Jan, 2013 1 commit
-
-
Steven Rostedt authored
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 <viro@ZenIV.linux.org.uk> Acked-by:
Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Signed-off-by:
Steven Rostedt <rostedt@goodmis.org>
-
- 14 Apr, 2012 1 commit
-
-
Will Drewry authored
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 88ebdda6 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>
-
- 08 Feb, 2012 1 commit
-
-
Ohad Ben-Cohen authored
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: Steph...
-
- 22 Mar, 2011 1 commit
-
-
Alan Ott authored
Documenation for the hidraw driver, with sample program. Signed-off-by:
Alan Ott <alan@signal11.us> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
- 29 Oct, 2010 1 commit
-
-
Jason Wessel authored
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>
-
- 11 Aug, 2010 1 commit
-
-
Stefani Seibold authored
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>
-
- 18 Sep, 2009 1 commit
-
-
Christoph Hellwig authored
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>
-
- 02 Jun, 2009 1 commit
-
-
K.Prasad authored
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>
-
- 15 Apr, 2009 1 commit
-
-
Steven Rostedt authored
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>
-
- 14 Oct, 2008 1 commit
-
-
Mathieu Desnoyers authored
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>
-
- 05 Mar, 2008 1 commit
-
-
Ananth N Mavinakayanahalli authored
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>
-
- 25 Jan, 2008 1 commit
-
-
Greg Kroah-Hartman authored
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>
-
- 19 Oct, 2007 1 commit
-
-
Mathieu Desnoyers authored
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>
-