SYSTEMS · COMPILERS · LINUX KERNEL

Ridham Khurana

Linux kernel drivers, GCC, and compilers built from the ground up.

CODE IN LINUX 7.3, 7.4 AND GCC 17

01 — UPSTREAM

Patches merged into or applied for the Linux kernel and GCC.

  • Model getenv() in -fanalyzer — GCC 17

    Taught GCC's static analyzer that getenv() can return NULL, splitting analysis into NULL and non-NULL paths so unchecked uses of environment variables get diagnosed.

    Project: GCC · Subsystem: analyzer · Commit: 01b6074a70cf

  • Fix runtime PM leak on request error path — LINUX 7.3

    A failed pm_runtime_get_sync() left the usage counter incremented, so the GPIO controller could never runtime-suspend.

    Project: LINUX · Subsystem: gpio: zynq · Commit: e9438ab5328a

  • Fix runtime PM leak on request error path — LINUX 7.3

    Same class of leak in the AXI GPIO driver: the controller could never runtime-suspend and its clock stayed permanently enabled.

    Project: LINUX · Subsystem: gpio: xilinx · Commit: ff82fc3a4a1d

  • Fix out-of-bounds read for TPS65224 BUCK2-4 — LINUX 7.3

    BUCK2-4 declared four voltage ranges against a two-entry table, so the regulator core read past the end of the array at registration.

    Project: LINUX · Subsystem: regulator: tps6594 · Commit: 2f15518682c7

  • Fix negative temperature conversion — HWMON TREE

    A 15-year-old bug: negative readings and offsets lost their fractional part. Fixed by decoding the register pair as a 16-bit two's complement value.

    Project: LINUX · Subsystem: hwmon: lm95245 · Commit: f58c16056f85

  • Fix rounding of negative temperatures — HWMON TREE

    Every negative reading across five sensor variants was one step too warm. Replaced truncating division with an arithmetic right shift.

    Project: LINUX · Subsystem: hwmon: lm70 · Commit: eddb0aaacce4

  • Normalize return value of get() — LINUX 7.4

    The get() callback returned raw register bits instead of the strict 0/1 the gpio_chip API requires.

    Project: LINUX · Subsystem: gpio: siox · Commit: 209fcf625880

  • Add missing MODULE_DEVICE_TABLE() — LINUX 7.4

    Without the device table the module was never autoloaded when the MCU was probed from the device tree.

    Project: LINUX · Subsystem: platform: turris-omnia-mcu · Commit: 59797443846b

02 — PROJECTS

Projects

Compilers and systems tools built from scratch.

Compilers

  • RM-x86-64-Forge — Optimizing Backend (Jul 2026)

    An optimizing x86-64 compiler backend that lowers an intermediate representation to two-address x86-64 assembly.

    • Instruction selection and lowering from IR to two-address x86-64 instructions.
    • Control-flow graph construction and liveness analysis, driving dead-code elimination.
    • Chaitin-style graph-coloring register allocator: interference graph construction, coloring, and spill-code rewriting.

    C++ · Register allocation · Liveness · x86-64

  • RMc7 — Production C Compiler (Dec 2025 — Present)

    A production-oriented C compiler in C++17 targeting 90–95% ISO C coverage, built on a modular, type-driven architecture.

    • Lexer with ~140 token types; recursive-descent parser with 15-level operator precedence.
    • Complex declarators, typedef expansion, and recursive type resolution.
    • Declarations, expressions, statements, functions, structs, unions, and enums, validated by 1,100+ tests at a 100% pass rate.

    C++17 · ISO C frontend · Type systems

  • RMc4 — C Compiler in C (Oct — Nov 2025)

    A C compiler written in C, end to end: from source to x86-64 assembly.

    • Tokenizer, recursive-descent parser, and typed AST with correct operator precedence and structured error reporting.
    • Semantic analysis and type checking, lowering to three-address code (TAC).
    • Optimization passes over TAC and x86-64 code generation.

    C · TAC · Optimization · x86-64

Also built

03 — EXPERIENCE

  • Linux Kernel Mentee — The Linux Foundation

    Jun 2026 — Present

    • Fixing driver bugs upstream across gpio, hwmon, regulator, and platform subsystems via mailing-list review with maintainers.
    • Root-causing defects from kernel git history and hardware datasheets; fixes tagged for stable backports.
    • Validating patches with native arm64 builds, checkpatch, W=1, and QEMU-emulated hardware.
  • Summer Research Intern — Indian Statistical Institute, Kolkata

    May — Jul 2025

    • Modified the Dilithium signature scheme: hash-function substitution, expanded challenge coefficients, and altered rejection sampling.
    • Implemented and benchmarked the variants in C with OpenSSL (GCC 11.3, Ubuntu), measuring signature variability, performance, and verification success rate.
    • Comparative study of Kyber (KEM) and Dilithium (signatures) covering efficiency and robustness trade-offs.

04 — CONTACT

Signed-off-by: Ridham Khurana <khurana.ridham222@gmail.com>