glibc:azanella/bz12683

Last commit made on 2020-04-07
Get this branch:
git clone -b azanella/bz12683 https://git.launchpad.net/glibc

Branch merges

Branch information

Name:
azanella/bz12683
Repository:
lp:glibc

Recent commits

e3b6264... by Adhemerval Zanella on 2019-08-14

Linux: Remove sysdep-cancel header

Now that single-thread optimization is provided by single-thread.h
header and the enable/disable asynchronous cancellation functions are
no longer used on cancellable syscalls, the header can be removed.

Checked with a build for all major Linux architectures and for hurd.

a08cbcf... by Adhemerval Zanella on 2019-01-10

nptl: csky: Fix Race conditions in pthread cancellation [BZ#12683]

This patch adds the csky modifications required for the BZ#12683 fix
by adding the arch-specific cancellation syscall bridge.

Checked against a build and make check run-built-tests=no for
csky-linux-gnuabiv2.

c8e6f3a... by Adhemerval Zanella on 2019-01-10

nptl: nios2: Fix Race conditions in pthread cancellation [BZ#12683]

This patch adds the nios2 modifications required for the BZ#12683 fix
by adding the arch-specific cancellation syscall bridge.

Checked against a build and make check run-built-tests=no for
nios2-linux-gnu.

1bf491a... by Adhemerval Zanella on 2019-01-10

nptl: s390: Fix Race conditions in pthread cancellation [BZ#12683]

This patch adds the s390 modifications required for the BZ#12683 fix
by adding the arch-specific cancellation syscall bridge.

Checked on s390-linux-gnu and s390x-linux-gnu.

Co-authored-by: Stefan Liebler <email address hidden>

3ed6ae1... by Adhemerval Zanella on 2019-01-09

nptl: riscv: Fix Race conditions in pthread cancellation [BZ#12683]

This patch adds the riscv modifications required for the BZ#12683 fix
by adding the arch-specific cancellation syscall bridge.

Reviewed-by: Andrew Waterman <email address hidden>

8b8a2f5... by Adhemerval Zanella on 2017-01-16

nptl: sh: Fix Race conditions in pthread cancellation [BZ#12683]

This patch adds the sh modifications required for the BZ#12683 fix
by adding the arch-specific cancellation syscall bridge.

Checked against a build and make check run-built-tests=no for
sh4-linux-gnu.

cabaf52... by Adhemerval Zanella on 2019-01-09

nptl: alpha: Fix Race conditions in pthread cancellation [BZ#12683]

This patch adds the alpha modifications required for the BZ#12683 fix
by adding the arch-specific cancellation syscall bridge.

Checked on alpha-linux-gnu.

496ec5f... by Adhemerval Zanella on 2019-01-09

nptl: m68k: Fix Race conditions in pthread cancellation [BZ#12683]

This patch adds the m68k modifications required for the BZ#12683 fix
by adding the arch-specific cancellation syscall bridge.

Checked on m68k-linux-gnu.

10cb157... by Adhemerval Zanella on 2017-02-03

nptl: hppa: Fix Race conditions in pthread cancellation [BZ#12683]

This patch adds the hppa modifications required for the BZ#12683 fix
by adding the arch-specific cancellation syscall bridge.

Checked on hppa-linux-gnu.

011f1f0... by Adhemerval Zanella on 2017-01-16

nptl: sparc: Fix Race conditions in pthread cancellation [BZ#12683]

This patch adds the sparc modifications required for the BZ#12683 fix.

Different than other architectures, SPARC passes the sigcontext_t
struct pointer as third argument in the signal handler set with
SA_SIGINFO (some info at [1]) for 64 bits and the pt_regs in 32 bits.
From Linux code:

* arch/sparc/kernel/signal_64.c

428 /* 3. signal handler back-trampoline and parameters */
429 regs->u_regs[UREG_FP] = ((unsigned long) sf) - STACK_BIAS;
430 regs->u_regs[UREG_I0] = ksig->sig;
431 regs->u_regs[UREG_I1] = (unsigned long) &sf->info;
432
433 /* The sigcontext is passed in this way because of how it
434 * is defined in GLIBC's /usr/include/bits/sigcontext.h
435 * for sparc64. It includes the 128 bytes of siginfo_t.
436 */
437 regs->u_regs[UREG_I2] = (unsigned long) &sf->info;

* arch/sparc/kernel/signal_32.c:

392 regs->u_regs[UREG_FP] = (unsigned long) sf;
393 regs->u_regs[UREG_I0] = ksig->sig;
394 regs->u_regs[UREG_I1] = (unsigned long) &sf->info;
395 regs->u_regs[UREG_I2] = (unsigned long) &sf->regs;
396
397 regs->pc = (unsigned long) ksig->ka.sa.sa_handler;
398 regs->npc = (regs->pc + 4);

So it requires an arch-specific ucontext_add_cancel.

Also on sparc interrupted pause syscall returns with a PC indicating a
side-effect and this deviates from other architectures. The sparc64
pause fall back to ppool syscall.

Checked on sparc64-linux-gnu and sparcv9-linux-gnu.

[1] https://www.spinics.net/lists/sparclinux/msg05037.html