Re: [PATCH v2 0/6] Some AF_UNIX fixes

2020-10-15 Thread Corinna Vinschen
On Oct 14 12:39, Ken Brown via Cygwin-patches wrote:
> On 10/13/2020 7:49 AM, Corinna Vinschen wrote:
> > On Oct  8 17:36, Ken Brown via Cygwin-patches wrote:
> > > On 10/4/2020 12:49 PM, Ken Brown via Cygwin-patches wrote:
> > > > I'm about to push these.  Corinna, please check them when you return.
> > > > The only difference between v2 and v1 is that there are a few more
> > > > fixes.
> > > > 
> > > > I'm trying to help get the AF_UNIX development going again.  I'm
> > > > mostly working on the topic/af_unix branch.  But when I find bugs that
> > > > exist on master, I'll push those to master and then merge master to
> > > > topic/af_unix.
> > > 
> > > FYI to Corinna and anyone else interested in AF_UNIX development.  After
> > > pushing a few patches to the topic/af_unix branch I did some cleanup
> > > (locally) and merged master into the topic branch.  I don't want to do a
> > > forced push and risk messing up the branch, so I've created a new branch,
> > > topic/af_unix_new, and will do all further work there until Corinna 
> > > returns
> > > and decides how we should proceed.
> > 
> > No, that's ok, just force push.
> 
> OK, I've done that now.  The branch contains a few sendmsg fixes, a first
> cut of a recvmsg implementation, and a merge from master.  I've done some
> testing of recvmsg, but many things are not yet tested.  I'll work on
> continued testing next.

This is sooo great!

> from Kerrisk's book, because that's what I read to learn the basics of
> sockets.  But those are just examples and are not meant to be comprehensive.

What Mark and Brian said, Stevens' book is quite nice, and there's
code available.  I downloaded the tar file with all code examples
way back when, but apparently the code is on github now, as Brian
pointed out.


Thanks,
Corinna


Re: [PATCH v2 0/6] Some AF_UNIX fixes

2020-10-14 Thread Brian Inglis
On 2020-10-14 22:19, Mark Geisert wrote:
> Ken Brown via Cygwin-patches wrote:
>> Are you aware of any test suite that I could run?  I've been using examples
>> from Kerrisk's book, because that's what I read to learn the basics of
>> sockets.  But those are just examples and are not meant to be comprehensive.
> 
> In ye olden days I used to use Stevens+Rago "Advanced Programming In The Unix
> Environment, 2nd ed.".  Chapter 17 covers UNIX domain sockets as advanced IPC.
> It's more examples but maybe they hit different corners of the playing field. 
>  I
> don't know of a test suite or even a standalone program that exercises 
> AF_UNIX.

The late author's Unix Network Programming has been updated by his co-authors to
Vol 1 3rd ed. and has some Unix domain AF_UNIX/AF_LOCAL content:

https://github.com/unpbook/unpv13e.git

Cygwin utilities nc, nttcp, socat, ttcp are available, some with Unix domain
AF_UNIX/AF_LOCAL support and tests;

replaces netperf.org web site, HP copyright somewhat non-free, includes Unix
domain AF_UNIX//AF_LOCAL tests, but I never tried it under Cygwin:

https://hewlettpackard.github.io/netperf/
https://github.com/HewlettPackard/netperf.git

also came across a mention of:

https://github.com/rigtorp/ipc-bench.git

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]


Re: [PATCH v2 0/6] Some AF_UNIX fixes

2020-10-14 Thread Mark Geisert

Ken Brown via Cygwin-patches wrote:
Are you aware of any test suite that I could run?  I've been using examples from 
Kerrisk's book, because that's what I read to learn the basics of sockets.  But 
those are just examples and are not meant to be comprehensive.


In ye olden days I used to use Stevens+Rago "Advanced Programming In The Unix 
Environment, 2nd ed.".  Chapter 17 covers UNIX domain sockets as advanced IPC. 
It's more examples but maybe they hit different corners of the playing field.  I 
don't know of a test suite or even a standalone program that exercises AF_UNIX.


..mark


Re: [PATCH v2 0/6] Some AF_UNIX fixes

2020-10-14 Thread Ken Brown via Cygwin-patches

On 10/13/2020 7:49 AM, Corinna Vinschen wrote:

On Oct  8 17:36, Ken Brown via Cygwin-patches wrote:

On 10/4/2020 12:49 PM, Ken Brown via Cygwin-patches wrote:

I'm about to push these.  Corinna, please check them when you return.
The only difference between v2 and v1 is that there are a few more
fixes.

I'm trying to help get the AF_UNIX development going again.  I'm
mostly working on the topic/af_unix branch.  But when I find bugs that
exist on master, I'll push those to master and then merge master to
topic/af_unix.


FYI to Corinna and anyone else interested in AF_UNIX development.  After
pushing a few patches to the topic/af_unix branch I did some cleanup
(locally) and merged master into the topic branch.  I don't want to do a
forced push and risk messing up the branch, so I've created a new branch,
topic/af_unix_new, and will do all further work there until Corinna returns
and decides how we should proceed.


No, that's ok, just force push.


OK, I've done that now.  The branch contains a few sendmsg fixes, a first cut of 
a recvmsg implementation, and a merge from master.  I've done some testing of 
recvmsg, but many things are not yet tested.  I'll work on continued testing next.


Are you aware of any test suite that I could run?  I've been using examples from 
Kerrisk's book, because that's what I read to learn the basics of sockets.  But 
those are just examples and are not meant to be comprehensive.


Ken


Re: [PATCH v2 0/6] Some AF_UNIX fixes

2020-10-13 Thread Corinna Vinschen
On Oct  8 17:36, Ken Brown via Cygwin-patches wrote:
> On 10/4/2020 12:49 PM, Ken Brown via Cygwin-patches wrote:
> > I'm about to push these.  Corinna, please check them when you return.
> > The only difference between v2 and v1 is that there are a few more
> > fixes.
> > 
> > I'm trying to help get the AF_UNIX development going again.  I'm
> > mostly working on the topic/af_unix branch.  But when I find bugs that
> > exist on master, I'll push those to master and then merge master to
> > topic/af_unix.
> 
> FYI to Corinna and anyone else interested in AF_UNIX development.  After
> pushing a few patches to the topic/af_unix branch I did some cleanup
> (locally) and merged master into the topic branch.  I don't want to do a
> forced push and risk messing up the branch, so I've created a new branch,
> topic/af_unix_new, and will do all further work there until Corinna returns
> and decides how we should proceed.

No, that's ok, just force push.


Thanks,
Corinna


Re: [PATCH v2 0/6] Some AF_UNIX fixes

2020-10-13 Thread Corinna Vinschen
On Oct  4 12:49, Ken Brown via Cygwin-patches wrote:
> I'm about to push these.  Corinna, please check them when you return.
> The only difference between v2 and v1 is that there are a few more
> fixes.
> 
> I'm trying to help get the AF_UNIX development going again.  I'm
> mostly working on the topic/af_unix branch.  But when I find bugs that
> exist on master, I'll push those to master and then merge master to
> topic/af_unix.
> 
> So far what I have on that branch locally (to be pushed shortly) is an
> implementation of fhandler_socket_unix::read, which I've tested by
> running the srver/client programs from Section 57.2 of Kerrisk's book,
> "The Linux Programming Interface".

Oh boy, this is S great!  Thanks for working on that!


Corinna


Re: [PATCH v2 0/6] Some AF_UNIX fixes

2020-10-08 Thread Ken Brown via Cygwin-patches

On 10/4/2020 12:49 PM, Ken Brown via Cygwin-patches wrote:

I'm about to push these.  Corinna, please check them when you return.
The only difference between v2 and v1 is that there are a few more
fixes.

I'm trying to help get the AF_UNIX development going again.  I'm
mostly working on the topic/af_unix branch.  But when I find bugs that
exist on master, I'll push those to master and then merge master to
topic/af_unix.


FYI to Corinna and anyone else interested in AF_UNIX development.  After pushing 
a few patches to the topic/af_unix branch I did some cleanup (locally) and 
merged master into the topic branch.  I don't want to do a forced push and risk 
messing up the branch, so I've created a new branch, topic/af_unix_new, and will 
do all further work there until Corinna returns and decides how we should proceed.


Ken


[PATCH v2 0/6] Some AF_UNIX fixes

2020-10-04 Thread Ken Brown via Cygwin-patches
I'm about to push these.  Corinna, please check them when you return.
The only difference between v2 and v1 is that there are a few more
fixes.

I'm trying to help get the AF_UNIX development going again.  I'm
mostly working on the topic/af_unix branch.  But when I find bugs that
exist on master, I'll push those to master and then merge master to
topic/af_unix.

So far what I have on that branch locally (to be pushed shortly) is an
implementation of fhandler_socket_unix::read, which I've tested by
running the srver/client programs from Section 57.2 of Kerrisk's book,
"The Linux Programming Interface".

Ken Brown (6):
  Cygwin: AF_UNIX: use FILE_OPEN_REPARSE_POINT when needed
  Cygwin: fix handling of known reparse points that are not symlinks
  Cygwin: always recognize AF_UNIX sockets as reparse points
  Cygwin: AF_UNIX: socket: set the O_RDWR flag
  Cygwin: AF_UNIX: listen_pipe: check for STATUS_SUCCESS
  Cygwin: AF_UNIX: open_pipe: call recv_peer_info

 winsup/cygwin/fhandler.cc | 11 --
 winsup/cygwin/fhandler_socket_unix.cc | 31 +--
 winsup/cygwin/path.cc | 27 +++
 winsup/cygwin/security.cc |  8 +--
 4 files changed, 53 insertions(+), 24 deletions(-)

-- 
2.28.0