Skip to content

Instantly share code, notes, and snippets.

@kostikbel
kostikbel / nfs_halfpage.c
Created July 23, 2017 09:43
nfs_halfpage
/* $Id: nfs_halfpage.c,v 1.2 2017/07/23 09:36:23 kostik Exp kostik $ */
#include <sys/fcntl.h>
#include <sys/mman.h>
#include <err.h>
#include <unistd.h>
int
main(int argc __unused, char *argv[])
{
/* $Id: rdgsbase.c,v 1.9 2017/08/13 16:22:01 kostik Exp kostik $ */
#include <sys/param.h>
#include <sys/sysctl.h>
#include <err.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <machine/sysarch.h>
@kostikbel
kostikbel / 1.txt
Created September 14, 2017 20:22
flix1 panic
Building the boot loader arguments PXE version 2.1, real mode entry point @950b:0106 BIOS 614kB/1738532kB available memory GDB: no debug ports present KDB: debugger backends: ddbr, Revision 1.1 KDB: current backend: ddb Aug 29 15:23:53 UTC 2016) Table 'FACP' at 0x6c540640.168.5.1 Table 'FPDT' at 0x6c540758o/flix1 Table 'FIDT' at 0x6c5407a0.0.0 Table 'UEFI' at 0x6c540840der.conf Table 'SPMI' at 0x6c5408a0x4e0ee8 data=0x58838+0x2902a8 syms=[0x8+0x7c308+0x8+0xTable 'UEFI' at 0x6c5408e8 Table 'MCFG' at 0x6c540930 0x748b0 at 0xcbc000
/* $Id: mvillard_nest.c,v 1.2 2017/09/15 14:33:30 kostik Exp kostik $ */
#include <sys/types.h>
#include <sys/syscall.h>
#include <sys/ucontext.h>
#include <machine/atomic.h>
#include <machine/segments.h>
#include <machine/sysarch.h>
#include <err.h>
#include <pthread.h>
@kostikbel
kostikbel / 1.patch
Last active September 21, 2017 11:06
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index f9d1d31394d..df4cb0a86bc 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -2215,15 +2215,21 @@ pmap_qremove(vm_offset_t sva, int count)
static __inline void
pmap_free_zero_pages(struct spglist *free)
{
+ struct pglist pgl;
vm_page_t m;
/* $Id: segnonp.c,v 1.4 2014/12/16 18:22:19 kostik Exp kostik $ */
#include <sys/param.h>
#include <sys/types.h>
#include <machine/segments.h>
#include <machine/sysarch.h>
#include <err.h>
#include <errno.h>
#include <signal.h>
#include <stdio.h>

Keybase proof

I hereby claim:

  • I am kostikbel on github.
  • I am kib (https://keybase.io/kib) on keybase.
  • I have a public key ASDzwPFf3sgwq_PYrgv-4OEMcIsTxzngqxIHun9wDmIJZQo

To claim this, I am signing this object:

/* $Id: beneath.c,v 1.1 2018/10/13 16:53:02 kostik Exp kostik $ */
#include <sys/stat.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#ifndef O_BENEATH
/* $Id: seek_hole.c,v 1.2 2012/05/26 04:50:22 kostik Exp kostik $ */
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include <fcntl.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* $Id: seek_hole2.c,v 1.1 2012/05/26 04:50:17 kostik Exp kostik $ */
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
static int
make_sparse(const char *name)