Skip to content

Instantly share code, notes, and snippets.

View wmealing's full-sized avatar
💭
Take me home, country roads

Wade Mealing wmealing

💭
Take me home, country roads
  • Brisbane
View GitHub Profile
Source Summary
Total: 94%
Module Coverage %
plugin_event_manager 50%
plugin_manager 100%
plugin_manager_app 100%
plugin_manager_srv 100%
plugin_manager_sup 100%
@wmealing
wmealing / log-module-loads.stap
Created April 18, 2013 02:02
Quick systemtap to log which processes attempt to load kernel modules.
/* stap -vv log-module-loads.stap */
probe syscall.init_module {
cmdline = cmdline_str()
time = ctime(gettimeofday_s());
printf("%s - Process %s[%d] is loading a module via: '%s'\n", time, pexecname(), ppid(), cmdline );
}
global parent_id = target()
probe whatever {
if(ppid() == parent_id) {
printf("I am a child of the parent, roar !\n");
}
}
@wmealing
wmealing / nmi-interrupts.txt
Created May 6, 2013 03:45
NMI interrupts and the joy they bring.
A non-maskable interrupt (NMI) is an interrupt type which differs from standard interrupt mechanism by enforcing attention from the interrupt processor (usually the CPU). This solution discusses an NMI is in more depth and how they are handled.
### What is an Interrupt ? ###
Modern systems architecture has created tightly coupled connect between system components. Work for components can be handed off to a component for completion. Rather than wait for the component the main CPU can be tasked to do other pending work.
When the component has completed its work it will raise a signal to the main processor. The main processor considers this signal an "interrupt", as the current work on the CPU will be interrupted immediately Each component has a number assigned to it.
### Why "mask" an interrupt ? ###
#include <pcre.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
int i,rc;
const char *err;
int off;
-module(ee_rule).
-include_lib("eunit/include/eunit.hrl").
-behaviour(gen_server).
%% API
-export([start_link/0]).
%% gen_server callbacks
Customer Focus: Meets or exceeds criteria
Prioritization: Meets or exceeds criteria
Collaboration: Not observed
Communication: Meets or exceeds criteria
Plan of Action: Meets or exceeds criteria
Resolution: Meets or exceeds criteria
KCS: Meets or exceeds criteria
@wmealing
wmealing / gist:5754579
Last active December 18, 2015 08:29
Beat up the nfs , expose flip bug.. profit.
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#define MAXLEN 31
#define PATH_PREFIX "/tmp/fhleak-mnt"
@wmealing
wmealing / gist:6010054
Created July 16, 2013 16:00
Producer/Consumer fanout.
1> producer:start_link().
=INFO REPORT==== 17-Jul-2013::01:58:59 ===
Negotiated maximums: (Channel = 0, Frame = 131072, Heartbeat = 600)
{ok,<0.36.0>}
2> consumer:start_link(dog).
consumer: init
=INFO REPORT==== 17-Jul-2013::01:59:06 ===
Negotiated maximums: (Channel = 0, Frame = 131072, Heartbeat = 600)
{ok,<0.61.0>}
@wmealing
wmealing / gist:6525388
Last active December 22, 2015 20:19
FIPS enabled Red Hat Enterprise Linux 5 kernel fails to boot with "Error initializing NSS" message