Skip to content

Instantly share code, notes, and snippets.

View uchan-nos's full-sized avatar

Kota UCHIDA uchan-nos

View GitHub Profile
void f() {
if (finfo != 0) {
/* ファイルが見つかった場合 */
appsiz = finfo->size;
p = file_loadfile2(finfo->clustno, &appsiz, fat);
if (appsiz >= 36 && strncmp(p + 4, "Hari", 4) == 0 && *p == 0x00) {
segsiz = *((int *) (p + 0x0000));
esp = *((int *) (p + 0x000c));
datsiz = *((int *) (p + 0x0010));
dathrb = *((int *) (p + 0x0014));
uchan@uchan-lavie:~/workspace/github.com/HariboteOS/harib27f/haribote$ make
../../z_tools/make -r ipl09.bin
make[1]: ディレクトリ '/home/uchan/workspace/github.com/HariboteOS/harib27f/haribote' に入ります
../../z_tools/nask ipl09.nas ipl09.bin ipl09.lst
make[1]: ../../z_tools/nask: コマンドが見つかりませんでした
Makefile:34: ターゲット 'ipl09.bin' のレシピで失敗しました
make[1]: *** [ipl09.bin] エラー 127
make[1]: ディレクトリ '/home/uchan/workspace/github.com/HariboteOS/harib27f/haribote' から出ます
Makefile:28: ターゲット 'default' のレシピで失敗しました
make: *** [default] エラー 2
182: Thu Jun 8 09:19:36 DST 2017: OK
kernel/cgroup/cgroup.c:439:13: warning: 'cgroup_get' defined but not used [-Wunused-function]
static void cgroup_get(struct cgroup *cgrp)
^
183: Thu Jun 8 09:24:55 DST 2017: OK
kernel/cgroup/cgroup.c:439:13: warning: 'cgroup_get' defined but not used [-Wunused-function]
static void cgroup_get(struct cgroup *cgrp)
^
184: Thu Jun 8 09:30:40 DST 2017: OK
kernel/cgroup/cgroup.c:439:13: warning: 'cgroup_get' defined but not used [-Wunused-function]
@uchan-nos
uchan-nos / cleanup.sh
Last active December 14, 2017 09:28
bug detail: mdadm may broke bbl if bitmap is too large
#!/bin/sh -ux
. ./variables.sh
for version in xenial zesty artful
do
MDADM=$ARCHIVES/$version/contents/sbin/mdadm
sudo $MDADM -S /dev/md/$version
sudo $MDADM -r /dev/md/$version
sudo $MDADM -S /dev/md/${version}_nobb
__attribute__ ((no_caller_saved_registers))
extern "C" void Inthandler40(void)
{
...
0000000000100920 <Inthandler40>:
100920: 55 push rbp
100921: 48 89 e5 mov rbp,rsp
100924: 50 push rax
100925: 41 53 push r11
#include <stdio.h>
void func(void)
{
int a[100];
int n, m = 0;
scanf("%d", &n);
for (int i = 0; i < n; ++i)
{
scanf("%d", a + i);
@uchan-nos
uchan-nos / character-encoding.md
Created May 26, 2018 04:59
文字コードに関するメモ書き

文字コード

文字コードに関するおすすめの記事 文字列 - Dive Into Python 3

Unicode

Unicode と個別のエンコーディング方式(UCS-2,UCS-4,UTF-8,UTF-16)の違いを意識するのは大事

  • Unicode は文字の集合.世界中の文字や絵文字などをすべて含む(のを目標にして拡張が続いている)
  • エンコーディング方式は,Unicode 文字をメモリやディスクに格納するためにバイト列に変換する方法

NEC LaVie Nybrid ZERO の内蔵 SSD 性能メモ.

PC 本体の型番:PC-GN246W3A4

換装前の SSD 品番はサムスン MZ-NTE128

uchan@uchan-lavie:/$ lsblk -io NAME,TYPE,SIZE,MOUNTPOINT,FSTYPE,MODEL
NAME   TYPE   SIZE MOUNTPOINT             FSTYPE MODEL
sda    disk 119.2G                               SAMSUNG MZNTE128
@uchan-nos
uchan-nos / superfence_vanish_pymdown_extensions.md
Last active June 20, 2018 05:23
investigation log about a "superfence vanishing" bug of pymdown-extensions
@uchan-nos
uchan-nos / history_of_attacking_system_program.md
Created July 23, 2018 03:04
システムソフトウェアに対する攻撃の歴史と傾向の読書メモ

「システムソフトウェアに対する攻撃の歴史と傾向」の読書メモ

対象記事:システムソフトウェアに対する攻撃の歴史と傾向

サイバー攻撃の始まり

  • 1972 年:バッファオーバーフローのバグを利用した攻撃について公に言及された
  • 1988 年:Morris Worm がバッファオーバーフローバグを侵入のための手段として用いる事で,バッファオーバーフローのバグが実用的な攻撃として認知され始めた
  • 1991 年:Linux 初リリース