Skip to content

Instantly share code, notes, and snippets.

Event title:

Break your BSD kernel

Subtitle of the event

Fuzzing BSD kernel

Abstract

@gotoco
gotoco / getdentries.c
Last active October 12, 2019 23:10
getdentries
#include <fcntl.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <dirent.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/dirent.h>
@gotoco
gotoco / IOMMU_definitions.md
Last active March 31, 2024 12:25
Definitions of IOMMU specific parts

Accessed bit (A):

A bit in the page table that indicates the corresponding memory has been read or written. Usually set to 1 by hardware.

ACPI:

Advanced Configuration and Power Interface, a specification of industry-standard interfaces enabling OS-directed configuration and other management.

APIC:

Advanced programmable interrupt controller (see specifications under the model numbers

@gotoco
gotoco / .vimrc
Last active June 2, 2019 16:44
sample vimrc config
"mmpg basic setup:
" Basic stuff, without that vim is huge security hole:
set exrc
set secure
" Basic Project guidelines:
" set tabstop=4
" set softtabstop=4
" set shiftwidth=4
#set -g default-terminal "xterm-256color"
# Tmux settings
# Set XTerm key bindings
setw -g xterm-keys on
# Set colors
set-option -g default-terminal "screen-256color"
@gotoco
gotoco / .gitignore
Created December 6, 2016 13:32
Git ignore for C, C++, KS/US applications
# General rules
.*
*.o
*.o.*
*.a
*.s
*.ko
*.so
*.so.dbg
*.mod.c
@gotoco
gotoco / SingleBitsOpps.md
Last active November 13, 2016 20:34
Cheat Sheet about common bit operations [SO based]

Setting a bit

Use the bitwise OR operator (|) to set a bit.

number |= 1 << x; That will set bit x.

Clearing a bit

Use the bitwise AND operator (&) to clear a bit.

@gotoco
gotoco / template.cpp
Last active April 9, 2017 17:14
Google Code Jam Contests template file
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <string.h>
#include <strings.h>
#include <math.h>
#include <time.h>
#include <map>