From nobody Fri Sep 12 00:17:40 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21C41C61DA4 for ; Tue, 14 Feb 2023 21:32:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229872AbjBNVcl (ORCPT ); Tue, 14 Feb 2023 16:32:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233136AbjBNVci (ORCPT ); Tue, 14 Feb 2023 16:32:38 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9427240FF for ; Tue, 14 Feb 2023 13:32:11 -0800 (PST) Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 31EHLlIk027227; Tue, 14 Feb 2023 21:31:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : subject : date : message-id : mime-version : content-type : content-transfer-encoding; s=qcppdkim1; bh=jdadcMHUEHEz3wESNyYCqEqZE1xiSFm7gjLwEXCHUq4=; b=onAw/Ed1Rds4wArHiFBeJntOEqNg5p3PqBvyUh6+M+MtRv8Jh0kvC6waD+qY2BBAZDjJ JfNSKdQQEJjFmMbGFa0EBbVuhLAH0HMdSLl9GyYd3gjazEZ9b78V/qfeoHvNKf2IkN07 P0eJM9p3sh7SSA9wtmqR0NDpqDxIcv6Xg68ANEzv6ky4vcLjJLNnOQ7r0wjS4OSNO+WT SREsyWc3lilplPKQEEe8D+Ncz2Ba4oSoCTTopsz/P47twra/NfFNrKAYMJP9t6FadVId hOp5/0eZ3AfjHx+EHRQjszmcLGEQp1bQ1IPlAucGlIrwcIsw0SfcaSTWBLi6U/CvKE4t 3Q== Received: from apblrppmta01.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3nqyygtu5r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 14 Feb 2023 21:31:32 +0000 Received: from pps.filterd (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 31ELVRmY013297; Tue, 14 Feb 2023 21:31:27 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 3np43kjtbk-1; Tue, 14 Feb 2023 21:31:27 +0000 Received: from APBLRPPMTA01.qualcomm.com (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 31ELVRKm013292; Tue, 14 Feb 2023 21:31:27 GMT Received: from hu-sgudaval-hyd.qualcomm.com (hu-c-spathi-hyd.qualcomm.com [10.213.108.59]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 31ELVQ2F013291; Tue, 14 Feb 2023 21:31:26 +0000 Received: by hu-sgudaval-hyd.qualcomm.com (Postfix, from userid 212714) id 1DA434801; Wed, 15 Feb 2023 03:01:26 +0530 (+0530) From: Srinivasarao Pathipati To: richard@nod.at, anton.ivanov@cambridgegreys.com, johannes@sipsolutions.net, quic_c_spathi@quicinc.com, linux-um@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH V1] um: Fix compilation warnings Date: Wed, 15 Feb 2023 03:00:43 +0530 Message-Id: <1676410243-10566-1-git-send-email-quic_c_spathi@quicinc.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: o9J2jh1-t8dYIgz2zYsGdSgbsy5oOMaz X-Proofpoint-GUID: o9J2jh1-t8dYIgz2zYsGdSgbsy5oOMaz X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.170.22 definitions=2023-02-14_15,2023-02-14_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 phishscore=0 impostorscore=0 malwarescore=0 adultscore=0 mlxlogscore=360 mlxscore=0 priorityscore=1501 lowpriorityscore=0 spamscore=0 bulkscore=0 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302140184 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use dynamic allocation in sig_handler_common() and in timer_real_alarm_handler() to fix below warnings and build failures where CONFIG_WERROR is enabled. arch/um/os-Linux/signal.c: In function =E2=80=98sig_handler_common=E2=80=99: arch/um/os-Linux/signal.c:51:1: error: the frame size of 2960 bytes is larg= er than 1024 bytes [-Werror=3Dframe-larger-than=3D] } ^ arch/um/os-Linux/signal.c: In function =E2=80=98timer_real_alarm_handler=E2= =80=99: arch/um/os-Linux/signal.c:95:1: error: the frame size of 2960 bytes is larg= er than 1024 bytes [-Werror=3Dframe-larger-than=3D] } Signed-off-by: Srinivasarao Pathipati --- arch/um/os-Linux/signal.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/arch/um/os-Linux/signal.c b/arch/um/os-Linux/signal.c index 24a403a..9de8826 100644 --- a/arch/um/os-Linux/signal.c +++ b/arch/um/os-Linux/signal.c @@ -32,23 +32,25 @@ void (*sig_info[NSIG])(int, struct siginfo *, struct um= l_pt_regs *) =3D { =20 static void sig_handler_common(int sig, struct siginfo *si, mcontext_t *mc) { - struct uml_pt_regs r; + struct uml_pt_regs *r; int save_errno =3D errno; =20 - r.is_user =3D 0; + r =3D malloc(sizeof(struct uml_pt_regs)); + r->is_user =3D 0; if (sig =3D=3D SIGSEGV) { /* For segfaults, we want the data from the sigcontext. */ - get_regs_from_mc(&r, mc); - GET_FAULTINFO_FROM_MC(r.faultinfo, mc); + get_regs_from_mc(r, mc); + GET_FAULTINFO_FROM_MC(r->faultinfo, mc); } =20 /* enable signals if sig isn't IRQ signal */ if ((sig !=3D SIGIO) && (sig !=3D SIGWINCH)) unblock_signals_trace(); =20 - (*sig_info[sig])(sig, si, &r); + (*sig_info[sig])(sig, si, r); =20 errno =3D save_errno; + free(r); } =20 /* @@ -99,13 +101,15 @@ void sig_handler(int sig, struct siginfo *si, mcontext= _t *mc) =20 static void timer_real_alarm_handler(mcontext_t *mc) { - struct uml_pt_regs regs; + struct uml_pt_regs *regs; =20 + regs =3D malloc(sizeof(struct uml_pt_regs)); if (mc !=3D NULL) - get_regs_from_mc(®s, mc); + get_regs_from_mc(regs, mc); else - memset(®s, 0, sizeof(regs)); - timer_handler(SIGALRM, NULL, ®s); + memset(regs, 0, sizeof(struct uml_pt_regs)); + timer_handler(SIGALRM, NULL, regs); + free(regs); } =20 void timer_alarm_handler(int sig, struct siginfo *unused_si, mcontext_t *m= c) --=20 2.7.4