This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unsigned long fake_addr; | |
void fakraft_handler(unsigned long ip, unsigned long parent, struct ftrace_ops *ops, struct pt_regs *regs) | |
{ | |
if (fake_addr) | |
regs->ip = fake_addr; | |
} | |
static struct ftrace_ops fakraft_ops __read_mostly = { | |
.func = fakraft_handler, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/awk -f | |
# gen-insn-dic.awk: x86 Instruction dictionary generator | |
# | |
# Usage: awk -f gen-insn-dic.awk arch/x86/lib/x86-opcode-map.txt > x86-dic.tsv | |
# Awk implementation sanity check | |
function check_awk_implement() { | |
if (sprintf("%x", 0) != "0") | |
return "Your awk has a printf-format problem." | |
return "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print "HTTP/1.1 200 OK" | |
print "" | |
print "Hello GPIO" | |
function write_reg(addr,data) | |
fa.spi("cs",0) | |
fa.spi("write",0x20) | |
fa.spi("write",addr) | |
fa.spi("write",data) | |
fa.spi("cs",1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
THETA="http://192.168.1.1:80" | |
get_info() { | |
wget -q $THETA/osc/info -O - | jq . | |
} | |
get_state() { | |
wget -q --post-data="" $THETA/osc/state -O - | jq . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function write_reg(addr,data) | |
fa.spi("cs",0) | |
fa.spi("write",0x20) | |
fa.spi("write",addr) | |
fa.spi("write",data) | |
fa.spi("cs",1) | |
fa.spi("read"); | |
end | |
function read_reg(addr) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Docker Registry Client (for v2 API) | |
# | |
# Copyright (C) 2016 Masami Hiramatsu <masami.hiramatsu@gmail.com> | |
# This program is released under the MIT License, see LICENSE. | |
# | |
# prerequisites: curl jq sha256sum | |
set -ex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian:latest | |
MAINTAINER Masami Hiramatsu <mhiramat@kernel.org> | |
VOLUME /opt/work/ | |
ARG TOOL_VER=5.3-2016.02 | |
ENV HOST_ARCH=x86_64 | |
ENV CROSS_ARCH=aarch64 | |
ENV LINARO_GCC=gcc-linaro-$TOOL_VER-${HOST_ARCH}_${CROSS_ARCH}-linux-gnu | |
ENV LINARO_PATH=/opt/$LINARO_GCC/bin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ 3598.796564] ------------[ cut here ]------------ | |
[ 3598.796585] WARNING: CPU: 1 PID: 11956 at /home/mhiramat/ksrc/linux/fs/btrfs/inode.c:9820 btrfs_rename2+0x393/0x16e0 [btrfs] | |
[ 3598.796586] BTRFS: Transaction aborted (error -2) | |
[ 3598.796587] Modules linked in: bnep bluetooth fuse xt_addrtype br_netfilter xt_CHECKSUM ipt_MASQUERADE nf_nat_masquerade_ipv4 tun nf_conntrack_netbios_ns nf_conntrack_broadcast ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 xt_conntrack ebtable_nat ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw snd_usb_audio snd_usbmidi_lib snd_rawmidi vfat fat intel_rapl x86_pkg_temp_thermal coretemp kvm_intel kvm eeepc_wmi snd_hda_codec_realtek snd_hda_codec_generic asus_wmi snd_hda_codec_hdmi gspca_zc3xx sparse_keymap rfkill irqbypass iTCO_wd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git tag | grep -P '^(?!.*-).*(?=^v).*$' | while read ver; do git grep NAME $ver -- Makefile ; done | |
v2.6.11:Makefile:NAME=Woozy Numbat | |
v2.6.12:Makefile:NAME=Woozy Numbat | |
v2.6.13:Makefile:NAME=Woozy Numbat | |
v2.6.14:Makefile:NAME=Affluent Albatross | |
v2.6.15:Makefile:NAME=Sliding Snow Leopard | |
v2.6.16:Makefile:NAME=Sliding Snow Leopard | |
v2.6.17:Makefile:NAME=Crazed Snow-Weasel | |
v2.6.18:Makefile:NAME=Avast! A bilge rat! | |
v2.6.19:Makefile:NAME=Avast! A bilge rat! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# syscalls to be traced | |
SYSCALLS="futex poll epoll_wait select" | |
# fork vfork mmap open close write read" | |
function print_with_spaces { | |
local MAX=$1 | |
local STR=$2 | |
local L=$(($MAX - $(echo $STR | wc -c))) |
OlderNewer