mirror of
https://github.com/tiennm99/HDH.git
synced 2026-08-10 10:21:44 +00:00
Edit BTL1
This commit is contained in:
+5279
File diff suppressed because it is too large
Load Diff
+1764
File diff suppressed because it is too large
Load Diff
@@ -5,5 +5,5 @@
|
||||
|
||||
long get_proc_info(pid_t pid, struct procinfos *info)
|
||||
{
|
||||
return syscall(548, pid, info);
|
||||
}
|
||||
return syscall(548, pid, info);
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
obj-y := sys_get_proc_info.o
|
||||
@@ -1 +0,0 @@
|
||||
cmd_get_proc_info/built-in.a := rm -f get_proc_info/built-in.a; ar rcSTPD get_proc_info/built-in.a get_proc_info/sys_get_proc_info.o
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -1,3 +0,0 @@
|
||||
/home/miti99/modules/get_proc_info.ko
|
||||
/home/miti99/modules/get_proc_info.o
|
||||
|
||||
Binary file not shown.
@@ -1 +0,0 @@
|
||||
cmd_/home/miti99/modules/get_proc_info.ko := ld -r -m elf_x86_64 -z max-page-size=0x200000 -T ./scripts/module-common.lds --build-id -o /home/miti99/modules/get_proc_info.ko /home/miti99/modules/get_proc_info.o /home/miti99/modules/get_proc_info.mod.o ; true
|
||||
@@ -1,672 +0,0 @@
|
||||
cmd_/home/miti99/modules/get_proc_info.mod.o := gcc -Wp,-MD,/home/miti99/modules/.get_proc_info.mod.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/7/include -I./arch/x86/include -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror-implicit-function-declaration -Werror=implicit-int -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_AVX512=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-int-in-bool-context -O2 --param=allow-store-data-races=0 -Wframe-larger-than=1024 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -g -gdwarf-4 -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -DKBUILD_BASENAME='"get_proc_info.mod"' -DKBUILD_MODNAME='"get_proc_info"' -DMODULE -c -o /home/miti99/modules/get_proc_info.mod.o /home/miti99/modules/get_proc_info.mod.c
|
||||
|
||||
source_/home/miti99/modules/get_proc_info.mod.o := /home/miti99/modules/get_proc_info.mod.c
|
||||
|
||||
deps_/home/miti99/modules/get_proc_info.mod.o := \
|
||||
$(wildcard include/config/module/unload.h) \
|
||||
$(wildcard include/config/retpoline.h) \
|
||||
include/linux/kconfig.h \
|
||||
$(wildcard include/config/cpu/big/endian.h) \
|
||||
$(wildcard include/config/booger.h) \
|
||||
$(wildcard include/config/foo.h) \
|
||||
include/linux/compiler_types.h \
|
||||
$(wildcard include/config/have/arch/compiler/h.h) \
|
||||
$(wildcard include/config/enable/must/check.h) \
|
||||
$(wildcard include/config/arch/supports/optimized/inlining.h) \
|
||||
$(wildcard include/config/optimize/inlining.h) \
|
||||
include/linux/compiler_attributes.h \
|
||||
include/linux/compiler-gcc.h \
|
||||
$(wildcard include/config/arch/use/builtin/bswap.h) \
|
||||
include/linux/build-salt.h \
|
||||
$(wildcard include/config/build/salt.h) \
|
||||
include/linux/elfnote.h \
|
||||
include/linux/elf.h \
|
||||
arch/x86/include/asm/elf.h \
|
||||
$(wildcard include/config/x86/64.h) \
|
||||
$(wildcard include/config/x86/32.h) \
|
||||
$(wildcard include/config/ia32/emulation.h) \
|
||||
$(wildcard include/config/x86/x32/abi.h) \
|
||||
$(wildcard include/config/compat.h) \
|
||||
include/linux/thread_info.h \
|
||||
$(wildcard include/config/thread/info/in/task.h) \
|
||||
$(wildcard include/config/have/arch/within/stack/frames.h) \
|
||||
$(wildcard include/config/hardened/usercopy.h) \
|
||||
include/linux/types.h \
|
||||
$(wildcard include/config/have/uid16.h) \
|
||||
$(wildcard include/config/uid16.h) \
|
||||
$(wildcard include/config/lbdaf.h) \
|
||||
$(wildcard include/config/arch/dma/addr/t/64bit.h) \
|
||||
$(wildcard include/config/phys/addr/t/64bit.h) \
|
||||
$(wildcard include/config/64bit.h) \
|
||||
include/uapi/linux/types.h \
|
||||
arch/x86/include/uapi/asm/types.h \
|
||||
include/uapi/asm-generic/types.h \
|
||||
include/asm-generic/int-ll64.h \
|
||||
include/uapi/asm-generic/int-ll64.h \
|
||||
arch/x86/include/uapi/asm/bitsperlong.h \
|
||||
include/asm-generic/bitsperlong.h \
|
||||
include/uapi/asm-generic/bitsperlong.h \
|
||||
include/uapi/linux/posix_types.h \
|
||||
include/linux/stddef.h \
|
||||
include/uapi/linux/stddef.h \
|
||||
include/linux/compiler_types.h \
|
||||
arch/x86/include/asm/posix_types.h \
|
||||
arch/x86/include/uapi/asm/posix_types_64.h \
|
||||
include/uapi/asm-generic/posix_types.h \
|
||||
include/linux/bug.h \
|
||||
$(wildcard include/config/generic/bug.h) \
|
||||
$(wildcard include/config/bug/on/data/corruption.h) \
|
||||
arch/x86/include/asm/bug.h \
|
||||
$(wildcard include/config/debug/bugverbose.h) \
|
||||
include/linux/stringify.h \
|
||||
include/asm-generic/bug.h \
|
||||
$(wildcard include/config/bug.h) \
|
||||
$(wildcard include/config/generic/bug/relative/pointers.h) \
|
||||
$(wildcard include/config/smp.h) \
|
||||
include/linux/compiler.h \
|
||||
$(wildcard include/config/trace/branch/profiling.h) \
|
||||
$(wildcard include/config/profile/all/branches.h) \
|
||||
$(wildcard include/config/stack/validation.h) \
|
||||
$(wildcard include/config/kasan.h) \
|
||||
arch/x86/include/asm/barrier.h \
|
||||
arch/x86/include/asm/alternative.h \
|
||||
arch/x86/include/asm/asm.h \
|
||||
arch/x86/include/asm/nops.h \
|
||||
$(wildcard include/config/mk7.h) \
|
||||
$(wildcard include/config/x86/p6/nop.h) \
|
||||
include/asm-generic/barrier.h \
|
||||
include/linux/kasan-checks.h \
|
||||
include/linux/kernel.h \
|
||||
$(wildcard include/config/preempt/voluntary.h) \
|
||||
$(wildcard include/config/debug/atomic/sleep.h) \
|
||||
$(wildcard include/config/mmu.h) \
|
||||
$(wildcard include/config/prove/locking.h) \
|
||||
$(wildcard include/config/arch/has/refcount.h) \
|
||||
$(wildcard include/config/panic/timeout.h) \
|
||||
$(wildcard include/config/tracing.h) \
|
||||
$(wildcard include/config/ftrace/mcount/record.h) \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/7/include/stdarg.h \
|
||||
include/linux/linkage.h \
|
||||
include/linux/export.h \
|
||||
$(wildcard include/config/modules.h) \
|
||||
$(wildcard include/config/modversions.h) \
|
||||
$(wildcard include/config/module/rel/crcs.h) \
|
||||
$(wildcard include/config/have/arch/prel32/relocations.h) \
|
||||
$(wildcard include/config/trim/unused/ksyms.h) \
|
||||
$(wildcard include/config/unused/symbols.h) \
|
||||
arch/x86/include/asm/linkage.h \
|
||||
$(wildcard include/config/x86/alignment/16.h) \
|
||||
include/linux/bitops.h \
|
||||
include/linux/bits.h \
|
||||
arch/x86/include/asm/bitops.h \
|
||||
$(wildcard include/config/x86/cmov.h) \
|
||||
arch/x86/include/asm/rmwcc.h \
|
||||
$(wildcard include/config/cc/has/asm/goto.h) \
|
||||
include/asm-generic/bitops/find.h \
|
||||
$(wildcard include/config/generic/find/first/bit.h) \
|
||||
include/asm-generic/bitops/sched.h \
|
||||
arch/x86/include/asm/arch_hweight.h \
|
||||
arch/x86/include/asm/cpufeatures.h \
|
||||
arch/x86/include/asm/required-features.h \
|
||||
$(wildcard include/config/x86/minimum/cpu/family.h) \
|
||||
$(wildcard include/config/math/emulation.h) \
|
||||
$(wildcard include/config/x86/pae.h) \
|
||||
$(wildcard include/config/x86/cmpxchg64.h) \
|
||||
$(wildcard include/config/x86/use/3dnow.h) \
|
||||
$(wildcard include/config/matom.h) \
|
||||
$(wildcard include/config/paravirt.h) \
|
||||
arch/x86/include/asm/disabled-features.h \
|
||||
$(wildcard include/config/x86/intel/mpx.h) \
|
||||
$(wildcard include/config/x86/smap.h) \
|
||||
$(wildcard include/config/x86/intel/umip.h) \
|
||||
$(wildcard include/config/x86/intel/memory/protection/keys.h) \
|
||||
$(wildcard include/config/x86/5level.h) \
|
||||
$(wildcard include/config/page/table/isolation.h) \
|
||||
include/asm-generic/bitops/const_hweight.h \
|
||||
include/asm-generic/bitops/le.h \
|
||||
arch/x86/include/uapi/asm/byteorder.h \
|
||||
include/linux/byteorder/little_endian.h \
|
||||
include/uapi/linux/byteorder/little_endian.h \
|
||||
include/linux/swab.h \
|
||||
include/uapi/linux/swab.h \
|
||||
arch/x86/include/uapi/asm/swab.h \
|
||||
include/linux/byteorder/generic.h \
|
||||
include/asm-generic/bitops/ext2-atomic-setbit.h \
|
||||
include/linux/log2.h \
|
||||
$(wildcard include/config/arch/has/ilog2/u32.h) \
|
||||
$(wildcard include/config/arch/has/ilog2/u64.h) \
|
||||
include/linux/typecheck.h \
|
||||
include/linux/printk.h \
|
||||
$(wildcard include/config/message/loglevel/default.h) \
|
||||
$(wildcard include/config/console/loglevel/default.h) \
|
||||
$(wildcard include/config/console/loglevel/quiet.h) \
|
||||
$(wildcard include/config/early/printk.h) \
|
||||
$(wildcard include/config/printk/nmi.h) \
|
||||
$(wildcard include/config/printk.h) \
|
||||
$(wildcard include/config/dynamic/debug.h) \
|
||||
include/linux/init.h \
|
||||
$(wildcard include/config/strict/kernel/rwx.h) \
|
||||
$(wildcard include/config/strict/module/rwx.h) \
|
||||
include/linux/kern_levels.h \
|
||||
include/linux/cache.h \
|
||||
$(wildcard include/config/arch/has/cache/line/size.h) \
|
||||
include/uapi/linux/kernel.h \
|
||||
include/uapi/linux/sysinfo.h \
|
||||
arch/x86/include/asm/cache.h \
|
||||
$(wildcard include/config/x86/l1/cache/shift.h) \
|
||||
$(wildcard include/config/x86/internode/cache/shift.h) \
|
||||
$(wildcard include/config/x86/vsmp.h) \
|
||||
include/linux/dynamic_debug.h \
|
||||
$(wildcard include/config/jump/label.h) \
|
||||
include/linux/jump_label.h \
|
||||
$(wildcard include/config/have/arch/jump/label/relative.h) \
|
||||
arch/x86/include/asm/jump_label.h \
|
||||
include/linux/build_bug.h \
|
||||
include/linux/restart_block.h \
|
||||
include/linux/time64.h \
|
||||
$(wildcard include/config/64bit/time.h) \
|
||||
include/linux/math64.h \
|
||||
$(wildcard include/config/arch/supports/int128.h) \
|
||||
arch/x86/include/asm/div64.h \
|
||||
include/asm-generic/div64.h \
|
||||
include/uapi/linux/time.h \
|
||||
arch/x86/include/asm/current.h \
|
||||
arch/x86/include/asm/percpu.h \
|
||||
$(wildcard include/config/x86/64/smp.h) \
|
||||
include/asm-generic/percpu.h \
|
||||
$(wildcard include/config/debug/preempt.h) \
|
||||
$(wildcard include/config/have/setup/per/cpu/area.h) \
|
||||
include/linux/threads.h \
|
||||
$(wildcard include/config/nr/cpus.h) \
|
||||
$(wildcard include/config/base/small.h) \
|
||||
include/linux/percpu-defs.h \
|
||||
$(wildcard include/config/debug/force/weak/per/cpu.h) \
|
||||
$(wildcard include/config/virtualization.h) \
|
||||
$(wildcard include/config/amd/mem/encrypt.h) \
|
||||
arch/x86/include/asm/thread_info.h \
|
||||
$(wildcard include/config/vm86.h) \
|
||||
$(wildcard include/config/frame/pointer.h) \
|
||||
arch/x86/include/asm/page.h \
|
||||
arch/x86/include/asm/page_types.h \
|
||||
$(wildcard include/config/physical/start.h) \
|
||||
$(wildcard include/config/physical/align.h) \
|
||||
$(wildcard include/config/dynamic/physical/mask.h) \
|
||||
include/linux/const.h \
|
||||
include/uapi/linux/const.h \
|
||||
include/linux/mem_encrypt.h \
|
||||
$(wildcard include/config/arch/has/mem/encrypt.h) \
|
||||
arch/x86/include/asm/mem_encrypt.h \
|
||||
arch/x86/include/uapi/asm/bootparam.h \
|
||||
include/linux/screen_info.h \
|
||||
include/uapi/linux/screen_info.h \
|
||||
include/linux/apm_bios.h \
|
||||
include/uapi/linux/apm_bios.h \
|
||||
include/uapi/linux/ioctl.h \
|
||||
arch/x86/include/uapi/asm/ioctl.h \
|
||||
include/asm-generic/ioctl.h \
|
||||
include/uapi/asm-generic/ioctl.h \
|
||||
include/linux/edd.h \
|
||||
include/uapi/linux/edd.h \
|
||||
arch/x86/include/asm/ist.h \
|
||||
arch/x86/include/uapi/asm/ist.h \
|
||||
include/video/edid.h \
|
||||
$(wildcard include/config/x86.h) \
|
||||
include/uapi/video/edid.h \
|
||||
arch/x86/include/asm/page_64_types.h \
|
||||
$(wildcard include/config/kasan/extra.h) \
|
||||
$(wildcard include/config/dynamic/memory/layout.h) \
|
||||
$(wildcard include/config/randomize/base.h) \
|
||||
arch/x86/include/asm/kaslr.h \
|
||||
$(wildcard include/config/randomize/memory.h) \
|
||||
arch/x86/include/asm/page_64.h \
|
||||
$(wildcard include/config/debug/virtual.h) \
|
||||
$(wildcard include/config/flatmem.h) \
|
||||
$(wildcard include/config/x86/vsyscall/emulation.h) \
|
||||
include/linux/range.h \
|
||||
include/asm-generic/memory_model.h \
|
||||
$(wildcard include/config/discontigmem.h) \
|
||||
$(wildcard include/config/sparsemem/vmemmap.h) \
|
||||
$(wildcard include/config/sparsemem.h) \
|
||||
include/linux/pfn.h \
|
||||
include/asm-generic/getorder.h \
|
||||
arch/x86/include/asm/cpufeature.h \
|
||||
$(wildcard include/config/x86/feature/names.h) \
|
||||
arch/x86/include/asm/processor.h \
|
||||
$(wildcard include/config/kvm.h) \
|
||||
$(wildcard include/config/stackprotector.h) \
|
||||
$(wildcard include/config/paravirt/xxl.h) \
|
||||
$(wildcard include/config/x86/debugctlmsr.h) \
|
||||
$(wildcard include/config/cpu/sup/amd.h) \
|
||||
$(wildcard include/config/xen.h) \
|
||||
arch/x86/include/asm/processor-flags.h \
|
||||
arch/x86/include/uapi/asm/processor-flags.h \
|
||||
arch/x86/include/asm/math_emu.h \
|
||||
arch/x86/include/asm/ptrace.h \
|
||||
arch/x86/include/asm/segment.h \
|
||||
$(wildcard include/config/xen/pv.h) \
|
||||
$(wildcard include/config/x86/32/lazy/gs.h) \
|
||||
arch/x86/include/uapi/asm/ptrace.h \
|
||||
arch/x86/include/uapi/asm/ptrace-abi.h \
|
||||
arch/x86/include/asm/paravirt_types.h \
|
||||
$(wildcard include/config/pgtable/levels.h) \
|
||||
$(wildcard include/config/paravirt/debug.h) \
|
||||
arch/x86/include/asm/desc_defs.h \
|
||||
arch/x86/include/asm/kmap_types.h \
|
||||
$(wildcard include/config/debug/highmem.h) \
|
||||
include/asm-generic/kmap_types.h \
|
||||
arch/x86/include/asm/pgtable_types.h \
|
||||
$(wildcard include/config/mem/soft/dirty.h) \
|
||||
$(wildcard include/config/proc/fs.h) \
|
||||
arch/x86/include/asm/pgtable_64_types.h \
|
||||
arch/x86/include/asm/sparsemem.h \
|
||||
include/asm-generic/pgtable-nop4d.h \
|
||||
arch/x86/include/asm/nospec-branch.h \
|
||||
include/linux/static_key.h \
|
||||
arch/x86/include/asm/alternative-asm.h \
|
||||
arch/x86/include/asm/msr-index.h \
|
||||
arch/x86/include/asm/spinlock_types.h \
|
||||
$(wildcard include/config/paravirt/spinlocks.h) \
|
||||
include/asm-generic/qspinlock_types.h \
|
||||
include/asm-generic/qrwlock_types.h \
|
||||
include/asm-generic/ptrace.h \
|
||||
arch/x86/include/uapi/asm/sigcontext.h \
|
||||
arch/x86/include/asm/msr.h \
|
||||
$(wildcard include/config/tracepoints.h) \
|
||||
arch/x86/include/asm/msr-index.h \
|
||||
arch/x86/include/uapi/asm/errno.h \
|
||||
include/uapi/asm-generic/errno.h \
|
||||
include/uapi/asm-generic/errno-base.h \
|
||||
arch/x86/include/asm/cpumask.h \
|
||||
include/linux/cpumask.h \
|
||||
$(wildcard include/config/cpumask/offstack.h) \
|
||||
$(wildcard include/config/hotplug/cpu.h) \
|
||||
$(wildcard include/config/debug/per/cpu/maps.h) \
|
||||
include/linux/bitmap.h \
|
||||
include/linux/string.h \
|
||||
$(wildcard include/config/binary/printf.h) \
|
||||
$(wildcard include/config/fortify/source.h) \
|
||||
include/uapi/linux/string.h \
|
||||
arch/x86/include/asm/string.h \
|
||||
arch/x86/include/asm/string_64.h \
|
||||
$(wildcard include/config/x86/mce.h) \
|
||||
$(wildcard include/config/arch/has/uaccess/flushcache.h) \
|
||||
arch/x86/include/uapi/asm/msr.h \
|
||||
arch/x86/include/asm/atomic.h \
|
||||
arch/x86/include/asm/cmpxchg.h \
|
||||
arch/x86/include/asm/cmpxchg_64.h \
|
||||
arch/x86/include/asm/atomic64_64.h \
|
||||
include/asm-generic/atomic-instrumented.h \
|
||||
include/linux/tracepoint-defs.h \
|
||||
include/linux/atomic.h \
|
||||
$(wildcard include/config/generic/atomic64.h) \
|
||||
include/asm-generic/atomic-long.h \
|
||||
arch/x86/include/asm/paravirt.h \
|
||||
$(wildcard include/config/debug/entry.h) \
|
||||
arch/x86/include/asm/frame.h \
|
||||
arch/x86/include/asm/special_insns.h \
|
||||
arch/x86/include/asm/fpu/types.h \
|
||||
arch/x86/include/asm/unwind_hints.h \
|
||||
arch/x86/include/asm/orc_types.h \
|
||||
include/linux/personality.h \
|
||||
include/uapi/linux/personality.h \
|
||||
include/linux/err.h \
|
||||
include/linux/irqflags.h \
|
||||
$(wildcard include/config/trace/irqflags.h) \
|
||||
$(wildcard include/config/irqsoff/tracer.h) \
|
||||
$(wildcard include/config/preempt/tracer.h) \
|
||||
$(wildcard include/config/trace/irqflags/support.h) \
|
||||
arch/x86/include/asm/irqflags.h \
|
||||
$(wildcard include/config/debug/lock/alloc.h) \
|
||||
arch/x86/include/asm/user.h \
|
||||
arch/x86/include/asm/user_64.h \
|
||||
arch/x86/include/uapi/asm/auxvec.h \
|
||||
arch/x86/include/asm/fsgsbase.h \
|
||||
arch/x86/include/asm/vdso.h \
|
||||
$(wildcard include/config/x86/x32.h) \
|
||||
include/linux/mm_types.h \
|
||||
$(wildcard include/config/have/aligned/struct/page.h) \
|
||||
$(wildcard include/config/memcg.h) \
|
||||
$(wildcard include/config/userfaultfd.h) \
|
||||
$(wildcard include/config/numa.h) \
|
||||
$(wildcard include/config/have/arch/compat/mmap/bases.h) \
|
||||
$(wildcard include/config/membarrier.h) \
|
||||
$(wildcard include/config/aio.h) \
|
||||
$(wildcard include/config/mmu/notifier.h) \
|
||||
$(wildcard include/config/transparent/hugepage.h) \
|
||||
$(wildcard include/config/numa/balancing.h) \
|
||||
$(wildcard include/config/arch/want/batched/unmap/tlb/flush.h) \
|
||||
$(wildcard include/config/hugetlb/page.h) \
|
||||
$(wildcard include/config/hmm.h) \
|
||||
include/linux/mm_types_task.h \
|
||||
$(wildcard include/config/split/ptlock/cpus.h) \
|
||||
$(wildcard include/config/arch/enable/split/pmd/ptlock.h) \
|
||||
arch/x86/include/asm/tlbbatch.h \
|
||||
include/linux/auxvec.h \
|
||||
include/uapi/linux/auxvec.h \
|
||||
include/linux/list.h \
|
||||
$(wildcard include/config/debug/list.h) \
|
||||
include/linux/poison.h \
|
||||
$(wildcard include/config/illegal/pointer/value.h) \
|
||||
$(wildcard include/config/page/poisoning/zero.h) \
|
||||
include/linux/spinlock.h \
|
||||
$(wildcard include/config/debug/spinlock.h) \
|
||||
$(wildcard include/config/preempt.h) \
|
||||
include/linux/preempt.h \
|
||||
$(wildcard include/config/preempt/count.h) \
|
||||
$(wildcard include/config/trace/preempt/toggle.h) \
|
||||
$(wildcard include/config/preempt/notifiers.h) \
|
||||
arch/x86/include/asm/preempt.h \
|
||||
include/linux/bottom_half.h \
|
||||
include/linux/spinlock_types.h \
|
||||
include/linux/lockdep.h \
|
||||
$(wildcard include/config/lockdep.h) \
|
||||
$(wildcard include/config/lock/stat.h) \
|
||||
include/linux/rwlock_types.h \
|
||||
arch/x86/include/asm/spinlock.h \
|
||||
arch/x86/include/asm/qspinlock.h \
|
||||
include/asm-generic/qspinlock.h \
|
||||
arch/x86/include/asm/qrwlock.h \
|
||||
include/asm-generic/qrwlock.h \
|
||||
include/linux/rwlock.h \
|
||||
include/linux/spinlock_api_smp.h \
|
||||
$(wildcard include/config/inline/spin/lock.h) \
|
||||
$(wildcard include/config/inline/spin/lock/bh.h) \
|
||||
$(wildcard include/config/inline/spin/lock/irq.h) \
|
||||
$(wildcard include/config/inline/spin/lock/irqsave.h) \
|
||||
$(wildcard include/config/inline/spin/trylock.h) \
|
||||
$(wildcard include/config/inline/spin/trylock/bh.h) \
|
||||
$(wildcard include/config/uninline/spin/unlock.h) \
|
||||
$(wildcard include/config/inline/spin/unlock/bh.h) \
|
||||
$(wildcard include/config/inline/spin/unlock/irq.h) \
|
||||
$(wildcard include/config/inline/spin/unlock/irqrestore.h) \
|
||||
$(wildcard include/config/generic/lockbreak.h) \
|
||||
include/linux/rwlock_api_smp.h \
|
||||
$(wildcard include/config/inline/read/lock.h) \
|
||||
$(wildcard include/config/inline/write/lock.h) \
|
||||
$(wildcard include/config/inline/read/lock/bh.h) \
|
||||
$(wildcard include/config/inline/write/lock/bh.h) \
|
||||
$(wildcard include/config/inline/read/lock/irq.h) \
|
||||
$(wildcard include/config/inline/write/lock/irq.h) \
|
||||
$(wildcard include/config/inline/read/lock/irqsave.h) \
|
||||
$(wildcard include/config/inline/write/lock/irqsave.h) \
|
||||
$(wildcard include/config/inline/read/trylock.h) \
|
||||
$(wildcard include/config/inline/write/trylock.h) \
|
||||
$(wildcard include/config/inline/read/unlock.h) \
|
||||
$(wildcard include/config/inline/write/unlock.h) \
|
||||
$(wildcard include/config/inline/read/unlock/bh.h) \
|
||||
$(wildcard include/config/inline/write/unlock/bh.h) \
|
||||
$(wildcard include/config/inline/read/unlock/irq.h) \
|
||||
$(wildcard include/config/inline/write/unlock/irq.h) \
|
||||
$(wildcard include/config/inline/read/unlock/irqrestore.h) \
|
||||
$(wildcard include/config/inline/write/unlock/irqrestore.h) \
|
||||
include/linux/rbtree.h \
|
||||
include/linux/rcupdate.h \
|
||||
$(wildcard include/config/preempt/rcu.h) \
|
||||
$(wildcard include/config/rcu/stall/common.h) \
|
||||
$(wildcard include/config/no/hz/full.h) \
|
||||
$(wildcard include/config/rcu/nocb/cpu.h) \
|
||||
$(wildcard include/config/tasks/rcu.h) \
|
||||
$(wildcard include/config/tree/rcu.h) \
|
||||
$(wildcard include/config/tiny/rcu.h) \
|
||||
$(wildcard include/config/debug/objects/rcu/head.h) \
|
||||
$(wildcard include/config/prove/rcu.h) \
|
||||
$(wildcard include/config/rcu/boost.h) \
|
||||
$(wildcard include/config/arch/weak/release/acquire.h) \
|
||||
include/linux/rcutree.h \
|
||||
include/linux/rwsem.h \
|
||||
$(wildcard include/config/rwsem/spin/on/owner.h) \
|
||||
$(wildcard include/config/rwsem/generic/spinlock.h) \
|
||||
include/linux/osq_lock.h \
|
||||
arch/x86/include/asm/rwsem.h \
|
||||
include/linux/completion.h \
|
||||
include/linux/wait.h \
|
||||
include/uapi/linux/wait.h \
|
||||
include/linux/uprobes.h \
|
||||
$(wildcard include/config/uprobes.h) \
|
||||
include/linux/errno.h \
|
||||
include/uapi/linux/errno.h \
|
||||
arch/x86/include/asm/uprobes.h \
|
||||
include/linux/notifier.h \
|
||||
$(wildcard include/config/tree/srcu.h) \
|
||||
include/linux/mutex.h \
|
||||
$(wildcard include/config/mutex/spin/on/owner.h) \
|
||||
$(wildcard include/config/debug/mutexes.h) \
|
||||
include/linux/debug_locks.h \
|
||||
$(wildcard include/config/debug/locking/api/selftests.h) \
|
||||
include/linux/srcu.h \
|
||||
$(wildcard include/config/tiny/srcu.h) \
|
||||
$(wildcard include/config/srcu.h) \
|
||||
include/linux/workqueue.h \
|
||||
$(wildcard include/config/debug/objects/work.h) \
|
||||
$(wildcard include/config/freezer.h) \
|
||||
$(wildcard include/config/sysfs.h) \
|
||||
$(wildcard include/config/wq/watchdog.h) \
|
||||
include/linux/timer.h \
|
||||
$(wildcard include/config/debug/objects/timers.h) \
|
||||
$(wildcard include/config/no/hz/common.h) \
|
||||
include/linux/ktime.h \
|
||||
include/linux/time.h \
|
||||
$(wildcard include/config/arch/uses/gettimeoffset.h) \
|
||||
include/linux/seqlock.h \
|
||||
include/linux/time32.h \
|
||||
include/linux/jiffies.h \
|
||||
include/linux/timex.h \
|
||||
include/uapi/linux/timex.h \
|
||||
include/uapi/linux/param.h \
|
||||
arch/x86/include/uapi/asm/param.h \
|
||||
include/asm-generic/param.h \
|
||||
$(wildcard include/config/hz.h) \
|
||||
include/uapi/asm-generic/param.h \
|
||||
arch/x86/include/asm/timex.h \
|
||||
arch/x86/include/asm/tsc.h \
|
||||
$(wildcard include/config/x86/tsc.h) \
|
||||
include/generated/timeconst.h \
|
||||
include/linux/timekeeping.h \
|
||||
include/linux/timekeeping32.h \
|
||||
include/linux/debugobjects.h \
|
||||
$(wildcard include/config/debug/objects.h) \
|
||||
$(wildcard include/config/debug/objects/free.h) \
|
||||
include/linux/rcu_segcblist.h \
|
||||
include/linux/srcutree.h \
|
||||
include/linux/rcu_node_tree.h \
|
||||
$(wildcard include/config/rcu/fanout.h) \
|
||||
$(wildcard include/config/rcu/fanout/leaf.h) \
|
||||
include/linux/page-flags-layout.h \
|
||||
$(wildcard include/config/kasan/sw/tags.h) \
|
||||
include/linux/numa.h \
|
||||
$(wildcard include/config/nodes/shift.h) \
|
||||
include/generated/bounds.h \
|
||||
arch/x86/include/asm/mmu.h \
|
||||
$(wildcard include/config/modify/ldt/syscall.h) \
|
||||
include/uapi/linux/elf.h \
|
||||
include/uapi/linux/elf-em.h \
|
||||
include/linux/module.h \
|
||||
$(wildcard include/config/modules/tree/lookup.h) \
|
||||
$(wildcard include/config/livepatch.h) \
|
||||
$(wildcard include/config/module/sig.h) \
|
||||
$(wildcard include/config/kallsyms.h) \
|
||||
$(wildcard include/config/bpf/events.h) \
|
||||
$(wildcard include/config/event/tracing.h) \
|
||||
$(wildcard include/config/constructors.h) \
|
||||
$(wildcard include/config/function/error/injection.h) \
|
||||
include/linux/stat.h \
|
||||
arch/x86/include/uapi/asm/stat.h \
|
||||
include/uapi/linux/stat.h \
|
||||
include/linux/uidgid.h \
|
||||
$(wildcard include/config/multiuser.h) \
|
||||
$(wildcard include/config/user/ns.h) \
|
||||
include/linux/highuid.h \
|
||||
include/linux/kmod.h \
|
||||
include/linux/umh.h \
|
||||
include/linux/gfp.h \
|
||||
$(wildcard include/config/highmem.h) \
|
||||
$(wildcard include/config/zone/dma.h) \
|
||||
$(wildcard include/config/zone/dma32.h) \
|
||||
$(wildcard include/config/zone/device.h) \
|
||||
$(wildcard include/config/pm/sleep.h) \
|
||||
$(wildcard include/config/memory/isolation.h) \
|
||||
$(wildcard include/config/compaction.h) \
|
||||
$(wildcard include/config/cma.h) \
|
||||
include/linux/mmdebug.h \
|
||||
$(wildcard include/config/debug/vm.h) \
|
||||
$(wildcard include/config/debug/vm/pgflags.h) \
|
||||
include/linux/mmzone.h \
|
||||
$(wildcard include/config/force/max/zoneorder.h) \
|
||||
$(wildcard include/config/zsmalloc.h) \
|
||||
$(wildcard include/config/memory/hotplug.h) \
|
||||
$(wildcard include/config/flat/node/mem/map.h) \
|
||||
$(wildcard include/config/page/extension.h) \
|
||||
$(wildcard include/config/deferred/struct/page/init.h) \
|
||||
$(wildcard include/config/have/memory/present.h) \
|
||||
$(wildcard include/config/have/memoryless/nodes.h) \
|
||||
$(wildcard include/config/have/memblock/node/map.h) \
|
||||
$(wildcard include/config/need/multiple/nodes.h) \
|
||||
$(wildcard include/config/have/arch/early/pfn/to/nid.h) \
|
||||
$(wildcard include/config/sparsemem/extreme.h) \
|
||||
$(wildcard include/config/memory/hotremove.h) \
|
||||
$(wildcard include/config/have/arch/pfn/valid.h) \
|
||||
$(wildcard include/config/holes/in/zone.h) \
|
||||
$(wildcard include/config/arch/has/holes/memorymodel.h) \
|
||||
include/linux/nodemask.h \
|
||||
include/linux/pageblock-flags.h \
|
||||
$(wildcard include/config/hugetlb/page/size/variable.h) \
|
||||
include/linux/memory_hotplug.h \
|
||||
$(wildcard include/config/arch/has/add/pages.h) \
|
||||
$(wildcard include/config/have/arch/nodedata/extension.h) \
|
||||
$(wildcard include/config/have/bootmem/info/node.h) \
|
||||
arch/x86/include/asm/mmzone.h \
|
||||
arch/x86/include/asm/mmzone_64.h \
|
||||
arch/x86/include/asm/smp.h \
|
||||
$(wildcard include/config/x86/local/apic.h) \
|
||||
$(wildcard include/config/x86/io/apic.h) \
|
||||
$(wildcard include/config/debug/nmi/selftest.h) \
|
||||
arch/x86/include/asm/mpspec.h \
|
||||
$(wildcard include/config/eisa.h) \
|
||||
$(wildcard include/config/x86/mpparse.h) \
|
||||
arch/x86/include/asm/mpspec_def.h \
|
||||
arch/x86/include/asm/x86_init.h \
|
||||
arch/x86/include/asm/apicdef.h \
|
||||
arch/x86/include/asm/apic.h \
|
||||
$(wildcard include/config/x86/x2apic.h) \
|
||||
arch/x86/include/asm/fixmap.h \
|
||||
$(wildcard include/config/provide/ohci1394/dma/init.h) \
|
||||
$(wildcard include/config/pci/mmconfig.h) \
|
||||
$(wildcard include/config/x86/intel/mid.h) \
|
||||
$(wildcard include/config/acpi/apei/ghes.h) \
|
||||
$(wildcard include/config/intel/txt.h) \
|
||||
arch/x86/include/asm/acpi.h \
|
||||
$(wildcard include/config/acpi/apei.h) \
|
||||
$(wildcard include/config/acpi.h) \
|
||||
$(wildcard include/config/acpi/numa.h) \
|
||||
include/acpi/pdc_intel.h \
|
||||
arch/x86/include/asm/numa.h \
|
||||
$(wildcard include/config/numa/emu.h) \
|
||||
arch/x86/include/asm/topology.h \
|
||||
$(wildcard include/config/sched/mc/prio.h) \
|
||||
include/asm-generic/topology.h \
|
||||
arch/x86/include/asm/realmode.h \
|
||||
$(wildcard include/config/acpi/sleep.h) \
|
||||
arch/x86/include/asm/io.h \
|
||||
$(wildcard include/config/mtrr.h) \
|
||||
$(wildcard include/config/x86/pat.h) \
|
||||
arch/x86/include/generated/asm/early_ioremap.h \
|
||||
include/asm-generic/early_ioremap.h \
|
||||
$(wildcard include/config/generic/early/ioremap.h) \
|
||||
include/asm-generic/iomap.h \
|
||||
$(wildcard include/config/has/ioport/map.h) \
|
||||
$(wildcard include/config/pci.h) \
|
||||
$(wildcard include/config/generic/iomap.h) \
|
||||
include/asm-generic/pci_iomap.h \
|
||||
$(wildcard include/config/no/generic/pci/ioport/map.h) \
|
||||
$(wildcard include/config/generic/pci/iomap.h) \
|
||||
include/asm-generic/io.h \
|
||||
$(wildcard include/config/virt/to/bus.h) \
|
||||
include/linux/logic_pio.h \
|
||||
$(wildcard include/config/indirect/pio.h) \
|
||||
include/linux/fwnode.h \
|
||||
include/linux/vmalloc.h \
|
||||
include/linux/llist.h \
|
||||
$(wildcard include/config/arch/have/nmi/safe/cmpxchg.h) \
|
||||
include/linux/overflow.h \
|
||||
arch/x86/include/uapi/asm/vsyscall.h \
|
||||
include/asm-generic/fixmap.h \
|
||||
arch/x86/include/asm/hardirq.h \
|
||||
$(wildcard include/config/kvm/intel.h) \
|
||||
$(wildcard include/config/have/kvm.h) \
|
||||
$(wildcard include/config/x86/thermal/vector.h) \
|
||||
$(wildcard include/config/x86/mce/threshold.h) \
|
||||
$(wildcard include/config/x86/mce/amd.h) \
|
||||
$(wildcard include/config/hyperv.h) \
|
||||
arch/x86/include/asm/io_apic.h \
|
||||
arch/x86/include/asm/irq_vectors.h \
|
||||
$(wildcard include/config/pci/msi.h) \
|
||||
include/linux/topology.h \
|
||||
$(wildcard include/config/use/percpu/numa/node/id.h) \
|
||||
$(wildcard include/config/sched/smt.h) \
|
||||
include/linux/smp.h \
|
||||
$(wildcard include/config/up/late/init.h) \
|
||||
include/linux/percpu.h \
|
||||
$(wildcard include/config/need/per/cpu/embed/first/chunk.h) \
|
||||
$(wildcard include/config/need/per/cpu/page/first/chunk.h) \
|
||||
include/linux/sysctl.h \
|
||||
$(wildcard include/config/sysctl.h) \
|
||||
include/uapi/linux/sysctl.h \
|
||||
include/linux/kobject.h \
|
||||
$(wildcard include/config/uevent/helper.h) \
|
||||
$(wildcard include/config/debug/kobject/release.h) \
|
||||
include/linux/sysfs.h \
|
||||
include/linux/kernfs.h \
|
||||
$(wildcard include/config/kernfs.h) \
|
||||
include/linux/idr.h \
|
||||
include/linux/radix-tree.h \
|
||||
include/linux/xarray.h \
|
||||
$(wildcard include/config/xarray/multi.h) \
|
||||
include/linux/kconfig.h \
|
||||
include/linux/kobject_ns.h \
|
||||
include/linux/kref.h \
|
||||
include/linux/refcount.h \
|
||||
$(wildcard include/config/refcount/full.h) \
|
||||
arch/x86/include/asm/refcount.h \
|
||||
include/linux/moduleparam.h \
|
||||
$(wildcard include/config/alpha.h) \
|
||||
$(wildcard include/config/ia64.h) \
|
||||
$(wildcard include/config/ppc64.h) \
|
||||
include/linux/rbtree_latch.h \
|
||||
include/linux/error-injection.h \
|
||||
arch/x86/include/asm/error-injection.h \
|
||||
include/asm-generic/error-injection.h \
|
||||
arch/x86/include/asm/module.h \
|
||||
$(wildcard include/config/unwinder/orc.h) \
|
||||
$(wildcard include/config/m486.h) \
|
||||
$(wildcard include/config/m586.h) \
|
||||
$(wildcard include/config/m586tsc.h) \
|
||||
$(wildcard include/config/m586mmx.h) \
|
||||
$(wildcard include/config/mcore2.h) \
|
||||
$(wildcard include/config/m686.h) \
|
||||
$(wildcard include/config/mpentiumii.h) \
|
||||
$(wildcard include/config/mpentiumiii.h) \
|
||||
$(wildcard include/config/mpentiumm.h) \
|
||||
$(wildcard include/config/mpentium4.h) \
|
||||
$(wildcard include/config/mk6.h) \
|
||||
$(wildcard include/config/mk8.h) \
|
||||
$(wildcard include/config/melan.h) \
|
||||
$(wildcard include/config/mcrusoe.h) \
|
||||
$(wildcard include/config/mefficeon.h) \
|
||||
$(wildcard include/config/mwinchipc6.h) \
|
||||
$(wildcard include/config/mwinchip3d.h) \
|
||||
$(wildcard include/config/mcyrixiii.h) \
|
||||
$(wildcard include/config/mviac3/2.h) \
|
||||
$(wildcard include/config/mviac7.h) \
|
||||
$(wildcard include/config/mgeodegx1.h) \
|
||||
$(wildcard include/config/mgeode/lx.h) \
|
||||
include/asm-generic/module.h \
|
||||
$(wildcard include/config/have/mod/arch/specific.h) \
|
||||
$(wildcard include/config/modules/use/elf/rel.h) \
|
||||
$(wildcard include/config/modules/use/elf/rela.h) \
|
||||
arch/x86/include/asm/orc_types.h \
|
||||
include/linux/vermagic.h \
|
||||
include/generated/utsrelease.h \
|
||||
|
||||
/home/miti99/modules/get_proc_info.mod.o: $(deps_/home/miti99/modules/get_proc_info.mod.o)
|
||||
|
||||
$(deps_/home/miti99/modules/get_proc_info.mod.o):
|
||||
@@ -1,84 +0,0 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/syscalls.h>
|
||||
|
||||
#define STUDENT_ID 1713484
|
||||
|
||||
static int pid __initdata = -1;
|
||||
module_param(pid, int, 0);
|
||||
|
||||
struct task_struct *proc;
|
||||
struct task_struct *parent_proc;
|
||||
struct task_struct *oldest_child_proc;
|
||||
|
||||
struct task_struct *task; //to test
|
||||
struct list_head *list; //to test
|
||||
|
||||
static int __init get_proc_info_init(void)
|
||||
{
|
||||
printk("Load module success!");
|
||||
printk("My student ID: %ld\n", (long)STUDENT_ID);
|
||||
printk("pid to find = %d\n", pid);
|
||||
if (pid == -1)
|
||||
{
|
||||
proc = get_current();
|
||||
}
|
||||
else
|
||||
{
|
||||
proc = pid_task(find_get_pid(pid), PIDTYPE_PID);
|
||||
if (proc == NULL)
|
||||
{
|
||||
printk("Not found proc with pid = %d!\n", pid);
|
||||
return EINVAL;
|
||||
}
|
||||
}
|
||||
printk("Proc ID: %d\n", proc->pid);
|
||||
printk("Proc name: %s\n", proc->comm);
|
||||
parent_proc = proc->parent;
|
||||
if (parent_proc != NULL)
|
||||
{
|
||||
printk("Parent ID: %d\n", parent_proc->pid);
|
||||
printk("Parent name: %s\n", parent_proc->comm);
|
||||
}
|
||||
else
|
||||
{ //Co the khong can thiet vi proc nao cung co parent
|
||||
printk("This proc does not have parent!\n");
|
||||
}
|
||||
oldest_child_proc = list_first_entry_or_null(&proc->children, struct task_struct, sibling);
|
||||
if (oldest_child_proc != NULL)
|
||||
{
|
||||
printk("Child ID: %d\n", oldest_child_proc->pid);
|
||||
printk("Child name: %s\n", oldest_child_proc->comm);
|
||||
}
|
||||
else
|
||||
{
|
||||
printk("This proc does not have any child!\n");
|
||||
}
|
||||
printk("-------TEST-------\n");
|
||||
oldest_child_proc = list_first_entry_or_null(&proc->ptraced, struct task_struct, sibling);
|
||||
if (oldest_child_proc != NULL)
|
||||
{
|
||||
printk("Child ID: %d\n", oldest_child_proc->pid);
|
||||
printk("Child name: %s\n", oldest_child_proc->comm);
|
||||
}
|
||||
else
|
||||
{
|
||||
printk("This proc does not have any child!\n");
|
||||
}
|
||||
list_for_each(list, ¤t->ptraced)
|
||||
{
|
||||
task = list_entry(list, struct task_struct, sibling);
|
||||
printk("%s[%d]\n", task->comm, task->pid);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __exit get_proc_info_exit(void)
|
||||
{
|
||||
printk("Unload module success!");
|
||||
}
|
||||
|
||||
module_init(get_proc_info_init);
|
||||
module_exit(get_proc_info_exit);
|
||||
MODULE_LICENSE("GPL");
|
||||
@@ -1,65 +0,0 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/syscalls.h>
|
||||
|
||||
#define STUDENT_ID 1713484
|
||||
|
||||
static int pid __initdata = -1;
|
||||
module_param(pid, int, 0);
|
||||
|
||||
struct task_struct *proc;
|
||||
struct task_struct *parent_proc;
|
||||
struct task_struct *oldest_child_proc;
|
||||
|
||||
static int __init get_proc_info_init(void)
|
||||
{
|
||||
printk("Load module success!");
|
||||
printk("My student ID: %ld\n", (long)STUDENT_ID);
|
||||
printk("pid to find = %d\n", pid);
|
||||
if (pid == -1)
|
||||
{
|
||||
proc = get_current();
|
||||
}
|
||||
else
|
||||
{
|
||||
proc = pid_task(find_get_pid(pid), PIDTYPE_PID);
|
||||
if (proc == NULL)
|
||||
{
|
||||
printk("Not found proc with pid = %d!\n", pid);
|
||||
return EINVAL;
|
||||
}
|
||||
}
|
||||
printk("Proc ID: %d\n", proc->pid);
|
||||
printk("Proc name: %s\n", proc->comm);
|
||||
parent_proc = proc->parent;
|
||||
if (parent_proc != NULL)
|
||||
{
|
||||
printk("Parent ID: %d\n", parent_proc->pid);
|
||||
printk("Parent name: %s\n", parent_proc->comm);
|
||||
}
|
||||
else
|
||||
{ //Co the khong can thiet vi proc nao cung co parent
|
||||
printk("This proc does not have parent!\n");
|
||||
}
|
||||
if (!list_empty(&proc->children))
|
||||
{
|
||||
oldest_child_proc = list_first_entry(&proc->children, struct task_struct, sibling);
|
||||
printk("Child ID: %d\n", oldest_child_proc->pid);
|
||||
printk("Child name: %s\n", oldest_child_proc->comm);
|
||||
}
|
||||
else
|
||||
{
|
||||
printk("This proc does not have any child!\n");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __exit get_proc_info_exit(void)
|
||||
{
|
||||
printk("Unload module success!");
|
||||
}
|
||||
|
||||
module_init(get_proc_info_init);
|
||||
module_exit(get_proc_info_exit);
|
||||
MODULE_LICENSE("GPL");
|
||||
Binary file not shown.
@@ -1,31 +0,0 @@
|
||||
#include <linux/build-salt.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/vermagic.h>
|
||||
#include <linux/compiler.h>
|
||||
|
||||
BUILD_SALT;
|
||||
|
||||
MODULE_INFO(vermagic, VERMAGIC_STRING);
|
||||
MODULE_INFO(name, KBUILD_MODNAME);
|
||||
|
||||
__visible struct module __this_module
|
||||
__attribute__((section(".gnu.linkonce.this_module"))) = {
|
||||
.name = KBUILD_MODNAME,
|
||||
.init = init_module,
|
||||
#ifdef CONFIG_MODULE_UNLOAD
|
||||
.exit = cleanup_module,
|
||||
#endif
|
||||
.arch = MODULE_ARCH_INIT,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_RETPOLINE
|
||||
MODULE_INFO(retpoline, "Y");
|
||||
#endif
|
||||
|
||||
static const char __module_depends[]
|
||||
__used
|
||||
__attribute__((section(".modinfo"))) =
|
||||
"depends=";
|
||||
|
||||
|
||||
MODULE_INFO(srcversion, "E8C42D4D53016883344C989");
|
||||
Binary file not shown.
Binary file not shown.
@@ -1 +0,0 @@
|
||||
sudo /usr/bin/vmhgfs-fuse .host:/Shared /mnt/hgfs/Shared -o subtype=vmhgfs-fuse,allow_other
|
||||
Binary file not shown.
@@ -0,0 +1,78 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/syscalls.h>
|
||||
|
||||
#define STUDENT_ID 1713484
|
||||
|
||||
struct proc_info
|
||||
{
|
||||
pid_t pid;
|
||||
char name[16];
|
||||
};
|
||||
|
||||
struct procinfos
|
||||
{
|
||||
long studentID;
|
||||
struct proc_info proc;
|
||||
struct proc_info parent_proc;
|
||||
struct proc_info oldest_child_proc;
|
||||
};
|
||||
|
||||
struct task_struct *proc;
|
||||
struct task_struct *parent_proc;
|
||||
struct task_struct *oldest_child_proc;
|
||||
|
||||
SYSCALL_DEFINE2(get_proc_info, pid_t, pid, struct procinfos *, info)
|
||||
{
|
||||
printk("My student ID: %ld\n", (long)STUDENT_ID);
|
||||
printk("pid to find = %d\n", pid);
|
||||
if (pid == -1)
|
||||
{
|
||||
proc = current;
|
||||
}
|
||||
else if (pid == 0)
|
||||
{
|
||||
proc = &init_task;
|
||||
}
|
||||
else
|
||||
{
|
||||
proc = find_task_by_vpid(pid);
|
||||
if (proc == NULL)
|
||||
{
|
||||
printk("Not found proc with pid = %d!\n", pid);
|
||||
return EINVAL;
|
||||
}
|
||||
}
|
||||
info->studentID = STUDENT_ID;
|
||||
printk("Proc ID: %d\n", proc->pid);
|
||||
printk("Proc name: %s\n", proc->comm);
|
||||
info->proc.pid = proc->pid;
|
||||
sprintf(info->proc.name, proc->comm);
|
||||
parent_proc = proc->parent;
|
||||
if (parent_proc != NULL)
|
||||
{
|
||||
printk("Parent ID: %d\n", parent_proc->pid);
|
||||
printk("Parent name: %s\n", parent_proc->comm);
|
||||
info->parent_proc.pid = parent_proc->pid;
|
||||
sprintf(info->parent_proc.name, parent_proc->comm);
|
||||
}
|
||||
else //Khong can thiet vi proc nao cung co parent
|
||||
{
|
||||
printk("This proc does not have parent!\n");
|
||||
info->parent_proc.pid = -1;
|
||||
}
|
||||
if (!list_empty(&proc->children))
|
||||
{
|
||||
oldest_child_proc = list_first_entry(&proc->children, struct task_struct, sibling);
|
||||
printk("Child ID: %d\n", oldest_child_proc->pid);
|
||||
printk("Child name: %s\n", oldest_child_proc->comm);
|
||||
info->oldest_child_proc.pid = oldest_child_proc->pid;
|
||||
sprintf(info->oldest_child_proc.name, oldest_child_proc->comm);
|
||||
}
|
||||
else
|
||||
{
|
||||
printk("This proc does not have any child!\n");
|
||||
info->oldest_child_proc.pid = -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,389 @@
|
||||
#
|
||||
# 64-bit system call numbers and entry vectors
|
||||
#
|
||||
# The format is:
|
||||
# <number> <abi> <name> <entry point>
|
||||
#
|
||||
# The __x64_sys_*() stubs are created on-the-fly for sys_*() system calls
|
||||
#
|
||||
# The abi is "common", "64" or "x32" for this file.
|
||||
#
|
||||
0 common read __x64_sys_read
|
||||
1 common write __x64_sys_write
|
||||
2 common open __x64_sys_open
|
||||
3 common close __x64_sys_close
|
||||
4 common stat __x64_sys_newstat
|
||||
5 common fstat __x64_sys_newfstat
|
||||
6 common lstat __x64_sys_newlstat
|
||||
7 common poll __x64_sys_poll
|
||||
8 common lseek __x64_sys_lseek
|
||||
9 common mmap __x64_sys_mmap
|
||||
10 common mprotect __x64_sys_mprotect
|
||||
11 common munmap __x64_sys_munmap
|
||||
12 common brk __x64_sys_brk
|
||||
13 64 rt_sigaction __x64_sys_rt_sigaction
|
||||
14 common rt_sigprocmask __x64_sys_rt_sigprocmask
|
||||
15 64 rt_sigreturn __x64_sys_rt_sigreturn/ptregs
|
||||
16 64 ioctl __x64_sys_ioctl
|
||||
17 common pread64 __x64_sys_pread64
|
||||
18 common pwrite64 __x64_sys_pwrite64
|
||||
19 64 readv __x64_sys_readv
|
||||
20 64 writev __x64_sys_writev
|
||||
21 common access __x64_sys_access
|
||||
22 common pipe __x64_sys_pipe
|
||||
23 common select __x64_sys_select
|
||||
24 common sched_yield __x64_sys_sched_yield
|
||||
25 common mremap __x64_sys_mremap
|
||||
26 common msync __x64_sys_msync
|
||||
27 common mincore __x64_sys_mincore
|
||||
28 common madvise __x64_sys_madvise
|
||||
29 common shmget __x64_sys_shmget
|
||||
30 common shmat __x64_sys_shmat
|
||||
31 common shmctl __x64_sys_shmctl
|
||||
32 common dup __x64_sys_dup
|
||||
33 common dup2 __x64_sys_dup2
|
||||
34 common pause __x64_sys_pause
|
||||
35 common nanosleep __x64_sys_nanosleep
|
||||
36 common getitimer __x64_sys_getitimer
|
||||
37 common alarm __x64_sys_alarm
|
||||
38 common setitimer __x64_sys_setitimer
|
||||
39 common getpid __x64_sys_getpid
|
||||
40 common sendfile __x64_sys_sendfile64
|
||||
41 common socket __x64_sys_socket
|
||||
42 common connect __x64_sys_connect
|
||||
43 common accept __x64_sys_accept
|
||||
44 common sendto __x64_sys_sendto
|
||||
45 64 recvfrom __x64_sys_recvfrom
|
||||
46 64 sendmsg __x64_sys_sendmsg
|
||||
47 64 recvmsg __x64_sys_recvmsg
|
||||
48 common shutdown __x64_sys_shutdown
|
||||
49 common bind __x64_sys_bind
|
||||
50 common listen __x64_sys_listen
|
||||
51 common getsockname __x64_sys_getsockname
|
||||
52 common getpeername __x64_sys_getpeername
|
||||
53 common socketpair __x64_sys_socketpair
|
||||
54 64 setsockopt __x64_sys_setsockopt
|
||||
55 64 getsockopt __x64_sys_getsockopt
|
||||
56 common clone __x64_sys_clone/ptregs
|
||||
57 common fork __x64_sys_fork/ptregs
|
||||
58 common vfork __x64_sys_vfork/ptregs
|
||||
59 64 execve __x64_sys_execve/ptregs
|
||||
60 common exit __x64_sys_exit
|
||||
61 common wait4 __x64_sys_wait4
|
||||
62 common kill __x64_sys_kill
|
||||
63 common uname __x64_sys_newuname
|
||||
64 common semget __x64_sys_semget
|
||||
65 common semop __x64_sys_semop
|
||||
66 common semctl __x64_sys_semctl
|
||||
67 common shmdt __x64_sys_shmdt
|
||||
68 common msgget __x64_sys_msgget
|
||||
69 common msgsnd __x64_sys_msgsnd
|
||||
70 common msgrcv __x64_sys_msgrcv
|
||||
71 common msgctl __x64_sys_msgctl
|
||||
72 common fcntl __x64_sys_fcntl
|
||||
73 common flock __x64_sys_flock
|
||||
74 common fsync __x64_sys_fsync
|
||||
75 common fdatasync __x64_sys_fdatasync
|
||||
76 common truncate __x64_sys_truncate
|
||||
77 common ftruncate __x64_sys_ftruncate
|
||||
78 common getdents __x64_sys_getdents
|
||||
79 common getcwd __x64_sys_getcwd
|
||||
80 common chdir __x64_sys_chdir
|
||||
81 common fchdir __x64_sys_fchdir
|
||||
82 common rename __x64_sys_rename
|
||||
83 common mkdir __x64_sys_mkdir
|
||||
84 common rmdir __x64_sys_rmdir
|
||||
85 common creat __x64_sys_creat
|
||||
86 common link __x64_sys_link
|
||||
87 common unlink __x64_sys_unlink
|
||||
88 common symlink __x64_sys_symlink
|
||||
89 common readlink __x64_sys_readlink
|
||||
90 common chmod __x64_sys_chmod
|
||||
91 common fchmod __x64_sys_fchmod
|
||||
92 common chown __x64_sys_chown
|
||||
93 common fchown __x64_sys_fchown
|
||||
94 common lchown __x64_sys_lchown
|
||||
95 common umask __x64_sys_umask
|
||||
96 common gettimeofday __x64_sys_gettimeofday
|
||||
97 common getrlimit __x64_sys_getrlimit
|
||||
98 common getrusage __x64_sys_getrusage
|
||||
99 common sysinfo __x64_sys_sysinfo
|
||||
100 common times __x64_sys_times
|
||||
101 64 ptrace __x64_sys_ptrace
|
||||
102 common getuid __x64_sys_getuid
|
||||
103 common syslog __x64_sys_syslog
|
||||
104 common getgid __x64_sys_getgid
|
||||
105 common setuid __x64_sys_setuid
|
||||
106 common setgid __x64_sys_setgid
|
||||
107 common geteuid __x64_sys_geteuid
|
||||
108 common getegid __x64_sys_getegid
|
||||
109 common setpgid __x64_sys_setpgid
|
||||
110 common getppid __x64_sys_getppid
|
||||
111 common getpgrp __x64_sys_getpgrp
|
||||
112 common setsid __x64_sys_setsid
|
||||
113 common setreuid __x64_sys_setreuid
|
||||
114 common setregid __x64_sys_setregid
|
||||
115 common getgroups __x64_sys_getgroups
|
||||
116 common setgroups __x64_sys_setgroups
|
||||
117 common setresuid __x64_sys_setresuid
|
||||
118 common getresuid __x64_sys_getresuid
|
||||
119 common setresgid __x64_sys_setresgid
|
||||
120 common getresgid __x64_sys_getresgid
|
||||
121 common getpgid __x64_sys_getpgid
|
||||
122 common setfsuid __x64_sys_setfsuid
|
||||
123 common setfsgid __x64_sys_setfsgid
|
||||
124 common getsid __x64_sys_getsid
|
||||
125 common capget __x64_sys_capget
|
||||
126 common capset __x64_sys_capset
|
||||
127 64 rt_sigpending __x64_sys_rt_sigpending
|
||||
128 64 rt_sigtimedwait __x64_sys_rt_sigtimedwait
|
||||
129 64 rt_sigqueueinfo __x64_sys_rt_sigqueueinfo
|
||||
130 common rt_sigsuspend __x64_sys_rt_sigsuspend
|
||||
131 64 sigaltstack __x64_sys_sigaltstack
|
||||
132 common utime __x64_sys_utime
|
||||
133 common mknod __x64_sys_mknod
|
||||
134 64 uselib
|
||||
135 common personality __x64_sys_personality
|
||||
136 common ustat __x64_sys_ustat
|
||||
137 common statfs __x64_sys_statfs
|
||||
138 common fstatfs __x64_sys_fstatfs
|
||||
139 common sysfs __x64_sys_sysfs
|
||||
140 common getpriority __x64_sys_getpriority
|
||||
141 common setpriority __x64_sys_setpriority
|
||||
142 common sched_setparam __x64_sys_sched_setparam
|
||||
143 common sched_getparam __x64_sys_sched_getparam
|
||||
144 common sched_setscheduler __x64_sys_sched_setscheduler
|
||||
145 common sched_getscheduler __x64_sys_sched_getscheduler
|
||||
146 common sched_get_priority_max __x64_sys_sched_get_priority_max
|
||||
147 common sched_get_priority_min __x64_sys_sched_get_priority_min
|
||||
148 common sched_rr_get_interval __x64_sys_sched_rr_get_interval
|
||||
149 common mlock __x64_sys_mlock
|
||||
150 common munlock __x64_sys_munlock
|
||||
151 common mlockall __x64_sys_mlockall
|
||||
152 common munlockall __x64_sys_munlockall
|
||||
153 common vhangup __x64_sys_vhangup
|
||||
154 common modify_ldt __x64_sys_modify_ldt
|
||||
155 common pivot_root __x64_sys_pivot_root
|
||||
156 64 _sysctl __x64_sys_sysctl
|
||||
157 common prctl __x64_sys_prctl
|
||||
158 common arch_prctl __x64_sys_arch_prctl
|
||||
159 common adjtimex __x64_sys_adjtimex
|
||||
160 common setrlimit __x64_sys_setrlimit
|
||||
161 common chroot __x64_sys_chroot
|
||||
162 common sync __x64_sys_sync
|
||||
163 common acct __x64_sys_acct
|
||||
164 common settimeofday __x64_sys_settimeofday
|
||||
165 common mount __x64_sys_mount
|
||||
166 common umount2 __x64_sys_umount
|
||||
167 common swapon __x64_sys_swapon
|
||||
168 common swapoff __x64_sys_swapoff
|
||||
169 common reboot __x64_sys_reboot
|
||||
170 common sethostname __x64_sys_sethostname
|
||||
171 common setdomainname __x64_sys_setdomainname
|
||||
172 common iopl __x64_sys_iopl/ptregs
|
||||
173 common ioperm __x64_sys_ioperm
|
||||
174 64 create_module
|
||||
175 common init_module __x64_sys_init_module
|
||||
176 common delete_module __x64_sys_delete_module
|
||||
177 64 get_kernel_syms
|
||||
178 64 query_module
|
||||
179 common quotactl __x64_sys_quotactl
|
||||
180 64 nfsservctl
|
||||
181 common getpmsg
|
||||
182 common putpmsg
|
||||
183 common afs_syscall
|
||||
184 common tuxcall
|
||||
185 common security
|
||||
186 common gettid __x64_sys_gettid
|
||||
187 common readahead __x64_sys_readahead
|
||||
188 common setxattr __x64_sys_setxattr
|
||||
189 common lsetxattr __x64_sys_lsetxattr
|
||||
190 common fsetxattr __x64_sys_fsetxattr
|
||||
191 common getxattr __x64_sys_getxattr
|
||||
192 common lgetxattr __x64_sys_lgetxattr
|
||||
193 common fgetxattr __x64_sys_fgetxattr
|
||||
194 common listxattr __x64_sys_listxattr
|
||||
195 common llistxattr __x64_sys_llistxattr
|
||||
196 common flistxattr __x64_sys_flistxattr
|
||||
197 common removexattr __x64_sys_removexattr
|
||||
198 common lremovexattr __x64_sys_lremovexattr
|
||||
199 common fremovexattr __x64_sys_fremovexattr
|
||||
200 common tkill __x64_sys_tkill
|
||||
201 common time __x64_sys_time
|
||||
202 common futex __x64_sys_futex
|
||||
203 common sched_setaffinity __x64_sys_sched_setaffinity
|
||||
204 common sched_getaffinity __x64_sys_sched_getaffinity
|
||||
205 64 set_thread_area
|
||||
206 64 io_setup __x64_sys_io_setup
|
||||
207 common io_destroy __x64_sys_io_destroy
|
||||
208 common io_getevents __x64_sys_io_getevents
|
||||
209 64 io_submit __x64_sys_io_submit
|
||||
210 common io_cancel __x64_sys_io_cancel
|
||||
211 64 get_thread_area
|
||||
212 common lookup_dcookie __x64_sys_lookup_dcookie
|
||||
213 common epoll_create __x64_sys_epoll_create
|
||||
214 64 epoll_ctl_old
|
||||
215 64 epoll_wait_old
|
||||
216 common remap_file_pages __x64_sys_remap_file_pages
|
||||
217 common getdents64 __x64_sys_getdents64
|
||||
218 common set_tid_address __x64_sys_set_tid_address
|
||||
219 common restart_syscall __x64_sys_restart_syscall
|
||||
220 common semtimedop __x64_sys_semtimedop
|
||||
221 common fadvise64 __x64_sys_fadvise64
|
||||
222 64 timer_create __x64_sys_timer_create
|
||||
223 common timer_settime __x64_sys_timer_settime
|
||||
224 common timer_gettime __x64_sys_timer_gettime
|
||||
225 common timer_getoverrun __x64_sys_timer_getoverrun
|
||||
226 common timer_delete __x64_sys_timer_delete
|
||||
227 common clock_settime __x64_sys_clock_settime
|
||||
228 common clock_gettime __x64_sys_clock_gettime
|
||||
229 common clock_getres __x64_sys_clock_getres
|
||||
230 common clock_nanosleep __x64_sys_clock_nanosleep
|
||||
231 common exit_group __x64_sys_exit_group
|
||||
232 common epoll_wait __x64_sys_epoll_wait
|
||||
233 common epoll_ctl __x64_sys_epoll_ctl
|
||||
234 common tgkill __x64_sys_tgkill
|
||||
235 common utimes __x64_sys_utimes
|
||||
236 64 vserver
|
||||
237 common mbind __x64_sys_mbind
|
||||
238 common set_mempolicy __x64_sys_set_mempolicy
|
||||
239 common get_mempolicy __x64_sys_get_mempolicy
|
||||
240 common mq_open __x64_sys_mq_open
|
||||
241 common mq_unlink __x64_sys_mq_unlink
|
||||
242 common mq_timedsend __x64_sys_mq_timedsend
|
||||
243 common mq_timedreceive __x64_sys_mq_timedreceive
|
||||
244 64 mq_notify __x64_sys_mq_notify
|
||||
245 common mq_getsetattr __x64_sys_mq_getsetattr
|
||||
246 64 kexec_load __x64_sys_kexec_load
|
||||
247 64 waitid __x64_sys_waitid
|
||||
248 common add_key __x64_sys_add_key
|
||||
249 common request_key __x64_sys_request_key
|
||||
250 common keyctl __x64_sys_keyctl
|
||||
251 common ioprio_set __x64_sys_ioprio_set
|
||||
252 common ioprio_get __x64_sys_ioprio_get
|
||||
253 common inotify_init __x64_sys_inotify_init
|
||||
254 common inotify_add_watch __x64_sys_inotify_add_watch
|
||||
255 common inotify_rm_watch __x64_sys_inotify_rm_watch
|
||||
256 common migrate_pages __x64_sys_migrate_pages
|
||||
257 common openat __x64_sys_openat
|
||||
258 common mkdirat __x64_sys_mkdirat
|
||||
259 common mknodat __x64_sys_mknodat
|
||||
260 common fchownat __x64_sys_fchownat
|
||||
261 common futimesat __x64_sys_futimesat
|
||||
262 common newfstatat __x64_sys_newfstatat
|
||||
263 common unlinkat __x64_sys_unlinkat
|
||||
264 common renameat __x64_sys_renameat
|
||||
265 common linkat __x64_sys_linkat
|
||||
266 common symlinkat __x64_sys_symlinkat
|
||||
267 common readlinkat __x64_sys_readlinkat
|
||||
268 common fchmodat __x64_sys_fchmodat
|
||||
269 common faccessat __x64_sys_faccessat
|
||||
270 common pselect6 __x64_sys_pselect6
|
||||
271 common ppoll __x64_sys_ppoll
|
||||
272 common unshare __x64_sys_unshare
|
||||
273 64 set_robust_list __x64_sys_set_robust_list
|
||||
274 64 get_robust_list __x64_sys_get_robust_list
|
||||
275 common splice __x64_sys_splice
|
||||
276 common tee __x64_sys_tee
|
||||
277 common sync_file_range __x64_sys_sync_file_range
|
||||
278 64 vmsplice __x64_sys_vmsplice
|
||||
279 64 move_pages __x64_sys_move_pages
|
||||
280 common utimensat __x64_sys_utimensat
|
||||
281 common epoll_pwait __x64_sys_epoll_pwait
|
||||
282 common signalfd __x64_sys_signalfd
|
||||
283 common timerfd_create __x64_sys_timerfd_create
|
||||
284 common eventfd __x64_sys_eventfd
|
||||
285 common fallocate __x64_sys_fallocate
|
||||
286 common timerfd_settime __x64_sys_timerfd_settime
|
||||
287 common timerfd_gettime __x64_sys_timerfd_gettime
|
||||
288 common accept4 __x64_sys_accept4
|
||||
289 common signalfd4 __x64_sys_signalfd4
|
||||
290 common eventfd2 __x64_sys_eventfd2
|
||||
291 common epoll_create1 __x64_sys_epoll_create1
|
||||
292 common dup3 __x64_sys_dup3
|
||||
293 common pipe2 __x64_sys_pipe2
|
||||
294 common inotify_init1 __x64_sys_inotify_init1
|
||||
295 64 preadv __x64_sys_preadv
|
||||
296 64 pwritev __x64_sys_pwritev
|
||||
297 64 rt_tgsigqueueinfo __x64_sys_rt_tgsigqueueinfo
|
||||
298 common perf_event_open __x64_sys_perf_event_open
|
||||
299 64 recvmmsg __x64_sys_recvmmsg
|
||||
300 common fanotify_init __x64_sys_fanotify_init
|
||||
301 common fanotify_mark __x64_sys_fanotify_mark
|
||||
302 common prlimit64 __x64_sys_prlimit64
|
||||
303 common name_to_handle_at __x64_sys_name_to_handle_at
|
||||
304 common open_by_handle_at __x64_sys_open_by_handle_at
|
||||
305 common clock_adjtime __x64_sys_clock_adjtime
|
||||
306 common syncfs __x64_sys_syncfs
|
||||
307 64 sendmmsg __x64_sys_sendmmsg
|
||||
308 common setns __x64_sys_setns
|
||||
309 common getcpu __x64_sys_getcpu
|
||||
310 64 process_vm_readv __x64_sys_process_vm_readv
|
||||
311 64 process_vm_writev __x64_sys_process_vm_writev
|
||||
312 common kcmp __x64_sys_kcmp
|
||||
313 common finit_module __x64_sys_finit_module
|
||||
314 common sched_setattr __x64_sys_sched_setattr
|
||||
315 common sched_getattr __x64_sys_sched_getattr
|
||||
316 common renameat2 __x64_sys_renameat2
|
||||
317 common seccomp __x64_sys_seccomp
|
||||
318 common getrandom __x64_sys_getrandom
|
||||
319 common memfd_create __x64_sys_memfd_create
|
||||
320 common kexec_file_load __x64_sys_kexec_file_load
|
||||
321 common bpf __x64_sys_bpf
|
||||
322 64 execveat __x64_sys_execveat/ptregs
|
||||
323 common userfaultfd __x64_sys_userfaultfd
|
||||
324 common membarrier __x64_sys_membarrier
|
||||
325 common mlock2 __x64_sys_mlock2
|
||||
326 common copy_file_range __x64_sys_copy_file_range
|
||||
327 64 preadv2 __x64_sys_preadv2
|
||||
328 64 pwritev2 __x64_sys_pwritev2
|
||||
329 common pkey_mprotect __x64_sys_pkey_mprotect
|
||||
330 common pkey_alloc __x64_sys_pkey_alloc
|
||||
331 common pkey_free __x64_sys_pkey_free
|
||||
332 common statx __x64_sys_statx
|
||||
333 common io_pgetevents __x64_sys_io_pgetevents
|
||||
334 common rseq __x64_sys_rseq
|
||||
|
||||
#
|
||||
# x32-specific system call numbers start at 512 to avoid cache impact
|
||||
# for native 64-bit operation. The __x32_compat_sys stubs are created
|
||||
# on-the-fly for compat_sys_*() compatibility system calls if X86_X32
|
||||
# is defined.
|
||||
#
|
||||
512 x32 rt_sigaction __x32_compat_sys_rt_sigaction
|
||||
513 x32 rt_sigreturn sys32_x32_rt_sigreturn
|
||||
514 x32 ioctl __x32_compat_sys_ioctl
|
||||
515 x32 readv __x32_compat_sys_readv
|
||||
516 x32 writev __x32_compat_sys_writev
|
||||
517 x32 recvfrom __x32_compat_sys_recvfrom
|
||||
518 x32 sendmsg __x32_compat_sys_sendmsg
|
||||
519 x32 recvmsg __x32_compat_sys_recvmsg
|
||||
520 x32 execve __x32_compat_sys_execve/ptregs
|
||||
521 x32 ptrace __x32_compat_sys_ptrace
|
||||
522 x32 rt_sigpending __x32_compat_sys_rt_sigpending
|
||||
523 x32 rt_sigtimedwait __x32_compat_sys_rt_sigtimedwait
|
||||
524 x32 rt_sigqueueinfo __x32_compat_sys_rt_sigqueueinfo
|
||||
525 x32 sigaltstack __x32_compat_sys_sigaltstack
|
||||
526 x32 timer_create __x32_compat_sys_timer_create
|
||||
527 x32 mq_notify __x32_compat_sys_mq_notify
|
||||
528 x32 kexec_load __x32_compat_sys_kexec_load
|
||||
529 x32 waitid __x32_compat_sys_waitid
|
||||
530 x32 set_robust_list __x32_compat_sys_set_robust_list
|
||||
531 x32 get_robust_list __x32_compat_sys_get_robust_list
|
||||
532 x32 vmsplice __x32_compat_sys_vmsplice
|
||||
533 x32 move_pages __x32_compat_sys_move_pages
|
||||
534 x32 preadv __x32_compat_sys_preadv64
|
||||
535 x32 pwritev __x32_compat_sys_pwritev64
|
||||
536 x32 rt_tgsigqueueinfo __x32_compat_sys_rt_tgsigqueueinfo
|
||||
537 x32 recvmmsg __x32_compat_sys_recvmmsg
|
||||
538 x32 sendmmsg __x32_compat_sys_sendmmsg
|
||||
539 x32 process_vm_readv __x32_compat_sys_process_vm_readv
|
||||
540 x32 process_vm_writev __x32_compat_sys_process_vm_writev
|
||||
541 x32 setsockopt __x32_compat_sys_setsockopt
|
||||
542 x32 getsockopt __x32_compat_sys_getsockopt
|
||||
543 x32 io_setup __x32_compat_sys_io_setup
|
||||
544 x32 io_submit __x32_compat_sys_io_submit
|
||||
545 x32 execveat __x32_compat_sys_execveat/ptregs
|
||||
546 x32 preadv2 __x32_compat_sys_preadv64v2
|
||||
547 x32 pwritev2 __x32_compat_sys_pwritev64v2
|
||||
548 common get_proc_info __x64_sys_get_proc_info
|
||||
+1322
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -1,47 +0,0 @@
|
||||
#include <get_proc_info.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
static struct procinfos info;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
if (argc != 2)
|
||||
{
|
||||
fprintf(stderr, "usage: a.out <integer value>\n");
|
||||
return -1;
|
||||
}
|
||||
long return_value;
|
||||
pid_t pid = (pid_t)atoi(argv[1]);
|
||||
return_value = get_proc_info(pid, &info);
|
||||
if (return_value != 0)
|
||||
{
|
||||
fprintf(stderr, "Proccess with pid = %d not found!\n", pid);
|
||||
return -1;
|
||||
}
|
||||
printf("My StudentID = %ld\n", info.studentID);
|
||||
printf("Proc ID: %d\n", info.proc.pid);
|
||||
printf("Proc name: %s\n", info.proc.name);
|
||||
if (info.parent_proc.pid != -1)
|
||||
{
|
||||
printf("Parent ID: %d\n", info.parent_proc.pid);
|
||||
printf("Parent name: %s\n", info.parent_proc.name);
|
||||
}
|
||||
else
|
||||
{ //Co the khong can thiet vi proc nao cung co parent
|
||||
printf("This proc does not have parent!\n");
|
||||
}
|
||||
if (info.oldest_child_proc.pid != -1)
|
||||
{
|
||||
printf("Child ID: %d\n", info.oldest_child_proc.pid);
|
||||
printf("Child name: %s\n", info.oldest_child_proc.name);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("This proc does not have any child!\n");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
#ifndef _GET_PROC_INFO_H_
|
||||
#define _GET_PROC_INFO_H_
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
struct proc_info
|
||||
{
|
||||
pid_t pid;
|
||||
char name[16];
|
||||
};
|
||||
|
||||
struct procinfos
|
||||
{
|
||||
long studentID;
|
||||
struct proc_info proc;
|
||||
struct proc_info parent_proc;
|
||||
struct proc_info oldest_child_proc;
|
||||
};
|
||||
|
||||
long sys_get_proc_info(pid_t pid, struct procinfos *info);
|
||||
#endif // _GET_PROC_INFO_H_
|
||||
Reference in New Issue
Block a user