From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 30485 invoked from network); 22 Jan 2021 18:51:27 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 22 Jan 2021 18:51:27 -0000 Received: (qmail 3533 invoked by uid 550); 22 Jan 2021 18:51:22 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 3501 invoked from network); 22 Jan 2021 18:51:21 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=pp1; bh=0hJ3R7PmnAV3KDkqFLyrwB7v1gGYxVPGPiVnT2GKSic=; b=evyQDCiyqlafjMdiP56eG2wcG6+tM9/KGYPO3SFb916/s95LuvVOOMup5LvasHuE3Cc7 t1VSaPzLN0lCp22kWbPpKoo3UC0tAlYyffHOpGTD13/sRfGke/6yUN1KJuIqSv5/GSuA bPFORiDNi5OZIyRQHPqDHe3NnW/IVaOOEHxxDblcRo2pZyMUr9SsRtTcx0kyagCTdTqw IQJzDvsFvjStZM/G+RsZl9gHUTBacuzD0ijicKcb3umXkt/ubl5MSLmFDbmypqLsj6tx OdLgRvvboJyPe2MKK144tuTeytOYKNOdUvseyFwblsVQw+Kqogd6v7IQqFFjGXy9Bi/P cA== Date: Fri, 22 Jan 2021 15:50:53 -0300 From: Raoni Fassina Firmino To: Rich Felker Cc: Florian Weimer , musl@lists.openwall.com, libc-alpha@sourceware.org, linuxppc-dev@lists.ozlabs.org, Nicholas Piggin , Alan Modra Message-ID: <20210122185053.ze3oaeexwjii2r7s@work-tp> Mail-Followup-To: Rich Felker , Florian Weimer , musl@lists.openwall.com, libc-alpha@sourceware.org, linuxppc-dev@lists.ozlabs.org, Nicholas Piggin , Alan Modra References: <20200511101952.1463138-1-npiggin@gmail.com> <87im7pp5yl.fsf@oldenburg.str.redhat.com> <20210122144402.GP23432@brightrain.aerifal.cx> <20210122181922.pcxyomeg5xcf2umu@work-tp> <20210122183127.GQ23432@brightrain.aerifal.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210122183127.GQ23432@brightrain.aerifal.cx> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.343,18.0.737 definitions=2021-01-22_13:2021-01-22,2021-01-22 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 malwarescore=0 phishscore=0 mlxscore=0 impostorscore=0 suspectscore=0 priorityscore=1501 lowpriorityscore=0 adultscore=0 mlxlogscore=972 clxscore=1015 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101220092 Subject: Re: [musl] Re: [PATCH v2] powerpc/64/signal: balance return predictor stack in signal trampoline On Fri, Jan 22, 2021 at 01:31:27PM -0500, Rich Felker wrote: > On Fri, Jan 22, 2021 at 03:19:22PM -0300, Raoni Fassina Firmino wrote: > > On Fri, Jan 22, 2021 at 09:44:05AM -0500, Rich Felker wrote: > > > Maybe I'm missing something but I don't see how this would break musl; > > > we just inspect the PC in the mcontext, which I don't see any changes > > > to and which should still point to the next instruction of the > > > interrupted context. I don't have a test environment though so I'll > > > have to wait for feedback from ppc users to be sure. Are there any > > > further details on how it's breaking glibc? > > > > For glibc, backtrace() compares the return-address from each stack frame > > to the value of `__kernel_sigtramp_rt64` to identify the frame with the > > mcontext information, but now the return-address is not the start of the > > routine, but the middle of it, so it fails to catch this special frame. > > Is there a reason it's backtracing rather than just looking at the > interrupted context (pointed to by the third argument to the signal > handler)? The regression is exposed in the backtrace() routine. More precisely, when the backtrace() is called from inside a signal handling. What I described is the way backtrace() uses to identify this special situation. What is failling in glibc is the test for this. o/ Raoni Fassina