Skip to content

Instantly share code, notes, and snippets.

View leitao's full-sized avatar

Breno Leitao leitao

  • Facebook/Meta
  • London, UK
View GitHub Profile
pwndbg> set exception-verbose on
Set whether to print a full stacktrace for exceptions raised in Pwndbg commands to 'on'
Traceback (most recent call last):
File "/home/leitao/Devel/pwndbg/pwndbg/gdblib/events.py", line 156, in caller
func()
File "/home/leitao/Devel/pwndbg/pwndbg/lib/memoize.py", line 45, in __call__
value = self.func(*args, **kwargs)
File "/home/leitao/Devel/pwndbg/pwndbg/gdblib/stack.py", line 81, in update
start, stop - start, 6 if not is_executable() else 7, 0, "[stack]"
File "/home/leitao/Devel/pwndbg/pwndbg/lib/memoize.py", line 45, in __call__
unstable ➜ bin sudo dmesg -c ; GLIBC_TUNABLES=glibc.elision.enable=0 find ; dmesg | grep find
[ 170.494187] HTM unavailable exception. Enabling it find
[ 170.497770] HTM unavailable exception. Enabling it dmesg
[ 170.498565] HTM unavailable exception. Enabling it grep
[ 170.503790] HTM unavailable exception. Enabling it git
[ 170.506438] HTM unavailable exception. Enabling it git
[ 170.509255] HTM unavailable exception. Enabling it git
[ 171.248050] HTM unavailable exception. Enabling it sudo
[ 171.255814] HTM unavailable exception. Enabling it dmesg
.
commit 2ee2270e6f40173cbb1e2bfd4a073e7cf7469f30 (HEAD -> tbs2)
Author: Breno Leitao <leitao@debian.org>
Date: Mon Jun 18 09:40:09 2018 -0400
powerpc/reg: Enable __MASK to be 64bits wide.
Currently __MASK is defined as type unsigned log (UL), which does not seem
correct, since this is mask to be used against MSR, which is 64-bits wide even
on 32 bits mode.
ofwbus0: <ibm,secureboot> compat ibm,secureboot-v2 (no driver attached)
ofwbus0: <imc-counters> compat ibm,opal-in-memory-counters (no driver attached)
simplebus0: <lpc-controller@c0012000> mem 0xc0012000-0xc00120ff compat ibm,power9-lpc-controller (no driver attached)
simplebus0: <lpc@0> compat ibm,power9-lpc (no driver attached)
simplebus0: <opb-arbiter@c0011000> mem 0xc0011000-0xc0011007 compat ibm,power9-lpcm-opb-arbiter (no driver attached)
simplebus0: <opb-master@c0010000> mem 0xc0010000-0xc001005f compat ibm,power9-lpcm-opb-master (no driver attached)
pci0: <OFW PCI bus> on pcib0
pci0: domain=0, physical bus=0
found-> vendor=0x1014, dev=0x04c1, revid=0x00
domain=0, bus=0, slot=0, func=0
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2018 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 12.0-CURRENT #325 fcb03d4b267(master): Fri Jun 8 15:10:51 CET 2018
root@free8:/usr/obj/root/kernel/freebsd/powerpc.powerpc64/sys/BRENO powerpc
gcc version 4.2.1 20070831 patched [FreeBSD]
WARNING: WITNESS option enabled, expect reduced performance.
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2018 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 12.0-CURRENT #325 fcb03d4b267(master): Fri Jun 8 15:10:51 CET 2018
root@free8:/usr/obj/root/kernel/freebsd/powerpc.powerpc64/sys/BRENO powerpc
gcc version 4.2.1 20070831 patched [FreeBSD]
WARNING: WITNESS option enabled, expect reduced performance.
xiting petitboot. Type 'exit' to return.
You may run 'pb-sos' to gather diagnostic data
/ # wget http://9.8.234.221/md
Connecting to 9.8.234.221 (9.8.234.221:80)
md 100% |*******************************| 35840k 0:00:00 ETA
/ # wget http://9.8.234.221/breno
Connecting to 9.8.234.221 (9.8.234.221:80)
breno 100% |*******************************| 18403k 0:00:00 ETA
/ # kexec -l breno -i md --append "-v"
/ # kexec -e
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2018 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 12.0-CURRENT #325 fcb03d4b267(master): Fri Jun 8 15:10:51 CET 2018
root@free8:/usr/obj/root/kernel/freebsd/powerpc.powerpc64/sys/BRENO powerpc
gcc version 4.2.1 20070831 patched [FreeBSD]
WARNING: WITNESS option enabled, expect reduced performance.
dev/ofw: Fix return values
Fix the behavior of this implementation according to the documentation of
OF_getprop()
Submitted by: Luis Pires <lffpires@ruabrasil.org>
Differential Revision: https://reviews.freebsd.org/D15680
Approved by: manu, jhibbits
md: use prestaged mfs_root
On PowerNV systems, the rootfs is passed through kexec, which loads the rootfs
into memory and set two fdt entries to describe where the file is located in
the memory;
I need to pass this memory region to the md device as a mfs_root, but, current
md driver does not support two things:
* Just getting a pointer from an external (bootloader) memory. If I need to