Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: 删除过时的va-pa转换函数,改为统一使用MMArch #862

Conversation

fslongjin
Copy link
Member

refactor: 删除过时的va-pa转换函数,改为统一使用MMArch

@fslongjin fslongjin added the A-mm Area: 内存管理子系统 label Jul 23, 2024
@dragonosbot dragonosbot added A-driver Area: 驱动程序 O-x86_64 Target: x86_64 S-等待审查 Status: 等待assignee以及相关方的审查。 T-virtulization Relevant to the virtulization team, which will review and decide on the PR/issue. labels Jul 23, 2024
@fslongjin fslongjin merged commit 816ee5a into DragonOS-Community:master Jul 25, 2024
8 checks passed
Samuka007 pushed a commit that referenced this pull request Aug 9, 2024
* 修复mprotect系统调用未正确设置vm_flags的错误 (#847)

* fix(time): modify update wall time (#836)

更改了时间子系统的update_wall_time函数,通过读取当前周期数,计算delta值进行更新,而不是通过传入delta值进行更新

* chore: 调整triagebot.toml以适应新的组织架构 (#848)

* doc: 完善README.md (#849)

* doc: 完善README.md

* chore: 更新sphinx相关配置,适应read the docs的更新 (#850)

根据read the docs在7月15日blog,进行此修改

https://about.readthedocs.com/blog/2024/07/addons-by-default/

* feat(driver/net): 实现Loopback网卡接口 (#845)

* 初步实现loopback设备

* fix: build-scripts和tools目录下的make check指定工具链版本 (#861)

* fix: tcp poll没有正确处理posix socket的listen状态的问题 (#859)

* chore: 将工具链更新到2024-07-23 (#864)

* chore: 将工具链更新到2024-07-23

* feat(fs): add eventfd syscall support (#858)

* feat(fs): add eventfd syscall support

* refactor: 删除过时的va-pa转换函数,改为统一使用MMArch (#862)

* 默认nightly-2024-07-23 & config改为config.toml (#872)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。 (#870)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。

* 实现多线程发送ping用户程序

* BUGREPORT: 参数parsing发生错误

* make fmt

* 固定ip

* feat(user): 实现多线程ping用户程序

* 添加注释

* 把ping加载在usr下

* feat(cred): 初步实现Cred (#846)

* 初步实现Cred

* 添加seteuid和setegid

* 添加cred测试程序

* 修改Cred::fscmp返回结果为CredFsCmp枚举

* 完善root用户相关信息

* 多线程有问题,先改成单线程的

* fix: 无法ping本地主机

* feat: 实现多线程ping

* 加注释

---------

Co-authored-by: MemoryShore <[email protected]>
Co-authored-by: 黄铭涛 <[email protected]>
Co-authored-by: LoGin <[email protected]>
Co-authored-by: linfeng <[email protected]>
Co-authored-by: Jomo <[email protected]>
Samuka007 added a commit that referenced this pull request Aug 16, 2024
* feat: add options for socket

* feat: print prettier

* add cloud-seed

* feat: improve debug logging for syscall_handler

* 修复mprotect系统调用未正确设置vm_flags的错误 (#847)

* fix(time): modify update wall time (#836)

更改了时间子系统的update_wall_time函数,通过读取当前周期数,计算delta值进行更新,而不是通过传入delta值进行更新

* chore: 调整triagebot.toml以适应新的组织架构 (#848)

* doc: 完善README.md (#849)

* doc: 完善README.md

* chore: 更新sphinx相关配置,适应read the docs的更新 (#850)

根据read the docs在7月15日blog,进行此修改

https://about.readthedocs.com/blog/2024/07/addons-by-default/

* feat(driver/net): 实现Loopback网卡接口 (#845)

* 初步实现loopback设备

* fix: build-scripts和tools目录下的make check指定工具链版本 (#861)

* fix: tcp poll没有正确处理posix socket的listen状态的问题 (#859)

* chore: 将工具链更新到2024-07-23 (#864)

* chore: 将工具链更新到2024-07-23

* remove uneccecary import

* feat(fs): add eventfd syscall support (#858)

* feat(fs): add eventfd syscall support

* refactor: 删除过时的va-pa转换函数,改为统一使用MMArch (#862)

* 默认nightly-2024-07-23 & config改为config.toml (#872)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。 (#870)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。

* make some updates

* chore: 将工具链更新到2024-07-23 (#864)

* chore: 将工具链更新到2024-07-23

* feat(fs): add eventfd syscall support (#858)

* feat(fs): add eventfd syscall support

* refactor: 删除过时的va-pa转换函数,改为统一使用MMArch (#862)

* 默认nightly-2024-07-23 & config改为config.toml (#872)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。 (#870)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。

* feat(cred): 初步实现Cred (#846)

* 初步实现Cred

* 添加seteuid和setegid

* 添加cred测试程序

* 修改Cred::fscmp返回结果为CredFsCmp枚举

* 完善root用户相关信息

* feat: alloc 127.0.0.2 ~ 127.0.0.8 to loopback device

* chore: 将工具链更新到2024-07-23 (#864)

* chore: 将工具链更新到2024-07-23

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。 (#870)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。

* feat(cred): 初步实现Cred (#846)

* 初步实现Cred

* 添加seteuid和setegid

* 添加cred测试程序

* 修改Cred::fscmp返回结果为CredFsCmp枚举

* 完善root用户相关信息

* allow deadcode

* allign syscall print

* change iface (origin netdevice)

* dev: rebuild net day1

* fix: 修复键盘码解析器没能正确处理类似ctrl C的控制字符的问题 (#877)

* fix: 修复键盘码解析器没能正确处理类似ctrl C的控制字符的问题

* fix: 解决ntty潜在的panic问题

* 重写datagram,构建inet socket底层

* feat: add tcp, add udp poll

* feat: redefine socket interface

* ci: enable ci workflow on branches other than master (#891)

* 修复unlink、unlinkat系统调用的路径错误 (#892)

* fix: socket shutdown wrong implement (#893)

* implment methods with poll_iface, and complete udp tcp poll.

* feat: add tcp connecting middle state

* fix: correct tcp connect state machine

* feat: tcp connect check

* feat: add inet socket iface

* fix net iface poll

---------

Co-authored-by: MemoryShore <[email protected]>
Co-authored-by: 黄铭涛 <[email protected]>
Co-authored-by: LoGin <[email protected]>
Co-authored-by: SMALLC <[email protected]>
Co-authored-by: linfeng <[email protected]>
Co-authored-by: Jomo <[email protected]>
Co-authored-by: Chiichen <[email protected]>
Samuka007 pushed a commit that referenced this pull request Aug 26, 2024
* add netlink todo directory

* save the work 2 another system workplace

* save the work 2 another system workplace

* add the demo of netlink_create and locate the kobject_uevent\kobject_uevent_env

* add the uevent directory and demo of kobject_uevent and kobject_uevent_env

* delete sth else in target

* handle existing errors, ready for the next period of dev

* 阶段性提交,完成了kobjectuevent_env的部分逻辑,接下来需要实现uevent_ops结构体的转写

* 调整uevent_suppress和subsystem,修改分支日志打印信息

* 调整uevent_suppress和subsystem,修改分支日志打印信息

* 在kset中引入了KsetUeventOps的trait,待实现

* 阶段性提交, 基本完成了处理kset的uevent_ops相关逻辑,新增一个trait和一个结构体,正在逐步完善kobject_uevent_env

* 阶段性提交:完善大部分kobject_uevent_env函数的功能

* add_uevent_var,kobject_uevent_net_broadcast,zap_modalias_env,完善其他细节的逻辑

* 阶段性提交,开始逐渐深入与netlink

* 阶段性提交,重构netlinktable和netlinksocket

* replace kdebug with log::info!

* 理清了sock和ueventsock的关系,重构了一部分原来的代码

* 阶段性提交,新增了几个函数,进一步完善了netlink

* 阶段性提交,新增了Sk_Buff封装了一层PacketBuffer,需要解决mc_list迭代器实现方案和PacketBuffer提供的接口不足的问题

* 初步解决mc_list迭代问题和consume_skb

* fmt

* 同步更改

* asy to antoher workplace

* 初步解决现有代码中所有权和生命周期等问题

* fix nlk_sk and init test for uevent

* 初步在driver中成功调用kobject_uevent()进行测试,标记需要发送uevent的地方

* ipml socket for netlinksock

* 阶段性提交,完善netlink_proto相关内容

* 阶段性提交,初步实现netlink_add_usersock_entry等

* 实现netlink_proto_init()

* add NetProtoFamily and NetlinkFamulyOps

* 修复mprotect系统调用未正确设置vm_flags的错误 (#847)

* fix(time): modify update wall time (#836)

更改了时间子系统的update_wall_time函数,通过读取当前周期数,计算delta值进行更新,而不是通过传入delta值进行更新

* chore: 调整triagebot.toml以适应新的组织架构 (#848)

* netlink_insert大体框架,遇到nlk无法修改的问题

* doc: 完善README.md (#849)

* doc: 完善README.md

* chore: 更新sphinx相关配置,适应read the docs的更新 (#850)

根据read the docs在7月15日blog,进行此修改

https://about.readthedocs.com/blog/2024/07/addons-by-default/

* 完善netlink_insert 和 netlink_lookup

* feat(driver/net): 实现Loopback网卡接口 (#845)

* 初步实现loopback设备

* fix: build-scripts和tools目录下的make check指定工具链版本 (#861)

* fix: tcp poll没有正确处理posix socket的listen状态的问题 (#859)

* chore: 将工具链更新到2024-07-23 (#864)

* chore: 将工具链更新到2024-07-23

* 考虑更换Sk_Buffer实现,留档原有方案

* feat(fs): add eventfd syscall support (#858)

* feat(fs): add eventfd syscall support

* 更换Sk_Buffer实现

* refactor: 删除过时的va-pa转换函数,改为统一使用MMArch (#862)

* 需要解决Arc内部可变性问题

* 解决sk:Arc内部可变性问题

* 默认nightly-2024-07-23 & config改为config.toml (#872)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。 (#870)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。

* 基本实现netlink单播,todo回调函数

* remove unused import

* 考虑是否引入回调函数,补充sockflags

* updates test-uevent

* add endpoint and complete to_endpoint function for NetLinkEndpoint

* feat(cred): 初步实现Cred (#846)

* 初步实现Cred

* 添加seteuid和setegid

* 添加cred测试程序

* 修改Cred::fscmp返回结果为CredFsCmp枚举

* 完善root用户相关信息

* fix: 修复键盘码解析器没能正确处理类似ctrl C的控制字符的问题 (#877)

* fix: 修复键盘码解析器没能正确处理类似ctrl C的控制字符的问题

* fix: 解决ntty潜在的panic问题

* success to call NetlinkSock bind fn and add a fn into Socket trait

* modify handle in NetlinkSock

* fix af_netlink problems in the new branch reported by RA

---------

Co-authored-by: val213 <[email protected]>
Co-authored-by: MemoryShore <[email protected]>
Co-authored-by: 黄铭涛 <[email protected]>
Co-authored-by: LoGin <[email protected]>
Co-authored-by: SMALLC <[email protected]>
Co-authored-by: linfeng <[email protected]>
Co-authored-by: Jomo <[email protected]>
Samuka007 added a commit that referenced this pull request Aug 26, 2024
* feat: add options for socket

* feat: print prettier

* add cloud-seed

* feat: improve debug logging for syscall_handler

* 修复mprotect系统调用未正确设置vm_flags的错误 (#847)

* fix(time): modify update wall time (#836)

更改了时间子系统的update_wall_time函数,通过读取当前周期数,计算delta值进行更新,而不是通过传入delta值进行更新

* chore: 调整triagebot.toml以适应新的组织架构 (#848)

* doc: 完善README.md (#849)

* doc: 完善README.md

* chore: 更新sphinx相关配置,适应read the docs的更新 (#850)

根据read the docs在7月15日blog,进行此修改

https://about.readthedocs.com/blog/2024/07/addons-by-default/

* feat(driver/net): 实现Loopback网卡接口 (#845)

* 初步实现loopback设备

* fix: build-scripts和tools目录下的make check指定工具链版本 (#861)

* fix: tcp poll没有正确处理posix socket的listen状态的问题 (#859)

* chore: 将工具链更新到2024-07-23 (#864)

* chore: 将工具链更新到2024-07-23

* remove uneccecary import

* feat(fs): add eventfd syscall support (#858)

* feat(fs): add eventfd syscall support

* refactor: 删除过时的va-pa转换函数,改为统一使用MMArch (#862)

* 默认nightly-2024-07-23 & config改为config.toml (#872)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。 (#870)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。

* make some updates

* chore: 将工具链更新到2024-07-23 (#864)

* chore: 将工具链更新到2024-07-23

* feat(fs): add eventfd syscall support (#858)

* feat(fs): add eventfd syscall support

* refactor: 删除过时的va-pa转换函数,改为统一使用MMArch (#862)

* 默认nightly-2024-07-23 & config改为config.toml (#872)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。 (#870)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。

* feat(cred): 初步实现Cred (#846)

* 初步实现Cred

* 添加seteuid和setegid

* 添加cred测试程序

* 修改Cred::fscmp返回结果为CredFsCmp枚举

* 完善root用户相关信息

* feat: alloc 127.0.0.2 ~ 127.0.0.8 to loopback device

* chore: 将工具链更新到2024-07-23 (#864)

* chore: 将工具链更新到2024-07-23

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。 (#870)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。

* feat(cred): 初步实现Cred (#846)

* 初步实现Cred

* 添加seteuid和setegid

* 添加cred测试程序

* 修改Cred::fscmp返回结果为CredFsCmp枚举

* 完善root用户相关信息

* allow deadcode

* allign syscall print

* change iface (origin netdevice)

* dev: rebuild net day1

* fix: 修复键盘码解析器没能正确处理类似ctrl C的控制字符的问题 (#877)

* fix: 修复键盘码解析器没能正确处理类似ctrl C的控制字符的问题

* fix: 解决ntty潜在的panic问题

* 重写datagram,构建inet socket底层

* feat: add tcp, add udp poll

* feat: redefine socket interface

* ci: enable ci workflow on branches other than master (#891)

* 修复unlink、unlinkat系统调用的路径错误 (#892)

* fix: socket shutdown wrong implement (#893)

* implment methods with poll_iface, and complete udp tcp poll.

* feat: add tcp connecting middle state

* fix: correct tcp connect state machine

* feat: tcp connect check

* feat: add inet socket iface

* fix net iface poll

* fix font size problem

---------

Co-authored-by: MemoryShore <[email protected]>
Co-authored-by: 黄铭涛 <[email protected]>
Co-authored-by: LoGin <[email protected]>
Co-authored-by: SMALLC <[email protected]>
Co-authored-by: linfeng <[email protected]>
Co-authored-by: Jomo <[email protected]>
Co-authored-by: Chiichen <[email protected]>
Samuka007 added a commit that referenced this pull request Aug 28, 2024
* feat: add options for socket

* feat: print prettier

* add cloud-seed

* feat: improve debug logging for syscall_handler

* 修复mprotect系统调用未正确设置vm_flags的错误 (#847)

* fix(time): modify update wall time (#836)

更改了时间子系统的update_wall_time函数,通过读取当前周期数,计算delta值进行更新,而不是通过传入delta值进行更新

* chore: 调整triagebot.toml以适应新的组织架构 (#848)

* doc: 完善README.md (#849)

* doc: 完善README.md

* chore: 更新sphinx相关配置,适应read the docs的更新 (#850)

根据read the docs在7月15日blog,进行此修改

https://about.readthedocs.com/blog/2024/07/addons-by-default/

* feat(driver/net): 实现Loopback网卡接口 (#845)

* 初步实现loopback设备

* fix: build-scripts和tools目录下的make check指定工具链版本 (#861)

* fix: tcp poll没有正确处理posix socket的listen状态的问题 (#859)

* chore: 将工具链更新到2024-07-23 (#864)

* chore: 将工具链更新到2024-07-23

* remove uneccecary import

* feat(fs): add eventfd syscall support (#858)

* feat(fs): add eventfd syscall support

* refactor: 删除过时的va-pa转换函数,改为统一使用MMArch (#862)

* 默认nightly-2024-07-23 & config改为config.toml (#872)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。 (#870)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。

* make some updates

* chore: 将工具链更新到2024-07-23 (#864)

* chore: 将工具链更新到2024-07-23

* feat(fs): add eventfd syscall support (#858)

* feat(fs): add eventfd syscall support

* refactor: 删除过时的va-pa转换函数,改为统一使用MMArch (#862)

* 默认nightly-2024-07-23 & config改为config.toml (#872)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。 (#870)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。

* feat(cred): 初步实现Cred (#846)

* 初步实现Cred

* 添加seteuid和setegid

* 添加cred测试程序

* 修改Cred::fscmp返回结果为CredFsCmp枚举

* 完善root用户相关信息

* feat: alloc 127.0.0.2 ~ 127.0.0.8 to loopback device

* chore: 将工具链更新到2024-07-23 (#864)

* chore: 将工具链更新到2024-07-23

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。 (#870)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。

* feat(cred): 初步实现Cred (#846)

* 初步实现Cred

* 添加seteuid和setegid

* 添加cred测试程序

* 修改Cred::fscmp返回结果为CredFsCmp枚举

* 完善root用户相关信息

* allow deadcode

* allign syscall print

* change iface (origin netdevice)

* dev: rebuild net day1

* fix: 修复键盘码解析器没能正确处理类似ctrl C的控制字符的问题 (#877)

* fix: 修复键盘码解析器没能正确处理类似ctrl C的控制字符的问题

* fix: 解决ntty潜在的panic问题

* 重写datagram,构建inet socket底层

* feat: add tcp, add udp poll

* feat: redefine socket interface

* ci: enable ci workflow on branches other than master (#891)

* 修复unlink、unlinkat系统调用的路径错误 (#892)

* fix: socket shutdown wrong implement (#893)

* implment methods with poll_iface, and complete udp tcp poll.

* feat: add tcp connecting middle state

* fix: correct tcp connect state machine

* feat: tcp connect check

* feat: add inet socket iface

* fix net iface poll

* feat: 增加tokio异步运行时支持 (#894)

* fix the EventFdFlags error

* feat: support tokio (Single thread version)

Fix deadlock issue on closing file.
Add function for PipeInode and EventFdInode.

* fix font size problem

* fix: pipe 读取/写入阻塞时,无法kill进程的问题 (#889)

* diable file autoSave on FocusChange, fix tcp method logics

* fix: change back socket inode design.
必须要有一个SocketInode承担IndexNode操作与Socket层之间的交互。
然后发现fcntl是无法将nonblock等flag传入socket层的,需要再改。

---------

Co-authored-by: MemoryShore <[email protected]>
Co-authored-by: 黄铭涛 <[email protected]>
Co-authored-by: LoGin <[email protected]>
Co-authored-by: SMALLC <[email protected]>
Co-authored-by: linfeng <[email protected]>
Co-authored-by: Jomo <[email protected]>
Co-authored-by: Chiichen <[email protected]>
Samuka007 added a commit that referenced this pull request Aug 29, 2024
…#905)

* feat: add options for socket

* feat: print prettier

* add cloud-seed

* feat: improve debug logging for syscall_handler

* 修复mprotect系统调用未正确设置vm_flags的错误 (#847)

* fix(time): modify update wall time (#836)

更改了时间子系统的update_wall_time函数,通过读取当前周期数,计算delta值进行更新,而不是通过传入delta值进行更新

* chore: 调整triagebot.toml以适应新的组织架构 (#848)

* doc: 完善README.md (#849)

* doc: 完善README.md

* chore: 更新sphinx相关配置,适应read the docs的更新 (#850)

根据read the docs在7月15日blog,进行此修改

https://about.readthedocs.com/blog/2024/07/addons-by-default/

* feat(driver/net): 实现Loopback网卡接口 (#845)

* 初步实现loopback设备

* fix: build-scripts和tools目录下的make check指定工具链版本 (#861)

* fix: tcp poll没有正确处理posix socket的listen状态的问题 (#859)

* chore: 将工具链更新到2024-07-23 (#864)

* chore: 将工具链更新到2024-07-23

* remove uneccecary import

* feat(fs): add eventfd syscall support (#858)

* feat(fs): add eventfd syscall support

* refactor: 删除过时的va-pa转换函数,改为统一使用MMArch (#862)

* 默认nightly-2024-07-23 & config改为config.toml (#872)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。 (#870)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。

* make some updates

* chore: 将工具链更新到2024-07-23 (#864)

* chore: 将工具链更新到2024-07-23

* feat(fs): add eventfd syscall support (#858)

* feat(fs): add eventfd syscall support

* refactor: 删除过时的va-pa转换函数,改为统一使用MMArch (#862)

* 默认nightly-2024-07-23 & config改为config.toml (#872)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。 (#870)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。

* feat(cred): 初步实现Cred (#846)

* 初步实现Cred

* 添加seteuid和setegid

* 添加cred测试程序

* 修改Cred::fscmp返回结果为CredFsCmp枚举

* 完善root用户相关信息

* feat: alloc 127.0.0.2 ~ 127.0.0.8 to loopback device

* chore: 将工具链更新到2024-07-23 (#864)

* chore: 将工具链更新到2024-07-23

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。 (#870)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。

* feat(cred): 初步实现Cred (#846)

* 初步实现Cred

* 添加seteuid和setegid

* 添加cred测试程序

* 修改Cred::fscmp返回结果为CredFsCmp枚举

* 完善root用户相关信息

* allow deadcode

* allign syscall print

* change iface (origin netdevice)

* dev: rebuild net day1

* fix: 修复键盘码解析器没能正确处理类似ctrl C的控制字符的问题 (#877)

* fix: 修复键盘码解析器没能正确处理类似ctrl C的控制字符的问题

* fix: 解决ntty潜在的panic问题

* 重写datagram,构建inet socket底层

* feat: add tcp, add udp poll

* feat: redefine socket interface

* ci: enable ci workflow on branches other than master (#891)

* 修复unlink、unlinkat系统调用的路径错误 (#892)

* fix: socket shutdown wrong implement (#893)

* implment methods with poll_iface, and complete udp tcp poll.

* feat: add tcp connecting middle state

* fix: correct tcp connect state machine

* feat: tcp connect check

* feat: add inet socket iface

* fix net iface poll

* feat: 增加tokio异步运行时支持 (#894)

* fix the EventFdFlags error

* feat: support tokio (Single thread version)

Fix deadlock issue on closing file.
Add function for PipeInode and EventFdInode.

* fix font size problem

* fix: pipe 读取/写入阻塞时,无法kill进程的问题 (#889)

* diable file autoSave on FocusChange, fix tcp method logics

* fix: change back socket inode design.
必须要有一个SocketInode承担IndexNode操作与Socket层之间的交互。
然后发现fcntl是无法将nonblock等flag传入socket层的,需要再改。

* feat: define socket trait, move unused definitions into socket/define

---------

Co-authored-by: MemoryShore <[email protected]>
Co-authored-by: 黄铭涛 <[email protected]>
Co-authored-by: LoGin <[email protected]>
Co-authored-by: SMALLC <[email protected]>
Co-authored-by: linfeng <[email protected]>
Co-authored-by: Jomo <[email protected]>
Co-authored-by: Chiichen <[email protected]>
Samuka007 added a commit that referenced this pull request Aug 29, 2024
* feat: add options for socket

* feat: print prettier

* add cloud-seed

* feat: improve debug logging for syscall_handler

* 修复mprotect系统调用未正确设置vm_flags的错误 (#847)

* fix(time): modify update wall time (#836)

更改了时间子系统的update_wall_time函数,通过读取当前周期数,计算delta值进行更新,而不是通过传入delta值进行更新

* chore: 调整triagebot.toml以适应新的组织架构 (#848)

* doc: 完善README.md (#849)

* doc: 完善README.md

* chore: 更新sphinx相关配置,适应read the docs的更新 (#850)

根据read the docs在7月15日blog,进行此修改

https://about.readthedocs.com/blog/2024/07/addons-by-default/

* feat(driver/net): 实现Loopback网卡接口 (#845)

* 初步实现loopback设备

* fix: build-scripts和tools目录下的make check指定工具链版本 (#861)

* fix: tcp poll没有正确处理posix socket的listen状态的问题 (#859)

* chore: 将工具链更新到2024-07-23 (#864)

* chore: 将工具链更新到2024-07-23

* remove uneccecary import

* feat(fs): add eventfd syscall support (#858)

* feat(fs): add eventfd syscall support

* refactor: 删除过时的va-pa转换函数,改为统一使用MMArch (#862)

* 默认nightly-2024-07-23 & config改为config.toml (#872)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。 (#870)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。

* make some updates

* chore: 将工具链更新到2024-07-23 (#864)

* chore: 将工具链更新到2024-07-23

* feat(fs): add eventfd syscall support (#858)

* feat(fs): add eventfd syscall support

* refactor: 删除过时的va-pa转换函数,改为统一使用MMArch (#862)

* 默认nightly-2024-07-23 & config改为config.toml (#872)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。 (#870)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。

* feat(cred): 初步实现Cred (#846)

* 初步实现Cred

* 添加seteuid和setegid

* 添加cred测试程序

* 修改Cred::fscmp返回结果为CredFsCmp枚举

* 完善root用户相关信息

* feat: alloc 127.0.0.2 ~ 127.0.0.8 to loopback device

* chore: 将工具链更新到2024-07-23 (#864)

* chore: 将工具链更新到2024-07-23

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。 (#870)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。

* feat(cred): 初步实现Cred (#846)

* 初步实现Cred

* 添加seteuid和setegid

* 添加cred测试程序

* 修改Cred::fscmp返回结果为CredFsCmp枚举

* 完善root用户相关信息

* allow deadcode

* allign syscall print

* change iface (origin netdevice)

* dev: rebuild net day1

* fix: 修复键盘码解析器没能正确处理类似ctrl C的控制字符的问题 (#877)

* fix: 修复键盘码解析器没能正确处理类似ctrl C的控制字符的问题

* fix: 解决ntty潜在的panic问题

* 重写datagram,构建inet socket底层

* feat: add tcp, add udp poll

* feat: redefine socket interface

* ci: enable ci workflow on branches other than master (#891)

* 修复unlink、unlinkat系统调用的路径错误 (#892)

* fix: socket shutdown wrong implement (#893)

* implment methods with poll_iface, and complete udp tcp poll.

* feat: add tcp connecting middle state

* fix: correct tcp connect state machine

* feat: tcp connect check

* feat: add inet socket iface

* fix net iface poll

* feat: 增加tokio异步运行时支持 (#894)

* fix the EventFdFlags error

* feat: support tokio (Single thread version)

Fix deadlock issue on closing file.
Add function for PipeInode and EventFdInode.

* fix font size problem

* fix: pipe 读取/写入阻塞时,无法kill进程的问题 (#889)

* diable file autoSave on FocusChange, fix tcp method logics

* fix: change back socket inode design.
必须要有一个SocketInode承担IndexNode操作与Socket层之间的交互。
然后发现fcntl是无法将nonblock等flag传入socket层的,需要再改。

* feat: define socket trait, move unused definitions into socket/define

* feat: add recv_msg and send_msg method

---------

Co-authored-by: MemoryShore <[email protected]>
Co-authored-by: 黄铭涛 <[email protected]>
Co-authored-by: LoGin <[email protected]>
Co-authored-by: SMALLC <[email protected]>
Co-authored-by: linfeng <[email protected]>
Co-authored-by: Jomo <[email protected]>
Co-authored-by: Chiichen <[email protected]>
Chiichen added a commit that referenced this pull request Sep 2, 2024
* docs(sched):调度子系统文档即cfs文档 (#807)

* 调度子系统文档以及cfs文档

* fix(net): Fix TCP Unresponsiveness and Inability to Close Connections (#791)

* fix(net): Improve stability. 为RawSocket与UdpSocket实现close时调用close方法,符合smoltcp的行为。为SocketInode实现drop,保证程序任何情况下退出时都能正确close对应socket, 释放被占用的端口。

* fix(net): Correct socket close behavior.

* fix: disable mm debug log to prevent system lockup due to thingbuf issue (#808)

* 添加支持gentoo系统的一键安装脚本 (#809)

* feat(driver/pci): add pci bus into sysfs (#792)

把pci设备加入sysfs

* doc: Add Gentoo Linux In build_system.md (#810)

* 增加安装文档中的Gentoo Linux提示

* doc: add v0.1.10 changelog (#813)

* 完成v0.1.10 changelog

* fix(driver/apic_timer): 修复local apic timer初始化顺序导致的在某些云服务器上无法收到中断的bug (#815)

* chore: move setup_arch_post timepoint to before clocksource_boot_finish (#820)

This commit adjusts the timing of the setup_arch_post event to occur before the clocksource_boot_finish event, allowing the time subsystem to properly register architecture-specific clock sources.

* feat(log): 将内核日志统一为新的logger (#814)

* fix(log): 修复pr #814 的问题 (#821)

* feat(driver/pci): 完善pci root结构体,增加portio的pci配置空间访问 (#818)

* feat(driver/pci): 完善pci root结构体,增加portio的pci配置空间访问

* 增加rust sparse稀疏索引选项 (#826)

* fix(time):修复了issue #816 (#830)

* chore(tools): add the gentoo grub_auto_install support (#827)

* 20240524 3:40

* 20240527 0010

* 修复mmap未延迟分配内存的问题

* feat(procfs): update procfs (#831)

为procfs增加是否是kthread的显示
增加返回进程已经占用的文件描述符数量

* Revert "Merge branch 'patch-add-file-mapping' into patch-fix-mmap"

This reverts commit 8eb687c, reversing
changes made to 33e9f0b.

* 20240528 1800

* Revert "Revert "Merge branch 'patch-add-file-mapping' into patch-fix-mmap""

This reverts commit 9261cb7.

* feat(mm): 修复mmap未延迟分配内存的问题 (#837)

* 20240524 3:40

* 20240527 0010

* 修复mmap未延迟分配内存的问题

* Revert "Merge branch 'patch-add-file-mapping' into patch-fix-mmap"

This reverts commit 8eb687c, reversing
changes made to 33e9f0b.

* update-20240529-0347

* fix(driver): fix memory security problem in tty device ioctl (#833)

* add soft link to musl-gcc

* fix the tty_ioctl

* modified

* modified

* update 20240604 0233

* feat(user): user management tool (#825)

* 用户管理工具

* 重构

* 改为多个bin文件入口

* bin文件的usage显示自身程序名而非固定程序名

* update 20240606 1800

* update 20240607 0200

* update 20240617 1747

* 重写页面保护标志的构造逻辑

* update20240620 1726

* 添加Riscv64的protection_map

* 简单实现fat文件系统的文件映射,添加msync系统调用

* trait FileSystem增加统一接口

* MountFS实现文件映射相关接口

* 格式化代码

* feat(time): Add syscall support for utime* (#838)

* feat(vfs): Add syscall support for utime*

impl sys_utimensat
impl sys_utimes
add utimensat test
fix some warning

* fix(vfs): Verify pointer validity

* fix: remove bad cfg

* pagecache存储方式由HashMap改为XArray

* 修复mprotect系统调用未正确设置vm_flags的错误 (#847)

* fix(time): modify update wall time (#836)

更改了时间子系统的update_wall_time函数,通过读取当前周期数,计算delta值进行更新,而不是通过传入delta值进行更新

* chore: 调整triagebot.toml以适应新的组织架构 (#848)

* doc: 完善README.md (#849)

* doc: 完善README.md

* chore: 更新sphinx相关配置,适应read the docs的更新 (#850)

根据read the docs在7月15日blog,进行此修改

https://about.readthedocs.com/blog/2024/07/addons-by-default/

* feat(driver/net): 实现Loopback网卡接口 (#845)

* 初步实现loopback设备

* fix: build-scripts和tools目录下的make check指定工具链版本 (#861)

* fix: tcp poll没有正确处理posix socket的listen状态的问题 (#859)

* 使用读写锁包装Page结构体

* chore: 将工具链更新到2024-07-23 (#864)

* chore: 将工具链更新到2024-07-23

* PageCache由存放物理地址改为直接存放页面

* 优化protection_map的初始化方式

* feat(fs): add eventfd syscall support (#858)

* feat(fs): add eventfd syscall support

* refactor: 删除过时的va-pa转换函数,改为统一使用MMArch (#862)

* 添加shrink_list方法释放页面

* 默认nightly-2024-07-23 & config改为config.toml (#872)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。 (#870)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。

* 添加页面回收机制

* 添加页面回收内核线程

* feat(cred): 初步实现Cred (#846)

* 初步实现Cred

* 添加seteuid和setegid

* 添加cred测试程序

* 修改Cred::fscmp返回结果为CredFsCmp枚举

* 完善root用户相关信息

* fix: 修复键盘码解析器没能正确处理类似ctrl C的控制字符的问题 (#877)

* fix: 修复键盘码解析器没能正确处理类似ctrl C的控制字符的问题

* fix: 解决ntty潜在的panic问题

* 缺页中断使用的锁修改为irq_save; 添加脏页回写机制

* 优化代码结构,添加部分注释

* ci: enable ci workflow on branches other than master (#891)

* 修复unlink、unlinkat系统调用的路径错误 (#892)

* fix: socket shutdown wrong implement (#893)

* feat: 增加tokio异步运行时支持 (#894)

* fix the EventFdFlags error

* feat: support tokio (Single thread version)

Fix deadlock issue on closing file.
Add function for PipeInode and EventFdInode.

* 优化PageCache的创建

* fix: pipe 读取/写入阻塞时,无法kill进程的问题 (#889)

* 将入口点改为链接器;修正链接器加载地址

* 修复合并错误

* 修复do_cow_page死锁问题

* 将PageFaultMessage中的地址对齐

* auxv添加随机数指针;修复AtType序号错误

* 简单实现用户栈的16字节对齐

* 通过check fmt

* 完善用户栈的字节对齐机制

* 通过riscv64编译

* 修改测试程序路径

* 添加动态库libgcc_s.so.1

---------

Co-authored-by: GnoCiYeH <[email protected]>
Co-authored-by: Samuel Dai <[email protected]>
Co-authored-by: LoGin <[email protected]>
Co-authored-by: donjuanplatinum <[email protected]>
Co-authored-by: 曾俊 <[email protected]>
Co-authored-by: Mingtao Huang <[email protected]>
Co-authored-by: BrahmaMantra <[email protected]>
Co-authored-by: laokengwt <[email protected]>
Co-authored-by: Jomo <[email protected]>
Co-authored-by: linfeng <[email protected]>
Co-authored-by: SMALLC <[email protected]>
Co-authored-by: linfeng <[email protected]>
Co-authored-by: Chiichen <[email protected]>
Co-authored-by: Samuel Dai <[email protected]>
Samuka007 pushed a commit that referenced this pull request Sep 3, 2024
)

* add netlink todo directory

* save the work 2 another system workplace

* save the work 2 another system workplace

* add the demo of netlink_create and locate the kobject_uevent\kobject_uevent_env

* add the uevent directory and demo of kobject_uevent and kobject_uevent_env

* delete sth else in target

* handle existing errors, ready for the next period of dev

* 阶段性提交,完成了kobjectuevent_env的部分逻辑,接下来需要实现uevent_ops结构体的转写

* 调整uevent_suppress和subsystem,修改分支日志打印信息

* 调整uevent_suppress和subsystem,修改分支日志打印信息

* 在kset中引入了KsetUeventOps的trait,待实现

* 阶段性提交, 基本完成了处理kset的uevent_ops相关逻辑,新增一个trait和一个结构体,正在逐步完善kobject_uevent_env

* 阶段性提交:完善大部分kobject_uevent_env函数的功能

* add_uevent_var,kobject_uevent_net_broadcast,zap_modalias_env,完善其他细节的逻辑

* 阶段性提交,开始逐渐深入与netlink

* 阶段性提交,重构netlinktable和netlinksocket

* replace kdebug with log::info!

* 理清了sock和ueventsock的关系,重构了一部分原来的代码

* 阶段性提交,新增了几个函数,进一步完善了netlink

* 阶段性提交,新增了Sk_Buff封装了一层PacketBuffer,需要解决mc_list迭代器实现方案和PacketBuffer提供的接口不足的问题

* 初步解决mc_list迭代问题和consume_skb

* fmt

* 同步更改

* asy to antoher workplace

* 初步解决现有代码中所有权和生命周期等问题

* fix nlk_sk and init test for uevent

* 初步在driver中成功调用kobject_uevent()进行测试,标记需要发送uevent的地方

* ipml socket for netlinksock

* 阶段性提交,完善netlink_proto相关内容

* 阶段性提交,初步实现netlink_add_usersock_entry等

* 实现netlink_proto_init()

* add NetProtoFamily and NetlinkFamulyOps

* 修复mprotect系统调用未正确设置vm_flags的错误 (#847)

* fix(time): modify update wall time (#836)

更改了时间子系统的update_wall_time函数,通过读取当前周期数,计算delta值进行更新,而不是通过传入delta值进行更新

* chore: 调整triagebot.toml以适应新的组织架构 (#848)

* netlink_insert大体框架,遇到nlk无法修改的问题

* doc: 完善README.md (#849)

* doc: 完善README.md

* chore: 更新sphinx相关配置,适应read the docs的更新 (#850)

根据read the docs在7月15日blog,进行此修改

https://about.readthedocs.com/blog/2024/07/addons-by-default/

* 完善netlink_insert 和 netlink_lookup

* feat(driver/net): 实现Loopback网卡接口 (#845)

* 初步实现loopback设备

* fix: build-scripts和tools目录下的make check指定工具链版本 (#861)

* fix: tcp poll没有正确处理posix socket的listen状态的问题 (#859)

* chore: 将工具链更新到2024-07-23 (#864)

* chore: 将工具链更新到2024-07-23

* 考虑更换Sk_Buffer实现,留档原有方案

* feat(fs): add eventfd syscall support (#858)

* feat(fs): add eventfd syscall support

* 更换Sk_Buffer实现

* refactor: 删除过时的va-pa转换函数,改为统一使用MMArch (#862)

* 需要解决Arc内部可变性问题

* 解决sk:Arc内部可变性问题

* 默认nightly-2024-07-23 & config改为config.toml (#872)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。 (#870)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。

* 基本实现netlink单播,todo回调函数

* remove unused import

* 考虑是否引入回调函数,补充sockflags

* updates test-uevent

* add endpoint and complete to_endpoint function for NetLinkEndpoint

* feat(cred): 初步实现Cred (#846)

* 初步实现Cred

* 添加seteuid和setegid

* 添加cred测试程序

* 修改Cred::fscmp返回结果为CredFsCmp枚举

* 完善root用户相关信息

* fix: 修复键盘码解析器没能正确处理类似ctrl C的控制字符的问题 (#877)

* fix: 修复键盘码解析器没能正确处理类似ctrl C的控制字符的问题

* fix: 解决ntty潜在的panic问题

* success to call NetlinkSock bind fn and add a fn into Socket trait

* modify handle in NetlinkSock

* fix af_netlink problems in the new branch reported by RA

* updates test-uevent

* add netlink_send adn  netlink_recv

* fix bind

---------

Co-authored-by: val213 <[email protected]>
Co-authored-by: MemoryShore <[email protected]>
Co-authored-by: 黄铭涛 <[email protected]>
Co-authored-by: LoGin <[email protected]>
Co-authored-by: SMALLC <[email protected]>
Co-authored-by: linfeng <[email protected]>
Co-authored-by: Jomo <[email protected]>
Samuka007 added a commit that referenced this pull request Sep 7, 2024
* 修复mprotect系统调用未正确设置vm_flags的错误 (#847)

* fix(time): modify update wall time (#836)

更改了时间子系统的update_wall_time函数,通过读取当前周期数,计算delta值进行更新,而不是通过传入delta值进行更新

* chore: 调整triagebot.toml以适应新的组织架构 (#848)

* doc: 完善README.md (#849)

* doc: 完善README.md

* chore: 更新sphinx相关配置,适应read the docs的更新 (#850)

根据read the docs在7月15日blog,进行此修改

https://about.readthedocs.com/blog/2024/07/addons-by-default/

* feat(driver/net): 实现Loopback网卡接口 (#845)

* 初步实现loopback设备

* fix: build-scripts和tools目录下的make check指定工具链版本 (#861)

* fix: tcp poll没有正确处理posix socket的listen状态的问题 (#859)

* chore: 将工具链更新到2024-07-23 (#864)

* chore: 将工具链更新到2024-07-23

* feat(fs): add eventfd syscall support (#858)

* feat(fs): add eventfd syscall support

* refactor: 删除过时的va-pa转换函数,改为统一使用MMArch (#862)

* 默认nightly-2024-07-23 & config改为config.toml (#872)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。 (#870)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。

* feat(cred): 初步实现Cred (#846)

* 初步实现Cred

* 添加seteuid和setegid

* 添加cred测试程序

* 修改Cred::fscmp返回结果为CredFsCmp枚举

* 完善root用户相关信息

* fix: 修复键盘码解析器没能正确处理类似ctrl C的控制字符的问题 (#877)

* fix: 修复键盘码解析器没能正确处理类似ctrl C的控制字符的问题

* fix: 解决ntty潜在的panic问题

* ci: enable ci workflow on branches other than master (#891)

* 修复unlink、unlinkat系统调用的路径错误 (#892)

* fix: socket shutdown wrong implement (#893)

* feat: 增加tokio异步运行时支持 (#894)

* fix the EventFdFlags error

* feat: support tokio (Single thread version)

Fix deadlock issue on closing file.
Add function for PipeInode and EventFdInode.

* feat: 实现unix stream sock和其状态

* 握手支持

* feat:建立连接功能实现

* feat:unix stream socket 初版

* fix: 消除标红

* feat: 阻塞式读写buffer

* feat: 实现unix socket buffer

* 不小心改了inode

---------

Co-authored-by: MemoryShore <[email protected]>
Co-authored-by: 黄铭涛 <[email protected]>
Co-authored-by: LoGin <[email protected]>
Co-authored-by: linfeng <[email protected]>
Co-authored-by: Jomo <[email protected]>
Co-authored-by: Chiichen <[email protected]>
Co-authored-by: Samuel Dai <[email protected]>
Samuka007 added a commit that referenced this pull request Sep 8, 2024
* feat: add options for socket

* feat: print prettier

* add cloud-seed

* feat: improve debug logging for syscall_handler

* 修复mprotect系统调用未正确设置vm_flags的错误 (#847)

* fix(time): modify update wall time (#836)

更改了时间子系统的update_wall_time函数,通过读取当前周期数,计算delta值进行更新,而不是通过传入delta值进行更新

* chore: 调整triagebot.toml以适应新的组织架构 (#848)

* doc: 完善README.md (#849)

* doc: 完善README.md

* chore: 更新sphinx相关配置,适应read the docs的更新 (#850)

根据read the docs在7月15日blog,进行此修改

https://about.readthedocs.com/blog/2024/07/addons-by-default/

* feat(driver/net): 实现Loopback网卡接口 (#845)

* 初步实现loopback设备

* fix: build-scripts和tools目录下的make check指定工具链版本 (#861)

* fix: tcp poll没有正确处理posix socket的listen状态的问题 (#859)

* chore: 将工具链更新到2024-07-23 (#864)

* chore: 将工具链更新到2024-07-23

* remove uneccecary import

* feat(fs): add eventfd syscall support (#858)

* feat(fs): add eventfd syscall support

* refactor: 删除过时的va-pa转换函数,改为统一使用MMArch (#862)

* 默认nightly-2024-07-23 & config改为config.toml (#872)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。 (#870)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。

* make some updates

* chore: 将工具链更新到2024-07-23 (#864)

* chore: 将工具链更新到2024-07-23

* feat(fs): add eventfd syscall support (#858)

* feat(fs): add eventfd syscall support

* refactor: 删除过时的va-pa转换函数,改为统一使用MMArch (#862)

* 默认nightly-2024-07-23 & config改为config.toml (#872)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。 (#870)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。

* feat(cred): 初步实现Cred (#846)

* 初步实现Cred

* 添加seteuid和setegid

* 添加cred测试程序

* 修改Cred::fscmp返回结果为CredFsCmp枚举

* 完善root用户相关信息

* feat: alloc 127.0.0.2 ~ 127.0.0.8 to loopback device

* chore: 将工具链更新到2024-07-23 (#864)

* chore: 将工具链更新到2024-07-23

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。 (#870)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。

* feat(cred): 初步实现Cred (#846)

* 初步实现Cred

* 添加seteuid和setegid

* 添加cred测试程序

* 修改Cred::fscmp返回结果为CredFsCmp枚举

* 完善root用户相关信息

* allow deadcode

* allign syscall print

* change iface (origin netdevice)

* dev: rebuild net day1

* fix: 修复键盘码解析器没能正确处理类似ctrl C的控制字符的问题 (#877)

* fix: 修复键盘码解析器没能正确处理类似ctrl C的控制字符的问题

* fix: 解决ntty潜在的panic问题

* 重写datagram,构建inet socket底层

* feat: add tcp, add udp poll

* feat: redefine socket interface

* ci: enable ci workflow on branches other than master (#891)

* 修复unlink、unlinkat系统调用的路径错误 (#892)

* fix: socket shutdown wrong implement (#893)

* implment methods with poll_iface, and complete udp tcp poll.

* feat: add tcp connecting middle state

* fix: correct tcp connect state machine

* feat: tcp connect check

* feat: add inet socket iface

* fix net iface poll

* feat: 增加tokio异步运行时支持 (#894)

* fix the EventFdFlags error

* feat: support tokio (Single thread version)

Fix deadlock issue on closing file.
Add function for PipeInode and EventFdInode.

* fix font size problem

* fix: pipe 读取/写入阻塞时,无法kill进程的问题 (#889)

* diable file autoSave on FocusChange, fix tcp method logics

* fix: change back socket inode design.
必须要有一个SocketInode承担IndexNode操作与Socket层之间的交互。
然后发现fcntl是无法将nonblock等flag传入socket层的,需要再改。

* feat: define socket trait, move unused definitions into socket/define

* feat: add recv_msg and send_msg method

* fix: syscalls

* feat: 精简 epoll items

* feat: a "should be able to go though compilation" commit

---------

Co-authored-by: MemoryShore <[email protected]>
Co-authored-by: 黄铭涛 <[email protected]>
Co-authored-by: LoGin <[email protected]>
Co-authored-by: SMALLC <[email protected]>
Co-authored-by: linfeng <[email protected]>
Co-authored-by: Jomo <[email protected]>
Co-authored-by: Chiichen <[email protected]>
Samuka007 added a commit that referenced this pull request Sep 9, 2024
* feat: add options for socket

* feat: print prettier

* add cloud-seed

* feat: improve debug logging for syscall_handler

* 修复mprotect系统调用未正确设置vm_flags的错误 (#847)

* fix(time): modify update wall time (#836)

更改了时间子系统的update_wall_time函数,通过读取当前周期数,计算delta值进行更新,而不是通过传入delta值进行更新

* chore: 调整triagebot.toml以适应新的组织架构 (#848)

* doc: 完善README.md (#849)

* doc: 完善README.md

* chore: 更新sphinx相关配置,适应read the docs的更新 (#850)

根据read the docs在7月15日blog,进行此修改

https://about.readthedocs.com/blog/2024/07/addons-by-default/

* feat(driver/net): 实现Loopback网卡接口 (#845)

* 初步实现loopback设备

* fix: build-scripts和tools目录下的make check指定工具链版本 (#861)

* fix: tcp poll没有正确处理posix socket的listen状态的问题 (#859)

* chore: 将工具链更新到2024-07-23 (#864)

* chore: 将工具链更新到2024-07-23

* remove uneccecary import

* feat(fs): add eventfd syscall support (#858)

* feat(fs): add eventfd syscall support

* refactor: 删除过时的va-pa转换函数,改为统一使用MMArch (#862)

* 默认nightly-2024-07-23 & config改为config.toml (#872)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。 (#870)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。

* make some updates

* chore: 将工具链更新到2024-07-23 (#864)

* chore: 将工具链更新到2024-07-23

* feat(fs): add eventfd syscall support (#858)

* feat(fs): add eventfd syscall support

* refactor: 删除过时的va-pa转换函数,改为统一使用MMArch (#862)

* 默认nightly-2024-07-23 & config改为config.toml (#872)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。 (#870)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。

* feat(cred): 初步实现Cred (#846)

* 初步实现Cred

* 添加seteuid和setegid

* 添加cred测试程序

* 修改Cred::fscmp返回结果为CredFsCmp枚举

* 完善root用户相关信息

* feat: alloc 127.0.0.2 ~ 127.0.0.8 to loopback device

* chore: 将工具链更新到2024-07-23 (#864)

* chore: 将工具链更新到2024-07-23

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。 (#870)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。

* feat(cred): 初步实现Cred (#846)

* 初步实现Cred

* 添加seteuid和setegid

* 添加cred测试程序

* 修改Cred::fscmp返回结果为CredFsCmp枚举

* 完善root用户相关信息

* allow deadcode

* allign syscall print

* change iface (origin netdevice)

* dev: rebuild net day1

* fix: 修复键盘码解析器没能正确处理类似ctrl C的控制字符的问题 (#877)

* fix: 修复键盘码解析器没能正确处理类似ctrl C的控制字符的问题

* fix: 解决ntty潜在的panic问题

* 重写datagram,构建inet socket底层

* feat: add tcp, add udp poll

* feat: redefine socket interface

* ci: enable ci workflow on branches other than master (#891)

* 修复unlink、unlinkat系统调用的路径错误 (#892)

* fix: socket shutdown wrong implement (#893)

* implment methods with poll_iface, and complete udp tcp poll.

* feat: add tcp connecting middle state

* fix: correct tcp connect state machine

* feat: tcp connect check

* feat: add inet socket iface

* fix net iface poll

* feat: 增加tokio异步运行时支持 (#894)

* fix the EventFdFlags error

* feat: support tokio (Single thread version)

Fix deadlock issue on closing file.
Add function for PipeInode and EventFdInode.

* fix font size problem

* fix: pipe 读取/写入阻塞时,无法kill进程的问题 (#889)

* diable file autoSave on FocusChange, fix tcp method logics

* fix: change back socket inode design.
必须要有一个SocketInode承担IndexNode操作与Socket层之间的交互。
然后发现fcntl是无法将nonblock等flag传入socket层的,需要再改。

* feat: define socket trait, move unused definitions into socket/define

* feat: add recv_msg and send_msg method

* fix: syscalls

* feat: 精简 epoll items

* feat: a "should be able to go though compilation" commit

* feat: more implement on inet poll notification chain

* fix: make fmt

* fix: complete socket startup module

* disable dhcp initialization

---------

Co-authored-by: MemoryShore <[email protected]>
Co-authored-by: 黄铭涛 <[email protected]>
Co-authored-by: LoGin <[email protected]>
Co-authored-by: SMALLC <[email protected]>
Co-authored-by: linfeng <[email protected]>
Co-authored-by: Jomo <[email protected]>
Co-authored-by: Chiichen <[email protected]>
Samuka007 added a commit that referenced this pull request Sep 14, 2024
* feat: add options for socket

* feat: print prettier

* add cloud-seed

* feat: improve debug logging for syscall_handler

* 修复mprotect系统调用未正确设置vm_flags的错误 (#847)

* fix(time): modify update wall time (#836)

更改了时间子系统的update_wall_time函数,通过读取当前周期数,计算delta值进行更新,而不是通过传入delta值进行更新

* chore: 调整triagebot.toml以适应新的组织架构 (#848)

* doc: 完善README.md (#849)

* doc: 完善README.md

* chore: 更新sphinx相关配置,适应read the docs的更新 (#850)

根据read the docs在7月15日blog,进行此修改

https://about.readthedocs.com/blog/2024/07/addons-by-default/

* feat(driver/net): 实现Loopback网卡接口 (#845)

* 初步实现loopback设备

* fix: build-scripts和tools目录下的make check指定工具链版本 (#861)

* fix: tcp poll没有正确处理posix socket的listen状态的问题 (#859)

* chore: 将工具链更新到2024-07-23 (#864)

* chore: 将工具链更新到2024-07-23

* remove uneccecary import

* feat(fs): add eventfd syscall support (#858)

* feat(fs): add eventfd syscall support

* refactor: 删除过时的va-pa转换函数,改为统一使用MMArch (#862)

* 默认nightly-2024-07-23 & config改为config.toml (#872)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。 (#870)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。

* make some updates

* chore: 将工具链更新到2024-07-23 (#864)

* chore: 将工具链更新到2024-07-23

* feat(fs): add eventfd syscall support (#858)

* feat(fs): add eventfd syscall support

* refactor: 删除过时的va-pa转换函数,改为统一使用MMArch (#862)

* 默认nightly-2024-07-23 & config改为config.toml (#872)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。 (#870)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。

* feat(cred): 初步实现Cred (#846)

* 初步实现Cred

* 添加seteuid和setegid

* 添加cred测试程序

* 修改Cred::fscmp返回结果为CredFsCmp枚举

* 完善root用户相关信息

* feat: alloc 127.0.0.2 ~ 127.0.0.8 to loopback device

* chore: 将工具链更新到2024-07-23 (#864)

* chore: 将工具链更新到2024-07-23

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。 (#870)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。

* feat(cred): 初步实现Cred (#846)

* 初步实现Cred

* 添加seteuid和setegid

* 添加cred测试程序

* 修改Cred::fscmp返回结果为CredFsCmp枚举

* 完善root用户相关信息

* allow deadcode

* allign syscall print

* change iface (origin netdevice)

* dev: rebuild net day1

* fix: 修复键盘码解析器没能正确处理类似ctrl C的控制字符的问题 (#877)

* fix: 修复键盘码解析器没能正确处理类似ctrl C的控制字符的问题

* fix: 解决ntty潜在的panic问题

* 重写datagram,构建inet socket底层

* feat: add tcp, add udp poll

* feat: redefine socket interface

* ci: enable ci workflow on branches other than master (#891)

* 修复unlink、unlinkat系统调用的路径错误 (#892)

* fix: socket shutdown wrong implement (#893)

* implment methods with poll_iface, and complete udp tcp poll.

* feat: add tcp connecting middle state

* fix: correct tcp connect state machine

* feat: tcp connect check

* feat: add inet socket iface

* fix net iface poll

* feat: 增加tokio异步运行时支持 (#894)

* fix the EventFdFlags error

* feat: support tokio (Single thread version)

Fix deadlock issue on closing file.
Add function for PipeInode and EventFdInode.

* fix font size problem

* fix: pipe 读取/写入阻塞时,无法kill进程的问题 (#889)

* diable file autoSave on FocusChange, fix tcp method logics

* fix: change back socket inode design.
必须要有一个SocketInode承担IndexNode操作与Socket层之间的交互。
然后发现fcntl是无法将nonblock等flag传入socket层的,需要再改。

* feat: define socket trait, move unused definitions into socket/define

* feat: add recv_msg and send_msg method

* fix: syscalls

* feat: 精简 epoll items

* feat: a "should be able to go though compilation" commit

* feat: more implement on inet poll notification chain

* fix: make fmt

* fix: complete socket startup module

* disable dhcp initialization

* add tcp accept

---------

Co-authored-by: MemoryShore <[email protected]>
Co-authored-by: 黄铭涛 <[email protected]>
Co-authored-by: LoGin <[email protected]>
Co-authored-by: SMALLC <[email protected]>
Co-authored-by: linfeng <[email protected]>
Co-authored-by: Jomo <[email protected]>
Co-authored-by: Chiichen <[email protected]>
Samuka007 pushed a commit that referenced this pull request Sep 18, 2024
…#926)

* add netlink todo directory

* save the work 2 another system workplace

* save the work 2 another system workplace

* add the demo of netlink_create and locate the kobject_uevent\kobject_uevent_env

* add the uevent directory and demo of kobject_uevent and kobject_uevent_env

* delete sth else in target

* handle existing errors, ready for the next period of dev

* 阶段性提交,完成了kobjectuevent_env的部分逻辑,接下来需要实现uevent_ops结构体的转写

* 调整uevent_suppress和subsystem,修改分支日志打印信息

* 调整uevent_suppress和subsystem,修改分支日志打印信息

* 在kset中引入了KsetUeventOps的trait,待实现

* 阶段性提交, 基本完成了处理kset的uevent_ops相关逻辑,新增一个trait和一个结构体,正在逐步完善kobject_uevent_env

* 阶段性提交:完善大部分kobject_uevent_env函数的功能

* add_uevent_var,kobject_uevent_net_broadcast,zap_modalias_env,完善其他细节的逻辑

* 阶段性提交,开始逐渐深入与netlink

* 阶段性提交,重构netlinktable和netlinksocket

* replace kdebug with log::info!

* 理清了sock和ueventsock的关系,重构了一部分原来的代码

* 阶段性提交,新增了几个函数,进一步完善了netlink

* 阶段性提交,新增了Sk_Buff封装了一层PacketBuffer,需要解决mc_list迭代器实现方案和PacketBuffer提供的接口不足的问题

* 初步解决mc_list迭代问题和consume_skb

* fmt

* 同步更改

* asy to antoher workplace

* 初步解决现有代码中所有权和生命周期等问题

* fix nlk_sk and init test for uevent

* 初步在driver中成功调用kobject_uevent()进行测试,标记需要发送uevent的地方

* ipml socket for netlinksock

* 阶段性提交,完善netlink_proto相关内容

* 阶段性提交,初步实现netlink_add_usersock_entry等

* 实现netlink_proto_init()

* add NetProtoFamily and NetlinkFamulyOps

* 修复mprotect系统调用未正确设置vm_flags的错误 (#847)

* fix(time): modify update wall time (#836)

更改了时间子系统的update_wall_time函数,通过读取当前周期数,计算delta值进行更新,而不是通过传入delta值进行更新

* chore: 调整triagebot.toml以适应新的组织架构 (#848)

* netlink_insert大体框架,遇到nlk无法修改的问题

* doc: 完善README.md (#849)

* doc: 完善README.md

* chore: 更新sphinx相关配置,适应read the docs的更新 (#850)

根据read the docs在7月15日blog,进行此修改

https://about.readthedocs.com/blog/2024/07/addons-by-default/

* 完善netlink_insert 和 netlink_lookup

* feat(driver/net): 实现Loopback网卡接口 (#845)

* 初步实现loopback设备

* fix: build-scripts和tools目录下的make check指定工具链版本 (#861)

* fix: tcp poll没有正确处理posix socket的listen状态的问题 (#859)

* chore: 将工具链更新到2024-07-23 (#864)

* chore: 将工具链更新到2024-07-23

* 考虑更换Sk_Buffer实现,留档原有方案

* feat(fs): add eventfd syscall support (#858)

* feat(fs): add eventfd syscall support

* 更换Sk_Buffer实现

* refactor: 删除过时的va-pa转换函数,改为统一使用MMArch (#862)

* 需要解决Arc内部可变性问题

* 解决sk:Arc内部可变性问题

* 默认nightly-2024-07-23 & config改为config.toml (#872)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。 (#870)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。

* 基本实现netlink单播,todo回调函数

* remove unused import

* 考虑是否引入回调函数,补充sockflags

* updates test-uevent

* add endpoint and complete to_endpoint function for NetLinkEndpoint

* feat(cred): 初步实现Cred (#846)

* 初步实现Cred

* 添加seteuid和setegid

* 添加cred测试程序

* 修改Cred::fscmp返回结果为CredFsCmp枚举

* 完善root用户相关信息

* fix: 修复键盘码解析器没能正确处理类似ctrl C的控制字符的问题 (#877)

* fix: 修复键盘码解析器没能正确处理类似ctrl C的控制字符的问题

* fix: 解决ntty潜在的panic问题

* success to call NetlinkSock bind fn and add a fn into Socket trait

* modify handle in NetlinkSock

* fix af_netlink problems in the new branch reported by RA

* updates test-uevent

* add netlink_send adn  netlink_recv

* fix bind

* fix sth

* fix var type

* 初步完成了netlink/uevent在用户空间的创建、绑定和读写测试,下一步是内核中kobject/kset相关的调用调试和uevent文件挂载到sysfs中的需求

* restore recvfrom parameter

---------

Co-authored-by: val213 <[email protected]>
Co-authored-by: MemoryShore <[email protected]>
Co-authored-by: 黄铭涛 <[email protected]>
Co-authored-by: LoGin <[email protected]>
Co-authored-by: SMALLC <[email protected]>
Co-authored-by: linfeng <[email protected]>
Co-authored-by: Jomo <[email protected]>
Samuka007 added a commit that referenced this pull request Sep 19, 2024
* 修复mprotect系统调用未正确设置vm_flags的错误 (#847)

* fix(time): modify update wall time (#836)

更改了时间子系统的update_wall_time函数,通过读取当前周期数,计算delta值进行更新,而不是通过传入delta值进行更新

* chore: 调整triagebot.toml以适应新的组织架构 (#848)

* doc: 完善README.md (#849)

* doc: 完善README.md

* chore: 更新sphinx相关配置,适应read the docs的更新 (#850)

根据read the docs在7月15日blog,进行此修改

https://about.readthedocs.com/blog/2024/07/addons-by-default/

* feat(driver/net): 实现Loopback网卡接口 (#845)

* 初步实现loopback设备

* fix: build-scripts和tools目录下的make check指定工具链版本 (#861)

* fix: tcp poll没有正确处理posix socket的listen状态的问题 (#859)

* chore: 将工具链更新到2024-07-23 (#864)

* chore: 将工具链更新到2024-07-23

* feat(fs): add eventfd syscall support (#858)

* feat(fs): add eventfd syscall support

* refactor: 删除过时的va-pa转换函数,改为统一使用MMArch (#862)

* 默认nightly-2024-07-23 & config改为config.toml (#872)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。 (#870)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。

* feat(cred): 初步实现Cred (#846)

* 初步实现Cred

* 添加seteuid和setegid

* 添加cred测试程序

* 修改Cred::fscmp返回结果为CredFsCmp枚举

* 完善root用户相关信息

* fix: 修复键盘码解析器没能正确处理类似ctrl C的控制字符的问题 (#877)

* fix: 修复键盘码解析器没能正确处理类似ctrl C的控制字符的问题

* fix: 解决ntty潜在的panic问题

* ci: enable ci workflow on branches other than master (#891)

* 修复unlink、unlinkat系统调用的路径错误 (#892)

* fix: socket shutdown wrong implement (#893)

* feat: 增加tokio异步运行时支持 (#894)

* fix the EventFdFlags error

* feat: support tokio (Single thread version)

Fix deadlock issue on closing file.
Add function for PipeInode and EventFdInode.

* feat: 实现unix stream sock和其状态

* 握手支持

* feat:建立连接功能实现

* feat:unix stream socket 初版

* fix: 消除标红

* feat: 阻塞式读写buffer

* feat: 实现unix socket buffer

* 不小心改了inode

* fix: 修复客户端和服务端buffer不互通的问题

* 111

* fix: 修改建立连接逻辑

* merge net

* feat: 解决bing问题

* fix: 消除红码

* feat: unix stream socket 阻塞式读写机制实现

---------

Co-authored-by: MemoryShore <[email protected]>
Co-authored-by: 黄铭涛 <[email protected]>
Co-authored-by: LoGin <[email protected]>
Co-authored-by: linfeng <[email protected]>
Co-authored-by: Jomo <[email protected]>
Co-authored-by: Chiichen <[email protected]>
Co-authored-by: Samuel Dai <[email protected]>
Samuka007 pushed a commit that referenced this pull request Sep 27, 2024
* add netlink todo directory

* save the work 2 another system workplace

* save the work 2 another system workplace

* add the demo of netlink_create and locate the kobject_uevent\kobject_uevent_env

* add the uevent directory and demo of kobject_uevent and kobject_uevent_env

* delete sth else in target

* handle existing errors, ready for the next period of dev

* 阶段性提交,完成了kobjectuevent_env的部分逻辑,接下来需要实现uevent_ops结构体的转写

* 调整uevent_suppress和subsystem,修改分支日志打印信息

* 调整uevent_suppress和subsystem,修改分支日志打印信息

* 在kset中引入了KsetUeventOps的trait,待实现

* 阶段性提交, 基本完成了处理kset的uevent_ops相关逻辑,新增一个trait和一个结构体,正在逐步完善kobject_uevent_env

* 阶段性提交:完善大部分kobject_uevent_env函数的功能

* add_uevent_var,kobject_uevent_net_broadcast,zap_modalias_env,完善其他细节的逻辑

* 阶段性提交,开始逐渐深入与netlink

* 阶段性提交,重构netlinktable和netlinksocket

* replace kdebug with log::info!

* 理清了sock和ueventsock的关系,重构了一部分原来的代码

* 阶段性提交,新增了几个函数,进一步完善了netlink

* 阶段性提交,新增了Sk_Buff封装了一层PacketBuffer,需要解决mc_list迭代器实现方案和PacketBuffer提供的接口不足的问题

* 初步解决mc_list迭代问题和consume_skb

* fmt

* 同步更改

* asy to antoher workplace

* 初步解决现有代码中所有权和生命周期等问题

* fix nlk_sk and init test for uevent

* 初步在driver中成功调用kobject_uevent()进行测试,标记需要发送uevent的地方

* ipml socket for netlinksock

* 阶段性提交,完善netlink_proto相关内容

* 阶段性提交,初步实现netlink_add_usersock_entry等

* 实现netlink_proto_init()

* add NetProtoFamily and NetlinkFamulyOps

* 修复mprotect系统调用未正确设置vm_flags的错误 (#847)

* fix(time): modify update wall time (#836)

更改了时间子系统的update_wall_time函数,通过读取当前周期数,计算delta值进行更新,而不是通过传入delta值进行更新

* chore: 调整triagebot.toml以适应新的组织架构 (#848)

* netlink_insert大体框架,遇到nlk无法修改的问题

* doc: 完善README.md (#849)

* doc: 完善README.md

* chore: 更新sphinx相关配置,适应read the docs的更新 (#850)

根据read the docs在7月15日blog,进行此修改

https://about.readthedocs.com/blog/2024/07/addons-by-default/

* 完善netlink_insert 和 netlink_lookup

* feat(driver/net): 实现Loopback网卡接口 (#845)

* 初步实现loopback设备

* fix: build-scripts和tools目录下的make check指定工具链版本 (#861)

* fix: tcp poll没有正确处理posix socket的listen状态的问题 (#859)

* chore: 将工具链更新到2024-07-23 (#864)

* chore: 将工具链更新到2024-07-23

* 考虑更换Sk_Buffer实现,留档原有方案

* feat(fs): add eventfd syscall support (#858)

* feat(fs): add eventfd syscall support

* 更换Sk_Buffer实现

* refactor: 删除过时的va-pa转换函数,改为统一使用MMArch (#862)

* 需要解决Arc内部可变性问题

* 解决sk:Arc内部可变性问题

* 默认nightly-2024-07-23 & config改为config.toml (#872)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。 (#870)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。

* 基本实现netlink单播,todo回调函数

* remove unused import

* 考虑是否引入回调函数,补充sockflags

* updates test-uevent

* add endpoint and complete to_endpoint function for NetLinkEndpoint

* feat(cred): 初步实现Cred (#846)

* 初步实现Cred

* 添加seteuid和setegid

* 添加cred测试程序

* 修改Cred::fscmp返回结果为CredFsCmp枚举

* 完善root用户相关信息

* fix: 修复键盘码解析器没能正确处理类似ctrl C的控制字符的问题 (#877)

* fix: 修复键盘码解析器没能正确处理类似ctrl C的控制字符的问题

* fix: 解决ntty潜在的panic问题

* success to call NetlinkSock bind fn and add a fn into Socket trait

* modify handle in NetlinkSock

* fix af_netlink problems in the new branch reported by RA

* updates test-uevent

* add netlink_send adn  netlink_recv

* fix bind

* fix sth

* fix var type

* 初步完成了netlink/uevent在用户空间的创建、绑定和读写测试,下一步是内核中kobject/kset相关的调用调试和uevent文件挂载到sysfs中的需求

* restore recvfrom parameter

* add postcore init fn, todo: callback and clourse define

* cfg使用闭包实现回调函数字段,修复部分nlk在动态类型分发侯进行类型转换失败的问题

* 调试现有函数调用链条,完善部分设计,为下一步继续实现udev监听并关联sysfs节点做准备

---------

Co-authored-by: val213 <[email protected]>
Co-authored-by: MemoryShore <[email protected]>
Co-authored-by: 黄铭涛 <[email protected]>
Co-authored-by: LoGin <[email protected]>
Co-authored-by: SMALLC <[email protected]>
Co-authored-by: linfeng <[email protected]>
Co-authored-by: Jomo <[email protected]>
Samuka007 added a commit that referenced this pull request Sep 28, 2024
* 修复mprotect系统调用未正确设置vm_flags的错误 (#847)

* fix(time): modify update wall time (#836)

更改了时间子系统的update_wall_time函数,通过读取当前周期数,计算delta值进行更新,而不是通过传入delta值进行更新

* chore: 调整triagebot.toml以适应新的组织架构 (#848)

* doc: 完善README.md (#849)

* doc: 完善README.md

* chore: 更新sphinx相关配置,适应read the docs的更新 (#850)

根据read the docs在7月15日blog,进行此修改

https://about.readthedocs.com/blog/2024/07/addons-by-default/

* feat(driver/net): 实现Loopback网卡接口 (#845)

* 初步实现loopback设备

* fix: build-scripts和tools目录下的make check指定工具链版本 (#861)

* fix: tcp poll没有正确处理posix socket的listen状态的问题 (#859)

* chore: 将工具链更新到2024-07-23 (#864)

* chore: 将工具链更新到2024-07-23

* feat(fs): add eventfd syscall support (#858)

* feat(fs): add eventfd syscall support

* refactor: 删除过时的va-pa转换函数,改为统一使用MMArch (#862)

* 默认nightly-2024-07-23 & config改为config.toml (#872)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。 (#870)

* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。

* feat(cred): 初步实现Cred (#846)

* 初步实现Cred

* 添加seteuid和setegid

* 添加cred测试程序

* 修改Cred::fscmp返回结果为CredFsCmp枚举

* 完善root用户相关信息

* fix: 修复键盘码解析器没能正确处理类似ctrl C的控制字符的问题 (#877)

* fix: 修复键盘码解析器没能正确处理类似ctrl C的控制字符的问题

* fix: 解决ntty潜在的panic问题

* ci: enable ci workflow on branches other than master (#891)

* 修复unlink、unlinkat系统调用的路径错误 (#892)

* fix: socket shutdown wrong implement (#893)

* feat: 增加tokio异步运行时支持 (#894)

* fix the EventFdFlags error

* feat: support tokio (Single thread version)

Fix deadlock issue on closing file.
Add function for PipeInode and EventFdInode.

* fix: pipe 读取/写入阻塞时,无法kill进程的问题 (#889)

* fix: 修复存在多个virtio设备时,中断号冲突的问题 (#904)

* feat: 添加gendisk抽象 (#903)

* feat: 添加gendisk抽象.

* 支持使用virtio磁盘作为根文件系统

* Update initial_kthread.rs to resolve conflict.

---------

Co-authored-by: Donkey Kane <[email protected]>

* feat(mm): 简单实现fat文件系统的文件映射 (#840)

- 添加文件映射相关接口,目前已简单实现fat文件系统的私有映射和共享映射
- 添加msync系统调用(由于当前未实现脏页自动回写,需要手动调用msync进行同步)
- 简单实现PageCache(暂时使用HashMap进行文件页号与页的映射)
- 添加新的PageFlags标志结构,原PageFlags改名为EntryFlags
- 参考linux使用protection_map映射表进行页面标志的获取
- 添加页面回收机制
- 添加页面回收内核线程
- 缺页中断使用的锁修改为irq_save; 添加脏页回写机制
- 修复do_cow_page死锁问题
- 访问非法地址时发送信号终止进程
- 修复重复插入反向vma表的错误
- 添加test_filemap文件映射测试程序

* feat: 添加对内核引导协议的抽象 (#913)

* 添加multiboot header

* head.S传参增加bootloader类型

* feat: 添加引导加载协议的抽象,并为multiboot2实现这个抽象.

* 把framebuffer的映射地址改为从early ioremap和mmio pool分配

* riscv64能运行

* fix(virtio):修复了特定virtio设备环境下中断号重复错误,以及开机内核panic的bug (#881)

* feat: 允许通过multiboot引导(直到acpi初始化报错) (#914)

* fix(mm): 修复riscv64启动时的PageFault (#915)

* 修复riscv64启动时的PageFault

* 优化代码结构

* feat(driver/net): 将网络设备注册到sysfs, 添加设备类属性文件 (#919)

* ci(docs): Build docs when push/PR to master and release version. (#935)

Signed-off-by: longjin <[email protected]>

* fix: Fix make update-submodules-by-mirror Error (#928)

* remove --init suffix in update-submodules-by-mirror

* ci: deploy documents to minio (#936)

Signed-off-by: longjin <[email protected]>

* ci: fix awscli botcore (#937)

Signed-off-by: longjin <[email protected]>

* feat(ida): IDA内部改为使用XArray实现 (#934)

目前可以记录哪些ID已经分配,支持了ID释放的功能.

Signed-off-by: longjin <[email protected]>

* doc: add commit revision to footer while build with sphinx-multiversion (#939)

Signed-off-by: longjin <[email protected]>

* doc: 添加在github上编辑的按钮,以及扩展footer (#940)

Signed-off-by: longjin <[email protected]>

* fix: sysfs ifacetrait改名

* merge net && feat(net): stream sockpairs

---------

Signed-off-by: longjin <[email protected]>
Co-authored-by: MemoryShore <[email protected]>
Co-authored-by: 黄铭涛 <[email protected]>
Co-authored-by: LoGin <[email protected]>
Co-authored-by: linfeng <[email protected]>
Co-authored-by: Jomo <[email protected]>
Co-authored-by: Chiichen <[email protected]>
Co-authored-by: Samuel Dai <[email protected]>
Co-authored-by: Donkey Kane <[email protected]>
Co-authored-by: MemoryShore <[email protected]>
Co-authored-by: 曾俊 <[email protected]>
Co-authored-by: EMasi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-driver Area: 驱动程序 A-mm Area: 内存管理子系统 O-x86_64 Target: x86_64 S-等待审查 Status: 等待assignee以及相关方的审查。 T-virtulization Relevant to the virtulization team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants