Skip to content

Instantly share code, notes, and snippets.

Avatar

Cel Skeggs celskeggs

View GitHub Profile
View gist:db24e886e63d7134ea2bbb9934c3184f
Implementation strategies:
- For loop with Duff's device
- `rep movsd` and similar
- mmx with movq on x86
- sse: movaps (16 byte aligned), caution about
https://stackoverflow.com/questions/3654905/faster-way-to-zero-memory-than-with-memset
@celskeggs
celskeggs / _README.md
Last active Dec 7, 2019
1-bit Serial Register supplementary data
View _README.md
@celskeggs
celskeggs / WORKSPACE
Created Dec 1, 2019
Can't build ceph with rules_foreign_cc
View WORKSPACE
# to reproduce: bazel build @ceph//:all
# will OOM
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "ceph",
url = "https://download.ceph.com/tarballs/ceph_14.2.4.orig.tar.gz",
sha256 = "7180b6afcac57d858f1b7cf49615e8903fbf1a701ae00fb956a5656d608fd0f8",
build_file_content = """filegroup(name = "all", srcs = glob(["**"]), visibility = ["//visibility:public"])""",
@celskeggs
celskeggs / 6480.md
Last active Dec 1, 2019
A set of publicly usable reproduction steps for #6480
View 6480.md

DON'T USE THIS; IT DOESN'T WORK

Reproducing bazelbuild/bazel#6480 in sipb/homeworld

We run pinned versions of bazel in a build chroot (which is run with systemd-nspawn).

(Recommended: using a debian stretch machine with passwordless sudo. A n1-standard-2 GCP instance should work.)

Take the following steps to set up and enter the build chroot:

@celskeggs
celskeggs / hellogo.txt
Created Nov 22, 2018
hellogo failures
View hellogo.txt
$ /hellogo
panic: unimplemented
fatal error: panic on system stack
fatal error: unimplemented
panic during panic
runtime stack:
runtime.throw(0x887f82, 0xd)
fatal error: malloc deadlock
stack trace unavailable
@celskeggs
celskeggs / db.py
Created Nov 13, 2018
hylock scripts
View db.py
import os
import sqlalchemy
import sqlalchemy.ext.declarative
import sqlalchemy.orm
SQLBase = sqlalchemy.ext.declarative.declarative_base()
class Locks(SQLBase):
__tablename__ = "locks"
name = sqlalchemy.Column(sqlalchemy.String(63), nullable=False, primary_key=True)
@celskeggs
celskeggs / chop-ccache.py
Created Feb 25, 2018
Parser and chopper for krb5 ccaches
View chop-ccache.py
def u16(data, index):
assert len(data) >= 2
return int.from_bytes(data[index:index+2], "big")
def u32(data, index):
assert len(data) >= 4
return int.from_bytes(data[index:index+4], "big")
def parse_header(header):
fields = []
@celskeggs
celskeggs / manifest.json
Created Feb 17, 2018
broken PodManifest for kvm stage1
View manifest.json
{
"acVersion": "0.8.9+git",
"acKind": "PodManifest",
"apps": [
{
"name": "kubedns",
"image": {
"id": "sha512-f281620f59eec9ff4dd26ce3995a52cd6372a615667db97061d876ee9186e4cc"
},
"app": {
@celskeggs
celskeggs / dmesg.txt
Created Jan 21, 2018
rcu_sched detected stalls info for hyades
View dmesg.txt
[81210.948409] INFO: rcu_sched detected stalls on CPUs/tasks:
[81210.951215] (detected by 1, t=15712987 jiffies, g=1158641, c=1158640, q=19)
[81210.954048] All QSes seen, last rcu_sched kthread activity 15712987 (4315195843-4299482856), jiffies_till_next_fqs=1, root ->qsmask 0x0
[81210.959599] qemu R running task 0 11176 777 0x00000008
[81210.959604] ffffffffac84a600 ffffffffabca2d7b ffff964a1fd18f80 ffffffffac84a600
[81210.959607] ffffffffabcde16c 0000000000000000 ffff964a06d04dc0 000000000011adf1
[81210.959609] 0000000000000000 0000000000000000 ffffffff00000000 00001e84d8b11400
[81210.959611] Call Trace:
[81210.959615] <IRQ>
[81210.959622] [<ffffffffabca2d7b>] ? sched_show_task+0xcb/0x130
@celskeggs
celskeggs / keybase.md
Last active Feb 10, 2016
keybase verification
View keybase.md

Keybase proof

I hereby claim:

  • I am celskeggs on github.
  • I am skeggsc (https://keybase.io/skeggsc) on keybase.
  • I have a public key ASAwS9Tpyu4plKdZwYJyUW_D2H-ISdlFeqncRNmoojxwJAo

To claim this, I am signing this object: {