X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:subject:to:references:from:message-id:date
	:mime-version:in-reply-to:content-type
	:content-transfer-encoding; q=dns; s=default; b=D81Dhxs8UwV/f3My
	gSciEEnJpM0sNE0VPaHI/7KBM3niXKwnu361el9tE0ojzZIOf2sQp40aWyXlWwQ+
	ZBZQ0Pkya1P3VNrMTYYsvv63X59wPNnQ1iPbPttqNYrI6/EwEir3aOUN+q8DieI2
	tyxkmaG39BAjssGg5I32gTgtdw8=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:subject:to:references:from:message-id:date
	:mime-version:in-reply-to:content-type
	:content-transfer-encoding; s=default; bh=llsw+hIj2BhEtaqjJzprkL
	VkR5A=; b=ZJzZFW3UMvDWbujwj45QcjaLGnfG9shSKAF6TaN2p3450MDEZLcQhY
	Q1JsSODSRiRl2kvlIQLt8i/zky3W9MAa8X6vVEI9lHZp7H7iC3ZDBJX8CVR47l+o
	3i972KIxozS+NR4d+EZ9nHupj22uqRYnbv3rV80Fkx/Nk6nYEL1C0=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_40,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=H*M:gmx, PHP, 16.06.2016, 16062016
X-HELO: mout.gmx.net
Subject: FUSE for Cygwin - was: Re: Fork and Windows Heap
To: cygwin@cygwin.com
References: <D3879734.9284%billziss@navimatics.com>
From: Herbert Stocker <hersto@gmx.de>
Message-ID: <57636BD6.3080305@gmx.de>
Date: Fri, 17 Jun 2016 05:17:42 +0200
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:38.0) Gecko/20100101 Thunderbird/38.1.0
MIME-Version: 1.0
In-Reply-To: <D3879734.9284%billziss@navimatics.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-UI-Out-Filterresults: notjunk:1;V01:K0:CrVl9LntlO0=:t5MbB75dNPBqHMQWV68VQZ pQGMcullGJfPuu3Rk7OPbwosjNKhSnFYaZHTPyclT3gsZY8zoR9k/l9ne0zxF8AL5WRSlA5BZ vkVZIPq/IzuC6eE16xnMU2HGdUneYonH00PeZ9O/Z17+TZtuPhco4beS+yyWAXSTFUMRHukPp 7sB11Gsfsflxz5gtEauij3PCU7kTM0QbFv7+GflPpvqOnnJFXBXwO9VO1a+954Ab3amTRPrHe pETXzj1OjItzfSAPTIuLoN3r486NDIwE0BLwll2IXchhllyJ1kV2m90hokjSrOFovy+Xp6Qfa PdJYUkp6aQsjfafAOv8vKFvdLFDHwtZpXD9teJo1pWEqFQD6cthcOTxCsCooPwPJ9/KxoMys6 rxCLkHTJeo2ABj+htR5lJ4lbzvGIUVhn0XF2s2E+hIwRaLLtRCWuGDWMx6EUj05l0L4sLY7+l pGI2AnAT6UGa+SwaaGHvmHaxaE9D9uqXF2lrrF2oiDXU/PySClVKhOxbelcS9YIosvb2CF2+K U4YhcPE83iDti4k/kN7Re/1Ii6A7DGS+D0f7pQPzAw9PufhuJLhylRz6S30ZcaY4fUXYgg2u3 BvVqh0c9RkR3XQM/7yDEvnabTxmQOwFec5yiCeS1y3roCIIIcvYWKfRUYx3MJ49r7ICsKKk1w 1krcBD6I1qhuYiwvvr+74XfjdycLDat/sa7MY+SGi2TBgfb1DNQiyw2Im7GeEzr4DjQozN6yi xKMBAwSRFh0TTZAqLAKtFDe/PZUMUuCzmBB+MODdFPHtg607Msa+0bIirY8OYhQsIAoiRhYjU ZeuYIco
X-IsSubscribed: yes

On 16.06.2016 08:37, Bill Zissimopoulos wrote:
>
> I am not porting anything from UNIX. I have a Windows solution developed
> using Visual Studio and the Windows Driver Kit that I am building a FUSE
> compatibility layer for. My DLL is not a Cygwin DLL. It is a native
> Windows DLL that also has a FUSE compatibility layer. I am taking pains to
> make that FUSE compatibility layer available to both Win32 and Cygwin apps.
>

Hey Bill,

this is a GREAT piece of work.
Although i did not dive into kernel development, i do understand that
writing a file system driver for Windows is surely lots of painful work,
with its undocumented and grown API.

You should write a book documenting all the knowledge you gathered
through your research, if the only one available is from '97 as you say.

Really, great work.
Also that you add the FUSE API.

Having FUSE available for Cygwin and maybe for Windows apps is something
i longed for, too. And i thought about adding it to Cygwin. Seariously.
But i'm too constrained to manage that amount of work. :-(

What is FUSE:
   Architecturally a FUSE file system is a (usermode) process that regis-
   ters with the kernel for a certain path in the file system and then
   responds to requests like open file, read/write data, rename file,
   stat file.

So, how is your architecture of the FUSE part of WinFsp?
Are you porting libfuse to Cygwin, so that a Cygwin process can link to
it and instead of receiving requests via /dev/fuse fro the Linux kernel,
your libfuse will receive IRPs through your user mode DLL from your
Windows kernel driver FSD?

Are you planning to have FUSE file systems be ported to native Windows
apps, i.e. don't link with cygwin1.dll, or will they run in a Cygwin
environment?
If porting to native app, this would be easier for the user to install
them, but:
  - FUSE has bindings to many languages like Perl, PHP, etc. Will these
    work then?
  - Aren't the FUSE programs relying on Posix features too much?
    Can they be easily ported with e.g. MinGW?

How are you dealing with limitations of the Windows file system as seen
from a POSIX perspective? You say you can't support hard links.
How will a Cygwin program see symlinks exported by the FUSE file system?
And pipes?

You write that you are mapping
  - characters not supported by Win32 but by POSIX via the Unicode
    private use page
  - Security apspects (SID vs. uid/gid, ACL)
between POSIX and Windows and that you do it like Cygwin/SFU/SFM is
doing it.

But if that's done by your code, a Cygwin process may see slightly
different mappings through WinFsp and through Cygwin. Won't that be a
potential for Bugs (misbehaving apps) or even for security issues?

i'm looking forward to trying it out this weekend and to see it go
from alpha state to stable.

(And i'm curious about the differences of disk based and network based
file systems. Is it just the handling as seen from the user or also
the semantics.)


Herbert



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

