From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-0.9 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 953B0200B9 for ; Mon, 7 May 2018 02:49:47 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:in-reply-to:references :content-transfer-encoding; q=dns; s=default; b=MEzn4XTsBxofBUuh G81VAY1+GgBlmQvdnGJHtVqqoxwvi2RrbqbUKLXmtE90j4cdtOAVc75uoeeZi/kc CIXSNRbx/lIHgJzHcjnKpW+6jxnRtvcnDh6Ac3xFEagTmznHhBUxUUBz5Vu+a+aU s1Sv1EBE470L9bOac9AgJ3oniXU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:in-reply-to:references :content-transfer-encoding; s=default; bh=5/YPz8+9Qf1zJoC6v3OApO 4xWTY=; b=FRzF+y9mSGc36Hg1oo3LBt+eKJh85pX9usJ+csccemTafmJlyk68r0 balaX77s9EdH2On9RYgw8Z2Fd7u93Dh44uYavHoowCrmYOoA2dXCfZSvQHBCWLSX KB9uCch1rKgKK2x12z8g7wZ98Qk0mb/vGwaq/DP3JMKfcMH/s9TM8= Received: (qmail 49916 invoked by alias); 7 May 2018 02:49:22 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 49756 invoked by uid 89); 7 May 2018 02:49:12 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mailbackend.panix.com From: Zack Weinberg To: libc-alpha@sourceware.org Cc: adhemerval.zanella@linaro.org Subject: Re: [PATCH v2 06/21] nptl: i386: Fix Race conditions in pthread cancellation (BZ#12683) Date: Sun, 6 May 2018 22:49:09 -0400 Message-Id: <20180507024909.5598-5-zackw@panix.com> In-Reply-To: <20180507024909.5598-1-zackw@panix.com> References: <20180507024909.5598-1-zackw@panix.com> MIME-Version: 1.0 In-Reply-To: <1519679016-12241-7-git-send-email-adhemerval.zanella@linaro.org> References: <1519679016-12241-7-git-send-email-adhemerval.zanella@linaro.org> Content-Transfer-Encoding: 8bit On 26 Feb 2018, Adhemerval Zanella wrote: > This patch adds the i386 modifications required for the BZ#12683. > It basically provides the required ucontext_get_pc symbol, add the > cancelable syscall wrapper and fix a thread atomic update macro. This also seems fine. > On i386 an arch-specific cancellation implementation is required > because depending of the glibc configuration and underlying kernel > the syscall may be done using a vDSO symbol (__kernel_vsyscall). ... > Also, since glibc supports i486, the old 'int 0x80' should be used > in the syscall wrapper. One option could make minimum default chip > to pentium II (which implements sysenter) or add a runtime check > on syscall_cancel.S to use 'int 0x80' or sysenter. If I remember correctly, there can be only one 'sysenter' instruction in the entire user address space, due to awkward limitations of the interface it presents to the kernel. That was why __kernel_vsyscall was added in the first place. We can probably live with using int 0x80 for these syscalls that may well be blocking anyway. > Similar to x86_64, it also remove bogus arch-specific > THREAD_ATOMIC_BIT_SET where it always reference to current thread > instead of the one referenced by input 'descr' argument. Same comment as for x86_64 -- shouldn't we get rid of or repair _all_ of the THREAD_ATOMIC_ macros that don't honor their arguments? zw