Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View markmont's full-sized avatar

Mark Montague markmont

View GitHub Profile
@markmont
markmont / gmail-hide-hangouts.user.js
Last active May 4, 2020 20:35
Tampermonkey - hide Hangouts Meet section in GMail
// ==UserScript==
// @name GMail hide Hangouts Meet
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Hide the Google Hangouts Meet section in GMail
// @author Mark Montague <markmont@umich.edu>
// @match https://mail.google.com/*
// @run-at document-start
// @grant none
// ==/UserScript==
@markmont
markmont / m2-results.txt
Last active August 2, 2017 15:29
W^X test case using temporary file that is mmap()'d twice
#
# Run under Fedora 26 with SELinux enabled
#
# /tmp must not be mounted noexec for this to work.
#
[markmont@f26docker examples]$ sudo setsebool selinuxuser_execstack=off deny_execmem=on
[sudo] password for markmont:
[markmont@f26docker examples]$ gcc -o m2 m2.c
[markmont@f26docker examples]$ ./m2
(dynamic) code returned 42
@markmont
markmont / m1-results.txt
Created August 2, 2017 15:02
W^X using mmap() and mprotect()
#
# Run under Fedora 26 with SELinux enabled
#
[markmont@f26docker examples]$ sudo setsebool selinuxuser_execstack=off deny_execmem=on
[sudo] password for markmont:
[markmont@f26docker examples]$ gcc -o m1 m1.c
[markmont@f26docker examples]$ ./m1
mprotect failed to mark exec-only: Permission denied
markmont@f26docker examples]$ sudo grep denied /var/log/audit/audit.log | tail -1
type=AVC msg=audit(1501685251.234:287): avc: denied { execmem } for pid=14572 comm="m1" scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=process permissive=0
@markmont
markmont / moarvm-latest-dyncall.txt
Last active August 1, 2017 20:39
Successful update of MoarVM to latest dyncall
$ # Using Fedora 26 x86_64 with SELinux enabled
$ uname -a
Linux f26docker.catseye.org 4.11.11-300.fc26.x86_64 #1 SMP Mon Jul 17 16:32:11 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
$ # Turn off executable stacks:
$ sudo setsebool selinuxuser_execstack off
[sudo] password for markmont:
$ getsebool selinuxuser_execstack
selinuxuser_execstack --> off
$ # Use Rakudo Star for simple testing:
$ tar zxf rakudo-star-2017.07.tar.gz