From e612307024b1578d137ea50b70315b81aeeb248b Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 30 Mar 2012 11:30:13 +0000 Subject: [PATCH] * cygwinenv.sgml (cygwinenv-implemented-options): Add detect_bloda. * new-features.sgml (ov-new1.7.12): Add list items for the change to flock and the detect_bloda CYGWIN option. * overview2.sgml (ov-hi-process-problems): Add a reference to the detect_bloda CYGWIN option. --- winsup/doc/ChangeLog | 8 ++++++++ winsup/doc/cygwinenv.sgml | 10 ++++++++++ winsup/doc/new-features.sgml | 18 ++++++++++++++++++ winsup/doc/overview2.sgml | 6 ++++-- 4 files changed, 40 insertions(+), 2 deletions(-) diff --git a/winsup/doc/ChangeLog b/winsup/doc/ChangeLog index ab58c5cd9..0e0a55e12 100644 --- a/winsup/doc/ChangeLog +++ b/winsup/doc/ChangeLog @@ -1,3 +1,11 @@ +2012-03-30 Corinna Vinschen + + * cygwinenv.sgml (cygwinenv-implemented-options): Add detect_bloda. + * new-features.sgml (ov-new1.7.12): Add list items for the change to + flock and the detect_bloda CYGWIN option. + * overview2.sgml (ov-hi-process-problems): Add a reference to the + detect_bloda CYGWIN option. + 2012-03-27 Corinna Vinschen * new-features.sgml (ov-new1.7.12): Create. Move mountinfo here. diff --git a/winsup/doc/cygwinenv.sgml b/winsup/doc/cygwinenv.sgml index 1b9fee499..2be87c8b2 100644 --- a/winsup/doc/cygwinenv.sgml +++ b/winsup/doc/cygwinenv.sgml @@ -11,6 +11,16 @@ by prefixing with no. + +(no)detect_bloda - If set, Cygwin will try to detect +foreign applications which try to inject threads into a Cygwin process, +or which redirect system sockets by providing an enforced so-called +Layered Service Provider. This may or may not help to +detect +BLODAs. Don't use this option for day-to-day usage, it will slow +down every thread and socket creation! + + (no)dosfilewarning - If set, Cygwin will warn the first time a user uses an "MS-DOS" style path name rather than a POSIX-style diff --git a/winsup/doc/new-features.sgml b/winsup/doc/new-features.sgml index a5216f8a8..bffe47db4 100644 --- a/winsup/doc/new-features.sgml +++ b/winsup/doc/new-features.sgml @@ -13,6 +13,24 @@ POSIX devices. Add virtual /proc/PID/mountinfo file. + +flock now additionaly supports the following scenario, which requires + to propagate locks to the parent process: + + ( + flock -n 9 || exit 1 + # ... commands executed under lock ... + } 9>/var/lock/mylockfile + + Only propagation to the direct parent process is supported so far, + not to grand parents or sibling processes. + + + +Add a "detect_bloda" setting for the CYGWIN environment variable to help +finding potential BLODAs. + + diff --git a/winsup/doc/overview2.sgml b/winsup/doc/overview2.sgml index 5c1e8652f..def02ba38 100644 --- a/winsup/doc/overview2.sgml +++ b/winsup/doc/overview2.sgml @@ -387,8 +387,10 @@ BLODA. Badly-behaved applications which inject dlls into other processes often manage to clobber important sections of the child's address space, leading to base address collisions which rebasing cannot fix. The only way to resolve this -problem is to remove (usually uninstall) the offending -app. +problem is to remove (usually uninstall) the offending app. See + for the +detect_bloda option, which may be able to identify the +BLODA. In summary, current Windows implementations make it impossible to implement a perfectly reliable fork, and occasional