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
chenjing
6eddc869d3
feat: support link/symlink/readlink
...
新增link/symlink/readlink接口的系统调用及内核实现,当前仅支持jffs2文件系统。具体接口说明如下:
一、hard link
接口原型:
int link(const char *oldpath, const char *newpath);
int linkat(int olddirfd, const char *oldpath, int newdirfd, const char *newpath, int flags);
作用:
创建oldpath的硬链接,名为newpath。
功能说明:
1、newpath与oldpath必须在同一挂载分区内。
2、若newpath已存在,不会覆盖,错误码EEXIST。
3、oldpath必须为普通文件或者软链接文件。
4、如果oldpath是一个软链接文件,那么:
若调用link接口或者linkat(flags=0),创建出软链接文件的硬链接;
若调用linkat(flags = AT_SYMLINK_FOLLOW),创建出软链接所指向源文件的硬链接。
5、oldpath与newpath对应同一个文件,对oldpath与newpath任一名字的操作都是直接操作文件,没有“原始文件”的说法。
6、使用cp命令拷贝一个硬链接文件,生成文件的拷贝,新文件的nlink数为1。
7、删除oldpath或newpath,底层文件仍存在,可以通过另一个path访问。只有当两个path都删除之后,才会真正将文件删除,空间释放。
二、symbol link
接口原型:
int symlink(const char *target, const char *linkpath);
int symlinkat(const char *target, int newdirfd, const char *linkpath);
作用:
创建一个软链接文件linkpath,存储字符串target。
功能说明:
1、target可以为任意字符串(长度小于PATH_MAX)。
2、若linkpath文件名已存在,不会覆盖,错误码EEXIST。
3、用readlink函数可读取软链接的target内容。
4、软链接文件本身大小为target长度。
5、ls时软链接文件类型显示为 'l'。
6、symlink最大循环次数为CONFIG_FS_MAX_LNK_CNT(目前为40),超出则返回错误,错误码ELOOP。
7、使用cp命令拷贝一个软链接文件:
若target是一个文件:创建一个源文件的拷贝,类型为普通文件;
若target非文件:拷贝失败。
三、readlink
接口原型:
ssize_t readlink(const char *pathname, char *buf, size_t bufsiz);
ssize_t readlinkat(int dirfd, const char *pathname, char *buf, size_t bufsiz);
作用:
读取软链接文件存放的的target内容。
功能说明:
1、pathname必须为软链接文件,否则错误码EINVAL。
2、如果bufsiz小于target长度,则截断target。
close #I3Q0OD
Change-Id: I3864d6069b627b705a369e8e32dc1eb922dc0157
Signed-off-by: chenjing <chenjing139@huawei.com>
2021-06-09 16:39:41 +08:00
openharmony_ci
3bf8cbc728
!301 修复SysOpenat返回的文件句柄不正确的问题
...
Merge pull request !301 from JING/openat
2021-06-09 13:50:40 +08:00
openharmony_ci
7d10057103
!300 codex问题修复
...
Merge pull request !300 from LeonChan/master
2021-06-08 08:48:30 +08:00
openharmony_ci
647f3defcd
!296 支持最小化特性编译,添加了一个针对qemu arm virt的样例config配置
...
Merge pull request !296 from Caoruihong/master
2021-06-07 22:51:46 +08:00
chenwei
101a55d119
fix: codex
...
1,VFS代码中不修改参数增加const修饰
2,fs_file_mapping.c: 增加安全函数的判空
3,path_cache.c: sizeof改为使用类型
4,fs_syscall.c: 对NULL解引用
5,VnodeLookup:冗余的判空,及不正确的判空
close: I3UMWD
Signed-off-by: yansira <yansira@hotmail.com>
2021-06-07 22:45:40 +08:00
chenjing
3457c0b11d
fix: SysOpenat返回值应该为进程fd,而非系统全局fd。
...
close #I3TNAK
Signed-off-by: chenjing <chenjing139@huawei.com>
Change-Id: Ie754259ead7fc8f4c3b0fa36ef31969dd728b235
2021-06-07 19:50:33 +08:00
Caoruihong
744b2021b2
chore: add a mini config for qemu arm virt
...
support turn off as many features as possible.
current only libc and posix and bsd can not be turned off.
Signed-off-by: Caoruihong <crh.cao@huawei.com>
Change-Id: I1e97570c67593207a56dc11f357eca4b4a018bfd
2021-06-05 17:40:22 +08:00
Kiita
e5f6bf0556
feat: timer_create支持以SIGEV_THREAD方式创建定时器
...
【背景】当前timer_create接口不支持以SIGEV_THREAD的方式创建多个定时器
【修改方案】
1、内核timer_create接口在创建software timers相应的线程时,使用线程
taskCB所携带的信息识别各个线程的信号并依据该信息分别派发出信号。
2、关于用户任务操作许可验证的修改,现在允许同一用户线程向其自身派发信
号,软件定时器计时结束,向用户态发送相应的信号,完成用户态线程的回调。
【影响】
对现有的产品暂无影响。
re #I3SRFI
Signed-off-by: yansira <yansira@hotmail.com>
Change-Id: Ia23f5ef01975bf867dd7f5db797a30c264c50501
2021-06-04 15:29:44 +08:00
zhushengle
cf89f016e9
fix: 解决kill进程时无法保证进程的已持有的内核资源合理释放.
...
背景: 当前信号实现原理是在系统调用结束和中断结束时检查是否有信号处理,
如果有信号处理就切去处理信号,信号处理结束后回来继续按原来流程执行。
问题:当用户态线程在执行系统调用或缺页异常时,运行在内核态,如果此时有信
号需要处理,且该线程已经持有了部分内核资源(如:锁,内存等), 此时如
果有中断发生,则在中断结束时,就会去处理该信号,此时用户态线程持有
了内核未释放的资源跑到了用户态去运行,如果该线程在用户态出现问题,
那么它持有的内核资源就无法被释放了。
方案:用户态线程在执行系统调用和缺页异常时暂时屏蔽信号,防止此时有中断去
处理信号,等系统调用结束或缺页异常结束时再去处理信号。
解决的问题:
1. 执行系统调用或缺页异常时屏蔽信号,防止中断去处理信号
2.解决无法kill 因为用户态的锁、ipc等阻塞的用户态线程
3.进程退出方式转变为: 依次通过kill去杀死该进程的所有线程
Close #I3S0N0
Change-Id: I0c48b9c89382826191b8a9326c71b57ba84124c2
2021-05-24 14:29:37 +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
openharmony_ci
6f99abfc7b
!222 fix: correct spelling
...
Merge pull request !222 from rtos-lover/los_task
2021-05-19 13:46:10 +08:00
zhushengle
1e308db64e
fix:Fixed exception not saving stack pointer of SVC mode and abnormal signal processing issues
...
Close #I3OAFR
Change-Id: I25b14572809b6fabb9e9d17de89a99047c02a59b
2021-05-11 09:58:54 +08:00
rtos-lover
c66fe0313f
fix: correct spelling
...
correct some typos in los_task.c and other files
close https://gitee.com/openharmony/kernel_liteos_a/issues/I3QDB8
2021-05-08 11:23:08 +08:00
zhushengle
6d63f75e7f
fix:Solve the coupling between the kernel and the structure under ARCH.
...
Close #I3OAFR
Change-Id: Icea238e20adf402d0ec1fc7e47ff4e58124a5e83
2021-04-26 19:54:49 +08:00
openharmony_ci
7ba0bfa800
!157 删除无用的__cplusplus,移除不必要的文件x权限
...
Merge pull request !157 from Caoruihong/cplusplus
2021-04-20 09:01:45 +08:00
Caoruihong
7e73c929a2
remove __cplusplus guards in .c files
...
Change-Id: I052d930d54e63179b17b77f02c107a015f3cfc3f
2021-04-19 18:28:25 +08:00
YOUR_NAME
74af06d5cb
IssueNo:#I3G1Q7
...
Description:Fix related interface competition issues.
Sig:liteos_a
Feature or Bugfix:Bugfix
Binary Source:No
Change-Id: I1198408be9ce577bbf0735e3da53d0834622f429
2021-04-17 16:15:35 +08:00
Caoruihong
d2197c801f
use -include option instead of including menuconfig manually
...
Change-Id: Ie48b96fe9c8ab036d7234b56a169d6668171a895
2021-04-14 17:56:48 +08:00
Guangyao Ma
ce849f2145
feat: add and fix some syscall
...
add SysFstatat64 SysInfo SysVfork SysGetrusage
fix up SysDup SysFcntl
Change-Id: If41228da62f406312858921e48e2210e04f16a16
2021-04-09 14:45:53 +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
openharmony_ci
0593715e39
!72 【轻量级 PR】:删除SysFork中的CLONE_SIGHAND flag
...
Merge pull request !72 from zhushengle/N/A
2021-03-18 21:32:00 +08:00
zhangfanfan2
36eb117140
组件解耦修改---支持内核态dynload和net关闭
2021-03-13 19:05:12 +08:00
mamingshuai
73a7b66116
update openharmony 1.0.1
2021-03-11 18:43:57 +08:00
zhushengle
5b03c42d9a
删除SysFork中的CLONE_SIGHAND flag
2021-02-27 17:51:32 +08:00
openharmony_ci
e901790b32
!48 【轻量级 PR】:代码中mount nfs问题修复
...
Merge pull request !48 from zhangfanfan2/N/A
2021-01-07 08:16:31 +08:00
openharmony_ci
58da2cb0c2
!33 OpenHarmony LiteOS-A QEMU support
...
Merge pull request !33 from WojciechZmuda/qemu-arm-dev
2020-12-31 18:21:58 +08:00
zhangfanfan2
a541338656
代码中mount nfs问题修复
2020-12-24 14:48:18 +08:00
laokz
a706de2fad
fix hilog, vm_syscall etc. typos
2020-12-08 18:00:32 +08:00
Zbigniew Bodek
e0406e3df7
Fix various build problems when building for non-HiSi config
...
Mainly adding missing headers, removing redundant headers that
induce undefined symbols or rearranging existing headers
according to dependencies betheen them.
Also add missing include paths to makefiles and make configs.
Note: direct inclusion of pthread.h in disk.h is caused by the
latter being used almost everywhere, including third_party libraries.
Putting pthread.h there releases us from affecting more code.
Basically fixes build for anything that is not default HiSi
configuration.
Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: Icdcb0874d9fed34d01fa282d33bd2e041c2ac436
2020-11-17 23:07:01 +08:00
Zbigniew Bodek
89fb5eb32f
Fix build when NET_LWIP_SACK is disabled
...
Allows to disable NET_LWIP_SACK in the kernel configuration.
Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: Ibcde4a811e67d61bc713d405414c4991cbc1bdd3
2020-11-17 23:07:01 +08:00
Zbigniew Bodek
aff8a3e3c1
Fix build when KERNEL_DYNLOAD is disabled
...
Fix unused function warning treated as error
when KERNEL_DYNLOAD option is switched off.
Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: I21a01ff3d7ecb7b2e65bacbaa985c6390f5e4be7
2020-11-17 23:07:01 +08:00
zhushengle
4ff3c4bf79
Description:Process security function rectification.
...
Reviewed-by:liulei, lihao, likailong
Change-Id: Ibacdda2ccbbc991ac9732f2ad09bdb98195203b3
2020-11-05 09:10:14 +08:00
Caoruihong
63bd69267a
drop unnecessary executable file permission mode
...
Change-Id: Ia6c1f6302407a707b3ec9b805f4c92d8a7970b86
2020-10-13 16:37:25 +08:00
wenjun
6df931fc98
add OpenHarmony 1.0 baseline
2020-09-08 17:22:24 +08:00