??д???????????Linux??????
???????????? ???????[ 2014/9/30 10:46:15 ] ?????????????? Linux
???????????????????????????????????? C ??????????У???????????Linux????????????????????????????????????????С???????????????е????bug?????????????????????????????????????????????С??????д??????????????????????????????????????????????????????Linux????????????????????C??????????????????κ???????????????????????????????????????????
??????????????????????д???????飺??ο?????????????????????????????????????——???磬????????????????????????????????????????????Σ?LCTT?????????????????????????????????????????????棬????????????????????????????????????????????????????????е???????????????????Linux????????????????????????????饗???????????????????????????????????????棬????????????????????????????????????????????????
???????????У?????????????????????????????????/dev/reverse?豸??д????豸?????????????????????????“Hello World”????“World Hello”???????????????????????????????????????????????????????????????????????????????Щ??????????????????棺???????е????bug???????????????????????????????п?????????????????????????????????????????????????????????????????????????н??????顣
??????????????root???
???????????£?/dev/reverse???root???????????????????sudo?????????????????????????????????????????????????/lib/udev/rules.d/99-reverse.rules?????
????SUBSYSTEM=="misc"?? KERNEL=="reverse"?? MODE="0666"
?????????????2?????顣?÷?root????????豸?????????????????????????????????????????????????????root??????ж???????????????????????
???????????
??????????????Linux??????????Cд????????????????????????????????????????????????????????棨???磬reverse.c???????????????????????????GitHub??——??????????????е??Щ??Ρ???????????????????Щ???????????????????????????????飺
????#include <linux/init.h>
????#include <linux/kernel.h>
????#include <linux/module.h>
????MODULE_LICENSE("GPL");
????MODULE_AUTHOR("Valentine Sinitsyn <valentine.sinitsyn@gmail.com>");
????MODULE_DESCRIPTION("In-kernel phrase reverser");
??????????ж?????????????MODULE_LICENSE()????????????????????????????GPL???????????????????????????????GPL???????磬“Proprietary”[???]?????Щ?????????????????????в????á?
???????????д??????
?????????????????????????????д????????????????????????????ɡ???????????????????????????????????????????????????????????????????У????????????????н?????????
??????????????USB???? —— ???libusb??
??????????????????? —— ????FUSE??
???????????Netfilter —— ???libnetfilter_queue??????????????
?????????????????????????????????????????????????????????????????
????????????????????????????main()????????Linux???????????顣????????????????????????????????????????
????static int __init reverse_init(void)
????{
????printk(KERN_INFO "reverse device has been registered
");
????return 0;
????}
????static void __exit reverse_exit(void)
????{
????printk(KERN_INFO "reverse device has been unregistered
");
????}
????module_init(reverse_init);
????module_exit(reverse_exit);
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11