Skip to content

Instantly share code, notes, and snippets.

@drakenclimber
drakenclimber / libseccomp v2.4.4 parisc64 syscall diff
Created July 31, 2020 15:43
libseccomp v2.4.4 parisc64 syscall diff
$ ./arch-syscall-validate ~/git/clean/upstream-torvalds/
--- parisc64 [library]
+++ parisc64 [system]
@@ -16,15 +16,10 @@
chown,180
chroot,61
clock_adjtime,324
-clock_adjtime64,405
clock_getres,257
-clock_getres_time64,406
@drakenclimber
drakenclimber / libcgroup-cgxget-example.c
Last active November 8, 2021 22:06
Example of how to use the newly proposed cgroup_cgxget() and cgroup_cgxset() C APIs.
#include <libcgroup.h>
#include <stdlib.h>
#define CGNAME "cgx_example"
#define CONTROLLER "cpu"
#define SETTING "cpu.shares"
#define VALUE "999"
static int other_interesting_calls(void)
{
@drakenclimber
drakenclimber / libcgroup-read-stats-example.c
Created December 17, 2021 15:52
libcgroup-read-stats-example.c
#include <libcgroup.h>
#include <stdlib.h>
#define CGPATH "stat_example/foo"
#define CONTROLLER "cpu"
int main(void)
{
struct cgroup_stat stat;
void *handle = NULL;
#ifndef _SECCOMP_RANGES_H
#define _SECCOMP_RANGES_H
#ifdef __cplusplus
extern "C" {
#endif
struct range ranges_x86_64_SCMP_KV_5_04[] = {
{0, 169},
{171, 334},
{424, 445},