Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-12-16Cygwin: Update 3.4.3 release notecygwin-3.4.3Jon Turney
2022-12-16Revert "Cygwin: x86_64: add wmemset assembler entry point"Jon Turney
This reverts commit 188d5f6c9ad5cbbd6f0fcb9aaf15bc9870597910.
2022-12-14Cygwin: path handling: never substitute virtual drive with target pathCorinna Vinschen
Move the drive substitution code after the call to GetFinalPathNameByHandleW into a local function revert_virtual_drive and add code to handle non-remote virtual drives, i. e., those created with the subst command. (Try to) make sure that virtual drives are never treated like symlinks. Fixes: 19d59ce75d53 ("Cygwin: path_conv: Rework handling native symlinks as inner path components") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-14Cygwin: add release message for latest path handling patchCorinna Vinschen
5ba5e09b9d39 ("Cygwin: path handling: never substitute virtual drive with target path") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-13Cygwin: Makefile: build new-cygwin1.dll in a single stepCorinna Vinschen
The complicated build routine was only required because we needed the .cygheap section at the end of the file, and the debug sections broke this. Now that the cygheap is out of the way, we really don't have to do this anymore, and the build can just generate a DLL with integrated debug info. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-13Cygwin: Makefile: only regenerate cygwin_version.c if it changesCorinna Vinschen
Make sure to create a new cygwin_version.c if it either doesn't exist yet, or if it would be different from the former file. This avoids unnecessary DLL rebuilding. Fixes: 97eb64b909bc ("Cygwin: uname: generate default release string from git as well") Fixes: 4949a82cde98 ("Cygwin: uname: fix building in non-git source dir") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-11bump DLL version to 3.4.3Corinna Vinschen
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-11Cygwin: add 3.4.2 release notescygwin-3.4.2Corinna Vinschen
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-11Cygwin: uname: fix building in non-git source dirCorinna Vinschen
commit 97eb64b909bc broke building outside of a git dir, because the git describe command would fail. Fix this by checking if we're in a git tree at all and just generate an empty string as version string. Use this in uname_x to generate a fallback version. Fixes: 97eb64b909bc ("Cygwin: uname: generate default release string from git as well" Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-11Cygwin: uname: generate default release string from git as wellCorinna Vinschen
When building a release with cygport, we get uname version info from cygport, which in turn gets version info from `git describe'. During development, the release info for local builds was not that helpful yet. Fix that, by creating version info from `git describe' if CYGPORT_RELEASE_INFO isn't given. Make sure to always force rebuild of the version info to pick up source file changes as well as git actions. Rearrange code slightly to generate machine info first, release info after that. Use snprintf to generate release string safely. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-11Revert "Cygwin: 3.4-only: uname: drop dot from external release info"Corinna Vinschen
This reverts commit b5eba8e972786275c76ea69a7ce6ef8d7c8279c3.
2022-12-11bump DLL version to 3.4.2Corinna Vinschen
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-09Cygwin: pipe: Fix performance degradation for non-cygwin pipe.cygwin-3.4.1Takashi Yano
https://cygwin.com/pipermail/cygwin/2022-December/252628.html After the commit 9e4d308cd592, the performance of read from non-cygwin pipe has been degraded. This is because select_sem mechanism does not work for non-cygwin pipe. This patch fixes the issue. Fixes: 9e4d308cd592 ("Cygwin: pipe: Adopt FILE_SYNCHRONOUS_IO_NONALERT flag for read pipe.") Reported-by: tryandbuy <tryandbuy@proton.me> Reviewed-by: Corinna Vinschen <corinna@vinschen.de> Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
2022-12-09Cygwin: improve release text for FILE issueCorinna Vinschen
Add a note in terms of 3.4.0 compatibility. Suggested-by: Markus Mützel <markus.muetzel@gmx.de> Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-08Cygwin: add __sFILE64 fix to 3.4.1 release notesCorinna Vinschen
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-08Cygwin: 3.4-only: uname: drop dot from external release infoCorinna Vinschen
Right now, the dot between the version and the machine info in the release field is expected to come in from CYGPORT_RELEASE_INFO. But that's just confusing and doesn't match what we now do in 3.5 since commit 97eb64b909bc ("Cygwin: uname: generate default release string from git as well") Add the dot when attaching the machine info. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-07Cygwin: link mcountFunc.o to libgmon.aCorinna Vinschen
Commit 188d5f6c9ad5 erroneously moved the mcountFunc.S file to the TARGET_FILES target, rather than keeping it in GMON_FILES. The result is that the __fentry__ entry point is now entirely undefined, so `gcc -pg' is broken. Create new target-specific GMON_TARGET_FILES and move mcountFunc.S into it. Add $(GMON_TARGET_FILES) to GMON_FILES. Fixes: 188d5f6c9ad5 ("Cygwin: x86_64: add wmemset assembler entry point") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-04bump DLL version to 3.4.1Corinna Vinschen
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-03Cygwin: add release message for commit previous commit 8d138c3f66c2cygwin-3.4.0Corinna Vinschen
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-03Cygwin: add latest primary group changes to release notesCorinna Vinschen
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-02Cygwin: uinfo: don't special case current userCorinna Vinschen
fetch_account_from_windows shortcuts the current user in that it takes the user's domain SID and just adds the matching RID from the token's primary group to create a group SID. How wrong this is can be very simply reproduced: Assuming you run a native process, like cmd, with primary group set to the Administrators builtin group. Run Cygwin's id(1) as child process. id(1) will print a non-existent group as primary group and also add it to the group list. This can only be avoided by not special casing the current user and thus not creating a group SID from partial information. Fixes: 6cc7c925ce86 ("(pwdgrp::fetch_account_from_windows): Default primary group for the current user to primary group from user token.") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-02Cygwin: uinfo: prefer token primary groupCorinna Vinschen
internal_getlogin overwrites the process token primary group if it differs from the primary group as stored in the passwd DB. However, this also overwrites the primary group of the process if it has been deliberately changed by a former process (e. g., newgrp), and the current process has a non-Cygwin process as parent. Our docs claim we restrict overwriting the primary group to local, non-domain user accounts anyway, and it was actually meant this way. So check for exactly that before overwriting the primary group in the token: It's only allowed if the user is a local account and the primary group in the token is still the default group "None". Fixes: 6cc7c925ce861 ("(internal_getlogin): Give primary group from user token more weight.") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-02Cygwin: uinfo: Drop long disabled nss_prefix and nss_separatorCorinna Vinschen
Originally the code was written to allow three ways of prefixing accounts and to freely define a domain/account separator. This code has been disabled even before being officially released, and it was never re-enabled. Given there has been no complaints for eight years now, drop this code eventually. Just add a macro to define the domain/account separator statically. Fixes: cc332c9e271b ("(cygheap_pwdgrp::nss_init_line): Disable db_prefix and db_separator settings. Add comment") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-02Cygwin: exec: don't access cygheap before it's initializedCorinna Vinschen
This is a long-standing thinko. When you exec a process, dll_crt0_0 in the child process calls child_info_spawn::handle_spawn(). handle_spawn() initialises the cygheap. Now consider calling strace. Strace is a non-Cygwin process dynamically loading cygwin1.dll via LoadLibrary. This in turn initializes the DLL: - dll_crt0_0 finds that the process it attaches to has been exec'd, so child_info_spawn::handle_spawn() is called. - If the DLL is being dynamically loaded, handle_spawn() calls child_info_spawn::get_parent_handle(). This in turn tries to set the moreinfo->myself_pinfo value inside the cygheap to NULL. - However, at this time, the cygheap has not yet been initialized. This only occurs in the cygheap_fixup_in_child() call after get_parent_handle() returns. --> SEGV This thinko never had a negative side effect, because the cygheap was pre-allocated at DLL load time until commit 2f9b8ff00cce ("Cygwin: decouple cygheap from Cygwin DLL"). With 2f9b8ff00cce, the cygheap actually doesn't exist until after the call to cygheap_fixup_in_child(). Fix this problem by moving the assignment after the call to cygheap_fixup_in_child(). Fixes: 3de7be4c1deb ("* DevNotes: Add entry cgf-000007. [...]") Fixes: 2f9b8ff00cce ("Cygwin: decouple cygheap from Cygwin DLL") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-01Cygwin: multiple_cygwin_problem: drop obsolete check for "cygheap"Corinna Vinschen
After decoupling cygheap from the DLL loading address, the check for a different _cygheap_start has gone. So the matching string check in multiple_cygwin_problem is obsolete now. Fixes: 2f9b8ff00cce ("Cygwin: decouple cygheap from Cygwin DLL") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-11-29Cygwin: serial: Fix a copy-paste error in DTR setupCarlo Bramini
In commit 2dab880c963ce0204c3513d664f610b587a3e6a6 I did a mistake when I copied the new fhandler_serial::switch_modem_lines() from my modified 3.3.6 branch to the current master and I left a copy paste error. This patch fixes that error. Fixes: 2dab880c963c ("Cygwin: fix TIOCMBIS/TIOCMBIC not working when using usbser.sys")
2022-11-25Cygwin: pty: Rename fhandler/tty.cc to fhandler/pty.cc.Takashi Yano
- Previously, we have two tty.cc, one is winsup/cygwin/tty.cc and the other is winsup/cygwin/fhandler/tty.cc. This is somewhat confusing. This patch renames fhandler/tty.cc to fhandler/pty.cc.
2022-11-24Cygwin: uname: allow to specify external release infoCorinna Vinschen
When creating regular Cygwin test releases we need a way to automate unambiguous version information based on the output of `git describe'. Allow to inject a release string via a preprocessor macro CYGPORT__RELEASE_INFO. Change the default release info to recognize a local, non-distro build. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-11-24Cygwin: drop snapshot handlingCorinna Vinschen
We're going to switch to regular test releases, rather than the old, handcrafted snapshots method. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-11-20Cygwin: pty, console: Encapsulate spawn.cc code related to pty/console.Takashi Yano
- The codes related to pty and console in spawn.cc have been moved into the new class fhandler_termios::spawn_worker, and make spawn.cc call them. The functionality has not been changed at all.
2022-11-11Cygwin: document bugfix for USB CDC devicesCorinna Vinschen
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-11-11Cygwin: fix TIOCMBIS/TIOCMBIC not working when using usbser.sysCarlo Bramini
In winsup/cygwin/fhandler/serial.cc, the function fhandler_serial::switch_modem_lines() is called when TIOCMBIS/TIOCMBIC are used in an ioctl() call. This function uses EscapeCommFunction() for setting and resetting RTS and DTR signals of a serial port. Unfortunately, this function does not work on USB CDC devices. This is not a true bug of CYGWIN but an issue of the usbser.sys driver, from Windows 2000 to the latest Windows 11. Both 32bit and 64bit versions of the operating system are affected. Actually, I tested EscapeCommFunction() also when using a real UART, based on the traditional 16550 driver and it works fine. Using thirdy party CDC drivers, like the one provided by FTDI for their USB bridge chips, probably also works. However, it is also possible to drive the RTS/DTR signals by writing their state with SetCommState(), which proved to be working fine all types of connection. This is also a better solution for handling these signals since RTS/DTR can be set at the same time rather than having two separate calls with a visible delay between them.
2022-11-10Cygwin: Correct /proc/*/stat for processes without cttyAndy Koppe
Report 0 instead of 268435455 (i.e. 0xFFFFFFF) in the tty field of /proc/*/stat for processes without a controlling terminal. This is what the procps utility expects when selecting or excluding such processes.
2022-11-04Cygwin: Handle out of order modules for module offsets in stackdumpJon Turney
Improve address to module+offset conversion, to work correctly in the presence of out-of-order elements in InMemoryOrderModuleList. Fixes: d59651d4
2022-10-29Cygwin: Add loaded module base address list to stackdumpJon Turney
This adds an extra section to the stackdump, which lists the loaded modules and their base address. This is perhaps useful as it makes it immediately clear if RandomCrashInjectedDll.dll is loaded... Future work: It seems like the 'InMemoryOrder' part of 'InMemoryOrderModuleList' is a lie? > Loaded modules > 000100400000 segv-test.exe > 7FFF2AC30000 ntdll.dll > 7FFF29050000 KERNEL32.DLL > 7FFF28800000 KERNELBASE.dll > 000180040000 cygwin1.dll > 7FFF28FA0000 advapi32.dll > 7FFF29F20000 msvcrt.dll > 7FFF299E0000 sechost.dll > 7FFF29B30000 RPCRT4.dll > 7FFF27C10000 CRYPTBASE.DLL > 7FFF28770000 bcryptPrimitives.dll
2022-10-28Cygwin: Add addresses as module offsets in .stackdump fileJon Turney
This adds an additional column to the stack trace in a .stackdump file, which gives the stack frame return address as a module name+offset. This makes it a possible to convert the address to a function name without having to guess what module the address belongs to. > Stack trace: > Frame Function Args > 0007FFFFCC30 0001004010E9 (000180048055, 000180046FA0, 000000000002, 00018031E160) segv-test.exe+0x10E9 > 0007FFFFCD30 0001800480C1 (000000000000, 000000000000, 000000000000, 000000000000) cygwin1.dll+0x80C1 > 0007FFFFFFF0 000180045C86 (000000000000, 000000000000, 000000000000, 000000000000) cygwin1.dll+0x5C86 > 0007FFFFFFF0 000180045D34 (000000000000, 000000000000, 000000000000, 000000000000) cygwin1.dll+0x5D34 > End of stack trace Loosely based on this patch [1] by Brian Dessent. [1] https://cygwin.com/pipermail/cygwin-patches/2008q1/006306.html
2022-10-28Cygwin: Tidy up formatting of stackdumpJon Turney
Resize stackdump headers for b9e97f58 Consistently use \r\n line endings
2022-10-28Cygwin: cygheap: make bucket_val a static const arrayCorinna Vinschen
Every time the cygheap is initialized, that is, on each fork or exec, cygheap_init() *again* computes the bucket size values and stores them in the cgyheap, albeit they are always the same values anyway. Make bucket_val a local const array, statically initialized instead. Fixes: 61522196c715 ("* Merge in cygwin-64bit-branch.)" Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-10-28Cygwin: document ASLR supporttopic/aslr_supportCorinna Vinschen
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-10-28Cygwin: Enable dynamicbase on the Cygwin DLL by defaultCorinna Vinschen
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-10-28Cygwin: /proc/<PID>/maps: output cygheap infoCorinna Vinschen
Now that the cygheap isn't part of the CYgwin DLL anymore, we have a known memory location which is not known in maps output. Fix that by checking for cygheap address (same in all processes) and add to output. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-10-28Cygwin: drop objcopy .gnu_debuglink juggleCorinna Vinschen
Prior to 591fec858d01 ("Cygwin: decouple cygheap from Cygwin DLL") the .cygheap section was required to stay the last section in the final binary. That required some juggling with objcopy to make sure the .gnu_debuglink section is prior to the .cygheap section in the final DLL. This isn't required anymore, so just drop it. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-10-28Cygwin: memory_layout.h: define absolute MMAP_STORAGE_HIGH values hereCorinna Vinschen
Use the symbolic values in wincap.cc. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-10-28Cygwin: memory_layout.h: fix commentsCorinna Vinschen
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-10-28Cygwin: decouple shared mem regions from Cygwin DLLCorinna Vinschen
Another reason ASLR may fail is the coupling of the standard shared mem regions (global, userinfo, process info, shared console) to the address of the Cygwin DLL. They are always placed in fixed addresses preceeding the Cygwin DLL's address. With ASLR this is bound to fail. Use a fixed, unused memory area to place the shared mem regions. This also allows to simplify the shared memory creation. There's no reason anymore to rebase the regions and rather than offsets, just use the addresses directly. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-10-28Cygwin: decouple cygheap from Cygwin DLLCorinna Vinschen
One reason that ASLR is tricky is the fact that the cygheap is placed at the end of the DLL and especially that it's expected to be growable. To support ASLR, this construct must go. Define dedicated cygheap memory region and reserve entire region. Commit 3 Megs, as was the default size of the cygheap before. Fix linker script accordingly, drop a now useless version check in get_cygwin_startup_info().
2022-10-28Cygwin: add memory_layout.hCorinna Vinschen
Collect all info about memory layout in one header file, so the mem layout is documented in one logical place and not in heap.cc arbitrarily. Use info from this file throughout. This is to prepare for ASLR support. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-10-28Cygwin: exceptions: print 48 bit addressesCorinna Vinschen
Exception handling was *still* printing addresses as 44 bit values, but Windows supports a 48 bit virtual address space since Windows 8.1. Fix that. Fixes: e1254add73b1 ("Cygwin: Allow accessing 48 bit address space in Windows 8.1 or later") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-10-28Cygwin: stop handling files with .com suffix like .exe filesCorinna Vinschen
.com is a remnant from the past. There are only five executables left: chcp.com format.com mode.com more.com tree.com Calling them on the command line already requires to use the suffix anyway. So drop useless .com test from the execve test for scripts (they are handled earlier in the same function as executables) and do not handle them like .exe suffixes in other functions. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-10-28Revert "Cygwin: pty: Fix 'Bad address' error when running 'cmd.exe /c dir'"Corinna Vinschen
This reverts commit 7589034cc3151bfac8cc3d3af5e91402a78e160b. The previous commit 14816de9af69 ("Cygwin: spawn: drop special handling for cmd.exe and command.com") make this patch unnecessary. The filename argument (i. e., run_path in the caller) is now always non-NULL. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>