Skip to content

Instantly share code, notes, and snippets.

View mbs0221's full-sized avatar
🏠
Working

Benshan Mei mbs0221

🏠
Working
View GitHub Profile
AMD EPYC 7V12 64-Core Processor
using System;
using System.Runtime.InteropServices;
using static LowSharp;
namespace LLVM
{
#region Enums
//LLVMVerifierFailureAction
public enum LLVMVerifierFailureAction : Int32
{
@mbs0221
mbs0221 / simple_socket_example.c
Created April 14, 2023 15:14 — forked from browny/simple_socket_example.c
simple socket example in C
/* --- Usage --- */
g++ server.c -o server
g++ client.c -o client
./server
./client 127.0.0.1
/* --- server.c --- */
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
@mbs0221
mbs0221 / cissp_notes.md
Created May 25, 2022 16:36 — forked from penafieljlm/cissp_notes.md
Personal CISSP Study Notes

CISSP Notes

CIA Triad

  • Confidentiality
    • Resources should be protected from unauthorized access
    • Prioritized by governments
    • Concepts
      • Sensitivity
        • How harmful is disclosure
  • Discretion
@mbs0221
mbs0221 / tsx.cpp
Created May 12, 2022 11:42 — forked from JimChengLin/tsx.cpp
Intel TSX simple benchmark
#include <atomic>
#include <chrono>
#include <immintrin.h>
#include <iostream>
#include <thread>
struct Node {
Node * prev{};
Node * next{};
};
@mbs0221
mbs0221 / check_cet_supported.c
Created May 12, 2022 11:28 — forked from kohnakagawa/check_cet_supported.c
Checks whether your cpu supports Intel CET or not (Linux).
#include <stdio.h>
#include <cpuid.h>
#include <stdint.h>
int cpu_supports_cet_shadow_stack() {
uint32_t eax = 0, ebx = 0, ecx = 0, edx = 0;
__cpuid_count(7, 0, eax, ebx, ecx, edx);
return (ecx & (1 << 7)) != 0;
}