Commit Graph

38 Commits

Author SHA1 Message Date
openharmony_ci 52d1d8d8d0 !623 procfs 使用统一的权限
Merge pull request !623 from LeonChan/procfs_mode
2021-09-16 11:35:42 +00:00
Leon Chan c79bcd028e fix: same file mode for procfs files
close: #I4ACTC

Signed-off-by: Leon Chan <chenwei26@huawei.com>
2021-09-16 16:18:02 +08:00
openharmony_ci ecd9ca7781 !534 pagecache从filep改为使用vnode
Merge pull request !534 from LeonChan/pg
2021-09-15 03:51:50 +00:00
Leon Chan 38a6b804e9 feat: page cache backed by vnode instead of filep
1, change the owner of page to vnode
2, save the file path in vnode

close: #I44TBS
Signed-off-by: Leon Chan <chenwei26@huawei.com>
2021-09-14 15:31:33 +08:00
arvinzzz b3d96d166c refactor: 清理Makefile冗余项
清理Makefile冗余项,各模块Makefile里不需要再次引用公共路径,只需引用私有头文件路径

close: #I49MOO

Signed-off-by: arvinzzz <zhaotianyu9@huawei.com>
Change-Id: I2dd7189c866498896461f78bfed5444ae1d86876
2021-09-13 18:14:15 +08:00
LiteOS2021 dc9ec6856f feat: L0-L1 支持Trace
1.【需求描述】
            L0~L1 支持Trace,提供两种工作模式:在线模式、离线缓存模式, 用于按时间线追踪系统事件,如任务切换、中断、ipc等。
        2.【方案描述】
            L0:
            (1).在内核模块预置静态代码桩
            (2).触发桩后,收集系统上下文信息
            (3).离线模式则写入内存,用户可通过dump导出;
            (4).在线模式通过pipeline对接IDE进行可视化解析和展示;
            L1:
            新增trace字符设备,位于"/dev/trace",通过对设备节点的read\write\ioctl,实现用户态trace;

        BREAKING CHANGE:
        1.新增一系列trace的对外API,位于los_trace.h中.
        LOS_TRACE_EASY简易插桩
        LOS_TRACE标准插桩
        LOS_TraceInit配置Trace缓冲区的地址和大小
        LOS_TraceStart开启事件记录
        LOS_TraceStop停止事件记录
        LOS_TraceRecordDump输出Trace缓冲区数据
        LOS_TraceRecordGet获取Trace缓冲区的首地址
        LOS_TraceReset清除Trace缓冲区中的事件
        LOS_TraceEventMaskSet设置事件掩码,仅记录某些模块的事件
        LOS_TraceHwiFilterHookReg注册过滤特定中断号事件的钩子函数

        Close #I46WA0

    Signed-off-by: LiteOS2021 <dinglu@huawei.com>

Change-Id: I6a8e64794c4852f2c2980993a06180e09ec6ee0d
2021-08-31 20:29:45 +08:00
wangchen d16bfd005a fix: A核告警消除
【背景】定期A核代码消除。

【修改方案】
1,根据工具扫描结果,对代码告警进行更改

【影响】
对现有的产品编译不会有影响。

re #I46KF6
Signed-off-by: wangchen <253227059@qq.com>
2021-08-20 18:09:04 +08:00
Guangyao Ma 27dca4d857 feat(vfs): vfs支持FD_CLOEXEC标记
首先,POSIX规范规定文件描述符需要支持close-on-exec属性,修改前的vfs不支持close-on-exec,当exec系列函数执行时,进程所有的文件将会被关闭(0,1,2也重新被打开)。但是,系统有些时候是不能在exec时关闭全部文件的,例如在执行exec之前,就需要重定向进程的某些文件描述符时(使用dup2),就希望该文件不被关闭,继续保持重定向属性,shell执行进程并重定向其标准输出到文件,这是我们经常做的事情。

BREAKING CHANGE:
执行exec类函数后,进程拥有的文件描述符情况发生变化:修改前,默认关闭所有的进程文件描述符,0,1,2重新打开;修改后,除非文件描述符拥有FD_CLOEXEC标记,否则该描述符不会被关闭。

re #I3U81W

Change-Id: I54e841ac88e9835ec23e97de0cbc906c4e11f5a4
Signed-off-by: Guangyao Ma <guangyao.ma@outlook.com>
2021-08-11 15:35:46 +08:00
wangchen 698756d1e6 fix: A核代码告警清零
【背景】定期A核代码告警清零。

【修改方案】
根据工具扫描结果,对代码告警进行更改。

【影响】
对现有的产品编译不会有影响。

re #I4378T
Signed-off-by: wangchen <253227059@qq.com>
2021-07-30 17:13:55 +08:00
Caoruihong a8805a65aa feat: add support for gn build system
add BUILD.gn for all kernel modules

Signed-off-by: Caoruihong <crh.cao@huawei.com>
Change-Id: I018446427bf64615f2596d47862b219659b58b34
2021-07-21 15:52:40 +08:00
Caoruihong ac8c2c6d5b fix: minimal compile
fix compile errors in minimal compilation

Signed-off-by: Caoruihong <crh.cao@huawei.com>
Change-Id: I48f4f7b27c684e2c747c1949776c5c4f9e383dec
2021-07-07 00:26:33 +08:00
openharmony_ci 12577eade5 !358 feat: L1支持低功耗投票框架
Merge pull request !358 from zhushengle/pm_v
2021-06-25 00:26:41 +00:00
openharmony_ci 112cdebe41 !357 修改/proc/mounts显示格式
Merge pull request !357 from JING/mount
2021-06-24 08:27:32 +00:00
openharmony_ci a28dcc38c9 !360 增加清除文件系统缓存的维测接口
Merge pull request !360 from 野生毛霉君/master
2021-06-24 07:34:45 +00:00
mucor 3d1cf683f3 feat: add clear cache cmd to /proc/fs_cache
write "clear pathcahe" to clear pathcaches and vnodes
write "clear pagecache" to clear pagecaches
write "clear all" to clear both pathcaches and pagechaches
the cache in use will not be cleared

close: #I3XLPH

Signed-off-by: mucor <mucorwang@gmail.com>
2021-06-24 15:11:50 +08:00
zhushengle 21d8ac8752 feat: L1支持低功耗投票框架
功能描述:
  在proc目录下增加power目录,添加powr_mode,power_lock,power_unlock和power_count节点,
  power_mode:节点用于查询和设置系统支持的功耗模式
  power_lock:用于查询和获取低功耗锁,持锁后,将会阻止系统进入低功耗状态
  power_unlock: 用于释放已经持有的低功耗锁,也可查询当前有那些持有低功耗锁
  power_count:用于查询当前持有低功耗锁的个数

Close #I3VS5N

Change-Id: I2e2881cc968eab3c5fa6f9dbd7e8c5e448609407
Signed-off-by: zhushengle <zhushengle@huawei.com>
2021-06-24 14:27:23 +08:00
chenjing 6860246cfa fix: 修改/proc/mounts显示格式
显示信息内容及格式修改为与posix标准一致,内容包括:
1、挂载设备名
2、挂载点路径
3、文件系统类型
4、挂载选项(此项暂不支持,打印())
5、dump频率(此项暂不支持,值为0)
6、fsck检查次序(此项暂不支持,值为0)

close #I3XGCS

Signed-off-by: chenjing <chenjing139@huawei.com>
Change-Id: I2a8cb093e7c5316feb55fb196bc1b4301d8d0249
2021-06-23 17:10:29 +08:00
openharmony_ci 8fe0cc7770 !344 对proc文件系统内的节点增加uid/gid管理
Merge pull request !344 from LeonChan/proc-uid
2021-06-23 01:21:12 +00:00
chenwei 600dded31e feat: add /proc/fd file to dump the pid/fd/path information
1, for users with privilege, display all users' fd info with the template "Pid  Fd  SysFd Path"
2, for normal user, display its own fd info with the template "Pid Fd Path"

close #I3WB5U

Signed-off-by: chenwei <chenwei26@huawei.com>
2021-06-22 17:27:25 +08:00
chenwei 67806596a3 feat: add uid/gid for ProcFs
close: #I3WGVP

Signed-off-by: chenwei <chenwei26@huawei.com>
2021-06-22 15:40:00 +08:00
mucor 231cb6be27 feat: add /proc/fs_cache to display cache info
add /proc/fs_cache to display vnode, path cache, page cache.
also change some bad virable name

close: #I3WWBD

Signed-off-by: mucor <mucorwang@gmail.com>
2021-06-22 14:53:17 +08:00
SimonLi 2f3d7efc24 回退 'Pull Request !342 : 增加/proc/fs_cache来显示文件系统缓存维测信息' 2021-06-21 21:33:52 +08:00
openharmony_ci b3120b5498 !342 增加/proc/fs_cache来显示文件系统缓存维测信息
Merge pull request !342 from 野生毛霉君/master
2021-06-21 17:21:02 +08:00
mucor 53c6d96c6f feat: add /proc/fs_cache to display cache info
add /proc/fs_cache to display vnode, path cache, page cache.
also change some bad virable name

close: #I3WESD

Signed-off-by: mucor <mucorwang@gmail.com>
2021-06-21 16:11:06 +08:00
chenjing e9ad6b71c3 fix: 增加表头,内容以制表符分栏。
close #I3W2M9

Signed-off-by: chenjing <chenjing139@huawei.com>
Change-Id: If8ba7047e2914a3104182bf017f437c2ae962625
2021-06-21 14:17:03 +08:00
mucor 73a777777e fix: remove redundant headfile
1.remove redundant headfile in kernel, such as:
  compiler.h;debug.h;automount.h;inode.h;syslog.h;net.h;
2.split fs.h to file.h and driver.h
3.move vnode.h and path_cache.h to vfs/include
4.remove redundant interface and defines

close: #I3RTNR

Signed-off-by: mucor <mucorwang@gmail.com>
2021-06-19 17:32:47 +08:00
li_zan f10dd7c135 feat: A核proc文件系统在echo模式下新增write的功能
close: #I3T6MZ

Signed-off-by: li_zan <371442490@qq.com>
2021-06-04 16:14:18 +08:00
arvinzzz 8cde768588 refactor: Refactored the kernel boot process and added a init framework
close: #I3I768

Change-Id: I4f801df4abe1a9afdf43391c28276e96a5e81513
2021-05-20 16:45:43 +08:00
Caoruihong 7e73c929a2 remove __cplusplus guards in .c files
Change-Id: I052d930d54e63179b17b77f02c107a015f3cfc3f
2021-04-19 18:28:25 +08:00
zhangfanfan2 78e1fdb971 解决issueI3J6PP 2021-04-16 18:51:09 +08:00
chenjing 62c039b287 proc closedir 2021-04-07 09:49:17 +08:00
chenjing 18d5e25373 /proc/mounts 2021-04-06 17:33:49 +08:00
chenjing c13366fd92 /proc/mounts 2021-04-06 15:21:29 +08:00
openharmony_ci be5e5fdf42 !112 修复代码段及只读段在uncache映射区域可以篡改的漏洞
Merge pull request !112 from JerryH/mmu
2021-04-01 09:51:59 +08:00
YOUR_NAME c959d43684 IssueNo:#I3E0F2
Description:Delete VM to support only kernel mode.
Sig:liteos_a
Feature or Bugfix:Feature
Binary Source:No

Change-Id: Ie1029c8fbc0c1b85c138663933118d2d148b7769
2021-03-31 16:14:54 +08:00
mucor 1884fa0523 fix readdir, rename
Change-Id: Ic443742e125915f0e5332a338dedea5c40348928
2021-03-24 18:15:06 +08:00
wangchenyang d970750808 Description:vfs refactoring
Feature or Bugfix:Feature
Binary Source:Huawei
PrivateCode(Yes/No):Yes

Change-Id: I175d2648bc6f9078c34de2c0a5c93fda10b86c47
ChangeID:13306388
2021-03-19 13:22:46 +08:00
mamingshuai 73a7b66116 update openharmony 1.0.1 2021-03-11 18:43:57 +08:00