9,385 questions
2
votes
0
answers
21
views
Reading CLOCK_BOOTTIME clock from BPF probe
I am using a BPF probe on sys_execve() to log current->start_boottime along with UID, GID, nspid etc. The probe also logs the current time using bpf_ktime_get_ns().
I am logging start_boottime a.k....
3
votes
2
answers
122
views
/kernel mode in MSVC cl.exe allows new despite specifying user must explicitly define the operator
According to documentation, under /kernel mode:
You must explicitly define the new() or delete() operator. The
compiler and runtime don't supply a default definition.
Yet, the following code ...
0
votes
0
answers
75
views
What's the memory order about pcie write? [closed]
What's the memory order in this situation:
ARM CPU connected to a PCIe NIC(Network Interface Card)
The NIC write data and descriptor to ARM CPU memory, data and descriptor are normal memory.
ARM CPU ...
Tooling
0
votes
0
replies
25
views
How to tell gdb the default opsize, so it can debug multi cpu mode code (without a weird disassembly output)
Note: This is a repost of a question I asked on RetroComputing, where I was told to move it here.
I've made my own kernel. It has 32-bit pm, 16-bit pm, and 16-bit real mode code. I use Qemu to ...
0
votes
1
answer
49
views
Where Can I See the Mapping Flow Between .dynsym and Kernel System Calls?
I'm struggling to reconcile the difference between the symbols listed in my ELF file's dynamic symbol table (.dynsym) and the system calls observed via strace.
When I perform static analysis using ...
Best practices
0
votes
3
replies
61
views
Where arguments of the running program are visible in the kernel
I'm writing a kernel patch (you can see a project here) that, when any program is launched in the system, checks whether the program has the bitX attribute in its хattr. If it's missing or equal to 0, ...
0
votes
2
answers
169
views
CPU Mode switches in qemu emulated machine. Undefined behavior. 16 bit code gets executed as 32 bit mode after a far jump
https://github.com/PoutineSyropErable/MapleKernel
The BareBones dir.
debug2 branch.
e5cf6d69e3f9f053 commit hash.
How is a proper 32PM -> 16RM mode switch done on modern x86_64? My 16 bit code is ...
0
votes
0
answers
83
views
build kernel-6.6 for riscv met "undefined reference to __efistub_efi_zboot_entry" issue
I was building kernel6.6(source from openkylin2.0 a down stream distibution of debian) on riscv platform, I met an issue while build with command dpkg-buildpackage -us -uc, part of the build log is as ...
1
vote
1
answer
71
views
modpost GPL error using ktime_* - what to use instead?
I'm building a non-GPL kernel module (non-negotiable) and in order to get timing information everywhere I look here and elsewhere tells me to use the new ktime_* API, but when I build I get this error:...
2
votes
0
answers
83
views
Where am I wrong with writing transition from protected mode to IA-32e mode?
I try to code the transition from protected mode to IA-32e mode. It's a task in college. The problem that I can't debug 32 bit bootloader. I can only run QEMU and tell based on its output whether this ...
1
vote
0
answers
118
views
Writing and executing a file from within the Linux kernel
I need to write (modify) an executable file and then execute it from a Linux system call. I have attempted to create (open) the file, write to it, close it, and then execute it. The problem is that ...
0
votes
0
answers
53
views
Dynamic Core Management via Arm's PSCI on OdroidC4
I have been creating a basic core management tool which is able to dynamically turn CPU cores on and off using Arm's PSCI CPU_ON and CPU_OFF functions. This worked great on QEMU, however moving onto ...
2
votes
0
answers
232
views
Building a kernel for pixel 9A tegu [closed]
In the android docs, it mentions that we can use bazel to build the .img file for the kenrel (which we can flash with fastboot). However, I don't seem to have the //common:kernel_aarch64_dist target ...
2
votes
2
answers
150
views
16-bit x86 Assembly Kernel getting stuck when calling input function
Well, I'm writing my own OS just for fun, and I thought it would have been cool to add a bytecode "language" interpreted by the kernel itself. I took inspiration mainly from Java, which is ...
1
vote
0
answers
37
views
Errors building custom kernel: field has incomplete type 'struct inet_skb_parm' and no member named 'header' in 'struct tcp_skb_cb'
I'm trying to build a custom Linux kernel for my device and I'm running into several compilation errors. Here are some examples:
../include/net/tcp.h:860:25: error: field has incomplete type 'struct ...