Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp5658012ybf; Thu, 5 Mar 2020 04:48:03 -0800 (PST) X-Google-Smtp-Source: ADFU+vu9FUth/wObLgk8gCVNlOeO1UZB54tzeZf8WdAX4Q8u8pe4jGQfJlGp38EHQZXpmynYC60a X-Received: by 2002:aca:5403:: with SMTP id i3mr5642169oib.107.1583412483353; Thu, 05 Mar 2020 04:48:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583412483; cv=none; d=google.com; s=arc-20160816; b=rkJhdh76aHwfS48gThi8c5ydPBduUwTrR/aeENLXBXx0yOdU5bqO58+IRZmsvSqjXB 9OejgXiemHrVwaH/br2hWfK39l6G/dLVGOvmXPLUjV6NUlkHHMXZzqwR4wfPROsrlZVU 4clQx3pI+NBCID2WCVl+svj4hJPemyzss51A8Dh0VjeRdMYjSR7nJWoJScGeLoPv7Szq VVQLVj8E6kb+ISHBaG5qSCVanKElroDa8wWQ5lo0AhT3M/ePxiDBQVoiwkSOix0tuyFU aXNV2SWxueluxa9aHe9t0FlNg98D4G6zcfj1jS2ORHNzsv82xxHI/SK9iTQHOU7bWir9 lC/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :user-agent:mime-version:in-reply-to:references:cc:to:subject:from :date; bh=h/s3K6S6mJz9JVJHtMjDFl9Jp0iZg6ESyCMWOdnps2c=; b=AqbYemmuxBFHmwGarTcaH6qzq+4toMgI655n/+18qit6EVkn6QiFjUuwBw6avPlSoe cfX8uN6FcTlqEve6XqSiPWEKZzif5gdYi+Xxnwna3tmiASlOqZhI7OLtVUpSZZ5Z7EKS EN8s5tV3/BjVtGCHWiqMF71bhLg7RpvqyW1VbMLaLswCIltdkWrM68XowEQ9+bUF/8Zh snedbn0JeifWBdV2NreX0jiR5hHHkqDp9gwZT5g4u+kqaoxn+uv+LQf2vi9fBE1Wi5CW S7/1pr7S/6GlNRGscgualuuvMLy2G2FmZ9smYJGRGclq3vmwcvcmVyeALR8vKxsrA4Jt K38g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e81si3064404ote.13.2020.03.05.04.47.51; Thu, 05 Mar 2020 04:48:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726220AbgCEMrb convert rfc822-to-8bit (ORCPT + 99 others); Thu, 5 Mar 2020 07:47:31 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:54438 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725989AbgCEMrb (ORCPT ); Thu, 5 Mar 2020 07:47:31 -0500 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 025Cd7uF076815 for ; Thu, 5 Mar 2020 07:47:30 -0500 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 2yhhy7yegy-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 05 Mar 2020 07:47:29 -0500 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 5 Mar 2020 12:47:27 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 5 Mar 2020 12:47:24 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 025ClNjc29687814 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 5 Mar 2020 12:47:23 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 617CA11C064; Thu, 5 Mar 2020 12:47:23 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 029A011C04C; Thu, 5 Mar 2020 12:47:23 +0000 (GMT) Received: from localhost (unknown [9.199.53.44]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 5 Mar 2020 12:47:22 +0000 (GMT) Date: Thu, 05 Mar 2020 18:17:21 +0530 From: "Naveen N. Rao" Subject: eh_frame confusion To: Linux Kbuild mailing list , LKML , "linuxppc-dev@lists.ozlabs.org" , Rasmus Villemoes , Michael Ellerman Cc: Segher Boessenkool References: <3b00b45f-74b5-13e3-9a98-c3d6b3bb7286@rasmusvillemoes.dk> <1583168442.ovqnxu16tp.naveen@linux.ibm.com> <1583169883.zo43kx69lm.naveen@linux.ibm.com> In-Reply-To: <1583169883.zo43kx69lm.naveen@linux.ibm.com> MIME-Version: 1.0 User-Agent: astroid/v0.15-13-gb675b421 (https://github.com/astroidmail/astroid) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8BIT X-TM-AS-GCONF: 00 x-cbid: 20030512-0008-0000-0000-0000035998EA X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 20030512-0009-0000-0000-00004A7AD005 Message-Id: <1583412126.fc8zskkv66.naveen@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-03-05_03:2020-03-05,2020-03-05 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 mlxlogscore=999 lowpriorityscore=0 suspectscore=0 phishscore=0 mlxscore=0 impostorscore=0 bulkscore=0 malwarescore=0 adultscore=0 clxscore=1015 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2003050082 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Naveen N. Rao wrote: > Naveen N. Rao wrote: >> Rasmus Villemoes wrote: > Can you check if the below patch works? I am yet to test this in more > detail, but would be good to know the implications for ppc32. > > - Naveen > > > --- > diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile > index f35730548e42..5b5bf98b8217 100644 > --- a/arch/powerpc/Makefile > +++ b/arch/powerpc/Makefile > @@ -239,10 +239,7 @@ KBUILD_CFLAGS += $(call cc-option,-mno-vsx) > KBUILD_CFLAGS += $(call cc-option,-mno-spe) > KBUILD_CFLAGS += $(call cc-option,-mspe=no) > > -# FIXME: the module load should be taught about the additional relocs > -# generated by this. > -# revert to pre-gcc-4.4 behaviour of .eh_frame > -KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm) > +KBUILD_CFLAGS += $(call cc-option,-fno-asynchronous-unwind-tables) In terms of the CFI information, the primary difference I see with -fno-dwarf2-cfi-asm is that when dumping the debug frames, CIE indicates version 3, while otherwise (i.e., without -fno-dwarf2-cfi-asm and with/without -fasynchronous-unwind-tables), it is version 1, regardless of -gdwarf-2/-gdwarf-4. There are few more minor changes, but none of these looked significant to me. > > # Never use string load/store instructions as they are > # often slow when they are implemented at all > diff --git a/arch/powerpc/kernel/vdso32/Makefile b/arch/powerpc/kernel/vdso32/Makefile > index e147bbdc12cd..d43b0b18137c 100644 > --- a/arch/powerpc/kernel/vdso32/Makefile > +++ b/arch/powerpc/kernel/vdso32/Makefile > @@ -25,6 +25,7 @@ KCOV_INSTRUMENT := n > UBSAN_SANITIZE := n > > ccflags-y := -shared -fno-common -fno-builtin -nostdlib \ > + -fasynchronous-unwind-tables \ > -Wl,-soname=linux-vdso32.so.1 -Wl,--hash-style=both > asflags-y := -D__VDSO32__ -s > > diff --git a/arch/powerpc/kernel/vdso64/Makefile b/arch/powerpc/kernel/vdso64/Makefile > index 32ebb3522ea1..b2cbb5c49bad 100644 > --- a/arch/powerpc/kernel/vdso64/Makefile > +++ b/arch/powerpc/kernel/vdso64/Makefile > @@ -13,6 +13,7 @@ KCOV_INSTRUMENT := n > UBSAN_SANITIZE := n > > ccflags-y := -shared -fno-common -fno-builtin -nostdlib \ > + -fasynchronous-unwind-tables \ > -Wl,-soname=linux-vdso64.so.1 -Wl,--hash-style=both > asflags-y := -D__VDSO64__ -s The above vdso hunks can be dropped since all our VDSO are assembly, so the above have no impact. - Naveen