Skip to content

Instantly share code, notes, and snippets.

View davidlohr's full-sized avatar

Davidlohr Bueso davidlohr

View GitHub Profile
@davidlohr
davidlohr / qemu-4xinterleave-switch-type3.cfg
Last active December 11, 2023 02:09
syzkaller config - qemu deployment emulating a 4 devices setup below a switch suitable for 1, 2 or 4 way interleave
{
"target": "linux/amd64",
"http": "127.0.0.1:56741",
"workdir": "workdir",
"kernel_obj": "/home/dave/code/linux/",
"image": "/img/bullseye.img",
"sshkey": "/img/bullseye.id_rsa",
"syzkaller": "/home/dave/code/syzkaller",
"procs": 8,
"type": "qemu",
@davidlohr
davidlohr / qemu-4xinterleave-1cfmw-2hb-2rp-type3.cfg
Last active December 24, 2024 16:06
syzkaller config - qemu deployment emulating a setup suitable for 4 way interleave. Only one fixed window provided, to enable 2 way interleave across 2 CXL host bridges. Each host bridge has 2 CXL Root Ports, with the CXL Type3 device directly attached (no switches).
{
"target": "linux/amd64",
"http": "127.0.0.1:56741",
"workdir": "workdir",
"kernel_obj": "/home/dave/code/linux/",
"image": "/img/bullseye.img",
"sshkey": "/img/bullseye.id_rsa",
"syzkaller": "/home/dave/code/syzkaller",
"procs": 8,
"type": "qemu",
@davidlohr
davidlohr / qemu-single-volatile-nolsa-type3.cfg
Last active December 11, 2023 02:11
syzkaller config - qemu deployment emulating a simple setup with just one directly attached CXL Type 3 volatile memory device
{
"target": "linux/amd64",
"http": "127.0.0.1:56741",
"workdir": "workdir",
"kernel_obj": "/home/dave/code/linux/",
"image": "/img/bullseye.img",
"sshkey": "/img/bullseye.id_rsa",
"syzkaller": "/home/dave/code/syzkaller",
"procs": 8,
"type": "qemu",
@davidlohr
davidlohr / qemu-single-pmem-type3.cfg
Last active December 11, 2023 02:09
syzkaller config - qemu deployment emulating a simple setup with just one directly attached CXL Type 3 Persistent Memory device
{
"target": "linux/amd64",
"http": "127.0.0.1:56741",
"workdir": "workdir",
"kernel_obj": "/home/dave/code/linux/",
"image": "/img/bullseye.img",
"sshkey": "/img/bullseye.id_rsa",
"syzkaller": "/home/dave/code/syzkaller",
"procs": 8,
"type": "qemu",
Applies to the MM, but works on any subsystem.
Based on https://deferred.io/2015/10/27/visualizing-linux-kernel-call-graphs.html
$ git diff
diff --git a/Makefile b/Makefile
index c43d825a3c4c..3b9f43a112b8 100644
--- a/Makefile
+++ b/Makefile
@@ -523,7 +523,7 @@ KBUILD_AFLAGS := -D__ASSEMBLY__ -fno-PIE
// Copyright (C) Davidlohr Bueso, 2018.
//
// Convert the infamous mmap_sem to a range lock.
// Usage within the kernel source:
//
// $ make coccicheck MODE=patch COCCI=/path/to/mmap_sem.cocci
virtual patch
virtual context
virtual org
@davidlohr
davidlohr / pmsg-shared.cpp
Last active July 22, 2016 17:11
parallel sysv msg pingpong
/*
* pmsg.cpp, parallel sysv msg pingpong
* compilation: g++ -Wall -O2 -lpthread pmsg-shared.cpp -o pmsg-shared
*
* Copyright (C) 1999, 2001, 2005, 2008 by Manfred Spraul.
* All rights reserved except the rights granted by the GPL.
*
* Redistribution of this file is permitted under the terms of the GNU
* General Public License (GPL) version 2 or later.
*/
@davidlohr
davidlohr / kbuild.cross
Last active August 11, 2016 23:55
support for ppc32
#!/bin/bash
#
# linux kernel CROSS make wrapper
#
# It will download/unpack the cross tool chain if necessary,
# then invoke make with suitable options.
#
# It detects ARCH in 4 ways.
#
# - make.i386 # make it a symlink to this script
@davidlohr
davidlohr / kbuild-auto.sh
Last active March 13, 2016 21:16
Automating tedious kernel hacking related tasks.
#!/bin/bash
#
# Copyright (C) 2016 Davidlohr Bueso.
#
# Download and build/install one or more flavors of the Linux kernel.
# Do what you please with this, but you better be root if you expect
# it to do anything useful. Also, probably very SUSE specific, this
# is my only working env.
#
# Usage:

Keybase proof

I hereby claim:

  • I am davidlohr on github.
  • I am davidlohr (https://keybase.io/davidlohr) on keybase.
  • I have a public key whose fingerprint is 75F1 66C4 83D2 BF46 CDA2 E07C 5D3C 6CC7 6ACA FA02

To claim this, I am signing this object: