Re: /proc//{cwd, root} links to for cygrunsrv, daemons, and shells

2024-04-09 Thread Corinna Vinschen
On Apr 9 10:38, Brian Inglis wrote: > On 2024-04-09 07:08, Corinna Vinschen wrote: > > That's typically a permission problem. On Linux you get something like > > > >ls: cannot read symbolic link '/proc/1/cwd': Permission denied > > Thanks Corinna, > > T

Re: /proc//{cwd, root} links to for cygrunsrv, daemons, and shells

2024-04-09 Thread Corinna Vinschen
On Apr 7 13:34, Brian Inglis wrote: > ISTM anomalous that for cygrunsrv, daemons, cron processes, and shells > /proc//{cwd,root} have bad symlinks to "", normally a process > or exe status: > > /proc/732/exe -> /usr/bin/cygrunsrv > /proc/732/root -> > /proc/732/cwd -> > | /proc/733/exe

Re: [PATCH] winsup/cygwin/fhandler/proc.cc: format_proc_cpuinfo() Linux 6.8 cpuinfo flags

2024-03-18 Thread Corinna Vinschen
On Mar 18 11:21, Brian Inglis wrote: > On 2024-03-18 09:45, Corinna Vinschen wrote: > > I see. I just don't understands the difference between, say, > > > >ftcprint (features1, 21, "avx512ifma"); /* vec int FMA */ > > + /* ftcprint (features1, 22, &quo

Re: [PATCH] winsup/cygwin/fhandler/proc.cc: format_proc_cpuinfo() Linux 6.8 cpuinfo flags

2024-03-18 Thread Corinna Vinschen
On Mar 18 08:10, Brian Inglis wrote: > On 2024-03-18 03:33, Corinna Vinschen wrote: > > Hi Brian, > > > > On Mar 16 10:44, Brian Inglis wrote: > > > add Linux 6.8 cpuinfo flags: > > > Intel 0x0007:1 eax:17 fredFlexible Return and Event >

Re: [PATCH] winsup/cygwin/fhandler/proc.cc: format_proc_cpuinfo() Linux 6.8 cpuinfo flags

2024-03-18 Thread Corinna Vinschen
Hi Brian, On Mar 16 10:44, Brian Inglis wrote: > add Linux 6.8 cpuinfo flags: > Intel 0x0007:1 eax:17 fredFlexible Return and Event > Delivery; > AMD 0x801f eax:4 sev_snp SEV secure nested paging; > document unused and some unprinted bits that could look like

Re: newlib-cygwin build fails on dumper

2024-03-15 Thread Corinna Vinschen
On Mar 14 10:10, Brian Inglis wrote: > Hi folks, > > During newlib-cygwin build to test patches, with latest current stable > packages as of last weekend, and yesterday's repo main/master, get a > warning, then errors building dumper: > > ... > > CC libc/reent/libc_a-getentropyr.o >

Re: [PATCH] Cygwin: pipe: Restore non-blocking mode which was reset for non-cygwin app.

2024-03-12 Thread Corinna Vinschen
ixes: 9e4d308cd592 ("Cygwin: pipe: Adopt FILE_SYNCHRONOUS_IO_NONALERT flag > for read pipe.") > Reported-by: wh > Reviewed-by: Corinna Vinschen > Signed-off-by: Takashi Yano > --- > winsup/cygwin/fhandler/pipe.cc | 63 + > winsup/cy

Re: [PATCH] Cygwin: pipe: Restore non-blocking mode which was reset for non-cygwin app.

2024-03-11 Thread Corinna Vinschen
d. > > Addresses: https://cygwin.com/pipermail/cygwin/2024-March/255644.html > Fixes: 9e4d308cd592 ("Cygwin: pipe: Adopt FILE_SYNCHRONOUS_IO_NONALERT flag > for read pipe.") > Reported-by: wh > Reviewed-by: Corinna Vinschen > Signed-off-by: Takashi Yano

Re: [PATCH] Cygwin: pipe: Restore non-blocking mode which was reset for non-cygwin app.

2024-03-11 Thread Corinna Vinschen
Hi Takashi, On Mar 10 19:31, Takashi Yano wrote: > @@ -590,6 +591,10 @@ child_info_spawn::worker (const char *prog_arg, const > char *const *argv, > { > fhandler_pipe *pipe = (fhandler_pipe *)(fhandler_base *) cfd; > pipe->set_pipe_non_blocking (false); >

Re: [PATCH] Cygwin: pipe: Give up to use query_hdl for non-cygwin apps.

2024-03-06 Thread Corinna Vinschen
On Mar 6 03:42, Takashi Yano wrote: > On Tue, 5 Mar 2024 17:54:19 +0100 > Corinna Vinschen wrote: > > On Mar 5 23:47, Takashi Yano wrote: > > > On Tue, 5 Mar 2024 11:14:46 +0100 > > > Corinna Vinschen wrote: > > > > This doesn't affect you

Re: [PATCH] Cygwin: pipe: Give up to use query_hdl for non-cygwin apps.

2024-03-05 Thread Corinna Vinschen
On Mar 5 23:47, Takashi Yano wrote: > On Tue, 5 Mar 2024 11:14:46 +0100 > Corinna Vinschen wrote: > > This doesn't affect your patch, but while looking into this, what > > strikes me as weird is that fhandler_pipe::temporary_query_hdl() calls > > NtQueryObject() and ass

Re: [PATCH v3] Cygwin: pipe: Give up to use query_hdl for non-cygwin apps.

2024-03-05 Thread Corinna Vinschen
; Addresses: https://github.com/msys2/msys2-runtime/issues/202 > > Fixes: b531d6b06eeb ("Cygwin: pipe: Introduce temporary query_hdl.") > Reported-by: Alisa Sireneva, Johannes Schindelin > Reviewed-by: Corinna Vinschen > Signed-off-by: Takashi Yano &

Re: [PATCH] Cygwin: pipe: Give up to use query_hdl for non-cygwin apps.

2024-03-05 Thread Corinna Vinschen
On Mar 5 09:06, Takashi Yano wrote: > On Mon, 4 Mar 2024 18:38:07 +0100 > Corinna Vinschen wrote: > > On Mar 4 16:45, ASSI wrote: > > > Corinna Vinschen writes: > > > > Right you are. We always said that independent Cygwin installations > >

Re: [PATCH] Cygwin: pipe: Give up to use query_hdl for non-cygwin apps.

2024-03-04 Thread Corinna Vinschen
On Mar 4 16:45, ASSI wrote: > Corinna Vinschen writes: > > Right you are. We always said that independent Cygwin installations > > are supposed to *stay* independent. > > > > Keep in mind that they don't share the same shared objects in the native > > NT name

Re: [PATCH] Cygwin: pipe: Give up to use query_hdl for non-cygwin apps.

2024-03-04 Thread Corinna Vinschen
On Mar 3 20:36, Takashi Yano wrote: > On Sun, 03 Mar 2024 11:39:40 +0100 > ASSI wrote: > > Takashi Yano writes: > > >> After noticing that we enumerate all the processes (which is an expensive > > >> operation) just to skip all of the non-Cygwin ones anyway, I wonder if it > > >> wouldn't be

Re: [PATCH 2/2] Cygwin: remove ENOSHARE and ECASECLASH from _sys_errlist[]

2024-02-28 Thread Corinna Vinschen
On Feb 27 17:26, Christian Franke wrote: > Hi Corinna, > > Corinna Vinschen wrote: > > On Feb 27 13:18, Christian Franke wrote: > > > ... > > > > > > diff --git a/winsup/cygwin/errno.cc b/winsup/cygwin/errno.cc > > > index 7d58e62ec..

Re: [PATCH 2/2] Cygwin: remove ENOSHARE and ECASECLASH from _sys_errlist[]

2024-02-27 Thread Corinna Vinschen
Hi Christian, On Feb 27 13:18, Christian Franke wrote: > From f495fb0e7c2bd3a42f16f81af18c64ffaba9a860 Mon Sep 17 00:00:00 2001 > From: Christian Franke > Date: Tue, 27 Feb 2024 13:05:36 +0100 > Subject: [PATCH 2/2] Cygwin: remove ENOSHARE and ECASECLASH from > _sys_errlist[] > > These errno

Re: [PATCH 1/4] Cygwin: introduce constexpr errmap_size and errmap[] consistency checks

2024-02-26 Thread Corinna Vinschen
On Feb 26 15:21, Christian Franke wrote: > From 947daa02b0b64131626c2ecedb74ca6893aab6c6 Mon Sep 17 00:00:00 2001 > From: Christian Franke > Date: Mon, 26 Feb 2024 13:37:33 +0100 > Subject: [PATCH 1/4] Cygwin: introduce constexpr errmap_size and errmap[] > consistency checks > > Use constexpr

Re: [PATCH] Cygwin: Map ERROR_NO_SUCH_DEVICE and ERROR_MEDIA_CHANGED to ENODEV

2024-02-26 Thread Corinna Vinschen
On Feb 26 12:14, Christian Franke wrote: > Corinna Vinschen wrote: > > Why so many? I used winerror.h to populate the list not too long ago, > > so I wonder why it suddenly has so many more error codes? > > "Required for mozilla-central." - 850 insertions: > h

Re: [PATCH] Cygwin: Map ERROR_NO_SUCH_DEVICE and ERROR_MEDIA_CHANGED to ENODEV

2024-02-26 Thread Corinna Vinschen
On Feb 25 10:12, Christian Franke wrote: > Corinna Vinschen wrote: > > So the default was EPERM at first and has been changed to EACCES > > because it "is better for the unknown error case". > > > > I'm open to ideas for an improved error mapping. > >

Re: [PATCH] Cygwin: Map ERROR_NO_SUCH_DEVICE and ERROR_MEDIA_CHANGED to ENODEV

2024-02-24 Thread Corinna Vinschen
On Feb 23 19:14, Christian Franke wrote: > Experiments with damaged USB flash drives and ddrescue revealed that the > current mapping of these Win32 errors to the fallback EACCES could be > improved. > > BTW: I wonder why EACCES was selected as the fallback. Source code control > forensics

Re: [PATCH] Cygwin: console: Fix exit code for non-cygwin process.

2024-02-03 Thread Corinna Vinschen
On Feb 4 00:04, Takashi Yano wrote: > On Sat, 3 Feb 2024 15:27:06 +0100 (CET) > Johannes Schindelin wrote: > > On IRC, you reported that the thread would crash if `cons` was not fixed > > up. The symptom was that that crash would apparently prevent the exit code > > from being read, and it would

Re: [PATCH 1/5] Cygwin: Make 'ulimit -c' control writing a coredump

2024-01-29 Thread Corinna Vinschen
On Jan 27 15:12, Jon Turney wrote: > On 26/01/2024 11:52, Corinna Vinschen wrote: > > > - Create a named mutex with a reproducible name (no need to use > > >the name as parameter) and immediately grab it. > > > - Call CreateProcess to start the debugger with

Re: [PATCH 1/5] Cygwin: Make 'ulimit -c' control writing a coredump

2024-01-26 Thread Corinna Vinschen
On Jan 26 12:12, Corinna Vinschen wrote: > On Jan 25 20:03, Jon Turney wrote: > > On 25/01/2024 18:21, Corinna Vinschen wrote: > > > On Jan 25 14:50, Jon Turney wrote: > > > > On 24/01/2024 14:39, Corinna Vinschen wrote: > > > > > On Jan 24 13:28, Jon

Re: [PATCH 1/5] Cygwin: Make 'ulimit -c' control writing a coredump

2024-01-26 Thread Corinna Vinschen
On Jan 25 20:03, Jon Turney wrote: > On 25/01/2024 18:21, Corinna Vinschen wrote: > > On Jan 25 14:50, Jon Turney wrote: > > > On 24/01/2024 14:39, Corinna Vinschen wrote: > > > > On Jan 24 13:28, Jon Turney wrote: > > > > > On 23/01/2024 14:29, Corinn

Re: [PATCH 1/5] Cygwin: Make 'ulimit -c' control writing a coredump

2024-01-25 Thread Corinna Vinschen
On Jan 25 14:50, Jon Turney wrote: > On 24/01/2024 14:39, Corinna Vinschen wrote: > > On Jan 24 13:28, Jon Turney wrote: > > > On 23/01/2024 14:29, Corinna Vinschen wrote: > > > > On Jan 23 14:20, Jon Turney wrote: > > > > > > > > >

Re: [PATCH] Cygwin: pthread: Fix handle leak in pthread_once.

2024-01-24 Thread Corinna Vinschen
On Jan 24 23:48, Takashi Yano wrote: > On Wed, 24 Jan 2024 15:40:22 +0100 > Corinna Vinschen wrote: > > (You don't have to CC me, btw., I only get the same mail twice then > > and I look into this mailing list constantly anyway) > > Perhaps, CC: is added automat

Re: [PATCH] Cygwin: pthread: Fix handle leak in pthread_once.

2024-01-24 Thread Corinna Vinschen
init_routine. > > Reviewed-by: Corinna Vinschen > Signed-off-by: Takashi Yano > --- > winsup/cygwin/thread.cc | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc > index 7bb4f9fc8..0f8327831 100644 > --- a/win

Re: [PATCH 1/5] Cygwin: Make 'ulimit -c' control writing a coredump

2024-01-24 Thread Corinna Vinschen
On Jan 24 13:28, Jon Turney wrote: > On 23/01/2024 14:29, Corinna Vinschen wrote: > > On Jan 23 14:20, Jon Turney wrote: > > > > > Even then this is clearly not totally bullet-proof. Maybe the right thing > > > to > > > do is add a suitable

Re: [PATCH 1/5] Cygwin: Make 'ulimit -c' control writing a coredump

2024-01-23 Thread Corinna Vinschen
On Jan 23 14:20, Jon Turney wrote: > On 12/01/2024 14:09, Jon Turney wrote: > > Pre-format a command to be executed on a fatal error to run 'dumper' > > (using an absolute path). > > > > Factor out executing a pre-formatted command, so we can use that for > > invoking the JIT debugger in

Re: [PATCH 1/5] Cygwin: Make 'ulimit -c' control writing a coredump

2024-01-16 Thread Corinna Vinschen
On Jan 16 13:52, Jon Turney wrote: > On 15/01/2024 14:28, Corinna Vinschen wrote: > > On Jan 15 13:27, Jon Turney wrote: > > > On 15/01/2024 09:46, Corinna Vinschen wrote: > > > > On Jan 13 14:20, Jon Turney wrote: > > > &g

Re: [PATCH 1/5] Cygwin: Make 'ulimit -c' control writing a coredump

2024-01-15 Thread Corinna Vinschen
On Jan 15 13:27, Jon Turney wrote: > On 15/01/2024 09:46, Corinna Vinschen wrote: > > On Jan 13 14:20, Jon Turney wrote: > > > On 12/01/2024 14:09, Jon Turney wrote: > > > > + > > > > + PWCHAR cp = dumper_command; > > > > + cp = w

Re: [PATCH] Cygwin: introduce close_range

2024-01-15 Thread Corinna Vinschen
On Jan 15 13:41, Christian Franke wrote: > Corinna Vinschen wrote: > > On Jan 15 13:07, Corinna Vinschen wrote: > > > Sorry Christian, but.. > > > > > > I was just going to push this patch when I realized that we now have > > > two lines

Re: [PATCH] Cygwin: introduce close_range

2024-01-15 Thread Corinna Vinschen
On Jan 15 13:07, Corinna Vinschen wrote: > Sorry Christian, but.. > > I was just going to push this patch when I realized that we now have > two lines of debug output per affected file descriptor: > > On Jan 15 12:19, Christian Franke wrote: > > + for (unsigned int

Re: [PATCH] Cygwin: introduce close_range

2024-01-15 Thread Corinna Vinschen
Sorry Christian, but.. I was just going to push this patch when I realized that we now have two lines of debug output per affected file descriptor: On Jan 15 12:19, Christian Franke wrote: > + for (unsigned int i = firstfd; i < size; i++) > +{ > + cygheap_fdget cfd ((int) i, false,

Re: [PATCH] Cygwin: introduce close_range

2024-01-15 Thread Corinna Vinschen
Hi Christian, On Jan 15 09:56, Christian Franke wrote: > Christian Franke wrote: > > Jon Turney wrote: > > > On 14/01/2024 16:07, Christian Franke wrote: > > > > Recently I learned about the existence and usefulness of close_range(): > > > >

Re: [PATCH] Cygwin: introduce close_range

2024-01-15 Thread Corinna Vinschen
On Jan 14 19:53, Christian Franke wrote: > Jon Turney wrote: > > On 14/01/2024 16:07, Christian Franke wrote: > > > Recently I learned about the existence and usefulness of close_range(): > > > https://github.com/smartmontools/smartmontools/issues/235 > > > > > >

Re: [PATCH 1/5] Cygwin: Make 'ulimit -c' control writing a coredump

2024-01-15 Thread Corinna Vinschen
On Jan 13 14:20, Jon Turney wrote: > On 12/01/2024 14:09, Jon Turney wrote: > > + > > + PWCHAR cp = dumper_command; > > + cp = wcpcpy (cp, L"\""); > > + cp = wcpcpy (cp, dll_dir); > > + cp = wcpcpy (cp, L"\\dumper.exe"); > > + cp = wcpcpy (cp, L"\" "); > > + cp = wcpcpy (cp, L"\""); > > +

Re: [PATCH 5/5] Cygwin: Update documentation for cygwin_stackdump

2024-01-12 Thread Corinna Vinschen
On Jan 12 14:09, Jon Turney wrote: > --- > winsup/doc/misc-funcs.xml | 4 > 1 file changed, 4 insertions(+) > > diff --git a/winsup/doc/misc-funcs.xml b/winsup/doc/misc-funcs.xml > index 7463942e6..55c5cac94 100644 > --- a/winsup/doc/misc-funcs.xml > +++ b/winsup/doc/misc-funcs.xml > @@

Re: [PATCH 0/5] Coredump under 'ulimit -c' control (v2)

2024-01-12 Thread Corinna Vinschen
On Jan 12 14:09, Jon Turney wrote: > Write a coredump under 'ulimit -c' control and related changes. > > The idea here is to make debugging using a coredump work as usual on a unix, > e.g.: > > $ ulimit -c unlimited > > $ ./segv-program > *** starting '"C:\cygwin64\bin\dumper.exe" >

Re: [PATCH 1/2] Cygwin: Make 'ulimit -c' control writing a coredump

2024-01-12 Thread Corinna Vinschen
On Jan 12 14:09, Jon Turney wrote: > On 11/01/2024 09:42, Corinna Vinschen wrote: > > I see. It's a bit unfortunate though, if dumper tries to create > > a 2 Gigs file which is later truncated, if we're low on disk space. > > But yeah, disk space isn't much of a proble

Re: [PATCH 1/2] Cygwin: Make 'ulimit -c' control writing a coredump

2024-01-11 Thread Corinna Vinschen
On Jan 10 17:38, Jon Turney wrote: > On 10/01/2024 15:30, Corinna Vinschen wrote: > > On Jan 10 13:57, Jon Turney wrote: > [...] > > > > > > Also: Fix the (deprecated) cygwin_dumpstack() function so it will now > > > write a .stackdump f

Re: [PATCH] Cygwin: Fix a stray '\n' in cygcheck manpage

2024-01-10 Thread Corinna Vinschen
On Jan 10 13:57, Jon Turney wrote: > --- > winsup/doc/utils.xml | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/winsup/doc/utils.xml b/winsup/doc/utils.xml > index 8261e7ebd..692dae38f 100644 > --- a/winsup/doc/utils.xml > +++ b/winsup/doc/utils.xml > @@ -210,7 +210,7 @@

Re: [PATCH 2/2] Cygwin: Disable writing core dumps by default.

2024-01-10 Thread Corinna Vinschen
On Jan 10 13:57, Jon Turney wrote: > Change the default core limit from unlimited to 0 (disabled) > --- > winsup/cygwin/mm/cygheap.cc | 2 +- > winsup/doc/new-features.xml | 6 ++ > 2 files changed, 7 insertions(+), 1 deletion(-) > > diff --git a/winsup/cygwin/mm/cygheap.cc

Re: [PATCH 1/2] Cygwin: Make 'ulimit -c' control writing a coredump

2024-01-10 Thread Corinna Vinschen
On Jan 10 13:57, Jon Turney wrote: > Factor out pre-formatting a command to be executed on a fatal signal, > and use that for both error_start (if present in the CYGWIN env var) and > for 'dumper'. > > Factor out executing that command, so we can use it from try_to_debug() > and when a fatal

Re: [PATCH] Cygwin: Add '--names-only' flag to cygcheck

2023-11-24 Thread Corinna Vinschen
On Nov 24 17:06, Jon Turney wrote: > Add '--names-only' flag to cygcheck, to output just the bare package > names. Push it! > --- > > Notes: > Rather than more hacky aftermarket solutions, let's make cygcheck output > something more useful for feeding into setup. > > Next step

Re: [PATCH] Cygwin: Add /dev/disk/by-label and /dev/disk/by-uuid symlinks

2023-11-23 Thread Corinna Vinschen
On Nov 22 17:31, Christian Franke wrote: > Hi Corinna, > > Corinna Vinschen wrote: > > Hi Christian, > > > > > > On second thought... > > > > I had a bad night tonight and was thinking a long time about this and > > that. It suddenl

Re: [PATCH] Cygwin: Add /dev/disk/by-label and /dev/disk/by-uuid symlinks

2023-11-22 Thread Corinna Vinschen
uot; which is on a fixed disk. So you get something like this: $ ls -l /dev/disk/by-label total 0 lrwxrwxrwx 1 corinna vinschen 0 Nov 22 10:09 VOLUME -> ../../sdb1 lrwxrwxrwx 1 corinna vinschen 0 Nov 22 10:10 root -> ../../sda3 Now you insert an USB Stick with a FAT32 filesyst

Re: [PATCH] Cygwin: Add /dev/disk/by-label and /dev/disk/by-uuid symlinks

2023-11-21 Thread Corinna Vinschen
On Nov 21 19:31, Christian Franke wrote: > Corinna Vinschen wrote: > > Hi Christian, > > > > Looks good, but I just realized that I was already wondering about the > > sanitization and forgot to talk about it: > > > > On Nov 21 12:24, Christian Franke

Re: [PATCH] Cygwin: Add /dev/disk/by-label and /dev/disk/by-uuid symlinks

2023-11-21 Thread Corinna Vinschen
Hi Christian, Looks good, but I just realized that I was already wondering about the sanitization and forgot to talk about it: On Nov 21 12:24, Christian Franke wrote: > diff --git a/winsup/cygwin/fhandler/dev_disk.cc > b/winsup/cygwin/fhandler/dev_disk.cc > index c5d72816f..d12ac52fa 100644 >

Re: [PATCH] Cygwin: Add /dev/disk/by-label and /dev/disk/by-uuid symlinks

2023-11-20 Thread Corinna Vinschen
On Nov 20 15:54, Christian Franke wrote: > From: Christian Franke > Date: Mon, 20 Nov 2023 15:40:42 +0100 > Subject: [PATCH] Cygwin: /dev/disk/by-uuid: Fix NTFS serial number print > format > > Signed-off-by: Christian Franke > --- > winsup/cygwin/fhandler/dev_disk.cc | 2 +- > 1 file

Re: [PATCH] Cygwin: Add /dev/disk/by-label and /dev/disk/by-uuid symlinks

2023-11-20 Thread Corinna Vinschen
On Nov 20 10:40, Corinna Vinschen wrote: > Hi Christian, > > This puzzles me: > > On Nov 17 21:25, Christian Franke wrote: > > @@ -610,7 +607,7 @@ get_by_id_table (by_id_entry * , > > fhandler_dev_disk::dev_disk_location loc) > >if (!table) &g

Re: [PATCH] Cygwin: Add /dev/disk/by-label and /dev/disk/by-uuid symlinks

2023-11-20 Thread Corinna Vinschen
Hi Christian, This puzzles me: On Nov 17 21:25, Christian Franke wrote: > @@ -610,7 +607,7 @@ get_by_id_table (by_id_entry * , > fhandler_dev_disk::dev_disk_location loc) >if (!table) > return (errno_set ? -1 : 0); > > - /* Sort by name and remove duplicates. */ > + /* Sort by name

Re: [PATCH] Cygwin: Add /dev/disk/by-label and /dev/disk/by-uuid symlinks

2023-11-17 Thread Corinna Vinschen
On Nov 17 18:53, Christian Franke wrote: > Corinna Vinschen wrote: > > On Nov 17 17:45, Christian Franke wrote: > > > Corinna Vinschen wrote: > > > > On Nov 17 15:39, Christian Franke wrote: > > > > > The last two /dev/disk subdirectories :-) > >

Re: [PATCH] Cygwin: Add /dev/disk/by-label and /dev/disk/by-uuid symlinks

2023-11-17 Thread Corinna Vinschen
On Nov 17 17:45, Christian Franke wrote: > Corinna Vinschen wrote: > > On Nov 17 15:39, Christian Franke wrote: > > > The last two /dev/disk subdirectories :-) > > > > > > Note a minor difference: On Linux, empty /dev/disk subdirectories > > >

Re: [PATCH] Cygwin: Add /dev/disk/by-label and /dev/disk/by-uuid symlinks

2023-11-17 Thread Corinna Vinschen
mulate. Agreed. This is really great. I just pushed your patch. However, there's something strange in terms of by-label: I have two partitions with labels: $ ls -l /dev/disk/by-label total 0 lrwxrwxrwx 1 corinna vinschen 0 Nov 17 17:18 blub -> ../../sda3 lrwxrwxrwx 1 corinna vinschen 0

Re: [PATCH] Cygwin: Add /dev/disk/by-drive and /dev/disk/by-uuid symlinks

2023-11-17 Thread Corinna Vinschen
On Nov 16 18:02, Christian Franke wrote: > Corinna Vinschen wrote: > > On Nov 16 12:50, Christian Franke wrote: > > ... > > > > I also tried an NTFS partition and the output looks like this: > > > > > > > > 0FD4F62866CFBF09 -> ../../

Re: [PATCH] Cygwin: Add /dev/disk/by-drive and /dev/disk/by-uuid symlinks

2023-11-16 Thread Corinna Vinschen
On Nov 16 12:50, Christian Franke wrote: > Corinna Vinschen wrote: > > Hi Christian, > > > > On Nov 15 18:23, Christian Franke wrote: > > > This is the next (and possibly last for now) extension to the /dev/disk > > > directory. Limited to disk related

Re: [PATCH] Cygwin: Add /dev/disk/by-drive and /dev/disk/by-uuid symlinks

2023-11-16 Thread Corinna Vinschen
Hi Christian, On Nov 15 18:23, Christian Franke wrote: > This is the next (and possibly last for now) extension to the /dev/disk > directory. Limited to disk related entries which allowed a straightforward > extension of the existing code. > > My original idea was to add also other drive letters

Re: [PATCH v2] Fix profiler error() definition and usage

2023-11-14 Thread Corinna Vinschen
On Nov 14 00:58, Mark Geisert wrote: > Minor updates to profiler and gmondump, which share some code: > - fix operation of error() so it actually works as intended > - resize 4K-size auto buffer reservations to BUFSIZ (==1K) > - remove trailing '\n' from 2nd arg on error() calls everywhere > -

Re: [PATCH] Cygwin: Fix profiler error() definition and usage

2023-11-13 Thread Corinna Vinschen
Hi Mark, On Nov 13 01:46, Mark Geisert wrote: > Minor updates to profiler and gmondump, which share some code: > - fix operation of error() so it actually works as intended > - resize 4K-size auto buffer reservations to BUFSIZ (==1K) > - remove trailing '\n' from 2nd arg on error() calls

Re: [PATCH] fix(libc): Fix handle of %E & %O modifiers at end of format string

2023-11-13 Thread Corinna Vinschen
Hi Pedro, On Nov 11 18:29, Pedro Luis Castedo Cepeda wrote: > OK. It's not a newlib problem but a GLib one as it is relaying on common but > non-standard strftime implementation details. > > I attach a short program more focused in g_date_strftime implementation so > it can be evaluated if it

Re: [PATCH] fix(libc): Fix handle of %E & %O modifiers at end of format string

2023-11-10 Thread Corinna Vinschen
On Nov 9 23:17, Brian Inglis wrote: > On 2023-11-09 12:04, Pedro Luis Castedo Cepeda wrote: > > - Prevent strftime to parsing format string beyond its end when > >it finish with "%E" or "%O". > > --- > > newlib/libc/time/strftime.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff

Re: [PATCH] Cygwin: /dev/disk/by-id: Remove leading spaces from identify fields

2023-11-08 Thread Corinna Vinschen
On Nov 8 17:40, Christian Franke wrote: > Minor improvement, avoids "/dev/disk/by-id/sata-VENDOR_MODEL___SERIAL". Pushed. Thanks, Corinna

Re: [PATCH] Cygwin: Add /dev/disk/by-id symlinks

2023-11-07 Thread Corinna Vinschen
On Nov 7 15:30, Christian Franke wrote: > Corinna Vinschen wrote: > > .. > > Looking forward to it. We'll just need an entry for the release text > > in winsup/cygwin/release/3.5.0 and doc/new-features.xml in the end :) > > Attached for now as implementing the r

Re: [PATCH] Cygwin: Add /dev/disk/by-id symlinks

2023-11-07 Thread Corinna Vinschen
On Nov 7 11:10, Christian Franke wrote: > Corinna Vinschen wrote: > > Hi Christian, > > > > On Nov 5 16:45, Christian Franke wrote: > > > ... > > > Old IOCTL dropped and code simplified. > > Great. I pushed your patch. > > Thanks. > >

Re: [PATCH] Cygwin: Add /dev/disk/by-id symlinks

2023-11-05 Thread Corinna Vinschen
Hi Christian, On Nov 5 16:45, Christian Franke wrote: > Corinna Vinschen wrote: > > Do we really still need IOCTL_DISK_GET_DRIVE_LAYOUT w/o _EX? > > Possibly not. I borrowed this code from code behind /proc/partitions. > > > fhandler_proc still uses it, too, but the E

Re: [PATCH] Cygwin: Add /dev/disk/by-id symlinks

2023-11-04 Thread Corinna Vinschen
Hi Christian, patch looks pretty good to me. Just two minor points: > + /* Traverse \Device directory ... */ > + bool errno_set = false; > + HANDLE devhdl = INVALID_HANDLE_VALUE; INVALID_HANDLE_VALUE is a Win32 API concept and is only returned by CreateFile and friends. The native NT API

Re: [PATCH] Cygwin: Add /dev/disk/by-id symlinks

2023-11-04 Thread Corinna Vinschen
On Nov 4 10:34, Corinna Vinschen wrote: > On Nov 3 18:54, Christian Franke wrote: > > Corinna Vinschen wrote: > > > On Nov 3 17:27, Corinna Vinschen wrote: > > > > On Nov 3 17:09, Christian Franke wrote: > > > > > Unlike (S)ATA and NVMe, the seri

Re: [PATCH] Cygwin: Add /dev/disk/by-id symlinks

2023-11-04 Thread Corinna Vinschen
On Nov 3 18:54, Christian Franke wrote: > Corinna Vinschen wrote: > > On Nov 3 17:27, Corinna Vinschen wrote: > > > On Nov 3 17:09, Christian Franke wrote: > > > > Unlike (S)ATA and NVMe, the serial number > > > > is not available for free in the device

Re: [PATCH] Cygwin: Add /dev/disk/by-id symlinks

2023-11-03 Thread Corinna Vinschen
On Nov 3 17:27, Corinna Vinschen wrote: > On Nov 3 17:09, Christian Franke wrote: > > Unlike (S)ATA and NVMe, the serial number > > is not available for free in the device identify data block but requires an > > extra command (SCSI INQUIRY of VPD page 0x80). This m

Re: [PATCH] Cygwin: Add /dev/disk/by-id symlinks

2023-11-03 Thread Corinna Vinschen
On Nov 3 17:09, Christian Franke wrote: > Corinna Vinschen wrote: > > I haven't found out where the UUID is coming from, yet, but based on the > > description from > > https://learn.microsoft.com/en-us/windows-hardware/drivers/storage/device-unique-identifiers--duids--for-

Re: [PATCH] Cygwin: Add /dev/disk/by-id symlinks

2023-11-03 Thread Corinna Vinschen
On Nov 3 12:10, Corinna Vinschen wrote: > On Nov 3 11:09, Corinna Vinschen wrote: > > On Nov 3 10:55, Corinna Vinschen wrote: > > > On Oct 3 14:39, Christian Franke wrote: > > > > According to NtQueryObject(., ObjectBasicInformation, ...), using > &g

Re: [PATCH] Cygwin: Add /dev/disk/by-id symlinks

2023-11-03 Thread Corinna Vinschen
On Nov 3 12:06, Christian Franke wrote: > Corinna Vinschen wrote: > > > I ran this on Windows 11 and Windows 2K19 in a QEMU/KVM VM. A > > > \Device\Harddisk0\Partition0 symlink pointing to \Device\Harddisk0\DR0 > > > exists in both cases. I straced it, and found th

Re: [PATCH] Cygwin: Add /dev/disk/by-id symlinks

2023-11-03 Thread Corinna Vinschen
On Nov 3 11:09, Corinna Vinschen wrote: > On Nov 3 10:55, Corinna Vinschen wrote: > > On Oct 3 14:39, Christian Franke wrote: > > > According to NtQueryObject(., ObjectBasicInformation, ...), using > > > NtOpenFile(., MAXIMUM_ALLOWED, ...) without admin right

Re: [PATCH] Cygwin: Add /dev/disk/by-id symlinks

2023-11-03 Thread Corinna Vinschen
On Nov 3 10:55, Corinna Vinschen wrote: > Hi Christian, > > On Oct 3 14:39, Christian Franke wrote: > > Christian Franke wrote: > > > This is a first attempt to partly emulate the Linux directory > > > /dev/disk/by-id. Useful to make sure the correct device

Re: [PATCH] Cygwin: Add /dev/disk/by-id symlinks

2023-11-03 Thread Corinna Vinschen
Hi Christian, On Oct 3 14:39, Christian Franke wrote: > Christian Franke wrote: > > This is a first attempt to partly emulate the Linux directory > > /dev/disk/by-id. Useful to make sure the correct device is accessed in > > conjunction with dd, ddrescue, fdisk, > > Attached is the second

Re: [PATCH] Cygwin: Fix __cpuset_zero_s prototype

2023-09-09 Thread Corinna Vinschen
On Sep 7 22:36, Mark Geisert wrote: > Add a missing "void" to the prototype for __cpuset_zero_s(). > > Reported-by: Marco Mason > Addresses: https://cygwin.com/pipermail/cygwin/2023-September/254423.html > Signed-off-by: Mark Geisert > Fixes: c6cfc99648d6 (Cygwin: sys/cpuset.h: add

Re: [PATCH] Add initial support for SOURCE_DATE_EPOCH

2023-09-08 Thread Corinna Vinschen
Jon, you did all the latest work in terms of the build machinery. Would you mind to review this patch, please? Thanks, Corinna On Sep 5 19:01, Christian Franke wrote: > This patch enables reproducible builds of cygwin package in conjunction with > this cygport patch: >

Re: [PATCH] Cygwin: Fix __cpuset_zero_s prototype

2023-09-08 Thread Corinna Vinschen
On Sep 7 22:36, Mark Geisert wrote: > Add a missing "void" to the prototype for __cpuset_zero_s(). > > Reported-by: Marco Mason > Addresses: https://cygwin.com/pipermail/cygwin/2023-September/254423.html > Signed-off-by: Mark Geisert > Fixes: c6cfc99648d6 (Cygwin: sys/cpuset.h: add

Re: [PATCH v2] Cygwin: cpuinfo: Linux 6.5 additions

2023-09-01 Thread Corinna Vinschen
On Sep 1 11:42, Brian Inglis wrote: > add AMD 0x801f EAX 14 debug_swap SEV-ES full debug state swap > > Signed-off-by: Brian Inglis > --- > winsup/cygwin/fhandler/proc.cc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/winsup/cygwin/fhandler/proc.cc

Re: [PATCH] Cygwin: Implement sound mixer device.

2023-09-01 Thread Corinna Vinschen
On Sep 1 19:04, Takashi Yano wrote: > This patch adds implementation of OSS-based sound mixer device. This > allows applications to change the sound playing volume. Cool! Go ahead, that's a nice addition. > NOTE: Currently, the recording volume cannot be changed. I guess you're already

Re: [PATCH] Cygwin: cpuinfo: Linux 6.5: add AMD 0x8000001f EAX 14 debug_swap SEV-ES full debug state swap

2023-08-31 Thread Corinna Vinschen
Hi Brian, nothing against the patch as such, but your subject line is not so nice. As it becomes the commit message first line, it should be shorter. Add more descriptive text instead, please, and make sure that it tells the reader what you're really doing, i. e.: You write "add ", but your

[PATCH] Cygwin: execve: drop argument size limit

2023-08-29 Thread Corinna Vinschen
From: Corinna Vinschen Before commit 44f73c5a6206 ("Cygwin: Fix segfalt when too many command line args are specified.") we had no actual argument size limit, except for the fact that the child process created another copy of the argv array on the stack, which could result in a stac

Re: [PATCH v2] Cygwin: spawn: Fix segfalt when too many command line args are specified.

2023-08-28 Thread Corinna Vinschen
On Aug 28 13:09, Corinna Vinschen wrote: > On Aug 28 12:57, Corinna Vinschen wrote: > > On Aug 28 18:46, Takashi Yano wrote: > > > Previously, the number of command line args was not checked for > > > cygwin process. Due to this, segmentation fault was caused if too &

Re: [PATCH v2] Cygwin: spawn: Fix segfalt when too many command line args are specified.

2023-08-28 Thread Corinna Vinschen
On Aug 28 12:57, Corinna Vinschen wrote: > On Aug 28 18:46, Takashi Yano wrote: > > Previously, the number of command line args was not checked for > > cygwin process. Due to this, segmentation fault was caused if too > > many command line args are specified. > > h

Re: [PATCH] Cygwin: termios: Refactor the function is_console_app().

2023-08-28 Thread Corinna Vinschen
On Aug 28 18:21, Takashi Yano wrote: > Signed-off-by: Takashi Yano > --- > winsup/cygwin/fhandler/termios.cc | 18 -- > 1 file changed, 8 insertions(+), 10 deletions(-) > > diff --git a/winsup/cygwin/fhandler/termios.cc > b/winsup/cygwin/fhandler/termios.cc > index

Re: [PATCH v2] Cygwin: spawn: Fix segfalt when too many command line args are specified.

2023-08-28 Thread Corinna Vinschen
On Aug 28 18:46, Takashi Yano wrote: > Previously, the number of command line args was not checked for > cygwin process. Due to this, segmentation fault was caused if too > many command line args are specified. > https://cygwin.com/pipermail/cygwin/2023-August/254333.html > > Since char

Re: [PATCH] Cygwin: pty: Fix failure to clear switch_to_nat_pipe flag.

2023-08-21 Thread Corinna Vinschen
On Aug 21 17:53, Takashi Yano wrote: > Hi Corinna, > > On Mon, 21 Aug 2023 10:20:30 +0200 > Corinna Vinschen wrote: > > Hi Takashi, > > > > On Aug 19 15:07, Takashi Yano wrote: > > > After the commit fbfea31dd9b9, switch_to_nat_pipe is not cleared > >

Re: [PATCH] Cygwin: pty: Fix failure to clear switch_to_nat_pipe flag.

2023-08-21 Thread Corinna Vinschen
Hi Takashi, On Aug 19 15:07, Takashi Yano wrote: > After the commit fbfea31dd9b9, switch_to_nat_pipe is not cleared > properly when non-cygwin app is terminated in the case where the > pseudo console is disabled. This is because get_winpid_to_hand_over() > sometimes returns PID of cygwin process

Re: [PATCH] Cygwin: shared: Fix access permissions setting in open_shared().

2023-08-16 Thread Corinna Vinschen
On Aug 16 09:51, Corinna Vinschen wrote: > On Aug 16 08:37, Takashi Yano wrote: > > After the commit 93508e5bb841, the access permissions argument passed > > to open_shared() is ignored and always replaced with (FILE_MAP_READ | > > FILE_MAP_WRITE). This causes the weird behavi

Re: [PATCH] Cygwin: shared: Fix access permissions setting in open_shared().

2023-08-16 Thread Corinna Vinschen
On Aug 16 08:37, Takashi Yano wrote: > After the commit 93508e5bb841, the access permissions argument passed > to open_shared() is ignored and always replaced with (FILE_MAP_READ | > FILE_MAP_WRITE). This causes the weird behaviour that sshd service > process loses its cygwin PID. This triggers

Re: [PATCH 1/2] Detect RAM disks as a separate filesystem type

2023-08-07 Thread Corinna Vinschen
Hi Les, your 2nd patch looks good to me, but this patch is a bit questionable. On Aug 7 03:13, Les De Ridder wrote: > diff --git a/winsup/cygwin/mount.cc b/winsup/cygwin/mount.cc > index 36ab042a7..1950dadb0 100644 > --- a/winsup/cygwin/mount.cc > +++ b/winsup/cygwin/mount.cc > @@ -292,6

Re: [PATCH 0/4] Testsuite update

2023-08-07 Thread Corinna Vinschen
On Aug 4 13:47, Jon Turney wrote: > This gets us down to no permanent failures in the testsuite in CI. > > When run locally, msgtest, semtest and shmtest fail because they need a > running cygserver using the test DLL, > and I haven't got a good idea about how to automate that. devdsp fails

Re: [PATCH 5/5] Cygwin: add AT_EMPTY_PATH fix to release message

2023-07-28 Thread Corinna Vinschen
On Jul 28 17:11, Pedro Alves wrote: > On 2023-07-12 13:08, Corinna Vinschen wrote: > > +- Fix AT_EMPTY_PATH handling in fchmodat and fstatat if dirfd referres to > > referres -> refers Oops, sorry, too late :}

Re: [PATCH 0/5] Fix AT_EMPTY_PATH handling

2023-07-26 Thread Corinna Vinschen
On Jul 26 11:10, Johannes Schindelin wrote: > Hi Corinna, > > I had a look over the patches and they all make sense. I also tested the > code to make sure that the `tar xf` regression I needed to be fixed is > also addressed by this patch series. > > As I don't really know the customs of the

Re: [PATCH 0/5] Fix AT_EMPTY_PATH handling

2023-07-24 Thread Corinna Vinschen
Johannes? Ping? On Jul 12 14:07, Corinna Vinschen wrote: > From: Corinna Vinschen > > The GLIBC extension AT_EMPTY_PATH allows the functions fchownat > and fstatat to operate on dirfd alone, if the given pathname is an > empty string. This also allows to operate on any file t

Re: [PATCH] Cygwin: testsuite: Drop using DejaGnu to run tests

2023-07-21 Thread Corinna Vinschen
On Jul 21 13:29, Jon Turney wrote: > A more sophisticated (and modern) test harness would probably be useful, > but switching to Automake's built-in test harness gets us parallel test > execution, colourization of failures, simplifies matters, seems adequate > for the current testuite, and means

Re: [PATCH 0/2] Testsuite adjustment and relevant fix

2023-07-20 Thread Corinna Vinschen
On Jul 20 17:14, Corinna Vinschen wrote: > On Jul 20 13:55, Jon Turney wrote: > > On 19/07/2023 16:33, Corinna Vinschen wrote: > > > On Jul 19 13:41, Jon Turney wrote: > > > > [1/2] has the side effect of flipping test stat06 from working to > &

Re: [PATCH 0/2] Testsuite adjustment and relevant fix

2023-07-20 Thread Corinna Vinschen
On Jul 20 13:55, Jon Turney wrote: > On 19/07/2023 16:33, Corinna Vinschen wrote: > > On Jul 19 13:41, Jon Turney wrote: > > > [1/2] has the side effect of flipping test stat06 from working to failing. > > > [2/2] fixes that > > > > > > W

  1   2   3   4   5   6   7   8   9   10   >