royzah commented on code in PR #20417: URL: https://github.com/apache/nuttx/pull/20417#discussion_r4154608660
########## include/nuttx/sched.h: ########## @@ -924,6 +928,12 @@ static inline_function bool nxsched_has_gid(FAR struct tcb_s *tcb, FAR struct tcb_s *nxsched_self(void); +#ifdef CONFIG_BUILD_KERNEL Review Comment: Fair. Will make tg_caps and the checks build independent, moved from the syscall wrappers into spawn, mount, boardctl and open. ########## include/nuttx/fs/fs.h: ########## @@ -147,6 +147,11 @@ #define INODE_IS_NAMEDEVENT(i) INODE_IS_TYPE(i,FSNODEFLAG_TYPE_NAMEDEVENT) #define INODE_IS_HARDLINK(i) INODE_IS_TYPE(i,FSNODEFLAG_TYPE_HARDLINK) +#define FSNODEFLAG_RAWIO 0x00000010 /* Raw storage access */ Review Comment: Same idea as linux CAP_SYS_RAWIO: block, MTD and BCH nodes skip the fs and its partitions. Flag on the inode at register time, so open() checks once, not every driver. ########## include/nuttx/sched.h: ########## @@ -33,6 +33,7 @@ #include <stdbool.h> #include <stdint.h> #include <sched.h> +#include <sys/prctl.h> Review Comment: Yep, will drop them and rebase on master. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
