Skip to content

Instantly share code, notes, and snippets.

View ryncsn's full-sized avatar

Kairui Song ryncsn

View GitHub Profile
[ 1038.542133] LTP: starting ftrace-stress-test (ftrace_stress_test.sh 90)
[ 1179.314527] ==================================================================
[ 1179.315755] BUG: KASAN: use-after-free in print_graph_function_flags+0x524/0x5a0
[ 1179.316630] Read of size 8 at addr ffff00001086fa00 by task cat/11171
[ 1179.317409]
[ 1179.317638] CPU: 2 PID: 11171 Comm: cat Kdump: loaded Tainted: G W 6.1.61-0.20231108gitdc120e1f3d0d.2303.1.ocs23.aarch64+debug #1
[ 1179.319124] Hardware name: QEMU KVM Virtual Machine, BIOS 0.0.0 02/06/2015
[ 1179.319951] Call trace:
[ 1179.320278] dump_backtrace+0x224/0x23c
[ 1179.320771] show_stack+0x34/0x44
commit e5e15fc44158804888a9b4a6cdd78fd1c5f10f22
Author: Kairui Song <kasong@redhat.com>
Date: Mon Aug 17 17:08:52 2020 +0800
Hyperv FB should handle 64bit
Signed-off-by: Kairui Song <kasong@redhat.com>
diff --git a/arch/x86/kernel/kexec-bzimage64.c b/arch/x86/kernel/kexec-bzimage64.c
index 4243359ac509..e5f6f5128ced 100644
#!/bin/sh -xe
git clone https://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git kexec-tools
git clone --depth=1 https://src.fedoraproject.org/git/rpms/kexec-tools.git kexec-tools-spec
git clone --depth=1 https://github.com/pratyushanand/eppic.git
git clone -b devel --depth=1 git://git.code.sf.net/p/makedumpfile/code makedumpfile
GIT_VERSION_CMD="git describe --tags"
EPPIC_TAR_NAME="eppic-git.tar.xz"
MAKEDUMPFILE_TAR_NAME="makedumpfile-git.tar.xz"
KEXEC_TOOLS_TAR_NAME="kexec-tools-git.tar.xz"
@ryncsn
ryncsn / LCD1602A module using libgpiod
Created March 28, 2020 15:12
Minimal LCD1602A module using libgpiod and nothing else, tested on Raspberry Pi 4 running Fedora 31 with Raspberry Pi official kernel, used https://www.mbtechworks.com/projects/drive-an-lcd-16x2-display-with-raspberry-pi.html as reference
#!/usr/bin/python
# LCD1602A module using libgpiod
import time
import gpiod
class LCD1602A(object):
LCD_CHR = True # Character mode
LCD_CMD = False # Command mode
LCD_CMD_WAIT = 0.0005
Mar 04 02:29:53 kasong-rh-laptop usbguard-notifier[40110]: terminate called after throwing an instance of 'std::logic_error'
Mar 04 02:29:53 kasong-rh-laptop usbguard-notifier[40110]: what(): basic_string::_M_construct null not valid
Mar 04 02:29:53 kasong-rh-laptop audit[40110]: ANOM_ABEND auid=4294967295 uid=0 gid=0 ses=4294967295 subj=system_u:system_r:unconfined_service_t:s0 pid=40110 comm="usbguard-notifi" exe="/us>
Mar 04 02:29:53 kasong-rh-laptop audit: AUDIT1334 prog-id=307 op=LOAD
Mar 04 02:29:53 kasong-rh-laptop audit: AUDIT1334 prog-id=308 op=LOAD
Mar 04 02:29:53 kasong-rh-laptop audit: AUDIT1334 prog-id=309 op=LOAD
Mar 04 02:29:53 kasong-rh-laptop systemd[1]: Started Process Core Dump (PID 40114/UID 0).
Mar 04 02:29:53 kasong-rh-laptop audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-coredump@2-40114-0 comm="systemd" exe=>
Mar 04 02:29:53 kasong-rh-laptop systemd[1]: usbguard-notifier.service: Main process exited, code=dumped,
# vim: syntax=spec
%global gitcommit 2afaabc935f297be7134ee8a083fd848b70dde29
%global gitshortcommit %(c=%{gitcommit}; echo ${c:0:7})
%global snapshotdate 20200303
# keep dracutlibdir consistent with the definition in dracut.spec
%global dracutlibdir %{_prefix}/lib/dracut
%global dracutmoduledir %{dracutlibdir}/modules.d/99memstrack
Name: memstrack
# vim: syntax=spec
%global gitcommit 2b57bec3c2d6a4b66e349010235558389167d4d4
%global gitshortcommit %(c=%{gitcommit}; echo ${c:0:7})
%global snapshotdate 20200211
Name: memstrack
Version: 0
Release: 1%{snapshotdate}git%{gitshortcommit}%{?dist}
Summary: A memory allocation trace, like a hot spot analyzer for memory allocation
Group: Applications/System
# vim: syntax=spec
%global gitcommit 2b57bec3c2d6a4b66e349010235558389167d4d4
%global gitshortcommit %(c=%{gitcommit}; echo ${c:0:7})
%global snapshotdate 20200211
Name: memstrack
Version: 0
Release: 1%{snapshotdate}git%{gitshortcommit}%{?dist}
Summary: A memory allocation trace, like a hot spot analyzer for memory allocation
Group: Applications/System
How it called:
__DO_TRACE
it_func_ptr = rcu_dereference_raw((tp)->funcs);
((void(*)(proto))(it_func))(args)
perf_trace_##call
perf_trace_run_bpf_submit
perf_tp_event
perf_swevent_event
perf_swevent_overflow
__perf_event_overflow
[root@localhost ~]# kexec -e
[ 28.583381] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 28.590411] kexec_core: Starting new kernel
[ 28.601535] BUG: unable to handle kernel NULL pointer dereference at 000000000000003e
[ 28.601535] #PF error: [WRITE]
[ 28.601535] PGD 80000000e46cb067 P4D 80000000e46cb067 PUD f006e067 PMD 0
[ 28.601535] Oops: 0002 [#1] SMP PTI
[ 28.601535] CPU: 0 PID: 6338 Comm: kexec Kdump: loaded Not tainted 5.0.0-rc6+ #51
[ 28.601535] Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS Hyper-V UEFI Release v3.0 03/02/2018
[ 28.601535] RIP: 0010:0xffffc9000001d000