TLPI--->Linux趣事之一
2016-03-13 13:10
609 查看
3-1:使用LInx专有的reboot系统调用重启系统时,必须将第二个参数magic2定义为一组magic号(例如:LINNUX_REBOOT_MAGIC2)。这些号有何意义?(将magic号转换为十六进制数,对解题会有所帮助。)
参考:Linux Easter Egg - Hidden Dates in the Linux Kernel
具体如下:
In order to prevent the reboot() system call being
called inadvertently, you must pass it a pair of magic values in the first two parameters. The first magic value is 0xfee1dead. The second magic value
is one of:
$ grep LINUX_REBOOT_MAGIC include/linux/*.h
include/linux/reboot.h:#define LINUX_REBOOT_MAGIC1 0xfee1dead
include/linux/reboot.h:#define LINUX_REBOOT_MAGIC2 672274793
include/linux/reboot.h:#define LINUX_REBOOT_MAGIC2A 85072278
include/linux/reboot.h:#define LINUX_REBOOT_MAGIC2B 369367448
include/linux/reboot.h:#define LINUX_REBOOT_MAGIC2C 537993216
Here are the answers.
0xfee1dead ="Feel Dead"
672274793=0x28121969 28/12/1969 is when Linus Torvalds was born.
These are Linus' daughters' birthdays:
85072278= 0x5121996 05/12/1996 is when Patricia Miranda was born.
367369448=0x16041998 16/04/1998 is when Daniela Yolanda was born.
537993216=0x20122000 20/12/2000 is when Celeste Amanda was born
从中不难感受到Linus Torvalds对女儿们满满的爱啊!
参考:Linux Easter Egg - Hidden Dates in the Linux Kernel
具体如下:
In order to prevent the reboot() system call being
called inadvertently, you must pass it a pair of magic values in the first two parameters. The first magic value is 0xfee1dead. The second magic value
is one of:
$ grep LINUX_REBOOT_MAGIC include/linux/*.h
include/linux/reboot.h:#define LINUX_REBOOT_MAGIC1 0xfee1dead
include/linux/reboot.h:#define LINUX_REBOOT_MAGIC2 672274793
include/linux/reboot.h:#define LINUX_REBOOT_MAGIC2A 85072278
include/linux/reboot.h:#define LINUX_REBOOT_MAGIC2B 369367448
include/linux/reboot.h:#define LINUX_REBOOT_MAGIC2C 537993216
Here are the answers.
0xfee1dead ="Feel Dead"
672274793=0x28121969 28/12/1969 is when Linus Torvalds was born.
These are Linus' daughters' birthdays:
85072278= 0x5121996 05/12/1996 is when Patricia Miranda was born.
367369448=0x16041998 16/04/1998 is when Daniela Yolanda was born.
537993216=0x20122000 20/12/2000 is when Celeste Amanda was born
从中不难感受到Linus Torvalds对女儿们满满的爱啊!
相关文章推荐
- linux下gdb调试器使用学习-02
- Linux 设备驱动开发 —— Tasklets 机制浅析
- linux文本处理-grep
- centos7关闭防火墙(转)
- 共享库查找顺序
- Linux/UNIX套接字连接
- linux系统下的软件管理(转)
- linux 第三周
- 【翻译自mos文章】Linux的/var/log/messages是空的(0k),messages.0, messages.1也是空的
- CentOS6.5 64位下源码安装PostgreSQL9.5.1
- linux的用户、组和权限管理
- linux磁盘分区、文件系统创建与挂载
- .Net程序员学习Linux最简单的方法
- Linux内核分析——跟踪分析Linux内核的启动过程
- 20135316王剑桥Linux内核学习笔记第三周
- crontab——Linux 下的定时任务
- mac自带的sed和linux不一致, 需要安装gnu-sed
- linux及安全第三周总结——跟踪分析LINUX内核的启动过程
- Linux内核分析 NO.3
- linux内核分析第三周