Skip to content

Instantly share code, notes, and snippets.

@opntr
opntr / patch.diff
Created September 2, 2017 20:36
patch.diff
diff --git a/sys/dev/virtio/block/virtio_blk.c b/sys/dev/virtio/block/virtio_blk.c
index 7b273641a5dd..fb2ef9566b5d 100644
--- a/sys/dev/virtio/block/virtio_blk.c
+++ b/sys/dev/virtio/block/virtio_blk.c
@@ -999,7 +999,7 @@ vtblk_drain_vq(struct vtblk_softc *sc)
{
struct virtqueue *vq;
struct vtblk_request *req;
- int last;
+ uint16_t last;
@opntr
opntr / tar-pie-error.txt
Created August 6, 2016 17:28
tar-pie-error.txt
root@pandora-d tests# pwd
/usr/src/usr.bin/tar/tests
root@pandora-d tests# make
(cd /usr/src/usr.bin/tar/tests && NO_SUBDIR=1 make -f /usr/src/usr.bin/tar/tests/Makefile _RECURSING_PROGS=t PROG=bsdtar_test DEPENDFILE=.depend.bsdtar_test .MAKE.DEPENDFILE=.depend.bsdtar_test )
cc -O2 -pipe -pipe -march=core-avx2 -DHARDENEDBSD -DPLATFORM_CONFIG_H=\"/usr/src/lib/libarchive/config_freebsd.h\" -static -I/usr/src/lib/libarchive -I/usr/obj/usr/src/usr.bin/tar/tests -I/usr/src/contrib/libarchive/tar -I/usr/src/contrib/libarchive/test_utils -fPIE -std=gnu99 -Qunused-arguments -fstack-protector -pie -Wl,-z,relro -Wl,-z,now -o bsdtar_test test_0.o test_basic.o test_copy.o test_empty_mtree.o test_extract_tar_bz2.o test_extract_tar_grz.o test_extract_tar_gz.o test_extract_tar_lrz.o test_extract_tar_lz.o test_extract_tar_lz4.o test_extract_tar_lzma.o test_extract_tar_lzo.o test_extract_tar_xz.o test_format_newc.o test_help.o test_leading_slash.o test_missing_file.o test_option_C_upper.o test_option_H_upper.o test_o
@opntr
opntr / make.conf
Last active October 23, 2015 10:30
make.conf
#CPUTYPE?=core-avx2
#COPTFLAGS+= -fno-delete-null-pointer-checks # defined in bsd.kernel.pre - OP
CFLAGS+= -pipe
#CFLAGS+= -fno-delete-null-pointer-checks
WITH_PIE=yes
OPTIONS_GALLIUM=yes
#KERNCONF=OP-DEBUG
@opntr
opntr / objdump -dr rettofunc2.o
Created September 30, 2015 07:18
objdump -dr rettofunc2.o
op@opn paxtest-freebsd> objdump -dr rettofunc2.o
rettofunc2.o: file format elf64-x86-64-freebsd
Disassembly of section .text:
0000000000000000 <doit>:
0: 55 push %rbp
1: 48 89 e5 mov %rsp,%rbp
4: 48 83 ec 10 sub $0x10,%rsp
@opntr
opntr / www-firefox-esr.diff
Last active August 29, 2015 14:26
firefox megtisztitasa
op@pandora-d firefox-esr> git diff origin/master.. -- .
diff --git a/www/firefox-esr/Makefile b/www/firefox-esr/Makefile
index 7fa48d2..bf16179 100644
--- a/www/firefox-esr/Makefile
+++ b/www/firefox-esr/Makefile
@@ -16,27 +16,24 @@ COMMENT= Web browser based on the browser portion of Mozilla
BUILD_DEPENDS= nspr>=4.10.8:${PORTSDIR}/devel/nspr \
nss>=3.19.2:${PORTSDIR}/security/nss \
libevent2>=2.0.21_2:${PORTSDIR}/devel/libevent2 \
- cairo>=1.12.16_1,2:${PORTSDIR}/graphics/cairo \
@opntr
opntr / aslr+
Created April 15, 2015 15:33
HardenedBSD v19 - aslr+
op@opn ~/paxtest-0.9.11> ./paxtest kiddie
PaXtest - Copyright(c) 2003,2004 by Peter Busser <peter@adamantix.org>
Released under the GNU Public Licence version 2 or later
Writing output to paxtest.log
It may take a while for the tests to complete
Test results:
PaXtest - Copyright(c) 2003,2004 by Peter Busser <peter@adamantix.org>
Released under the GNU Public Licence version 2 or later
@opntr
opntr / gist:c96b83fa81dfa3804adb
Created January 27, 2015 20:39
szarmentes firefox-esr
diff --git a/www/firefox-esr/Makefile b/www/firefox-esr/Makefile
index 43f810d..f14c973 100644
--- a/www/firefox-esr/Makefile
+++ b/www/firefox-esr/Makefile
@@ -24,18 +24,17 @@ BUILD_DEPENDS= nspr>=4.10.6:${PORTSDIR}/devel/nspr \
libvpx>=1.3.0:${PORTSDIR}/multimedia/libvpx \
sqlite3>=3.8.4.2:${PORTSDIR}/databases/sqlite3 \
${PYTHON_PKGNAMEPREFIX}sqlite3>0:${PORTSDIR}/databases/py-sqlite3 \
- v4l_compat>0:${PORTSDIR}/multimedia/v4l_compat \
autoconf-2.13:${PORTSDIR}/devel/autoconf213 \
It may take a while for the tests to complete
Test results:
PaXtest - Copyright(c) 2003,2004 by Peter Busser <peter@adamantix.org>
Released under the GNU Public Licence version 2 or later
Mode: blackhat
FreeBSD hardenedbsd 11.0-CURRENT FreeBSD 11.0-CURRENT #1 c53c532(hardened/current/master): Sun Nov 16 16:49:24 CET 2014 root@hardenedbsd:/usr/obj/usr/src/sys/HARDENEDBSD amd64
Executable anonymous mapping : Killed
Executable bss : Killed
{+hide-user-agent{Mozilla/5.0 (X11; U; en-US; rv:9.9.9.9) Gecko/99999999 Firefox/17.10.100}}
/
{+redirect{s@http://@https://@}}
#www.otpbank.hu
.facebook.com
#.otpbank.hu
#.otp.hu
#otp.hu
FILTER: velvet-korhataros Velvet korhataros body class filter
s/(<body [^>]*)korhataros(.*)/$1$2/ig
FILTER: hu-adverticum-div Tipikusan index.hu es kornyeke megtisztitasa
s/(<div [^>]*)goAdverticum(.*)/$1itt_lenne_adverticumos_ize$2/ig