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
/**
*
*/
package com.example.weightplates;
import java.util.List;
import android.util.Log;
import java.util.Iterator;
@wmealing
wmealing / Verifying source to binary
Last active December 28, 2015 02:09
Complications.
=== Overview
Confirming the specified origin of a compiled binary is a complicated problem. Proving changes that either by malicious intent or by accidental occurrence is a complex undertaking when considering the the complexities of the questions involved. Due to these complexities this document assumes that the reader has a solid understanding of the compiling process and excellent understanding of underlying hardware components.
== Existing work done in this area
=== Proof carrying code
Proof carrying code (PCC) is a set of mechanisms that run on a host system to verify the properties of compiled code to a formal proof derived from the original source code. The host system verifies the validity of the proof by observing operations and comparing the conclusions to the formal proof to determine if a function is behaving within specifications. This in itself is useful to determine if the code behaves as per the original formal proof but not that policy/ proof hasn't been redefined or modified for the e
@wmealing
wmealing / compress.erl
Created April 4, 2014 00:49
Simple erlang example of compressing ranges using recursion.
%%%-------------------------------------------------------------------
%%% @author Wade Mealing <>
%%% Created : 2 Apr 2014 by Wade Mealing <>
%%%-------------------------------------------------------------------
-module(compress).
-include_lib("eunit/include/eunit.hrl").
%% user should only use compress/1
-export([compress/1, run_all_tests/0]).
diff --git a/fs/proc/array.c b/fs/proc/array.c
index 25b1ebc..b2d8d56 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -155,11 +155,33 @@ static inline const char *get_task_state(struct task_struct *tsk)
return *p;
}
+static int count_open_files(struct fdtable *fdt)
+{
diff --git a/fs/proc/array.c b/fs/proc/array.c
index 25b1ebc..b2d8d56 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -155,11 +155,33 @@ static inline const char *get_task_state(struct task_struct *tsk)
return *p;
}
+static int count_open_files(struct fdtable *fdt)
+{
@wmealing
wmealing / -
Last active August 29, 2015 14:02
diff --git a/fs/proc/array.c b/fs/proc/array.c
index 25b1ebc..300f52d 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -155,11 +155,27 @@ static inline const char *get_task_state(struct task_struct *tsk)
return *p;
}
+static int count_open_files(struct fdtable *fdt)
+{
diff --git a/fs/proc/array.c b/fs/proc/array.c
index 25b1ebc..3f9de99 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -155,11 +155,27 @@ static inline const char *get_task_state(struct task_struct *tsk)
return *p;
}
+static int count_open_files(struct fdtable *fdt)
+{
diff --git a/fs/proc/array.c b/fs/proc/array.c
index 25b1ebc..300f52d 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -155,11 +155,27 @@ static inline const char *get_task_state(struct task_struct *tsk)
return *p;
}
+static int count_open_files(struct fdtable *fdt)
+{
@wmealing
wmealing / C-states.md
Last active May 17, 2024 07:53
What are CPU "C-states" and how to disable them if needed?

To limit a CPU to a certain C-state, you can pass the processor.max_cstate=X option in the kernel line of /boot/grub/grub.conf.

Here we limit the system to only C-State 1:

    kernel /vmlinuz-2.6.18-371.1.2.el5 ... processor.max_cstate=1

On some systems, the kernel can override the BIOS setting, and the parameter intel_idle.max_cstate=0 may be required to ensure sleep states are not entered:

It may be possible to mitigate by enforcing bash to use privledged mode.

install the bash debuginfo

$ sudo debuginfo-install bash

install systemtap

$ sudo yum install systemtap