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: Tom Herbert <therbert@google.com> | |
Subject: net: backport SO_REUSEPORT patch to fix load imbalance among listen sockets | |
Patch-mainline: In house | |
References: | |
http://permalink.gmane.org/gmane.linux.network/158320 | |
This patch implements so_reuseport (SO_REUSEPORT socket option) for | |
TCP and UDP. For TCP, so_reuseport allows multiple listener sockets | |
to be bound to the same port. In the case of UDP, so_reuseport allows |
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
#!/usr/bin/env python | |
import random | |
class CurveFp( object ): | |
def __init__( self, p, a, b ): | |
self.__p = p | |
self.__a = a | |
self.__b = b | |
def p( self ): |
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 | |
# Live Ubuntu Backup V2.2, Nov 4th,2009 | |
# Copyright (C) 2009 billbear <billbear@gmail.com> | |
# This program is free software; you can redistribute it and/or modify it | |
# under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 2 of the License, | |
# or (at your option) any later version. | |
# |
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
# use -b to put in background | |
wget http://download2-developer.amd.com/amd/Stream20GA/icd-registration.tgz | |
tar zxvf icd-registration.tgz | |
mkdir -p /etc/OpenCL/vendors/ | |
cp etc/OpenCL/vendors/atiocl64.icd /etc/OpenCL/vendors/atiocl64.icd | |
wget http://download2-developer.amd.com/amd/APPSDK/AMD-APP-SDK-v2.4-lnx64.tgz | |
cd /opt | |
tar zxvf ~/AMD-APP-SDK-v2.4-lnx64.tgz # or path |
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
# modified from pysync | |
_BASE=65521 # largest prime smaller than 65536 | |
_NMAX=5552 # largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 | |
_OFFS=1 # default initial s1 offset | |
# fcicq: _NMAX is embedded in zlib's adler32 for one pass calculation, | |
# and we mainly do the rolling hash, so _NMAX is not used here. | |
import zlib | |
class adler32: | |
def __init__(self,data=''): |
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 | |
# this is /etc/libvirt/hooks/qemu | |
# see also http://wiki.libvirt.org/page/Networking#Forwarding_Incoming_Connections | |
HOST_PORT="17000:17030" | |
GUEST_IP="192.168.122.2" | |
COMMAND_1="iptables -t nat -D PREROUTING -p tcp --dport ${HOST_PORT} -j DNAT --to ${GUEST_IP}" | |
COMMAND_2="`echo \"${COMMAND_1}\" | sed -e \"s/tcp/udp/\"`" | |
COMMAND_3="iptables -D FORWARD -p tcp -d ${GUEST_IP}/32 -m state --state NEW -m tcp --dport ${HOST_PORT} -j ACCEPT" | |
COMMAND_4="iptables -D FORWARD -p udp -d ${GUEST_IP}/32 -m udp --dport ${HOST_PORT} -j ACCEPT" |
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
[8755143.193404] BUG: soft lockup - CPU#1 stuck for 22s! [nginx:9811] | |
[8755143.194729] Process nginx (pid: 9811, ti=ec4ae000 task=eb64f230 task.ti=eac0c000) | |
[8755143.195964] Stack: | |
[8755143.197155] Call Trace: | |
[8755143.198350] <IRQ> | |
[8755143.199669] Code: cc cc cc cc b8 1c 00 00 00 cd 82 c3 cc cc cc cc cc cc cc cc cc cc | |
cc cc cc cc cc cc cc cc cc cc cc cc cc cc b8 1d 00 00 00 cd 82 <c3> cc cc cc cc cc cc cc | |
cc cc cc cc cc cc cc cc cc cc cc cc cc |
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
# usage: qemu-kvm -acpitable file=FILE/TO/374/BYTES/SLIC/BIN | |
# You may wish to modify the path to your own | |
SLIC_PATH="" | |
if [ "${SLIC_PATH}" == "" ]; then | |
SLIC_PATH="/sys/firmware/acpi/tables/SLIC" | |
fi | |
git clone git://github.com/ghuntley/seaslic | |
cd seaslic |
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
This patch adds configuration for DMI configuration data. | |
This is useful if you want to run SeaBIOS on real Hardware, | |
and the OS selects drivers based on hw manufacturer/model. | |
Signed-off-by: Sven Schnelle <svens at stackframe.org> | |
--- | |
src/Kconfig | 26 ++++++++++++++++++++++++++ | |
src/config.h | 1 - | |
src/smbios.c | 15 +++++++-------- | |
3 files changed, 33 insertions(+), 9 deletions(-) |
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
# GF(2^8) by http://www.samiam.org/galois.html | |
def generate_table(): | |
table = [0] * 256 | |
ltable = [0] * 256 | |
a = 1 | |
for c in range(256): | |
table[c] = a | |
d = a & 0x80 | |
a = (a << 1) & 0xff | |
if d == 0x80: a ^= 0x1b |