Skip to content

Instantly share code, notes, and snippets.

View lenage's full-sized avatar

Yuan He lenage

View GitHub Profile
lenage / XZ Backdoor Analysis
Created April 2, 2024 12:08 — forked from smx-smx/XZ Backdoor Analysis
[WIP] XZ Backdoor Analysis and symbol mapping
XZ Backdoor symbol deobfuscation. Updated as i make progress
lenage / example.proto
Last active October 26, 2022 04:57
I18n your text field
// byted/api/i18n.proto
extend google.protobuf.FieldOptions {
// A Language annoation of a field
// in protobuf messages.
// Examples:
// string name = 1 [(byted.api.language)="en"];
// string desc = 2 [(byted.api.language)="en",
// (byted.api.language)="zh"];


This document was originally written several years ago. At the time I was working as an execution core verification engineer at Arm. The following points are coloured heavily by working in and around the execution cores of various processors. Apply a pinch of salt; points contain varying degrees of opinion.

It is still my opinion that RISC-V could be much better designed; though I will also say that if I was building a 32 or 64-bit CPU today I'd likely implement the architecture to benefit from the existing tooling.

Mostly based upon the RISC-V ISA spec v2.0. Some updates have been made for v2.2

Original Foreword: Some Opinion

The RISC-V ISA has pursued minimalism to a fault. There is a large emphasis on minimizing instruction count, normalizing encoding, etc. This pursuit of minimalism has resulted in false orthogonalities (such as reusing the same instruction for branches, calls and returns) and a requirement for superfluous instructions which impacts code density both in terms of size and

lenage / gist:4b9315654af7064b13b7b037135eaf88
Created October 26, 2018 07:21 — forked from jimbojsb/gist:1630790
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

---- darwin
lenage / fnv_example.go
Created March 31, 2017 01:55
golang fnv example
package main
import (
lenage / ss-ignore.list
Created January 4, 2017 08:14
Shadowsock ignore list
lenage / feature.swagger.json
Created November 14, 2016 12:32
swagger JSON example
"swagger": "2.0",
"info": {
"title": "feature.proto",
"version": "version not set"
"schemes": [
lenage / dnscrypt.csv
Created July 30, 2016 04:29
DNScrypt server list
We can make this file beautiful and searchable if this error is corrected: It looks like row 5 should actually have 14 columns, instead of 6. in line 4.
Name,Full name,Description,Location,Coordinates,URL,Version,DNSSEC validation,No logs,Namecoin,Resolver address,Provider name,Provider public key,Provider public key TXT record
4armed,4ARMED,DNSCrypt Server provided by,France,,,1,yes,yes,no,,,FD3E:5887:63EA:17A9:1AF8:4325:DE82:1507:6ED0:01AB:2F9E:55DE:689B:F491:4D8E:526E,
cisco,Cisco OpenDNS,Remove your DNS blind spot,Anycast,,,1,no,no,no,,,B735:1140:206F:225D:3E2B:D822:D7FD:691E:A1C3:3CC8:D666:8D0C:BE04:BFAB:CA43:FB79,
cisco-familyshield,Cisco OpenDNS with FamilyShield,Blocks web sites not suitable for children,Anycast,,,1,no,no,no,,,B735:1140:206F:225D:3E2B:D822:D7FD:691E:A1C3:3CC8:D666:8D0C:BE04:BFAB:CA43:FB79,
cisco-ipv6,Cisco OpenDNS over IPv6,Cisco OpenDNS IPv6 sandbox,Anycast,,https://www.op