openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [OpenBMC] [Linux-5.10] useradd: cannot open /etc/passwd
@ 2021-03-29  6:17 CS20 CHLi30
  2021-03-30  2:21 ` Lei Yu
  0 siblings, 1 reply; 5+ messages in thread
From: CS20 CHLi30 @ 2021-03-29  6:17 UTC (permalink / raw)
  To: CS20 CHLi30, openbmc

[-- Attachment #1: Type: text/plain, Size: 4398 bytes --]

Hi All,

We met this issue symptom after upgrading Linux kernel to 5.10.xx.
However, we didn't meet this issue at kernel 5.4 and 5.8.

And, we had run QEMU with latest palmetto 5.10.23 image, issue symptom also can be repo it.
Is there anyone meet this issue at Linux kernel 5.10.xx? From journal log, we didn't find any obvious log about this symptom.
This issue is easy to repo and 100%, you can follow below repo step on your OpenBMC project to repo it. Thanks.

Symptom:
==============================================================================
Ipmi.Test Ipmi User :: Test suite for OpenBMC IPMI user management.
==============================================================================
Verify IPMI User Summary :: Verify IPMI maximum supported IPMI use...
| FAIL |
Set User Name command failed (user 9, name HgekZnCI): Unspecified error: 1 != 0

Journal Log:
olympus-nuvoton kernel: Linux version 5.10.14-711b69d-dirty-08f25ae (oe-user@oe-host)
Mar 18 14:42:26 olympus-nuvoton phosphor-user-manager[1409]: useradd: cannot open /etc/passwd
Mar 18 14:42:26 olympus-nuvoton useradd[1409]: failed adding user 'HgekZnCI', data deleted
Mar 18 14:42:26 olympus-nuvoton phosphor-user-manager[288]: The operation failed internally.
Mar 18 14:42:26 olympus-nuvoton phosphor-user-manager[288]: Unable to create new user
Mar 18 14:42:26 olympus-nuvoton phosphor-user-manager[288]: The operation failed internally.

How to repo:
1. Run robot -t Verify_IPMI_User_Summary ipmi/test_ipmi_user.robot or
2. Execute useradd command to add user in our Olympus-nuvoton runbmc device.
  root@olympus-nuvoton:/# useradd timlee
  useradd: cannot open /etc/passwd

QEMU for plametto test result:
root@palmetto:~# cat /proc/version
Linux version 5.10.23-6687842 (oe-user@oe-host) (arm-openbmc-linux-gnueabi-gcc (GCC) 10.2.0, GNU ld (GNU Binutils) 2.36.1.20210209) #1 Sun Mar 28 20:54:20 UTC 2021
root@palmetto:~# useradd timlee
useradd: cannot open /etc/passwd

Debug:
We had added more debug log in overlayfs driver, but seems all overlayfs function call normally without error code return.
Here is the part of log after executing useradd command.

root@olympus-nuvoton:/# useradd timlee66
Mar 24 05:21:41 olympus-nuvoton kernel: overlayfs: open(a6b0076c[sbin/useradd/l], 0400040) -> (581ac127, 0401400040)
Mar 24 05:21:46 olympus-nuvoton kernel: overlayfs: open(c2f826cb[etc/nsswitch.conf/l], 00) -> (f971c00e, 0401000000)
Mar 24 05:21:46 olympus-nuvoton kernel: overlayfs: open(6fc219b2[etc/ld.so.cache/l], 0400000) -> (0d21569c, 0401400000)
Mar 24 05:21:46 olympus-nuvoton kernel: overlayfs: open(48a47202[lib/libnss_files-2.32.so/l], 0400000) -> (ee6b0bfe, 0401400000)
Mar 24 05:21:46 olympus-nuvoton kernel: overlayfs: open(3c1f263f[etc/passwd/l], 00) -> (b7939c0b, 0401000000)
Mar 24 05:21:46 olympus-nuvoton kernel: overlayfs: open(176fd21b[etc/ld.so.cache/l], 0400000) -> (d2e6be78, 0401400000)
Mar 24 05:21:46 olympus-nuvoton kernel: overlayfs: open(607e8d70[lib/libnss_ldap.so.2/l], 0400000) -> (57f4f2f1, 0401400000)
Mar 24 05:21:52 olympus-nuvoton kernel: overlayfs: create(etc/passwd.985, 0100600) = 0
Mar 24 05:21:52 olympus-nuvoton kernel: overlayfs: open(c46e5b8b[etc/passwd.985/u], 0400001) -> (ef6449e9, 0401400001)
Mar 24 05:21:52 olympus-nuvoton kernel: overlayfs: link(etc/passwd.985, etc/passwd.lock) = 0
Mar 24 05:21:52 olympus-nuvoton kernel: overlayfs: create(work/#1b, 0100000) = 0
Mar 24 05:21:52 olympus-nuvoton kernel: overlayfs: unlink(work/#1b) = 0
Mar 24 05:21:52 olympus-nuvoton useradd[985]: failed adding user 'timlee', data deleted
useradd: cannot open /etc/passwd

Best regards,
Tim
________________________________
The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

[-- Attachment #2: Type: text/html, Size: 10131 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [OpenBMC] [Linux-5.10] useradd: cannot open /etc/passwd
  2021-03-29  6:17 [OpenBMC] [Linux-5.10] useradd: cannot open /etc/passwd CS20 CHLi30
@ 2021-03-30  2:21 ` Lei Yu
  2021-03-30  5:47   ` CS20 CHLi30
  0 siblings, 1 reply; 5+ messages in thread
From: Lei Yu @ 2021-03-30  2:21 UTC (permalink / raw)
  To: CS20 CHLi30; +Cc: openbmc

As discussed in [discord][1], a similar issue could be simply reproduced by:
`touch /etc/passwd`, that gives `Invalid argument`.

With strace, the error is from `utimensat_time64()`

    # ./strace touch /etc/passwd
    execve("/bin/touch", ["touch", "/etc/passwd"], 0x7eef7dd4 /* 16 vars */) = 0
    ......
    getuid32()                              = 0
    utimensat_time64(AT_FDCWD, "/etc/passwd", NULL, 0) = -1 EINVAL
(Invalid argument)
    write(2, "touch: /etc/passwd: Invalid argu"..., 37touch:
/etc/passwd: Invalid argument
    ) = 37
    exit_group(1)

[1]: https://discord.com/channels/775381525260664832/775694683589574659/826065967582281768

On Mon, Mar 29, 2021 at 2:18 PM CS20 CHLi30 <CHLI30@nuvoton.com> wrote:
>
> Hi All,
>
>
>
> We met this issue symptom after upgrading Linux kernel to 5.10.xx.
>
> However, we didn't meet this issue at kernel 5.4 and 5.8.
>
>
>
> And, we had run QEMU with latest palmetto 5.10.23 image, issue symptom also can be repo it.
>
> Is there anyone meet this issue at Linux kernel 5.10.xx? From journal log, we didn’t find any obvious log about this symptom.
>
> This issue is easy to repo and 100%, you can follow below repo step on your OpenBMC project to repo it. Thanks.
>
>
>
> Symptom:
>
> ==============================================================================
>
> Ipmi.Test Ipmi User :: Test suite for OpenBMC IPMI user management.
>
> ==============================================================================
>
> Verify IPMI User Summary :: Verify IPMI maximum supported IPMI use...
>
> | FAIL |
>
> Set User Name command failed (user 9, name HgekZnCI): Unspecified error: 1 != 0
>
>
>
> Journal Log:
>
> olympus-nuvoton kernel: Linux version 5.10.14-711b69d-dirty-08f25ae (oe-user@oe-host)
>
> Mar 18 14:42:26 olympus-nuvoton phosphor-user-manager[1409]: useradd: cannot open /etc/passwd
>
> Mar 18 14:42:26 olympus-nuvoton useradd[1409]: failed adding user 'HgekZnCI', data deleted
>
> Mar 18 14:42:26 olympus-nuvoton phosphor-user-manager[288]: The operation failed internally.
>
> Mar 18 14:42:26 olympus-nuvoton phosphor-user-manager[288]: Unable to create new user
>
> Mar 18 14:42:26 olympus-nuvoton phosphor-user-manager[288]: The operation failed internally.
>
>
>
> How to repo:
>
> 1. Run robot -t Verify_IPMI_User_Summary ipmi/test_ipmi_user.robot or
>
> 2. Execute useradd command to add user in our Olympus-nuvoton runbmc device.
>
>   root@olympus-nuvoton:/# useradd timlee
>
>   useradd: cannot open /etc/passwd
>
>
>
> QEMU for plametto test result:
>
> root@palmetto:~# cat /proc/version
>
> Linux version 5.10.23-6687842 (oe-user@oe-host) (arm-openbmc-linux-gnueabi-gcc (GCC) 10.2.0, GNU ld (GNU Binutils) 2.36.1.20210209) #1 Sun Mar 28 20:54:20 UTC 2021
>
> root@palmetto:~# useradd timlee
>
> useradd: cannot open /etc/passwd
>
>
>
> Debug:
>
> We had added more debug log in overlayfs driver, but seems all overlayfs function call normally without error code return.
>
> Here is the part of log after executing useradd command.
>
>
>
> root@olympus-nuvoton:/# useradd timlee66
>
> Mar 24 05:21:41 olympus-nuvoton kernel: overlayfs: open(a6b0076c[sbin/useradd/l], 0400040) -> (581ac127, 0401400040)
>
> Mar 24 05:21:46 olympus-nuvoton kernel: overlayfs: open(c2f826cb[etc/nsswitch.conf/l], 00) -> (f971c00e, 0401000000)
>
> Mar 24 05:21:46 olympus-nuvoton kernel: overlayfs: open(6fc219b2[etc/ld.so.cache/l], 0400000) -> (0d21569c, 0401400000)
>
> Mar 24 05:21:46 olympus-nuvoton kernel: overlayfs: open(48a47202[lib/libnss_files-2.32.so/l], 0400000) -> (ee6b0bfe, 0401400000)
>
> Mar 24 05:21:46 olympus-nuvoton kernel: overlayfs: open(3c1f263f[etc/passwd/l], 00) -> (b7939c0b, 0401000000)
>
> Mar 24 05:21:46 olympus-nuvoton kernel: overlayfs: open(176fd21b[etc/ld.so.cache/l], 0400000) -> (d2e6be78, 0401400000)
>
> Mar 24 05:21:46 olympus-nuvoton kernel: overlayfs: open(607e8d70[lib/libnss_ldap.so.2/l], 0400000) -> (57f4f2f1, 0401400000)
>
> Mar 24 05:21:52 olympus-nuvoton kernel: overlayfs: create(etc/passwd.985, 0100600) = 0
>
> Mar 24 05:21:52 olympus-nuvoton kernel: overlayfs: open(c46e5b8b[etc/passwd.985/u], 0400001) -> (ef6449e9, 0401400001)
>
> Mar 24 05:21:52 olympus-nuvoton kernel: overlayfs: link(etc/passwd.985, etc/passwd.lock) = 0
>
> Mar 24 05:21:52 olympus-nuvoton kernel: overlayfs: create(work/#1b, 0100000) = 0
>
> Mar 24 05:21:52 olympus-nuvoton kernel: overlayfs: unlink(work/#1b) = 0
>
> Mar 24 05:21:52 olympus-nuvoton useradd[985]: failed adding user 'timlee', data deleted
>
> useradd: cannot open /etc/passwd
>
>
>
> Best regards,
>
> Tim
>
> ________________________________
> The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.



-- 
BRs,
Lei YU

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [OpenBMC] [Linux-5.10] useradd: cannot open /etc/passwd
  2021-03-30  2:21 ` Lei Yu
@ 2021-03-30  5:47   ` CS20 CHLi30
  2021-03-30 22:35     ` Joel Stanley
  0 siblings, 1 reply; 5+ messages in thread
From: CS20 CHLi30 @ 2021-03-30  5:47 UTC (permalink / raw)
  To: Lei Yu, CS20 CHLi30; +Cc: openbmc

Hi Lei Yu,

Thanks your help to provide this information.
This issue seems relate to "cannot do write action for /etc/passwd file".
I'm trying to check whether is relate to jffs2 or overlayfs filesystem driver.
If you have any suggestion or finding, please let me know, thank you very much. BTW, I cannot see any discussion on [discord][1], is it open?

open action for /etc/passwd file without problem, but when doing "touch" or "useradd" this kind of writing action then got issue symptom.
Thus, this issue's root cause should not relate to "utimensat_time64()" function.
Due to "useradd" got same fail symptom, but it's not call this function according the result about strace.
Below are strace result on kernel 5.4 and 5.10 for you refer it. Both are using the same version useradd daemon to test it.

Kernel 5.10:
root@olympus-nuvoton:/# strace useradd timlee
openat(AT_FDCWD, "/etc/passwd", O_RDWR|O_NOCTTY|O_NONBLOCK|O_LARGEFILE|O_NOFOLLOW) = -1 EINVAL (Invalid argument)
write(2, "useradd: cannot open /etc/passwd"..., 33useradd: cannot open /etc/passwd
) = 33

Kernel 5.4:
root@olympus-nuvoton:/# strace useradd timlee
openat(AT_FDCWD, "/etc/passwd", O_RDWR|O_NOCTTY|O_NONBLOCK|O_LARGEFILE|O_NOFOLLOW) = 4

Best regards,
Tim

-----Original Message-----
From: Lei Yu [mailto:yulei.sh@bytedance.com]
Sent: Tuesday, March 30, 2021 10:21 AM
To: CS20 CHLi30 <CHLI30@nuvoton.com>
Cc: openbmc@lists.ozlabs.org
Subject: Re: [OpenBMC] [Linux-5.10] useradd: cannot open /etc/passwd

As discussed in [discord][1], a similar issue could be simply reproduced by:
`touch /etc/passwd`, that gives `Invalid argument`.

With strace, the error is from `utimensat_time64()`

    # ./strace touch /etc/passwd
    execve("/bin/touch", ["touch", "/etc/passwd"], 0x7eef7dd4 /* 16 vars */) = 0
    ......
    getuid32()                              = 0
    utimensat_time64(AT_FDCWD, "/etc/passwd", NULL, 0) = -1 EINVAL (Invalid argument)
    write(2, "touch: /etc/passwd: Invalid argu"..., 37touch:
/etc/passwd: Invalid argument
    ) = 37
    exit_group(1)

[1]: https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdiscord.com%2Fchannels%2F775381525260664832%2F775694683589574659%2F826065967582281768&amp;data=04%7C01%7CCHLI30%40nuvoton.com%7C09540457f4be483dc75108d8f3227ffd%7Ca3f24931d4034b4a94f17d83ac638e07%7C0%7C0%7C637526676785951652%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=Ju0bjtNK%2BAVlMVtFILficzZhK6%2BC74AiVujO%2FvbjCyE%3D&amp;reserved=0

On Mon, Mar 29, 2021 at 2:18 PM CS20 CHLi30 <CHLI30@nuvoton.com> wrote:
>
> Hi All,
>
>
>
> We met this issue symptom after upgrading Linux kernel to 5.10.xx.
>
> However, we didn't meet this issue at kernel 5.4 and 5.8.
>
>
>
> And, we had run QEMU with latest palmetto 5.10.23 image, issue symptom also can be repo it.
>
> Is there anyone meet this issue at Linux kernel 5.10.xx? From journal log, we didn't find any obvious log about this symptom.
>
> This issue is easy to repo and 100%, you can follow below repo step on your OpenBMC project to repo it. Thanks.
>
>
>
> Symptom:
>
> ======================================================================
> ========
>
> Ipmi.Test Ipmi User :: Test suite for OpenBMC IPMI user management.
>
> ======================================================================
> ========
>
> Verify IPMI User Summary :: Verify IPMI maximum supported IPMI use...
>
> | FAIL |
>
> Set User Name command failed (user 9, name HgekZnCI): Unspecified
> error: 1 != 0
>
>
>
> Journal Log:
>
> olympus-nuvoton kernel: Linux version 5.10.14-711b69d-dirty-08f25ae
> (oe-user@oe-host)
>
> Mar 18 14:42:26 olympus-nuvoton phosphor-user-manager[1409]: useradd:
> cannot open /etc/passwd
>
> Mar 18 14:42:26 olympus-nuvoton useradd[1409]: failed adding user
> 'HgekZnCI', data deleted
>
> Mar 18 14:42:26 olympus-nuvoton phosphor-user-manager[288]: The operation failed internally.
>
> Mar 18 14:42:26 olympus-nuvoton phosphor-user-manager[288]: Unable to
> create new user
>
> Mar 18 14:42:26 olympus-nuvoton phosphor-user-manager[288]: The operation failed internally.
>
>
>
> How to repo:
>
> 1. Run robot -t Verify_IPMI_User_Summary ipmi/test_ipmi_user.robot or
>
> 2. Execute useradd command to add user in our Olympus-nuvoton runbmc device.
>
>   root@olympus-nuvoton:/# useradd timlee
>
>   useradd: cannot open /etc/passwd
>
>
>
> QEMU for plametto test result:
>
> root@palmetto:~# cat /proc/version
>
> Linux version 5.10.23-6687842 (oe-user@oe-host)
> (arm-openbmc-linux-gnueabi-gcc (GCC) 10.2.0, GNU ld (GNU Binutils)
> 2.36.1.20210209) #1 Sun Mar 28 20:54:20 UTC 2021
>
> root@palmetto:~# useradd timlee
>
> useradd: cannot open /etc/passwd
>
>
>
> Debug:
>
> We had added more debug log in overlayfs driver, but seems all overlayfs function call normally without error code return.
>
> Here is the part of log after executing useradd command.
>
>
>
> root@olympus-nuvoton:/# useradd timlee66
>
> Mar 24 05:21:41 olympus-nuvoton kernel: overlayfs:
> open(a6b0076c[sbin/useradd/l], 0400040) -> (581ac127, 0401400040)
>
> Mar 24 05:21:46 olympus-nuvoton kernel: overlayfs:
> open(c2f826cb[etc/nsswitch.conf/l], 00) -> (f971c00e, 0401000000)
>
> Mar 24 05:21:46 olympus-nuvoton kernel: overlayfs:
> open(6fc219b2[etc/ld.so.cache/l], 0400000) -> (0d21569c, 0401400000)
>
> Mar 24 05:21:46 olympus-nuvoton kernel: overlayfs:
> open(48a47202[lib/libnss_files-2.32.so/l], 0400000) -> (ee6b0bfe,
> 0401400000)
>
> Mar 24 05:21:46 olympus-nuvoton kernel: overlayfs:
> open(3c1f263f[etc/passwd/l], 00) -> (b7939c0b, 0401000000)
>
> Mar 24 05:21:46 olympus-nuvoton kernel: overlayfs:
> open(176fd21b[etc/ld.so.cache/l], 0400000) -> (d2e6be78, 0401400000)
>
> Mar 24 05:21:46 olympus-nuvoton kernel: overlayfs:
> open(607e8d70[lib/libnss_ldap.so.2/l], 0400000) -> (57f4f2f1,
> 0401400000)
>
> Mar 24 05:21:52 olympus-nuvoton kernel: overlayfs:
> create(etc/passwd.985, 0100600) = 0
>
> Mar 24 05:21:52 olympus-nuvoton kernel: overlayfs:
> open(c46e5b8b[etc/passwd.985/u], 0400001) -> (ef6449e9, 0401400001)
>
> Mar 24 05:21:52 olympus-nuvoton kernel: overlayfs:
> link(etc/passwd.985, etc/passwd.lock) = 0
>
> Mar 24 05:21:52 olympus-nuvoton kernel: overlayfs: create(work/#1b,
> 0100000) = 0
>
> Mar 24 05:21:52 olympus-nuvoton kernel: overlayfs: unlink(work/#1b) =
> 0
>
> Mar 24 05:21:52 olympus-nuvoton useradd[985]: failed adding user
> 'timlee', data deleted
>
> useradd: cannot open /etc/passwd
>
>
>
> Best regards,
>
> Tim
>
> ________________________________
> The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.



--
BRs,
Lei YU
________________________________
________________________________
 The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [OpenBMC] [Linux-5.10] useradd: cannot open /etc/passwd
  2021-03-30  5:47   ` CS20 CHLi30
@ 2021-03-30 22:35     ` Joel Stanley
  2021-03-31  0:56       ` CS20 CHLi30
  0 siblings, 1 reply; 5+ messages in thread
From: Joel Stanley @ 2021-03-30 22:35 UTC (permalink / raw)
  To: CS20 CHLi30; +Cc: openbmc, Lei Yu

On Tue, 30 Mar 2021 at 05:47, CS20 CHLi30 <CHLI30@nuvoton.com> wrote:
>
> Hi Lei Yu,
>
> Thanks your help to provide this information.
> This issue seems relate to "cannot do write action for /etc/passwd file".
> I'm trying to check whether is relate to jffs2 or overlayfs filesystem driver.

jffs2!

I did a bisection and the offending commit is
https://git.kernel.org/torvalds/c/36e2c7421f02a, from v5.9-rc1. I have
posted a patch that fixes the issue:

https://lore.kernel.org/lkml/20210330134537.423447-1-joel@jms.id.au/

I will merge this patch into dev-5.10 today.

Cheers,

Joel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [OpenBMC] [Linux-5.10] useradd: cannot open /etc/passwd
  2021-03-30 22:35     ` Joel Stanley
@ 2021-03-31  0:56       ` CS20 CHLi30
  0 siblings, 0 replies; 5+ messages in thread
From: CS20 CHLi30 @ 2021-03-31  0:56 UTC (permalink / raw)
  To: Joel Stanley; +Cc: openbmc, Lei Yu, CS20 CHLi30

Hi Joel,

Yes, you are right, the problem is jffs2 driver. Below is our analysis result:

Analysis result:
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Yesterday, we added more debug log in fs driver seems relate to do_splice_from() this function.
After replacing this function from kernel 5.4 then issue symptom was gone.

In jffs2 driver (kernel 5.4 and 5.10) that didn't provide .splice_write operation call from file_operations jffs2_file_operations.
But do_splice_from() be changed to verify .splice_write operation in kernel 5.10.
Thus, if didn't find this file operation just return not support write operation.

However, do_splic_from() will provide a default .splice_write function when it's not find .splice_write operation in kernel 5.4.
Thus, we could add .splice_write = iter_file_splice_write in jffs2 driver or using old do_splic_from() function to fix this problem.
We are checking if there is any misunderstanding to work around this issue.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

After checking your patch for this issue that did the same solution as our finding in jffs2 driver.
Thanks your help to fix this problem and merge it. Thank you!!!

Sincerely,
Tim

-----Original Message-----
From: Joel Stanley [mailto:joel@jms.id.au]
Sent: Wednesday, March 31, 2021 6:35 AM
To: CS20 CHLi30 <CHLI30@nuvoton.com>
Cc: Lei Yu <yulei.sh@bytedance.com>; openbmc@lists.ozlabs.org
Subject: Re: [OpenBMC] [Linux-5.10] useradd: cannot open /etc/passwd

On Tue, 30 Mar 2021 at 05:47, CS20 CHLi30 <CHLI30@nuvoton.com> wrote:
>
> Hi Lei Yu,
>
> Thanks your help to provide this information.
> This issue seems relate to "cannot do write action for /etc/passwd file".
> I'm trying to check whether is relate to jffs2 or overlayfs filesystem driver.

jffs2!

I did a bisection and the offending commit is https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.kernel.org%2Ftorvalds%2Fc%2F36e2c7421f02a&amp;data=04%7C01%7CCHLI30%40nuvoton.com%7Ccd7e5a2f62bd4fbd46e908d8f3cc2035%7Ca3f24931d4034b4a94f17d83ac638e07%7C0%7C0%7C637527405356044360%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=qbmFGMGW5J4mbfQw%2BB%2FzukUwj7kTwiAfESNEbx6Uync%3D&amp;reserved=0, from v5.9-rc1. I have posted a patch that fixes the issue:

https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Flkml%2F20210330134537.423447-1-joel%40jms.id.au%2F&amp;data=04%7C01%7CCHLI30%40nuvoton.com%7Ccd7e5a2f62bd4fbd46e908d8f3cc2035%7Ca3f24931d4034b4a94f17d83ac638e07%7C0%7C0%7C637527405356044360%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=m7iDZ2rhyAibeRj2OGDzz999ronznTNLloFqQDyZq%2Bc%3D&amp;reserved=0

I will merge this patch into dev-5.10 today.

Cheers,

Joel
________________________________
________________________________
 The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-03-31  0:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-29  6:17 [OpenBMC] [Linux-5.10] useradd: cannot open /etc/passwd CS20 CHLi30
2021-03-30  2:21 ` Lei Yu
2021-03-30  5:47   ` CS20 CHLi30
2021-03-30 22:35     ` Joel Stanley
2021-03-31  0:56       ` CS20 CHLi30

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).