From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 1CEDE3858CD1 for ; Fri, 23 Jun 2023 12:01:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1CEDE3858CD1 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=linux.vnet.ibm.com Received: from pps.filterd (m0353723.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 35NBn7pc013471 for ; Fri, 23 Jun 2023 12:01:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pp1; bh=kBTojW5h8evMPcrpX/sj7U14M2mIruXmhCESzwiy/4c=; b=d3A/2tZ8lfPhtL8/MdkYzav3UoIfwkwwkxAO5YLbkKpcrYa0gdMJeezjgWX1ODmtUwOA oHv9Q2NeyIC8BiMEdnO6u/hAnp4iK1xVbij746b7tqC9u2e4FQ4wwSshSB4W6PSKFM5U n759zOnInvbP2vJa1GaW2hCPAnwEgyiLPhZL61MM1X2ZamFdsHzYxjI5PNOhmZlunoZH yEMjGCboxxQrV10DF7CSVHZcw2gvdusE5mlf+kPhf0bfd8rNYlfEDM//ftb9uGGlme6g 8sQTja6ieoPbw3M0I/yJCsKM5/EMEf3MykFfUM5qEm2Kb3cqoBCWoqR+/ULvIs0mjO2p JA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3rdahh8h5r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 23 Jun 2023 12:01:28 +0000 Received: from m0353723.ppops.net (m0353723.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 35NBvZIo012383 for ; Fri, 23 Jun 2023 12:01:28 GMT Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3rdahh8h4w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 23 Jun 2023 12:01:28 +0000 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 35N4XlMn006311; Fri, 23 Jun 2023 12:01:26 GMT Received: from smtprelay06.wdc07v.mail.ibm.com ([9.208.129.118]) by ppma03dal.us.ibm.com (PPS) with ESMTPS id 3r94f5jh66-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 23 Jun 2023 12:01:26 +0000 Received: from smtpav01.dal12v.mail.ibm.com (smtpav01.dal12v.mail.ibm.com [10.241.53.100]) by smtprelay06.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 35NC1OBT59834676 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 23 Jun 2023 12:01:24 GMT Received: from smtpav01.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6A93858062; Fri, 23 Jun 2023 12:01:24 +0000 (GMT) Received: from smtpav01.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1BA6F5805D; Fri, 23 Jun 2023 12:01:23 +0000 (GMT) Received: from [9.43.49.246] (unknown [9.43.49.246]) by smtpav01.dal12v.mail.ibm.com (Postfix) with ESMTP; Fri, 23 Jun 2023 12:01:22 +0000 (GMT) Message-ID: <1c9f4755-6be2-3ef3-a770-6291ff53cc5f@linux.vnet.ibm.com> Date: Fri, 23 Jun 2023 17:31:21 +0530 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH] powerpc: Use sysconf (_SC_SIGSTKSZ) to set SIGSTKSZ and MINSIGSTKSZ. To: Florian Weimer , Manjunath Matti via Libc-alpha Cc: Manjunath Matti , rajis@linux.ibm.com References: <20230516111140.2585699-1-mmatti@linux.ibm.com> <877csxtune.fsf@oldenburg.str.redhat.com> Content-Language: en-US From: Manjunath S Matti In-Reply-To: <877csxtune.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed X-TM-AS-GCONF: 00 X-Proofpoint-GUID: D9lSb0uvdKSVMJHHREr2DqY3J617hxca X-Proofpoint-ORIG-GUID: 683tSAoa1o4ufTC_yCA1YxSyxmu5rYIz Content-Transfer-Encoding: 7bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-06-23_06,2023-06-22_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 priorityscore=1501 adultscore=0 impostorscore=0 suspectscore=0 spamscore=0 lowpriorityscore=0 phishscore=0 bulkscore=0 mlxscore=0 mlxlogscore=750 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306230105 X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham 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 25/05/23 12:38 am, Florian Weimer wrote: > * Manjunath Matti via Libc-alpha: > >> diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/sigstksz.h b/sysdeps/unix/sysv/linux/powerpc/bits/sigstksz.h >> new file mode 100644 >> index 0000000000..399a49c1b0 >> --- /dev/null >> +++ b/sysdeps/unix/sysv/linux/powerpc/bits/sigstksz.h >> @@ -0,0 +1,33 @@ >> +#ifndef _SIGNAL_H >> +# error "Never include directly; use instead." >> +#endif >> + >> +#if defined __USE_DYNAMIC_STACK_SIZE && __USE_DYNAMIC_STACK_SIZE >> +# include >> + >> +/* Default stack size for a signal handler: sysconf (SC_SIGSTKSZ). */ >> +# undef SIGSTKSZ >> +# define SIGSTKSZ sysconf (_SC_SIGSTKSZ) >> + >> +/* Minimum stack size for a signal handler: SIGSTKSZ/4. */ >> +# undef MINSIGSTKSZ >> +# define MINSIGSTKSZ (SIGSTKSZ >> 2) >> +#endif > I'm not sure if it is a good idea to hard-code that constant 4 here. > Similarly, it's not great to encode the constant 1 in the default case. > > This is a subtle portability hazard because with these changes, > MINSIGSTKSZ is not enough on POWER to do anything on the signal stack > (because it's exactly the kernel supplied value). On other > architectures, it's at least possible to do some minor stuff and call > e.g. siglongjmp (at least if lazy binding is not required). After deliberate thinking, internal discussions and the below comment by H J Lu. https://patchwork.sourceware.org/project/glibc/patch/20230424105208.301614-1-mmatti@linux.ibm.com/#144525 I think we can drop this patch. > The factor 4 in the implementation is somewhat x86-64-specific because > it accounts for the fact that we do a signal-like context switch > (pushing XSAVE data on the stack) in the lazy binding trampoline. > > Thanks, > Florian > Thank you Florian for your time and support. Regards, Manjunath S Matti.