Move all non-README links to cirosantilli.com where the file is not cut off...

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-07-07 00:00:01 +00:00
parent ec74746707
commit 28cd27f969
380 changed files with 419 additions and 419 deletions

4
.gitignore vendored
View File

@@ -10,10 +10,10 @@ tmp.*
*.gitignore
gitignore.*
# https://github.com/cirosantilli/linux-kernel-module-cheat#prebuilt
# https://cirosantilli.com/linux-kernel-module-cheat#prebuilt
/lkmc-*.zip
# https://github.com/cirosantilli/linux-kernel-module-cheat#bst-vs-heap-vs-hashmap
# https://cirosantilli.com/linux-kernel-module-cheat#bst-vs-heap-vs-hashmap
*.dat
# Python trash.

View File

@@ -1,4 +1,4 @@
# https://github.com/cirosantilli/linux-kernel-module-cheat#docker
# https://cirosantilli.com/linux-kernel-module-cheat#docker
FROM ubuntu:18.04
COPY setup /
RUN /setup -y

View File

@@ -13,7 +13,7 @@ The perfect emulation setup to study and develop the <<linux-kernel>> v5.1, kern
TL;DR: <<qemu-buildroot-setup-getting-started>>
The source code for this page is located at: https://github.com/cirosantilli/linux-kernel-module-cheat[]. Due to link:https://github.com/isaacs/github/issues/1610[a GitHub limitation], this README is too long and not fully rendered on github.com. Either use: https://www.cirosantilli.com/linux-kernel-module-cheat or <<build-the-documentation,build the docs yourself>>.
The source code for this page is located at: https://github.com/cirosantilli/linux-kernel-module-cheat[]. Due to link:https://github.com/isaacs/github/issues/1610[a GitHub limitation], this README is too long and not fully rendered on github.com. Either use: https://cirosantilli.com/linux-kernel-module-cheat or <<build-the-documentation,build the docs yourself>>.
toc::[]

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
# https://github.com/cirosantilli/linux-kernel-module-cheat#asciidoctor-extract-header-ids
# https://cirosantilli.com/linux-kernel-module-cheat#asciidoctor-extract-header-ids
require 'asciidoctor'
require 'asciidoctor/extensions'

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
# https://github.com/cirosantilli/linux-kernel-module-cheat#asciidoctor-extract-link-targets
# https://cirosantilli.com/linux-kernel-module-cheat#asciidoctor-extract-link-targets
require 'asciidoctor'
require 'asciidoctor/extensions'

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
#
# https://github.com/cirosantilli/linux-kernel-module-cheat#asciidoctor-link-target-up-rb
# https://cirosantilli.com/linux-kernel-module-cheat#asciidoctor-link-target-up-rb
require 'asciidoctor'
require 'asciidoctor/extensions'

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
# https://github.com/cirosantilli/linux-kernel-module-cheat#asciidoctor-link-target-up-rb
# https://cirosantilli.com/linux-kernel-module-cheat#asciidoctor-link-target-up-rb
require 'asciidoctor'
require 'asciidoctor/extensions'

View File

@@ -1 +1 @@
https://github.com/cirosantilli/linux-kernel-module-cheat#baremetal-setup
https://cirosantilli.com/linux-kernel-module-cheat#baremetal-setup

View File

@@ -12,7 +12,7 @@ int main(void) {
uint64_t CurrentEL;
__asm__ ("mrs %0, CurrentEL;" : "=r" (CurrentEL) : :);
printf("CurrentEL 0x%" PRIX64 "\n", CurrentEL);
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-exception-levels */
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-exception-levels */
printf("CurrentEL.EL 0x%" PRIX64 "\n", CurrentEL >> 2);
return 0;
}

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-multicore */
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-multicore */
#include <lkmc.h>
@@ -39,7 +39,7 @@ cpu0_only:
#if !LKMC_GEM5
/* Wake up CPU 1 from initial sleep!
* See:https://github.com/cirosantilli/linux-kernel-module-cheat#arm-psci
* See:https://cirosantilli.com/linux-kernel-module-cheat#arm-psci
*/
/* PCSI function identifier: CPU_ON. */
ldr w0, =0xc4000003

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#semihosting */
/* https://cirosantilli.com/linux-kernel-module-cheat#semihosting */
.global lkmc_start
lkmc_start:

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-svc-instruction */
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-svc-instruction */
#include <assert.h>
#include <inttypes.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-svc-instruction */
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-svc-instruction */
#include <lkmc.h>

View File

@@ -7,7 +7,7 @@ int main(void) {
uint32_t spsr;
__asm__ ("mrs %0, spsr" : "=r" (spsr) : :);
printf("SPSR 0x%" PRIX32 "\n", spsr);
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-exception-levels */
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-exception-levels */
printf("SPSR.M 0x%" PRIX32 "\n", spsr & 0xF);
#if 0

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-multicore */
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-multicore */
#include <lkmc.h>

View File

@@ -6,7 +6,7 @@ lkmc_start:
ldr x0, =lkmc_vector_table
msr vbar_el1, x0
/* https://github.com/cirosantilli/linux-kernel-module-cheat#aarch64-baremetal-neon-setup */
/* https://cirosantilli.com/linux-kernel-module-cheat#aarch64-baremetal-neon-setup */
mov x1, 0x3 << 20
msr cpacr_el1, x1
isb
@@ -15,7 +15,7 @@ lkmc_start:
ldr x0, =stack_top
mov sp, x0
/* https://github.com/cirosantilli/linux-kernel-module-cheat#magic-failure-string */
/* https://cirosantilli.com/linux-kernel-module-cheat#magic-failure-string */
adr x0, lkmc_baremetal_on_exit_callback
bl on_exit

View File

@@ -18,7 +18,7 @@ lkmc_start:
mov r0, 1 << 30 /* Create value with FPEXC (bit 30) set in r0 */
vmsr fpexc, r0 /* Enable VFP and SIMD extensions */
/* https://github.com/cirosantilli/linux-kernel-module-cheat#magic-failure-string */
/* https://cirosantilli.com/linux-kernel-module-cheat#magic-failure-string */
ldr r0, =lkmc_baremetal_on_exit_callback
bl on_exit

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# https://github.com/cirosantilli/linux-kernel-module-cheat#bisection
# https://cirosantilli.com/linux-kernel-module-cheat#bisection
set -eu
cd ../..
./build-gem5 --arch aarch64 --gem5-build-id bisect

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# https://github.com/cirosantilli/linux-kernel-module-cheat#bisection
# https://cirosantilli.com/linux-kernel-module-cheat#bisection
set -eu
cd ../..
./build-gem5 --gem5-build-id bisect

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# https://github.com/cirosantilli/linux-kernel-module-cheat#bisection
# https://cirosantilli.com/linux-kernel-module-cheat#bisection
set -eu
./build-linux --clean "$@"
./build-linux "$@"

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# https://github.com/cirosantilli/linux-kernel-module-cheat#bisection
# https://cirosantilli.com/linux-kernel-module-cheat#bisection
set -eu
git submodule update --recursive
cd ../..

View File

@@ -11,7 +11,7 @@ class Main(common.LkmcCliFunction):
},
description='''\
Convert a BST vs heap stat file into a gnuplot input
https://github.com/cirosantilli/linux-kernel-module-cheat#bst-vs-heap-vs-hashmap
https://cirosantilli.com/linux-kernel-module-cheat#bst-vs-heap-vs-hashmap
''',
)

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env gnuplot
# https://github.com/cirosantilli/linux-kernel-module-cheat#bst-vs-heap-vs-hashmap
# https://cirosantilli.com/linux-kernel-module-cheat#bst-vs-heap-vs-hashmap
#
# A stacked plot with a single xlabel as shown at:
#

4
build
View File

@@ -68,7 +68,7 @@ It is currently not possible to configure individual components from the command
when you build with this script. TODO.
Without any args, build only what is necessary for:
https://github.com/cirosantilli/linux-kernel-module-cheat#qemu-buildroot-setup
https://cirosantilli.com/linux-kernel-module-cheat#qemu-buildroot-setup
....
./%(prog)s
@@ -367,7 +367,7 @@ so looping over all of them would waste time.
default=True,
help='''\
Don't run any apt-get commands. To make it easier to use with other archs:
https://github.com/cirosantilli/linux-kernel-module-cheat#supported-hosts
https://cirosantilli.com/linux-kernel-module-cheat#supported-hosts
'''
)
self.add_argument(

View File

@@ -13,7 +13,7 @@ class Main(common.BuildCliFunction):
description='''\
Download and build Android AOSP.
https://github.com/cirosantilli/linux-kernel-module-cheat#android
https://cirosantilli.com/linux-kernel-module-cheat#android
'''
)
self.add_argument(

View File

@@ -14,7 +14,7 @@ class Main(common.LkmcCliFunction):
'show_time': False,
},
description='''\
https://github.com/cirosantilli/linux-kernel-module-cheat#build-the-documentation
https://cirosantilli.com/linux-kernel-module-cheat#build-the-documentation
''',
)
self.add_argument(
@@ -70,13 +70,13 @@ from the README to example sources to GitHub rather than locally.
'git',
'grep',
'--fixed-strings',
self.env['github_repo_id_url'] + '#',
self.env['homepage_url'] + '#',
LF
],
cwd=self.env['root_dir']
).splitlines():
url_index = grep_line.index(self.env['github_repo_id_url'])
hash_start_index = url_index + len(self.env['github_repo_id_url'])
url_index = grep_line.index(self.env['homepage_url'])
hash_start_index = url_index + len(self.env['homepage_url'])
if len(grep_line) > hash_start_index:
hash_str = grep_line_hash_re.search(grep_line[hash_start_index + 1:]).group(1)
if not hash_str in header_ids:

View File

@@ -56,7 +56,7 @@ top of it.
help='''\
Like --custom-config-file, but select the gem5 Linux kernel fork
config as the custom config file. Ignore --custom-config-file if given.
See: https://github.com/cirosantilli/linux-kernel-module-cheat#gem5-arm-linux-kernel-patches
See: https://cirosantilli.com/linux-kernel-module-cheat#gem5-arm-linux-kernel-patches
'''
)
self.add_argument(
@@ -195,7 +195,7 @@ Run `make modules_install` after `make`.
common_make_args +
self.sh.add_newlines(self.env['extra_make_args'])
),
# https://github.com/cirosantilli/linux-kernel-module-cheat#proc-version
# https://cirosantilli.com/linux-kernel-module-cheat#proc-version
extra_env={
'KBUILD_BUILD_VERSION': '1',
'KBUILD_BUILD_TIMESTAMP': 'Thu Jan 1 00:00:00 UTC 1970',

View File

@@ -16,7 +16,7 @@ class Main(common.BuildCliFunction):
description='''\
Build our Linux kernel modules without using Buildroot.
See also: https://github.com/cirosantilli/linux-kernel-module-cheat#host
See also: https://cirosantilli.com/linux-kernel-module-cheat#host
''')
self.add_argument(
'--make-args',

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# Build just enough to run ./test:
# https://github.com/cirosantilli/linux-kernel-module-cheat#automated-tests
# https://cirosantilli.com/linux-kernel-module-cheat#automated-tests
set -eu
test_size=1
while [ $# -gt 0 ]; do

View File

@@ -12,7 +12,7 @@ class Main(build_userland.Main):
def __init__(self):
super().__init__(
description='''\
https://github.com/cirosantilli/linux-kernel-module-cheat#userland-setup-getting-started-natively
https://cirosantilli.com/linux-kernel-module-cheat#userland-setup-getting-started-natively
''',
defaults={
'archs': [platform.processor()],

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# https://github.com/cirosantilli/linux-kernel-module-cheat#xen
# https://cirosantilli.com/linux-kernel-module-cheat#xen
set -eux
cd submodules/xen
make \

View File

@@ -1 +1 @@
https://github.com/cirosantilli/linux-kernel-module-cheat#buildroot_packages-directory
https://cirosantilli.com/linux-kernel-module-cheat#buildroot_packages-directory

View File

@@ -1 +1 @@
https://github.com/cirosantilli/linux-kernel-module-cheat#kernel_modules-buildroot-package
https://cirosantilli.com/linux-kernel-module-cheat#kernel_modules-buildroot-package

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#kernel-module-dependencies */
/* https://cirosantilli.com/linux-kernel-module-cheat#kernel-module-dependencies */
#include <linux/kernel.h>
#include <linux/module.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#kernel-module-dependencies */
/* https://cirosantilli.com/linux-kernel-module-cheat#kernel-module-dependencies */
#include <linux/kernel.h>
#include <linux/module.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#kernel_modules-buildroot-package */
/* https://cirosantilli.com/linux-kernel-module-cheat#kernel_modules-buildroot-package */
#include <linux/module.h>
#include <linux/kernel.h>

View File

@@ -102,14 +102,14 @@ consts['sha'] = common.git_sha(consts['root_dir'])
consts['release_dir'] = os.path.join(consts['out_dir'], 'release')
consts['release_zip_file'] = os.path.join(consts['release_dir'], 'lkmc-{}.zip'.format(consts['sha']))
consts['github_repo_id'] = 'cirosantilli/linux-kernel-module-cheat'
consts['github_repo_id_url'] = 'https://github.com/' + consts['github_repo_id']
consts['homepage_url'] = 'https://cirosantilli.com/linux-kernel-module-cheat'
consts['asm_ext'] = '.S'
consts['c_ext'] = '.c'
consts['cxx_ext'] = '.cpp'
consts['header_ext'] = '.h'
consts['kernel_module_ext'] = '.ko'
consts['obj_ext'] = '.o'
# https://github.com/cirosantilli/linux-kernel-module-cheat#baremetal-cpp
# https://cirosantilli.com/linux-kernel-module-cheat#baremetal-cpp
consts['baremetal_build_in_exts'] = [
consts['asm_ext'],
consts['c_ext'],
@@ -338,7 +338,7 @@ Use the given directory as the gem5 source tree. Ignore `--gem5-worktree`.
'--gem5-worktree',
help='''\
Create and use a git worktree of the gem5 submodule.
See: https://github.com/cirosantilli/linux-kernel-module-cheat#gem5-worktree
See: https://cirosantilli.com/linux-kernel-module-cheat#gem5-worktree
'''
)
@@ -367,7 +367,7 @@ Use the given directory as the Linux source tree.
'--initramfs',
default=False,
help='''\
See: https://github.com/cirosantilli/linux-kernel-module-cheat#initramfs
See: https://cirosantilli.com/linux-kernel-module-cheat#initramfs
'''
)
self.add_argument(
@@ -376,7 +376,7 @@ See: https://github.com/cirosantilli/linux-kernel-module-cheat#initramfs
help='''\
For Buildroot: create a CPIO root filessytem.
For QEMU use that CPUI root filesystem initrd instead of the default ext2.
See: https://github.com/cirosantilli/linux-kernel-module-cheat#initrd
See: https://cirosantilli.com/linux-kernel-module-cheat#initrd
'''
)
@@ -595,7 +595,7 @@ Valid emulators: {}
"native" means running natively on host. It is only supported for userland,
and you must have built the program for native running, see:
https://github.com/cirosantilli/linux-kernel-module-cheat#userland-setup-getting-started-natively
https://cirosantilli.com/linux-kernel-module-cheat#userland-setup-getting-started-natively
Incompatible archs are skipped.
'''.format(emulators_string)
)
@@ -1497,9 +1497,9 @@ Force rebuild even if sources didn't change.
'help': '''
Use the given GCC -O optimization level.
For some scripts, there are hard technical challenges why it cannot
be implemented, e.g.: https://github.com/cirosantilli/linux-kernel-module-cheat#kernel-o0
be implemented, e.g.: https://cirosantilli.com/linux-kernel-module-cheat#kernel-o0
and for others such as gem5 have their custom mechanism:
https://github.com/cirosantilli/linux-kernel-module-cheat#gem5-debug-build
https://cirosantilli.com/linux-kernel-module-cheat#gem5-debug-build
''',
}
}

View File

@@ -1,5 +1,5 @@
'''
https://github.com/cirosantilli/linux-kernel-module-cheat#default-command-line-arguments
https://cirosantilli.com/linux-kernel-module-cheat#default-command-line-arguments
'''
def set_args(args, script_name):

View File

@@ -11,7 +11,7 @@ class Main(common.BuildCliFunction):
def __init__(self):
super().__init__(
description='''\
https://github.com/cirosantilli/linux-kernel-module-cheat#rootfs_overlay
https://cirosantilli.com/linux-kernel-module-cheat#rootfs_overlay
''')
def build(self):

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# https://github.com/cirosantilli/linux-kernel-module-cheat#gem5-run-benchmark
# https://cirosantilli.com/linux-kernel-module-cheat#gem5-run-benchmark
set -eu
root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"

View File

@@ -1 +1 @@
https://github.com/cirosantilli/linux-kernel-module-cheat#hello-host
https://cirosantilli.com/linux-kernel-module-cheat#hello-host

View File

@@ -14,7 +14,7 @@ ccflags-y := \
$(CCFLAGS)
ifeq ($(ARCH),x86)
# https://github.com/cirosantilli/linux-kernel-module-cheat#floating-point-in-kernel-modules
# https://cirosantilli.com/linux-kernel-module-cheat#floating-point-in-kernel-modules
CFLAGS_REMOVE_float.o += -mno-sse -mno-sse2
endif

View File

@@ -1 +1 @@
https://github.com/cirosantilli/linux-kernel-module-cheat#your-first-kernel-module-hack
https://cirosantilli.com/linux-kernel-module-cheat#your-first-kernel-module-hack

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#anonymous-inode */
/* https://cirosantilli.com/linux-kernel-module-cheat#anonymous-inode */
#include <linux/anon_inodes.h>
#include <linux/debugfs.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#character-devices */
/* https://cirosantilli.com/linux-kernel-module-cheat#character-devices */
#include <linux/fs.h> /* register_chrdev, unregister_chrdev */
#include <linux/module.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#automatically-create-character-device-file-on-insmod */
/* https://cirosantilli.com/linux-kernel-module-cheat#automatically-create-character-device-file-on-insmod */
#include <linux/cdev.h>
#include <linux/device.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#debugfs */
/* https://cirosantilli.com/linux-kernel-module-cheat#debugfs */
#include <linux/debugfs.h>
#include <linux/kernel.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#kernel-module-dependencies */
/* https://cirosantilli.com/linux-kernel-module-cheat#kernel-module-dependencies */
#include <linux/debugfs.h>
#include <linux/kernel.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#kernel-module-dependencies */
/* https://cirosantilli.com/linux-kernel-module-cheat#kernel-module-dependencies */
#include <linux/debugfs.h>
#include <linux/kernel.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#dump_stack */
/* https://cirosantilli.com/linux-kernel-module-cheat#dump_stack */
#include <linux/module.h>
#include <linux/kernel.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#floating-point-in-kernel-modules */
/* https://cirosantilli.com/linux-kernel-module-cheat#floating-point-in-kernel-modules */
#include <linux/kernel.h>
#include <linux/module.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#file-operations */
/* https://cirosantilli.com/linux-kernel-module-cheat#file-operations */
#include <linux/debugfs.h>
#include <linux/errno.h> /* EFAULT */

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#qemu-buildroot-setup-getting-started */
/* https://cirosantilli.com/linux-kernel-module-cheat#qemu-buildroot-setup-getting-started */
#include <linux/module.h>
#include <linux/kernel.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#qemu-buildroot-setup-getting-started */
/* https://cirosantilli.com/linux-kernel-module-cheat#qemu-buildroot-setup-getting-started */
#include <linux/module.h>
#include <linux/kernel.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#init_module */
/* https://cirosantilli.com/linux-kernel-module-cheat#init_module */
#include <linux/module.h>
#include <linux/kernel.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#ioctl */
/* https://cirosantilli.com/linux-kernel-module-cheat#ioctl */
#include <linux/debugfs.h>
#include <linux/module.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#irq-ko */
/* https://cirosantilli.com/linux-kernel-module-cheat#irq-ko */
#include <linux/fs.h>
#include <linux/interrupt.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#kprobes
/* https://cirosantilli.com/linux-kernel-module-cheat#kprobes
*
* Adapted from: https://github.com/torvalds/linux/blob/v4.17/samples/kprobes/kprobe_example.c
*/

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#kstrto */
/* https://cirosantilli.com/linux-kernel-module-cheat#kstrto */
#include <linux/debugfs.h>
#include <linux/kernel.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#kthread */
/* https://cirosantilli.com/linux-kernel-module-cheat#kthread */
#include <linux/delay.h> /* usleep_range */
#include <linux/kernel.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#kthreads */
/* https://cirosantilli.com/linux-kernel-module-cheat#kthreads */
#include <linux/delay.h> /* usleep_range */
#include <linux/kernel.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#config_fortify_source */
/* https://cirosantilli.com/linux-kernel-module-cheat#config_fortify_source */
#include <linux/kernel.h>
#include <linux/module.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#mmap */
/* https://cirosantilli.com/linux-kernel-module-cheat#mmap */
#include <linux/fs.h>
#include <linux/init.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#module_info */
/* https://cirosantilli.com/linux-kernel-module-cheat#module_info */
#include <linux/module.h>
#include <linux/kernel.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#pr_debug */
/* https://cirosantilli.com/linux-kernel-module-cheat#pr_debug */
#include <linux/module.h>
#include <linux/kernel.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#netlink-sockets */
/* https://cirosantilli.com/linux-kernel-module-cheat#netlink-sockets */
#include <linux/delay.h> /* usleep_range */
#include <linux/module.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#kernel-panic-and-oops */
/* https://cirosantilli.com/linux-kernel-module-cheat#kernel-panic-and-oops */
#include <linux/module.h>
#include <linux/kernel.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#kernel-panic-and-oops */
/* https://cirosantilli.com/linux-kernel-module-cheat#kernel-panic-and-oops */
#include <linux/module.h>
#include <linux/kernel.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#kernel-module-parameters */
/* https://cirosantilli.com/linux-kernel-module-cheat#kernel-module-parameters */
#include <linux/debugfs.h>
#include <linux/delay.h> /* usleep_range */

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#pci_min */
/* https://cirosantilli.com/linux-kernel-module-cheat#pci_min */
#include <linux/cdev.h>
#include <linux/fs.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-pmccntr-register */
/* https://cirosantilli.com/linux-kernel-module-cheat#arm-pmccntr-register */
#include <linux/debugfs.h>
#include <linux/errno.h> /* EFAULT */

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#poll */
/* https://cirosantilli.com/linux-kernel-module-cheat#poll */
#include <linux/debugfs.h>
#include <linux/delay.h> /* usleep_range */

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#procfs */
/* https://cirosantilli.com/linux-kernel-module-cheat#procfs */
#include <linux/debugfs.h>
#include <linux/module.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#qemu-edu */
/* https://cirosantilli.com/linux-kernel-module-cheat#qemu-edu */
#include <linux/cdev.h> /* cdev_ */
#include <linux/fs.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#ring0 */
/* https://cirosantilli.com/linux-kernel-module-cheat#ring0 */
#include <linux/module.h>
#include <linux/kernel.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#schedule */
/* https://cirosantilli.com/linux-kernel-module-cheat#schedule */
#include <linux/kernel.h>
#include <linux/kthread.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#seq_file */
/* https://cirosantilli.com/linux-kernel-module-cheat#seq_file */
#include <linux/debugfs.h>
#include <linux/errno.h> /* EFAULT */

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#seq_file-single_open */
/* https://cirosantilli.com/linux-kernel-module-cheat#seq_file-single_open */
#include <linux/debugfs.h>
#include <linux/errno.h> /* EFAULT */

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#sleep */
/* https://cirosantilli.com/linux-kernel-module-cheat#sleep */
#include <linux/delay.h> /* usleep_range */
#include <linux/kernel.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#config_fortify_source */
/* https://cirosantilli.com/linux-kernel-module-cheat#config_fortify_source */
#include <linux/kernel.h>
#include <linux/module.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#sysfs */
/* https://cirosantilli.com/linux-kernel-module-cheat#sysfs */
#include <linux/init.h>
#include <linux/kobject.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#timers */
/* https://cirosantilli.com/linux-kernel-module-cheat#timers */
#include <linux/jiffies.h>
#include <linux/kernel.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#vermagic */
/* https://cirosantilli.com/linux-kernel-module-cheat#vermagic */
#include <linux/module.h>
#include <linux/kernel.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#vermagic */
/* https://cirosantilli.com/linux-kernel-module-cheat#vermagic */
#include <linux/module.h>
#include <linux/kernel.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#virt_to_phys */
/* https://cirosantilli.com/linux-kernel-module-cheat#virt_to_phys */
#include <asm/io.h> /* virt_to_phys */
#include <linux/debugfs.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#wait-queues */
/* https://cirosantilli.com/linux-kernel-module-cheat#wait-queues */
#include <linux/delay.h> /* usleep_range */
#include <linux/kernel.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#wait-queues */
/* https://cirosantilli.com/linux-kernel-module-cheat#wait-queues */
#include <linux/delay.h> /* usleep_range */
#include <linux/kernel.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#warn_on */
/* https://cirosantilli.com/linux-kernel-module-cheat#warn_on */
#include <linux/module.h>
#include <linux/kernel.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#workqueue-from-workqueue */
/* https://cirosantilli.com/linux-kernel-module-cheat#workqueue-from-workqueue */
#include <linux/kernel.h>
#include <linux/module.h>

View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#workqueues */
/* https://cirosantilli.com/linux-kernel-module-cheat#workqueues */
#include <linux/delay.h> /* usleep_range */
#include <linux/kernel.h>

View File

@@ -1 +1 @@
https://github.com/cirosantilli/linux-kernel-module-cheat#kernel-configs-about
https://cirosantilli.com/linux-kernel-module-cheat#kernel-configs-about

View File

@@ -1,4 +1,4 @@
# https://github.com/cirosantilli/linux-kernel-module-cheat#buildroot-kernel-config
# https://cirosantilli.com/linux-kernel-module-cheat#buildroot-kernel-config
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y

View File

@@ -1,4 +1,4 @@
# https://github.com/cirosantilli/linux-kernel-module-cheat#buildroot-kernel-config
# https://cirosantilli.com/linux-kernel-module-cheat#buildroot-kernel-config
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SYSVIPC=y

View File

@@ -1,4 +1,4 @@
# https://github.com/cirosantilli/linux-kernel-module-cheat#buildroot-kernel-config
# https://cirosantilli.com/linux-kernel-module-cheat#buildroot-kernel-config
CONFIG_SYSVIPC=y
CONFIG_IKCONFIG=y

View File

@@ -1,4 +1,4 @@
# https://github.com/cirosantilli/linux-kernel-module-cheat#linux-kernel-min-config
# https://cirosantilli.com/linux-kernel-module-cheat#linux-kernel-min-config
## gem5 x86

View File

@@ -1,4 +1,4 @@
# https://github.com/cirosantilli/linux-kernel-module-cheat#nfs
# https://cirosantilli.com/linux-kernel-module-cheat#nfs
CONFIG_NFSD=y
CONFIG_NFSD_V2_ACL=y
CONFIG_NFSD_V3=y

View File

@@ -1,4 +1,4 @@
# https://github.com/cirosantilli/linux-kernel-module-cheat#selinux
# https://cirosantilli.com/linux-kernel-module-cheat#selinux
CONFIG_AUDIT=y
CONFIG_SECURITY=y
CONFIG_SECURITY_NETWORK=y

2
lkmc.c
View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#lkmc-c */
/* https://cirosantilli.com/linux-kernel-module-cheat#lkmc-c */
#include <math.h>
#include <stdio.h>

2
lkmc.h
View File

@@ -1,4 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#lkmc-c */
/* https://cirosantilli.com/linux-kernel-module-cheat#lkmc-c */
#ifndef LKMC_H
#define LKMC_H

View File

@@ -1 +1 @@
https://github.com/cirosantilli/linux-kernel-module-cheat#lkmc-directory
https://cirosantilli.com/linux-kernel-module-cheat#lkmc-directory

Some files were not shown because too many files have changed in this diff Show More