Skip to contentSkip to conversation

cifs: Fix support for creating SFU fifo

PATCH In review Pali Rohár 2 participants 3 messages Jul 7 – Jul 8

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cifs: Fix support for creating SFU fifo

SFU fifos are natively supported (created and recognized) at least by:
- Microsoft POSIX subsystem
- OpenNT/Interix subsystem
- Microsoft SFU (Windows Services for UNIX)
- Microsoft SUA (Subsystem for UNIX-based Applications)
- Windows NFS server (up to the Windows Server 2008 R2)

Windows NFS server since Windows Server 2012 uses new reparse point format for storing new fifos, but still can recognize this old format (also in the latest Windows Server 2022 version).

SFU-style fifo is empty regular file which has system attribute set.

These SFU-style fifos are already recognized by Linux SMB client.

But Linux SMB client is currently creating new SFU fifos in different format which is not compatible with all those SFU-style consumers. Fix this by creating new fifos in correct SFU format which would be recognized by all those applications and also by existing Linux SMB clients.

This change affects only creating new fifos when mount option -o sfu is used.

---
 fs/smb/client/smb2ops.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
fs/smb/client/smb2ops.c +2 -4
index e59fda1b2230..1261b928edee 100644
@@ -5293,10 +5293,8 @@ int __cifs_sfu_make_node(unsigned int xid, struct inode *inode,
 		type[0] = '\0';
 		break;
 	case S_IFIFO:
-		type_len = 8;
-		strscpy(type, "LnxFIFO");
-		data = (u8 *)&pdev;
-		data_len = sizeof(pdev);
+		/* SFU fifo is system file which is empty */
+		type_len = 0;
 		break;
 	default:
 		rc = -EPERM;
Signature · 1 line
2.20.1
#1 lore raw

AI search says that "LnxFIFO" is used by WSL? Have you verified this recently.

Quoted 49 lines · Pali Rohár

SFU fifos are natively supported (created and recognized) at least by:
- Microsoft POSIX subsystem
- OpenNT/Interix subsystem
- Microsoft SFU (Windows Services for UNIX)
- Microsoft SUA (Subsystem for UNIX-based Applications)
- Windows NFS server (up to the Windows Server 2008 R2)

Windows NFS server since Windows Server 2012 uses new reparse point format for storing new fifos, but still can recognize this old format (also in the latest Windows Server 2022 version).

SFU-style fifo is empty regular file which has system attribute set.

These SFU-style fifos are already recognized by Linux SMB client.

But Linux SMB client is currently creating new SFU fifos in different format which is not compatible with all those SFU-style consumers. Fix this by creating new fifos in correct SFU format which would be recognized by all those applications and also by existing Linux SMB clients.

This change affects only creating new fifos when mount option -o sfu is used.

---
 fs/smb/client/smb2ops.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
fs/smb/client/smb2ops.c +2 -5
index e59fda1b2230..1261b928edee 100644
@@ -5293,10 +5293,8 @@ int __cifs_sfu_make_node(unsigned int xid, struct inode *inode,
                type[0] = '\0';
                break;
        case S_IFIFO:
-               type_len = 8;
-               strscpy(type, "LnxFIFO");
-               data = (u8 *)&pdev;
-               data_len = sizeof(pdev);
+               /* SFU fifo is system file which is empty */
+               type_len = 0;
                break;
        default:
                rc = -EPERM;
--

2.20.1

Signature · 3 lines
Thanks,

Steve
#2 lore raw

I have verified WSL and it does not use "LnxFIFO". This looks like AI hallucination too. WSL stores fifos as reparse point of IO_REPARSE_TAG_LX_FIFO type.

Quoted 58 lines · On Wednesday 08 July 2026 08:55:02 Steve French wrote:

AI search says that "LnxFIFO" is used by WSL? Have you verified this recently.

Quoted 49 lines · Pali Rohár

SFU fifos are natively supported (created and recognized) at least by:
- Microsoft POSIX subsystem
- OpenNT/Interix subsystem
- Microsoft SFU (Windows Services for UNIX)
- Microsoft SUA (Subsystem for UNIX-based Applications)
- Windows NFS server (up to the Windows Server 2008 R2)

Windows NFS server since Windows Server 2012 uses new reparse point format for storing new fifos, but still can recognize this old format (also in the latest Windows Server 2022 version).

SFU-style fifo is empty regular file which has system attribute set.

These SFU-style fifos are already recognized by Linux SMB client.

But Linux SMB client is currently creating new SFU fifos in different format which is not compatible with all those SFU-style consumers. Fix this by creating new fifos in correct SFU format which would be recognized by all those applications and also by existing Linux SMB clients.

This change affects only creating new fifos when mount option -o sfu is used.

---
 fs/smb/client/smb2ops.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
fs/smb/client/smb2ops.c +2 -5
index e59fda1b2230..1261b928edee 100644
@@ -5293,10 +5293,8 @@ int __cifs_sfu_make_node(unsigned int xid, struct inode *inode,
                type[0] = '\0';
                break;
        case S_IFIFO:
-               type_len = 8;
-               strscpy(type, "LnxFIFO");
-               data = (u8 *)&pdev;
-               data_len = sizeof(pdev);
+               /* SFU fifo is system file which is empty */
+               type_len = 0;
                break;
        default:
                rc = -EPERM;
--

2.20.1

Signature · 3 lines
Thanks,

Steve