Skip to content

Instantly share code, notes, and snippets.

View kaiwan's full-sized avatar

Kaiwan N Billimoria kaiwan

View GitHub Profile
@kaiwan
kaiwan / 6.1_modeset_oops_vbox
Created December 21, 2022 14:24
Possible regression in 6.1
Dec 20 11:08:50 osboxes kernel: Oops: 0000 [#1] PREEMPT SMP PTI
Dec 20 11:08:50 osboxes kernel: CPU: 1 PID: 295 Comm: systemd-udevd Not tainted 6.1.0-lkp2e-01+ #2
Dec 20 11:08:50 osboxes kernel: Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006
Dec 20 11:08:50 osboxes kernel: RIP: 0010:ttm_bo_move_memcpy+0x15f/0x2e0 [ttm]
Dec 20 11:08:50 osboxes kernel: Code: 89 c6 0f 84 e2 00 00 00 49 81 fe 00 f0 ff ff 0f 87 7a 01 00 00 49 8b 06 0f b6 40 10 3c 01 0f 87 41 63 00 00 a8 01 75 6c 31 ff <8b> 71 0c 48 89 da 4c 89 f1 e8 63 fb ff ff 49 8b 06 44 0f b6 70 10
Dec 20 11:08:50 osboxes kernel: RSP: 0018:ffffb2a0406f71a8 EFLAGS: 00010246
Dec 20 11:08:50 osboxes kernel: RAX: 0000000000000001 RBX: ffffb2a0406f71c8 RCX: 0000000000000000
Dec 20 11:08:50 osboxes kernel: RDX: ffff963705e97ba0 RSI: 0000000000000000 RDI: 0000000000000001
Dec 20 11:08:50 osboxes kernel: RBP: ffffb2a0406f7238 R08: 0000000000000000 R09: 00000000000e03e7
Dec 20 11:08:50 osboxes kernel: R10: ffffb2a041c01000 R11: 00000000000
@kaiwan
kaiwan / kaiwantech_github_repos
Created March 8, 2022 04:09
All relevant kaiwanTECH GitHub repos
-----------------------------------------------------
kaiwanTECH : opensource GitHub repos for source code:
-----------------------------------------------------
Book:
Hands-On System Programming with Linux, Kaiwan NB, Packt - code:
https://github.com/PacktPublishing/Hands-on-System-Programming-with-Linux
Book:
Linux Kernel Programming - Part 1
@kaiwan
kaiwan / VAS_Linux_different_archs
Last active August 2, 2020 03:41
Summary of the VAS layout on the Linux OS for different CPUs
Aarch64
DUT: Raspberry Pi 3B+
- via the LLKD ch7/show_kernel_seg LKM:
[...]
[ 4171.867794] llkd_minsysinfo(): minimal platform info:
CPU: Aarch64, little-endian; 64-bit OS.
[ 4171.867798]
@kaiwan
kaiwan / foo_register_driver-apis-in-5.4.txt
Last active June 23, 2020 13:26
List of all the Linux kernel APIs of the format foo_register_driver()
Aim: to list all the Linux kernel APIs of the format
foo_register_driver();
With a good bit of scripting foo within the drivers/ dir, I got these APIs (from 5.4.0);
(am unsure how accurate this is though...):
acpi_button_register_driver
cnic_register_driver
cpufreq_register_driver
cpuidle_register_driver
cx8802_register_driver
@kaiwan
kaiwan / gist_useful_CLI.txt
Last active December 6, 2018 13:50
Useful CLI stuff
--------------------------------------------
To get timestamp in a useful format:
date +%a_%d_%m_%Y_%H%M
Eg. o/p:
$ date +%a_%d_%m_%Y_%H%M
Thu_06_12_2018_0737
$
--------------------------------------------
Shell scripting:
@kaiwan
kaiwan / errno_codes.txt
Created June 2, 2018 06:53
Linux errno values
errno.h - C Error Codes in Linux
All the Linux/C error codes are listed below.
I occasionally google C error codes, but always end up grepping through /usr/include to find the answer.
To save myself, and a few others, some time in the future, here they are:
Include file :: /usr/include/asm-generic/errno-base.h
#ifndef _ASM_GENERIC_ERRNO_BASE_H
#define _ASM_GENERIC_ERRNO_BASE_H
@kaiwan
kaiwan / 0_reuse_code.js
Created March 3, 2014 06:35
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console