You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/07/11 08:14:11 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 opened a new pull request #4118: fs: Support the root file system attributes(mode, uid, gid and time)

xiaoxiang781216 opened a new pull request #4118:
URL: https://github.com/apache/incubator-nuttx/pull/4118


   ## Summary
   All attributes is guarded by PSEUDOFS_ATTRIBUTES to save the space
   Note: the attribute modification will support in the next patchset
   
   ## Impact
   stat/lstat/fstat can return these attributes for the root file system.
   
   ## Testing
   
   


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] masayuki2009 commented on pull request #4118: fs: Support the root file system attributes(mode, uid, gid and time)

Posted by GitBox <gi...@apache.org>.
masayuki2009 commented on pull request #4118:
URL: https://github.com/apache/incubator-nuttx/pull/4118#issuecomment-880121422


   >Hmm, hifive1-revb:nsh with QEMU crashses at startup.
   
   @xiaoxiang781216 
   sim:smp, esp32-devkitc:smp (QEMU), maix-bit:smp (QEMU) also crashed.
   


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] masayuki2009 edited a comment on pull request #4118: fs: Support the root file system attributes(mode, uid, gid and time)

Posted by GitBox <gi...@apache.org>.
masayuki2009 edited a comment on pull request #4118:
URL: https://github.com/apache/incubator-nuttx/pull/4118#issuecomment-880242090


   @xiaoxiang781216 
   
   ```
   Breakpoint 1, getumask () at misc/lib_umask.c:66                                                                                                           
   66        info = task_get_info();                                                                                                                          
   (gdb) where                                                                                                                                                
   #0  getumask () at misc/lib_umask.c:66                                                                                                                     
   #1  0x20406534 in file_vopen (filep=filep@entry=0x80000ff0, path=path@entry=0x2040d55c "/dev/console", oflags=oflags@entry=3, ap=<optimized out>, ap@entry\
   =0x80001038) at vfs/fs_open.c:74                                                                                                                           
   #2  0x204065fc in nx_vopen (path=path@entry=0x2040d55c "/dev/console", oflags=oflags@entry=3, ap=ap@entry=0x80001038) at vfs/fs_open.c:202                 
   #3  0x2040663e in nx_open (path=path@entry=0x2040d55c "/dev/console", oflags=oflags@entry=3) at vfs/fs_open.c:303                                          
   #4  0x2040126c in group_setupidlefiles (tcb=tcb@entry=0x80000690 <g_idletcb>) at group/group_setupidlefiles.c:78                                           
   #5  0x20400ab4 in nx_start () at init/nx_start.c:739                                                                                                       
   #6  0x20400188 in __fe310_start () at chip/fe310_start.c:119                                                                                               
   #7  0x20400026 in __start () at chip/fe310_head.S:62                                                                                                       
   Backtrace stopped: previous frame inner to this frame (corrupt stack?)                                                                                     
   (gdb) n                                                                                                                                                    
   67        return info->ta_umask;                                                                                                                           
   (gdb) p info                                                                                                                                               
   $1 = (struct task_info_s *) 0x0                                                                                                                            
   (gdb)                                          
   ```


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 edited a comment on pull request #4118: fs: Support the root file system attributes(mode, uid, gid and time)

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 edited a comment on pull request #4118:
URL: https://github.com/apache/incubator-nuttx/pull/4118#issuecomment-879873200


   > Hi @xiaoxiang781216, this is a great improvement, kudos!!! How to add new users and groups to test it? 
   The patch will come in the next patchset:
   
   1. Support set gid/uid/time in vfs
   2. Support get/set in the individual fs one by one
   
   > Also it is not clear if this code will work for others MTD FS like SmartFS, I think it should be nice to add support to Attributes on SmartFS.
   
   Most file system don't save this info into inode, but read/write to the disk directly. The next patch will add callback to mount_operation_s to make it possible.


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] masayuki2009 commented on pull request #4118: fs: Support the root file system attributes(mode, uid, gid and time)

Posted by GitBox <gi...@apache.org>.
masayuki2009 commented on pull request #4118:
URL: https://github.com/apache/incubator-nuttx/pull/4118#issuecomment-880386712


   @xiaoxiang781216 
   
   Shall we revert this PR until the above crashes are fixed?
   


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] acassis commented on pull request #4118: fs: Support the root file system attributes(mode, uid, gid and time)

Posted by GitBox <gi...@apache.org>.
acassis commented on pull request #4118:
URL: https://github.com/apache/incubator-nuttx/pull/4118#issuecomment-879853976


   Hi @xiaoxiang781216, this is a great improvement, kudos!!! How to add new users and groups to test it? Also it is not clear if this code will work for others MTD FS like SmartFS, I think it should be nice to add support to Attributes on SmartFS.


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] saramonteiro commented on pull request #4118: fs: Support the root file system attributes(mode, uid, gid and time)

Posted by GitBox <gi...@apache.org>.
saramonteiro commented on pull request #4118:
URL: https://github.com/apache/incubator-nuttx/pull/4118#issuecomment-880257438


   This PR also added a crash on `esp32s2-saola-1:nsh`:
   And this is the stacktrace result: 
   
   ```
   0x40083a4f: xtensa_assert at xtensa_assert.c:93
   0x40083b19: xtensa_user_panic at xtensa_assert.c:320 (discriminator 2)
   0x4008369b: xtensa_user at esp32s2_user.c:391
   0x40022686: _xtensa_user_handler at xtensa_user_handler.S:257
   0x4008bbf3: getumask at lib_umask.c:66
   0x400884e5: file_vopen at fs_open.c:74
   0x40088598: nx_vopen at fs_open.c:202
   0x400885fd: nx_open at fs_open.c:303
   0x400813b0: group_setupidlefiles at group_setupidlefiles.c:78
   0x40080c3b: nx_start at nx_start.c:739
   0x4002275c: __start at esp32s2_start.c:151
   0x40050db5: ?? ??:0
   0x40051211: ?? ??:0
   0x4004c231: ?? ??:0
   0x40011371: ?? ??:0
   0x4000f788: ?? ??:0
   0x400072a5: ?? ??:0
   ```


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] masayuki2009 commented on pull request #4118: fs: Support the root file system attributes(mode, uid, gid and time)

Posted by GitBox <gi...@apache.org>.
masayuki2009 commented on pull request #4118:
URL: https://github.com/apache/incubator-nuttx/pull/4118#issuecomment-880242090


   ```
   Breakpoint 1, getumask () at misc/lib_umask.c:66                                                                                                           
   66        info = task_get_info();                                                                                                                          
   (gdb) where                                                                                                                                                
   #0  getumask () at misc/lib_umask.c:66                                                                                                                     
   #1  0x20406534 in file_vopen (filep=filep@entry=0x80000ff0, path=path@entry=0x2040d55c "/dev/console", oflags=oflags@entry=3, ap=<optimized out>, ap@entry\
   =0x80001038) at vfs/fs_open.c:74                                                                                                                           
   #2  0x204065fc in nx_vopen (path=path@entry=0x2040d55c "/dev/console", oflags=oflags@entry=3, ap=ap@entry=0x80001038) at vfs/fs_open.c:202                 
   #3  0x2040663e in nx_open (path=path@entry=0x2040d55c "/dev/console", oflags=oflags@entry=3) at vfs/fs_open.c:303                                          
   #4  0x2040126c in group_setupidlefiles (tcb=tcb@entry=0x80000690 <g_idletcb>) at group/group_setupidlefiles.c:78                                           
   #5  0x20400ab4 in nx_start () at init/nx_start.c:739                                                                                                       
   #6  0x20400188 in __fe310_start () at chip/fe310_start.c:119                                                                                               
   #7  0x20400026 in __start () at chip/fe310_head.S:62                                                                                                       
   Backtrace stopped: previous frame inner to this frame (corrupt stack?)                                                                                     
   (gdb) n                                                                                                                                                    
   67        return info->ta_umask;                                                                                                                           
   (gdb) p info                                                                                                                                               
   $1 = (struct task_info_s *) 0x0                                                                                                                            
   (gdb)                                          
   ```


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #4118: fs: Support the root file system attributes(mode, uid, gid and time)

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #4118:
URL: https://github.com/apache/incubator-nuttx/pull/4118#issuecomment-879883760


   @acassis could you merge this PR? My next patch is waiting.


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #4118: fs: Support the root file system attributes(mode, uid, gid and time)

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #4118:
URL: https://github.com/apache/incubator-nuttx/pull/4118#issuecomment-879873200


   > Hi @xiaoxiang781216, this is a great improvement, kudos!!! How to add new users and groups to test it? Also it is not clear if this code will work for others MTD FS like SmartFS, I think it should be nice to add support to Attributes on SmartFS.
   
   The patch will come in the next patchset:
   
   1. Support set gid/uid/time in vfs
   2. Support get/set in the individual fs one by one


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #4118: fs: Support the root file system attributes(mode, uid, gid and time)

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #4118:
URL: https://github.com/apache/incubator-nuttx/pull/4118#issuecomment-880549784


   Sorry for late reply, it look like this patch make the panic:
   https://github.com/apache/incubator-nuttx/pull/4118/commits/41ea701f67fd564832014c5c89745db889a34d3c
   I will take a look.


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] masayuki2009 commented on pull request #4118: fs: Support the root file system attributes(mode, uid, gid and time)

Posted by GitBox <gi...@apache.org>.
masayuki2009 commented on pull request #4118:
URL: https://github.com/apache/incubator-nuttx/pull/4118#issuecomment-880097209


   @xiaoxiang781216 
   
   Hmm, hifive1-revb:nsh with QEMU crashses at startup.
   
   ```
   up_assert: Assertion failed at file:irq/irq_unexpectedisr.c line: 51 task: Idle Task
   riscv_registerdump: EPC:20409f42 
   riscv_registerdump: A0:00000000 A1:80000f74 A2:00000003 A3:80001038 A4:80000aa0 A5:80000aa0 A6:000031f3 A7:00000000
   riscv_registerdump: T0:20400004 T1:00000000 T2:00000000 T3:00000000 T4:00000000 T5:00000000 T6:00000000
   riscv_registerdump: S0:2040d55c S1:80000ff0 S2:80001000 S3:00000003 S4:80000788 S5:00000001 S6:00000000 S7:00000000
   riscv_registerdump: S8:00000000 S9:00000000 S10:00000000 S11:00000000
   riscv_registerdump: SP:80000fa0 FP:2040d55c TP:00000000 RA:20406534
   riscv_dumpstate: sp:     800005d0
   riscv_dumpstate: IRQ stack:
   riscv_dumpstate:   base: 80000060
   riscv_dumpstate:   size: 00000600
   riscv_stackdump: 800005c0: 80000000 000005c0 2040d000 2040327a 00000001 00000000 00000000 deadbeef
   riscv_stackdump: 800005e0: deadbeef deadbeef 00000000 00000000 00000000 00000001 80000788 00000003
   riscv_stackdump: 80000600: 80001000 80000000 00000005 20402834 deadbeef deadbeef deadbeef 20400bd2
   riscv_stackdump: 80000620: deadbeef deadbeef deadbeef 20400b96 deadbeef deadbeef deadbeef 2040011a
   riscv_stackdump: 80000640: deadbeef deadbeef deadbeef 80000f1c deadbeef 80000ff0 20409f42 2040008a
   riscv_dumpstate: sp:     80000660
   riscv_dumpstate: User stack:
   riscv_dumpstate:   base: 80000ae0
   riscv_dumpstate:   size: 000005c0
   riscv_dumpstate: ERROR: Stack pointer is not within allocated stack
   riscv_stackdump: 80000ae0: deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef
   riscv_stackdump: 80000b00: deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef
   riscv_stackdump: 80000b20: deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef
   riscv_stackdump: 80000b40: deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef
   riscv_stackdump: 80000b60: deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef
   riscv_stackdump: 80000b80: deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef
   riscv_stackdump: 80000ba0: deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef
   riscv_stackdump: 80000bc0: deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef
   riscv_stackdump: 80000be0: deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef
   riscv_stackdump: 80000c00: deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef
   riscv_stackdump: 80000c20: deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef
   riscv_stackdump: 80000c40: deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef
   riscv_stackdump: 80000c60: deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef
   riscv_stackdump: 80000c80: deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef
   riscv_stackdump: 80000ca0: deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef
   riscv_stackdump: 80000cc0: deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef
   riscv_stackdump: 80000ce0: deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef
   riscv_stackdump: 80000d00: deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef
   riscv_stackdump: 80000d20: deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef
   riscv_stackdump: 80000d40: deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef
   riscv_stackdump: 80000d60: deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef
   riscv_stackdump: 80000d80: deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef
   riscv_stackdump: 80000da0: deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef
   riscv_stackdump: 80000dc0: deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef
   riscv_stackdump: 80000de0: deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef
   riscv_stackdump: 80000e00: deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef
   riscv_stackdump: 80000e20: deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef
   riscv_stackdump: 80000e40: deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef
   riscv_stackdump: 80000e60: deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef
   riscv_stackdump: 80000e80: deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef
   riscv_stackdump: 80000ea0: deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef
   riscv_stackdump: 80000ec0: deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef
   riscv_stackdump: 80000ee0: deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef
   riscv_stackdump: 80000f00: deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef deadbeef 20409f42
   riscv_stackdump: 80000f20: 20406534 80000fa0 00000000 00000000 20400004 00000000 00000000 2040d55c
   riscv_stackdump: 80000f40: 80000ff0 00000000 80000f74 00000003 80001038 80000aa0 80000aa0 000031f3
   riscv_stackdump: 80000f60: 00000000 80001000 00000003 80000788 00000001 00000000 00000000 00000000
   riscv_stackdump: 80000f80: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00001880
   riscv_stackdump: 80000fa0: 2040d571 80001408 2040d571 20406534 deadbeef 00000000 2040d561 00000021
   riscv_stackdump: 80000fc0: 2040d55c 00000000 2040d571 204060b6 2040d56c 00000000 80000788 80000690
   riscv_stackdump: 80000fe0: 80001000 80000000 80000690 204065fc 800013d8 00000000 80001558 20401a60
   riscv_stackdump: 80001000: 2040d55c 00000000 80000690 2040663e 2040d56c 2040d5e8 80000000 80001038
   riscv_stackdump: 80001020: 80001000 80000690 800014c8 2040126c 80001000 80000000 00000001 00000000
   riscv_stackdump: 80001040: 00008000 00000000 000031f3 00000000 80001000 80000000 80001000 20400ab4
   riscv_stackdump: 80001060: 00000000 00000000 800010a0 00002f60 00000000 00000000 00000000 00000000
   riscv_stackdump: 80001080: 00000000 00000000 00000000 20400188 00000000 00000000 00000000 20400026
   riscv_taskdump: Idle Task: PID=0 Stack Used=388 of 1472
   ```


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] acassis merged pull request #4118: fs: Support the root file system attributes(mode, uid, gid and time)

Posted by GitBox <gi...@apache.org>.
acassis merged pull request #4118:
URL: https://github.com/apache/incubator-nuttx/pull/4118


   


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org