From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [IPv6:2001:470:683e::1]) by sourceware.org (Postfix) with ESMTPS id CD4433858D38 for ; Tue, 11 Apr 2023 06:35:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CD4433858D38 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xry111.site DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1681194949; bh=+C37qaRykuPPVjJ4GFSzfq6v56cKelEeY3WQ5TvqheQ=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=NDPcqI7tjItbD7NjpkCfMh5vSz7rpuTMpHP+pHvyZfxuVgxY+gFCKakrqwtJS8FK/ MRgBWoXq2IiftRXf6/Mt/ii6aefg+90E+gERk6keziuOXcePAbWDhVhvVYipn4wXNf d1qIvVo8SQHg6xWiewPPcAcbNZ35rcI1zKinqjTc= Received: from [IPv6:240e:358:11f1:2100:dc73:854d:832e:6] (unknown [IPv6:240e:358:11f1:2100:dc73:854d:832e:6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id B385865C8B; Tue, 11 Apr 2023 02:35:43 -0400 (EDT) Message-ID: Subject: Re: [PATCH v5 10/22] riscv: Fix Race conditions in pthread cancellation [BZ#12683] From: Xi Ruoyao To: Adhemerval Zanella , libc-alpha@sourceware.org Cc: Andrew Waterman Date: Tue, 11 Apr 2023 14:35:35 +0800 In-Reply-To: <20230410204614.4129551-2-adhemerval.zanella@linaro.org> References: <20230410195907.4123869-1-adhemerval.zanella@linaro.org> <20230410204614.4129551-1-adhemerval.zanella@linaro.org> <20230410204614.4129551-2-adhemerval.zanella@linaro.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.0 MIME-Version: 1.0 X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,LIKELY_SPAM_FROM,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Mon, 2023-04-10 at 17:46 -0300, Adhemerval Zanella via Libc-alpha wrote: > +1: > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0addi=C2=A0=C2=A0=C2=A0=C2=A0sp= , sp, -16 > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0cfi_def_cfa_offset (16) > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0REG_S=C2=A0=C2=A0=C2=A0ra, (16= -SZREG)(sp) > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0cfi_offset (ra, -SZREG) > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0call=C2=A0=C2=A0=C2=A0=C2=A0__= syscall_do_cancel Similarly to LoongArch, IMO this should simply be "tail __syscall_do_cancel". Apparently _Noreturn is preventing GCC from generating a tail call for RISC-V and LoongArch, so if you modeled the assembly following the GCC output you'll get these sub-optimal things. It seems a GCC bug to me. --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University