Skip to content

Instantly share code, notes, and snippets.

View mizhka's full-sized avatar

Michael Zhilin mizhka

  • PostgresPro
  • Moscow
View GitHub Profile
db> bt
Tracing pid 215 tid 100061 td 0x80862b40
[kernel] kdb_enter+0x48 (?,?,?,?) ra 8018e6e4 sp c0473b90 sz 24 subr 8018e594
[kernel] kdb_sysctl_enter+0xbc (?,?,?,?) ra 8014f7b0 sp c0473ba8 sz 48 subr 8018e628
[kernel] sysctl_root_handler_locked+0xa4 (?,?,?,?) ra 8014fa78 sp c0473bd8 sz 56 subr 8014f70c
[kernel] sysctl_root+0xd8 (?,?,?,?) ra 8014fed4 sp c0473c10 sz 96 subr 8014f9a0
[kernel] userland_sysctl+0x110 (80862b40,?,?,?) ra 80150184 sp c0473c70 sz 112 subr 8014fdc4
[kernel] sys___sysctl+0xac (?,?,?,?) ra 80349874 sp c0473ce0 sz 168 subr 801500d8
[kernel] trap+0x1000 (?,?,?,?) ra 80336304 sp c0473d88 sz 248 subr 80348874
[kernel] MipsUserGenException+0x10c (?,?,?,?) ra 00000000 sp c0473e80 sz 0 subr 803361f8
Tracing pid 207 tid 100060 td 0x806c6780
[kernel] kdb_enter+0x48 (?,?,?,?) ra 8018e6e4 sp c04f5b90 sz 24 subr 8018e594
[kernel] kdb_sysctl_enter+0xbc (?,?,?,?) ra 8014f7b0 sp c04f5ba8 sz 48 subr 8018e628
[kernel] sysctl_root_handler_locked+0xa4 (?,?,?,?) ra 8014fa78 sp c04f5bd8 sz 56 subr 8014f70c
[kernel] sysctl_root+0xd8 (?,?,?,?) ra 8014fed4 sp c04f5c10 sz 96 subr 8014f9a0
[kernel] userland_sysctl+0x110 (806c6780,?,?,?) ra 80150184 sp c04f5c70 sz 112 subr 8014fdc4
[kernel] sys___sysctl+0xac (?,?,?,?) ra 80349874 sp c04f5ce0 sz 168 subr 801500d8
[kernel] trap+0x1000 (?,?,?,?) ra 80336304 sp c04f5d88 sz 248 subr 80348874
[kernel] MipsUserGenException+0x10c (?,?,?,?) ra 00000000 sp c04f5e80 sz 0 subr 803361f8
--- exception, cause 4ea420 badvaddr 25 ---
/usr/local/lib/libwebkit2gtk-4.0.so.37: Undefined symbol "soup_auth_negotiate_supported"
/usr/local/lib/libwebkit2gtk-4.0.so.37: Undefined symbol "soup_auth_negotiate_supported"
U-Boot 1.1.3 (Jul 8 2013 - 10:13:26)
Board: Ralink APSoC DRAM: 32 MB
relocate_code Pointer at: 81fb4000
******************************
Software System Reset Occurred
******************************
spi_wait_nsec: 42
spi device id: c2 20 16 c2 20 (2016c220)
find flash: MX25L3205D
@mizhka
mizhka / old-mips-malloc-init-issue.lst
Created February 14, 2018 23:16
old-mips-malloc-init-issue.lst
CFE> boot -tftp 192.168.1.2:/kernel.BCM.tramp.bin -raw -max=0x700000 -addr=0x80900000
Loader:raw Filesys:tftp Dev:eth0 File:192.168.1.2:/kernel.BCM.tramp.bin Options:(null)
Loading: CFE works as TFTP Client.
.......TFTP_BLKLEN!!
break!! last block!!
.. 5419928 bytes read
Entry at 0x80900000
Closing network.
Starting program at 0x80900000
entry: mips_init()
@mizhka
mizhka / gist:d26481c21ceaab93516ad73842ce70b6
Created May 14, 2019 12:18
Poor Man FreeBSD DDB stacktraces
CODE:
int debug = 1;
sysctlbyname("debug.kdb.enter", NULL, NULL, &debug, sizeof(debug));
WHERE:
libc - abort
login - bail
dig, host - fetches DNS information
fuser - displays the PIDs of processes using the specified files or file systems.
gcore - generate a core file of a running program
gdb - allow you to see what is going on ''inside'' another program / coredump
iotop - watches I/O usage information output and displays a table of current I/O usage by processes or threads on the system
lftp - a file transfer program that allows sophisticated ftp, http and other connections to other hosts (including parallel transfer)
lsof - lists on its standard output file information about files opened by processes
nc - networking utility for reading from and writing to network connections using TCP or UDP
nmon - a huge amount of important performance information in one go
pbzip2 - a parallel implementation of the bzip2 block-sorting file compressor that uses pthreads and achieves near-linear speedup on SMP machines
@mizhka
mizhka / gist:0e1461c360b133d526ebe0854635cf44
Created May 20, 2019 07:32
WHR-300 FreeBSD firmware - entropy
% binwalk -E whr300-tftp-noheader.bin
WARNING: Failed to import pyqtgraph module, visual entropy graphing will be disabled
DECIMAL HEXADECIMAL ENTROPY
--------------------------------------------------------------------------------
0 0x0 Rising entropy edge (0.985684)
1392640 0x154000 Falling entropy edge (0.000000)
1443840 0x160800 Rising entropy edge (0.989380)
3745792 0x392800 Falling entropy edge (0.693819)
GOOD:
ar7240> erase 0xbf040000 +0x160000
Erase Flash from 0xbf040000 to 0xbf19ffff in Bank # 1
First 0x40 last 0x19f sector size 0x1000
400
Erased 352 sectors
ar7240> cp.b 0x81000000 0xbf040000 0x160000
Copy to Flash...
Copy 1441792 byte to Flash... write addr: bf040000
BUFFALO U-BOOT Ver 1.03
AP93 (ar7240) U-boot
sri
=====================================================================================================================================
TAP CALC (read_cnt=512)
----+--------------------------------------------------------------------------------------------------------------------------------
TAP | 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
----+--------------------------------------------------------------------------------------------------------------------------------
FAIL| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 512 512 512 512 512 512 512 512 512 512 51