Skip to content

Instantly share code, notes, and snippets.

@kev009
kev009 / pmap.diff
Created July 26, 2015 12:20
MFi386 - Fix FreeBSD mips debug build
diff --git a/sys/mips/mips/pmap.c b/sys/mips/mips/pmap.c
index 7ab4244..fb28a6b 100644
--- a/sys/mips/mips/pmap.c
+++ b/sys/mips/mips/pmap.c
@@ -3328,14 +3328,15 @@ void
pmap_pvdump(vm_offset_t pa)
{
register pv_entry_t pv;
+ pmap_t pmap;
vm_page_t m;
@kev009
kev009 / gist:69b563ded8820e439a6a
Created June 27, 2015 23:21
wanic 5434 first boot
Octeon SDK: Cavium Inc. OCTEON SDK version 2.3.0, build 427
Available Octeon features: SAAD ZIP CRYPTO PCIE KEY_MEMORY LED_CONTROLLER TRA MGMT_PORT RAID USB NO_WPTR MDIO_CLAUSE_45 NPEI
Copyright (c) 1992-2015 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 11.0-CURRENT #0 511fb8f(master): Sat Jun 27 03:12:59 MST 2015
kev009@kev-ws-aurora:/usr/home/kev009/c/freebsd-obj/mips.mips64/usr/home/kev009/c/freebsd/sys/WANIC mips
gcc version 4.2.1 20070831 patched [FreeBSD]
WARNING: WITNESS option enabled, expect reduced performance.
@kev009
kev009 / gist:13ba2e2a61d5b753d72b
Created May 13, 2015 06:41
net/libnss-cache bump
diff --git a/net/libnss-cache/Makefile b/net/libnss-cache/Makefile
index 13f8008..85c6a81 100644
--- a/net/libnss-cache/Makefile
+++ b/net/libnss-cache/Makefile
@@ -3,6 +3,7 @@
PORTNAME= libnss-cache
PORTVERSION= 0.13
+PORTREVISION= 1
CATEGORIES= net
(lldb) Process 96553 launched: '/usr/local/lib/kde4/libexec/kwin_opengl_test' (x86_64)
Process 96553 stopped
* (lldb) thread #1: tid = 101700, 0x0000000801a4835a, stop reason = invalid address (fault address: 0x800000082)
frame #0: 0x0000000801a4835a
-> 0x801a4835a: movq 0x80(%rax), %r12
0x801a48361: callq 0x801a666c0
0x801a48366: movq 0x262f03(%rip), %r14
0x801a4836d: movl %eax, %ebx
(lldb) bt
* thread #1: tid = 101700, 0x0000000801a4835a, stop reason = invalid address (fault address: 0x800000082)
@kev009
kev009 / gist:266d156eaf0104c4f217
Last active August 29, 2015 14:08
Xorg segfault
Core file '//Xorg.core' (x86_64) was loaded.
Process 0 stopped
* thread #1: tid = 0, 0x0000000802059c9a libc.so.7`__sys_thr_kill + 10, name = 'Xorg', stop reason = signal SIGABRT
frame #0: 0x0000000802059c9a libc.so.7`__sys_thr_kill + 10
libc.so.7`__sys_thr_kill + 10:
-> 0x802059c9a: jb 0x14b14c
0x802059ca0: ret
0x802059ca1: nop
0x802059ca2: nop
(lldb) bt
#include <stdio.h>
#include <zmq.h>
int main() {
void *ctx = zmq_ctx_new();
void *req = zmq_socket(ctx, ZMQ_REQ);
int rc;
int ipv6 = 1;

Keybase proof

I hereby claim:

  • I am kev009 on github.
  • I am kev009 (https://keybase.io/kev009) on keybase.
  • I have a public key whose fingerprint is CD7E 2DE8 954D 00DC FE10 F244 564F 9E31 DF9A 49CD

To claim this, I am signing this object:

@kev009
kev009 / dmesg
Last active August 29, 2015 13:56
lspci -vv and dmesg
$ dmesg
Copyright (c) 1992-2014 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 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014
[email protected]:/usr/obj/usr/src/sys/GENERIC amd64
FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
CPU: Intel(R) Xeon(R) CPU L5639 @ 2.13GHz (2133.45-MHz K8-class CPU)
Origin = "GenuineIntel" Id = 0x206c2 Family = 0x6 Model = 0x2c Stepping = 2
@kev009
kev009 / timer.c
Last active January 1, 2016 06:48
Testing kqueue precision
#include <sys/types.h>
#include <sys/event.h>
#include <sys/time.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h> /* for strerror() */
#include <unistd.h>
/* function prototypes */
void diep(const char *s);
package NNTP
import java.net.InetSocketAddress
import akka.actor._
class Client(destAddress: InetSocketAddress) extends Actor with ActorLogging {
val socket = IOManager(context.system).connect(destAddress)
val state = IO.IterateeRef.sync()
def receive = {