Skip to content

ABI, bảo mật và độ ổn định

Những nguyên tắc cần tuân thủ khi thiết kế interface cho user space.

Nguyên tắc ổn định ABI

TODO

  • "We don't break userspace"
  • UAPI header trong include/uapi/
  • Documentation/ABI/: stable, testing, obsolete

Kiểm tra input từ user

TODO

  • TOCTOU, đọc dữ liệu user hai lần
  • Tràn số khi tính size
  • Không làm lộ kernel pointer (%pK)

Phân quyền

TODO

  • capable(), capability
  • Quyền trên file node
  • seccomp

Tương thích 32/64-bit

TODO

  • compat_ioctl
  • Padding và alignment của struct trong UAPI, dùng __u32, __u64

Tham khảo