Branch: refs/heads/smoke-me/khw-safe
  Home:   https://github.com/Perl/perl5
  Commit: 874a37799a21433c291cde0de1ef8ebd56db44c5
      
https://github.com/Perl/perl5/commit/874a37799a21433c291cde0de1ef8ebd56db44c5
  Author: Karl Williamson <[email protected]>
  Date:   2020-12-05 (Sat, 05 Dec 2020)

  Changed paths:
    M dist/Time-HiRes/HiRes.pm
    M dist/Time-HiRes/HiRes.xs

  Log Message:
  -----------
  HiRes.xs: Remove unused macro defns


  Commit: 66f47916c593ac481b8d5bff4dab853a8cf467c5
      
https://github.com/Perl/perl5/commit/66f47916c593ac481b8d5bff4dab853a8cf467c5
  Author: Karl Williamson <[email protected]>
  Date:   2020-12-05 (Sat, 05 Dec 2020)

  Changed paths:
    M thread.h

  Log Message:
  -----------
  XXX Change many-reader mutex API to conform with other


  Commit: 19dc378a6158aa6fccf8e240eb3b940cf00a3fa9
      
https://github.com/Perl/perl5/commit/19dc378a6158aa6fccf8e240eb3b940cf00a3fa9
  Author: Karl Williamson <[email protected]>
  Date:   2020-12-05 (Sat, 05 Dec 2020)

  Changed paths:
    M thread.h

  Log Message:
  -----------
  Add start-up/tear-down for many-reader mutexes

These were missed in 5640a370e8b19af74b8ca0b4694464c21a87916b.


  Commit: 9f0cba089566cbc1cefb08fe46534dfd92478de4
      
https://github.com/Perl/perl5/commit/9f0cba089566cbc1cefb08fe46534dfd92478de4
  Author: Karl Williamson <[email protected]>
  Date:   2020-12-05 (Sat, 05 Dec 2020)

  Changed paths:
    M perl.h

  Log Message:
  -----------
  perl.h: Move some code around

This is in preparation for future commits where things will be needed
earlier/later than currently.


  Commit: 96ebb073e4620baf90cb3e7f587ce6a313e6c3e3
      
https://github.com/Perl/perl5/commit/96ebb073e4620baf90cb3e7f587ce6a313e6c3e3
  Author: Karl Williamson <[email protected]>
  Date:   2020-12-05 (Sat, 05 Dec 2020)

  Changed paths:
    M ext/POSIX/POSIX.xs
    M locale.c
    M perl.h

  Log Message:
  -----------
  Change name of mutex macro.

This macro is for localeconv(); the new name is clearer as to the
meaning, and this preps for further changes.


  Commit: cc2ff7aaccfd779e22c0bbbb8642298cc882bb5c
      
https://github.com/Perl/perl5/commit/cc2ff7aaccfd779e22c0bbbb8642298cc882bb5c
  Author: Karl Williamson <[email protected]>
  Date:   2020-12-05 (Sat, 05 Dec 2020)

  Changed paths:
    M makedef.pl
    M perl.h
    M perlvars.h

  Log Message:
  -----------
  Refactor locale mutex setup

This was prompted by my realization that even on a locale thread-safe
platform, there are functions we call that may not be thread-safe in
that they return their results in an internal static buffer, which may
be process-wide instead of per-thread.  Tomasz Konojacki++ briefly
looked at Windows source code for localeconv() and this indeed did
appear to be the case.

If we thought a platform was thread-safe, no locale mutexes were set up,
and instead the calls in the code to lock were no-oops.  This would lead
to potential races, the most likely candidate being localeconv().  None
have been reported, at least as far as we know.  Likely that function
isn't called frequently.  This would be true on both Posix 2008 and
Windows platforms, except possibly for FreeBSD, which may be the only
platform that we support that has a localeconv_l() function, which is
supposed to be immune from this issue..

The solution adopted here is to test for all the possible functions that
the Perl core uses that may be susceptible to this, and to set up the
mutex if any are found.  Thus there won't be no-ops where there should
be a lock.


  Commit: 1605e0ca7e2bd5ad6885425962b5fa72265aeb17
      
https://github.com/Perl/perl5/commit/1605e0ca7e2bd5ad6885425962b5fa72265aeb17
  Author: Karl Williamson <[email protected]>
  Date:   2020-12-05 (Sat, 05 Dec 2020)

  Changed paths:
    M ext/POSIX/POSIX.xs
    M locale.c
    M perl.h

  Log Message:
  -----------
  XXX fill in commit Name individual locale locks

These locks for different functions all use the same underlying mutex;
but that may not always be the case.  By creating separate names
used only when we think they will be necessary, the compiler will
complain if the conditions in the code that actually use them are the
same.  Doing this showed a misspelling in an #ifdef, fixed in XXX


  Commit: 88c322cfc23663f13aed31f39d062eeed18df20e
      
https://github.com/Perl/perl5/commit/88c322cfc23663f13aed31f39d062eeed18df20e
  Author: Karl Williamson <[email protected]>
  Date:   2020-12-05 (Sat, 05 Dec 2020)

  Changed paths:
    M perl.h
    M perlvars.h

  Log Message:
  -----------
  Add capability of many-reader locale lock

This will be used in future commits


  Commit: fa066a3ee0b2abee43a24cc413f703c8f7bdb94f
      
https://github.com/Perl/perl5/commit/fa066a3ee0b2abee43a24cc413f703c8f7bdb94f
  Author: Karl Williamson <[email protected]>
  Date:   2020-12-05 (Sat, 05 Dec 2020)

  Changed paths:
    M perl.h
    M time64.c
    M util.c

  Log Message:
  -----------
  Change name of mutex macro for ENV/LOCALE locking

This combines two diffrent mutexes, and it isn't clear from the former
name what precisely is happening.


  Commit: d0582fdfea69153d0ae4d965abe9924394ea8678
      
https://github.com/Perl/perl5/commit/d0582fdfea69153d0ae4d965abe9924394ea8678
  Author: Karl Williamson <[email protected]>
  Date:   2020-12-05 (Sat, 05 Dec 2020)

  Changed paths:
    M perl.h
    M perlvars.h

  Log Message:
  -----------
  perl.h: Add capability for many-reader ENV mutex locking

There are several places where there could be a problem in the
environment were changed by another thread when a function is executing,
but otherwise if another thread were reading the environment at the same
time, there isn't a problem.  This adds mutex for that situation.
Future commits will take advantage of it.


  Commit: fa0700018b3dfae735d13717f3db8e6763a5d1da
      
https://github.com/Perl/perl5/commit/fa0700018b3dfae735d13717f3db8e6763a5d1da
  Author: Karl Williamson <[email protected]>
  Date:   2020-12-05 (Sat, 05 Dec 2020)

  Changed paths:
    M os2/os2.c

  Log Message:
  -----------
  os2: Use many reader lock instead of exclusive

This is just reading the environment, not changing it, so a many readers
can be accessing it at the same time.


  Commit: 95267cd2c9f68fa97afcd836cd8f8786c8219a00
      
https://github.com/Perl/perl5/commit/95267cd2c9f68fa97afcd836cd8f8786c8219a00
  Author: Karl Williamson <[email protected]>
  Date:   2020-12-05 (Sat, 05 Dec 2020)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  XXX prob drop; done before anything so no races


  Commit: 595a93bb509d2254de7dbf239e87d0c2dbe1cb15
      
https://github.com/Perl/perl5/commit/595a93bb509d2254de7dbf239e87d0c2dbe1cb15
  Author: Karl Williamson <[email protected]>
  Date:   2020-12-05 (Sat, 05 Dec 2020)

  Changed paths:
    M perl.h

  Log Message:
  -----------
  XXX finish msg Implement combo ENV/LOCALE mutexes

There are cases where an executing function is vulnerable to either the
locale or environment being changed by another thread.  This implements
macros that use mutexes to protect these critical sections.  There are
two cases, one where the functions only read; and one where they can
write, or need exclusive control so that a competing thread can't
overwrite the returned static buffer before it is safely copied.

5.32 had a placeholder for these, but didn't actually implement it.
Instead it locked just the ENV portion.  On modern platforms with
thread-safe locales, the locale portion is a no-op anyway, so things
worked on them.

This new commit extends that safety to other platforms.  This has long
been a vulnerability in Perl, but


  Commit: d6a01f071f1ad3a3f3183eafbc311a6ed333b3d0
      
https://github.com/Perl/perl5/commit/d6a01f071f1ad3a3f3183eafbc311a6ed333b3d0
  Author: Karl Williamson <[email protected]>
  Date:   2020-12-05 (Sat, 05 Dec 2020)

  Changed paths:
    M locale.c
    M util.c

  Log Message:
  -----------
  Move mutex to called function

This function has a critical section.  Since it is a long-standing API
function, it needs to set one up itself rather than relying on callers
to do it.  Remove the caller's set up, and do it inside.


  Commit: 556527091f7e59ad34ed17de512c39e324a9a85d
      
https://github.com/Perl/perl5/commit/556527091f7e59ad34ed17de512c39e324a9a85d
  Author: Karl Williamson <[email protected]>
  Date:   2020-12-05 (Sat, 05 Dec 2020)

  Changed paths:
    M locale.c
    M util.c

  Log Message:
  -----------
  strftime is a critical section

with regard to changes in the locale and environment.  And it writes
certain global variables, so must be write-locked.


  Commit: f7d1d84830293ab496501aed786a00df5846a0cd
      
https://github.com/Perl/perl5/commit/f7d1d84830293ab496501aed786a00df5846a0cd
  Author: Karl Williamson <[email protected]>
  Date:   2020-12-05 (Sat, 05 Dec 2020)

  Changed paths:
    M Configure
    M Cross/config.sh-arm-linux
    M Cross/config.sh-arm-linux-n770
    M NetWare/config.wc
    M Porting/config.sh
    M config_h.SH
    M configure.com
    M metaconfig.h
    M plan9/config_sh.sample
    M uconfig.h
    M uconfig.sh
    M uconfig64.sh
    M win32/config.gc
    M win32/config.vc

  Log Message:
  -----------
  preserves


  Commit: 29dbb18f73b6ee2ad889d65e029f745678480209
      
https://github.com/Perl/perl5/commit/29dbb18f73b6ee2ad889d65e029f745678480209
  Author: Karl Williamson <[email protected]>
  Date:   2020-12-05 (Sat, 05 Dec 2020)

  Changed paths:
    M inline.h
    M perl.h

  Log Message:
  -----------
  Add GETENV_LOCK

get_env() needs to lock other threads from writing to the environment
while it is executing.  It may need to have an exclusive lock if those
threads can clobber its buffer before it gets a chance to save them.
The previous commit has added a Configure probe which tells us if that
is the case.  This commit uses it to select which type of mutex to use.


  Commit: 7cab5df1909ba0cf40e9c818d3ccbd2962b5e12c
      
https://github.com/Perl/perl5/commit/7cab5df1909ba0cf40e9c818d3ccbd2962b5e12c
  Author: Karl Williamson <[email protected]>
  Date:   2020-12-05 (Sat, 05 Dec 2020)

  Changed paths:
    M pod/perllocale.pod

  Log Message:
  -----------
  perllocale: Remove stray markup


  Commit: 8cc08c206ab7a77ffc2d8b8c5cd9517ec2b3f7b7
      
https://github.com/Perl/perl5/commit/8cc08c206ab7a77ffc2d8b8c5cd9517ec2b3f7b7
  Author: Karl Williamson <[email protected]>
  Date:   2020-12-05 (Sat, 05 Dec 2020)

  Changed paths:
    M ext/POSIX/POSIX.xs
    M perl.h
    M time64.c
    M util.c
    M win32/win32.c

  Log Message:
  -----------
  l fcn locks


  Commit: 3357f81d1dc3fdc126115d524f746b34173e193d
      
https://github.com/Perl/perl5/commit/3357f81d1dc3fdc126115d524f746b34173e193d
  Author: Karl Williamson <[email protected]>
  Date:   2020-12-05 (Sat, 05 Dec 2020)

  Changed paths:
    M perl.h

  Log Message:
  -----------
  LC_NUMERIC on old windows


  Commit: 7746de27857c946dcbce5c3d79d36dc999b9a29b
      
https://github.com/Perl/perl5/commit/7746de27857c946dcbce5c3d79d36dc999b9a29b
  Author: Karl Williamson <[email protected]>
  Date:   2020-12-05 (Sat, 05 Dec 2020)

  Changed paths:
    M embedvar.h
    M inline.h
    M intrpvar.h
    M perl.h
    M util.c

  Log Message:
  -----------
  mem_log


  Commit: 4c5b3730ceb4d586ed38204a8866c22f3eac79dd
      
https://github.com/Perl/perl5/commit/4c5b3730ceb4d586ed38204a8866c22f3eac79dd
  Author: Karl Williamson <[email protected]>
  Date:   2020-12-05 (Sat, 05 Dec 2020)

  Changed paths:
    M perl.h
    M reentr.h
    M regen/reentr.pl

  Log Message:
  -----------
  reentr


  Commit: 34337222efef61c0458156691fd8ddb14b33ceb9
      
https://github.com/Perl/perl5/commit/34337222efef61c0458156691fd8ddb14b33ceb9
  Author: Karl Williamson <[email protected]>
  Date:   2020-12-05 (Sat, 05 Dec 2020)

  Changed paths:
    M inline.h
    M intrpvar.h

  Log Message:
  -----------
  more memlog


  Commit: a224ce090374923caf4e6bf3781053436fb59941
      
https://github.com/Perl/perl5/commit/a224ce090374923caf4e6bf3781053436fb59941
  Author: Karl Williamson <[email protected]>
  Date:   2020-12-05 (Sat, 05 Dec 2020)

  Changed paths:
    M perl.h

  Log Message:
  -----------
  f


  Commit: cf9e71c780e5647e1f67631e6afec80ab79ee311
      
https://github.com/Perl/perl5/commit/cf9e71c780e5647e1f67631e6afec80ab79ee311
  Author: Karl Williamson <[email protected]>
  Date:   2020-12-05 (Sat, 05 Dec 2020)

  Changed paths:
    M makedef.pl

  Log Message:
  -----------
  f


  Commit: 17b12212f1160cad53f52dd270317fa225081928
      
https://github.com/Perl/perl5/commit/17b12212f1160cad53f52dd270317fa225081928
  Author: Karl Williamson <[email protected]>
  Date:   2020-12-05 (Sat, 05 Dec 2020)

  Changed paths:
    M perlvars.h

  Log Message:
  -----------
  f


  Commit: 7a49f8906646d817537a7c46e4b6c6bf6532620a
      
https://github.com/Perl/perl5/commit/7a49f8906646d817537a7c46e4b6c6bf6532620a
  Author: Karl Williamson <[email protected]>
  Date:   2020-12-05 (Sat, 05 Dec 2020)

  Changed paths:
    M perl.h
    M perlvars.h

  Log Message:
  -----------
  f


  Commit: 94dd455f90bd35c878f3991213fd28362f08aec1
      
https://github.com/Perl/perl5/commit/94dd455f90bd35c878f3991213fd28362f08aec1
  Author: Karl Williamson <[email protected]>
  Date:   2020-12-05 (Sat, 05 Dec 2020)

  Changed paths:
    M perl.h

  Log Message:
  -----------
  f


  Commit: 95b3d87a9f6755385e48d363cafb16f54380e9af
      
https://github.com/Perl/perl5/commit/95b3d87a9f6755385e48d363cafb16f54380e9af
  Author: Karl Williamson <[email protected]>
  Date:   2020-12-05 (Sat, 05 Dec 2020)

  Changed paths:
    M perl.h

  Log Message:
  -----------
  f


  Commit: 508441798f04c79a659cbb93b88dff2b25b6b5b4
      
https://github.com/Perl/perl5/commit/508441798f04c79a659cbb93b88dff2b25b6b5b4
  Author: Karl Williamson <[email protected]>
  Date:   2020-12-05 (Sat, 05 Dec 2020)

  Changed paths:
    M cpan/Time-Piece/Piece.pm
    M cpan/Time-Piece/Piece.xs
    M locale.c
    M perl.h
    M pp_sys.c
    M reentr.h
    M regen/reentr.pl
    M t/porting/known_pod_issues.dat

  Log Message:
  -----------
  split


Compare: https://github.com/Perl/perl5/compare/d9dec1873480...508441798f04

Reply via email to