CPU Mode switches in qemu emulated machine. Undefined behavior. 16 bit code...
https://github.com/PoutineSyropErable/MapleKernelThe BareBones dir.debug2 branch.e5cf6d69e3f9f053 commit hash.My 16 bit code is being executed as 32 bit (after a far jump) and undefined behavior...
View ArticleWhere 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,...
View ArticleLinux security attr set on Windows
Linux have Extended security attributes like security.attr_name.Somebody told me, how I can, if can. Set this attribute for file on Windows.example:On Windows we have file, 1.txt.Setting attr to file...
View ArticleWhere 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...
View ArticleDoes device driver works without calling probe function
Recently I was Trying to work with Qualcomm platform device. I was looking at Flow of touchscreen hbtp_input device driver, the driver is getting registered and calling init function but it doesn't...
View ArticleHow to tell gdb the default opsize, so it can debug multi cpu mode code...
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 emualate an...
View Article/kernel mode in MSVC cl.exe allows new despite specifying user must...
According to documentation, under /kernel mode:You must explicitly define the new() or delete() operator. Thecompiler and runtime don't supply a default definition.Yet, the following code compiles and...
View ArticleLinux kernel workqueue: Own queue versus system_wq?
In linux/workqueue.h , there are pointers to system-wide workqueues.The comment block details the individual properties.(excerpt from workqueue.h, v6.13)/* * System-wide workqueues which are always...
View ArticleReading 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.a....
View ArticleWindows 2008 R2 - Kernel (System Process PID=4) is locking files and folders
Windows 2008 R2 - Kernel (System Process PID=4) is locking files and folders for a long time.For example when deleting a file, the file may remain locked for 1 minute or more and only after that be...
View ArticleThe order in which the device-tree text file is written, does it matter?
Does the order in which a device-tree text file (.dts) is written matter at all ?For example, if you take a node from the top of the file and move it to the bottom, will it change the order of hardware...
View ArticleWriting a basic java shell or GUI on a kernel
As a hobby I have been writing a shell in java. It's very basic, it include the creation, deletion, reading of files through a command line or through a desktop-like environment if a plugin is...
View Articledumping the content of the $mft file
for some commercial project I'm doing I need to be able to read the actual data stored on the $mft file.I found a gpl lib that could help, but since its gpl i can't integrate it into my code.could...
View ArticleWhere Linux Kernel Setup GDT
I am reading through Linux Kernel code, and I have some doubt regarding GDT (Global Descriptor Table) in Linux.My Questions are:Where does the Linux Kernel Setup Large GDT?I know that in pm.cthe kernel...
View ArticleTest a kernel driver in QEMU
How should I test a Linux kernel driver, without a real device. It is not a device that QEMU supports(in my case, it's drivers/tty/serial/digicolor-usart.c).Gemini told me I can modify the source code...
View ArticleWhere is the code for mounting the ext4 filesystem in the linux kernel?
I am just learning how to modify the Linux kernel. I am using gdb in order to debug the kernel remotely but my breakpoints (b console_init, b start_kernel) doesn't work. Now I want to try to set a...
View ArticleShould I redefine GDT in the kernel if I already did in the bootloader
I have a simple bootloader where I have GDT and switch to protected mode Now I want just to play and experiment with interruptions my initial idea was to do everything in bootloader but at the end it...
View ArticleContainerd error loading seccomp filter into kernel in kubernetes
Recently i get this error on one of the Kubernetes worker and on bitnami pods (redis, rabbitmq, mongodb) where the seccomp profile is defined.(combined from similar events): Liveness probe errored: rpc...
View ArticleDoes sysfs procfs devtmpfs mounted by kernel?
I'm looking into systemd.I thought systemd would mount sysfs(/sys), procfs(/proc), devtmpfs(/dev) during booting after kernel initialization.But my systemd debugging log show that systemd doesn't mount...
View Articlekernel programming
Is there any other way to execute a program using kernel, other than shell and system calls?
View ArticleIs exit syscall invoked implicitly?
Is exit syscall actually invoked even if it is not called by a library function in the program?
View ArticleKernel file not loading correctly in MASM
Just making a simple OS as a beginner for my assembly project. I have this very simple bootloader which prints a character B and reads the second sector (kernel) from drive and loads it at 10000h...
View ArticleConfiguring initramfs with buildroot and uboot
I am attempting to get initramfs working on an embedded linux device using buildroot and uboot. I have been following the guides have have initramfs set up in the buildroot and kernel config. However...
View ArticleShutdown computer, how operating systems achieve it? (C Kernel development)
I've been developing an OS lately in C. But how can I shutdown the computer? By saying 'shutdown the computer', I mean a force shutdown.How can I do that in C kernel development?Any help would be...
View ArticleLInux kernel log
I'm running embedded Linux (Angstrom distribution, for Atmel). I would like to read the kernel message log during shutdown, same stuff I'd get with dmesg. Basically I'm exploring a few issues I have by...
View ArticleWhat is the best way to hack linux kernel source and learn by doing?
I am new to both Linux kernel engineering and mm. I am interested in mm subsystem.One person on irc channel told me to read the page fault handler code (both x86 architecture specific and the generic...
View Articlekmallloc() limitation for mmap and how big mem is allocated
I read in kernel doc that mmap needs physical memory that will be virtually mapped. The physical memory can be allocated by kmalloc(). However kmalloc() can allocate very limited amount of memory and...
View ArticleRT preempt vs RTAI vs Xenomai for real-time linux
What are differences, pros and cons of the three referred real time OS framework, extensions or patches?I want to measure a CPU timestamp counter (TSC), time in nanosecond everytime when a data frame...
View ArticleMirror kernel virtual addresses in a user-space simulator
I am developing a user-space simulator that is intended to produce execution traces identical to those generated when the program runs inside the kernel.The program operates within a small sandboxed...
View ArticleShowing Error while using train_test_Split method to on Kaggle kernel
What is the error here and how can I avoid it? The same code actually works in my Jupyter and Spider environment. Also I didn't understand why this isn't working on kaggle kernel.Below is my code.#...
View Article