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
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
...
08 Jul, 2016
1 commit
-
Add a separate Kconfig option for SAMPLES_SECCOMP.
Main reason for this is that, just like other samples, it's forced to
be a module.Without this, since the sample is a target only controlled by
CONFIG_SECCOMP_FILTER, the samples will be built before include files are
put in place properly. For example, from an arm64 allmodconfig built with
"make -sk -j 32" (without specific target), the following happens:samples/seccomp/bpf-fancy.c:13:27: fatal error: linux/seccomp.h: No such file or directory
samples/seccomp/bpf-helper.h:20:50: fatal error: linux/seccomp.h: No such file or directory
samples/seccomp/dropper.c:20:27: fatal error: linux/seccomp.h: No such file or directory
samples/seccomp/bpf-direct.c:21:27: fatal error: linux/seccomp.h: No such file or directorySo, just stick to the same format as other samples.
Signed-off-by: Olof Johansson
Signed-off-by: Kees Cook
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
28 Apr, 2016
1 commit
-
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
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
04 Feb, 2015
1 commit
-
Rename CONFIG_LIVE_PATCHING to CONFIG_LIVEPATCH to make the naming of
the config and the code more consistent.Signed-off-by: Josh Poimboeuf
Reviewed-by: Jingoo Han
Signed-off-by: Jiri Kosina
22 Dec, 2014
1 commit
-
Add a sample live patching module.
Signed-off-by: Seth Jennings
Reviewed-by: Miroslav Benes
Reviewed-by: Petr Mladek
Reviewed-by: Masami Hiramatsu
Signed-off-by: Jiri Kosina
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
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
01 Nov, 2011
1 commit
-
Signed-off-by: Paul Bolle
Signed-off-by: Michal Marek
23 May, 2011
1 commit
21 Apr, 2011
1 commit
-
samples/hid-example.o needs some Kconfig and Makefile additions in order
to build. It should use headers from the build tree, so use
HEADERS_CHECK to require that those header files be present.Change the kconfig symbol from tristate to bool since userspace cannot be
built as loadable modules.However, I don't understand why the userspace header files are not present
as reported in Andrew's build log, since it builds OK on x86_64 without
any of these changes.Signed-off-by: Randy Dunlap
Cc: Alan Ott
Cc: Jiri Kosina
Signed-off-by: Andrew Morton
Signed-off-by: Jiri Kosina
31 Mar, 2011
1 commit
-
Fixes generated by 'codespell' and manually reviewed.
Signed-off-by: Lucas De Marchi
22 Mar, 2011
1 commit
-
Documenation for the hidraw driver, with sample program.
Signed-off-by: Alan Ott
Signed-off-by: Jiri Kosina
30 Oct, 2010
1 commit
-
Add an example of how to add a dynamic kdb shell command via a kernel
module.Signed-off-by: Jason Wessel
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
08 Dec, 2009
1 commit
-
Conflicts:
kernel/irq/chip.c
09 Nov, 2009
1 commit
-
Additionally, some excessive newlines removed.
Signed-off-by: Michael Roth
Signed-off-by: Jiri Kosina
18 Oct, 2009
1 commit
-
Conflicts:
kernel/Makefile
kernel/trace/Makefile
kernel/trace/trace.h
samples/MakefileMerge 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.
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
17 Jun, 2009
1 commit
-
Conflicts:
arch/x86/Kconfig
arch/x86/kernel/traps.c
arch/x86/power/cpu.c
arch/x86/power/cpu_32.c
kernel/MakefileSemantic conflict:
arch/x86/kernel/hw_breakpoint.cMerge reason: Resolve the conflicts, move from put_cpu_no_sched() to
put_cpu() in arch/x86/kernel/hw_breakpoint.c.Signed-off-by: Ingo Molnar
16 Jun, 2009
1 commit
-
With SAMPLE_KOBJECT=y, it isn't even linked into the kernel image.
Signed-off-by: Michal Marek
Signed-off-by: Greg Kroah-Hartman
03 Jun, 2009
1 commit
-
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
Signed-off-by: Frederic Weisbecker
06 May, 2009
1 commit
-
Normally a config should be default to n. This patch also makes the
sample module-only, like SAMPLE_MARKERS and SAMPLE_TRACEPOINTS.[ Impact: don't build trace event sample by default ]
Signed-off-by: Li Zefan
Acked-by: Steven Rostedt
Acked-by: Frederic Weisbecker
LKML-Reference:
Signed-off-by: Ingo Molnar
15 Apr, 2009
1 commit
-
This patch adds a sample to the samples directory on how to create
and use TRACE_EVENT trace points.Signed-off-by: Steven Rostedt
14 Oct, 2008
1 commit
-
Tracepoint example code under samples/.
Signed-off-by: Mathieu Desnoyers
Acked-by: 'Peter Zijlstra'
Signed-off-by: Ingo Molnar
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
25 Jan, 2008
1 commit
-
This is a simple kobject module, showing how to use kobj_attributes in
basic and more complex ways.Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman
20 Oct, 2007
2 commits
-
Module example showing how to use the Linux Kernel Markers.
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Mathieu Desnoyers
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Begin infrastructure for kernel code samples in the samples/ directory.
Add its Kconfig and Kbuild files.
Source its Kconfig file in all arch/ Kconfigs.Signed-off-by: Randy Dunlap
Signed-off-by: Mathieu Desnoyers
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds