Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp1207334lqh; Sun, 5 May 2024 23:28:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXDE5RCrCCWYJKNeTmlkBvOwSb26KzjMASjtih0yxThqqtc+o8BsPqSeDKoAhvo3jofT2V+tUiSQ9ERqdG/2/TR38Vb0PVd0ekes7FZQg== X-Google-Smtp-Source: AGHT+IHAIvdWjixOBvy4Xbb3FEIZ6k++kZsAtb8A6B+0TA13igfUr9LvGAY3AJVaalJyky9Qyc/0 X-Received: by 2002:a05:6358:d19:b0:186:27ce:63aa with SMTP id v25-20020a0563580d1900b0018627ce63aamr11518887rwj.24.1714976887108; Sun, 05 May 2024 23:28:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714976887; cv=pass; d=google.com; s=arc-20160816; b=qdrzYUSvwo1l9C6nNbvrxsQ06h9lXmIjTOvGmCirIznIchflLiocnA9KQwOHPUcuSE 1kgO8r3NI4Ojmg6H3jzsbrDLUjL6nr4oAHsKTnjxcpa85894vIL/+5VSsTypDEXfihq6 sIof9PPFqLKaYtbcseOxGNdcspxl36AbEp6kHlsHVhLWle4hX3FydgXowCtvrxxcnsXN y0+CXH39qesisPbpDfr8FNwed+NRkbXqpQDWBobVqureeVm070sMtr4kS5Vw8bPZoxN3 Tee/sT48Ur2S9eP9zwmfxvZS+oWyFyGMfa9LO0xwCaa0lFxnHywnDugH6lQXxLxNo0fn bHZw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=RIGEcxO9iBsq9RdQ7hRo5WlqUTKj0bvYnPS1dfwVru8=; fh=5YBmAF6SiFPK19yasnrFcO3VT5KcPKYZINskqAtrAh0=; b=Uot9vqRayma5p2gFQrvd4tRVuIE24JSV+jfSItEkpHX6O/7pGSD3UY/gfAgtqxv3t/ zkGU1Y5NkdP0ilxWDkjFymAww4Ut6LEFYl7tPu7prrYMaLfLTZX4OvwIX21ftt+o/D2L qCaUQrphLb0XXjLWG/BBh+rld7hFq1qBG/4N3J5kJqeqt4mIwm6objiExrhCNZ23hQ/K /PAoOHBxbYYNb+ou16K2QJ2vY8lSiDwKyjhelHWDMuqnk6negU1WaMmuZ7/02lZQYByN A6OGraYOkNx3DRW0W9v0F+0q7pahUIl1/TJTPKWxiMrgvF9O2yuPg6J51LoRmlNk/zxX SSgg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=OYbf2BJg; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-169359-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169359-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id m65-20020a633f44000000b0061d2394ddcdsi6319299pga.724.2024.05.05.23.28.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 May 2024 23:28:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-169359-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=OYbf2BJg; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-169359-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169359-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 3B8A52817D7 for ; Mon, 6 May 2024 06:28:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B02174D9F5; Mon, 6 May 2024 06:28:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="OYbf2BJg" Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8754D481B1; Mon, 6 May 2024 06:27:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714976880; cv=none; b=UtQg1eXfbfovM2nqDErmodSQMOnh5MtmZVPewsWrtOKXXg/HqULuzc90I5CiSyT5iG0nNFwPVmI38TGF9O+Ww3zLep8Oh5Oiaj6+llPZeeYfDGv9P3gfJHqjcdNph7CvzRPF2aelRwIfp24N+Aq3+sJ0fEqJ/K2mQqirX6u9krA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714976880; c=relaxed/simple; bh=J6lwFhRAUTQqgryMYvr9KovWpiaYAxESsqduXrYIcBs=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=aahkMfmG0co22689/7B65H1jB/lxUOZmWsSfOTGd8Igy+CSI8r/9u7n0hM+/UPicZD7WR2lr2+IHVhX5IVVWsnZnofTl+Tutcj7jdzr/mGlFxg08lhQwYBoL3sx9WNpLi/2sbU81sOx80k4B2qF45tExjA7O0tKJG/lR3rN+f00= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=OYbf2BJg; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4464lTsT004249; Mon, 6 May 2024 06:27:56 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=qcppdkim1; bh=RIGEcxO 9iBsq9RdQ7hRo5WlqUTKj0bvYnPS1dfwVru8=; b=OYbf2BJg/nJyimJpCpvDUYw CBg8Qwh1iCWwVGdP4A4TN4zAy4X2nLOskANFYXL0GRzKIwKWZOeyS8BdaTaXbwJf eR0x2f9Q4o/ew/42btx0/579ZP4k+byhdqsn9APDRHOBgPjEEBWxUAGmCKeOhHI2 BJKjb51iuaDER3t7UEJpNDudIkclTYE/YbvNmANoR38ZeJcji7HeEJFkVjDEjbz5 1IiSl1ccMrr+V9OO5oNGc3Tt8LBKtPq7iM4QSXySyyqMjbI3vchQ+ECwSzHo/OVl qAwpqwbDiSIUPke7Py0g0+DS4QSx+PJDEwbXGSdO1+kT3duDHaUD9xL/kKCXtjw= = Received: from nasanppmta02.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xwe6rtqry-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 May 2024 06:27:56 +0000 (GMT) Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 4466RtsI004039 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 6 May 2024 06:27:55 GMT Received: from la-sh003-lnx.qualcomm.com (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Sun, 5 May 2024 23:27:54 -0700 From: Joey Jiao To: CC: , Luis Chamberlain , Subject: [PATCH] kernel/module: disable cfi for do_mod_ctors Date: Mon, 6 May 2024 14:27:13 +0800 Message-ID: <20240506062713.3360093-1-quic_jiangenj@quicinc.com> X-Mailer: git-send-email 2.43.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: -B47IhXWWiA2NCBlPHeLJXSS0am_gHDx X-Proofpoint-GUID: -B47IhXWWiA2NCBlPHeLJXSS0am_gHDx X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-06_03,2024-05-03_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 phishscore=0 clxscore=1011 mlxscore=0 impostorscore=0 lowpriorityscore=0 priorityscore=1501 spamscore=0 mlxlogscore=892 malwarescore=0 suspectscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2405060039 CFI failure when both CONFIG_CONSTRUCTORS and CFI_CLANG enabled. CFI failure at do_init_module+0x100/0x384 (target: tsan.module_ctor+0x0/0xa98 [module_name_xx]; expected type: 0xa540670c) Disable cfi for do_mod_ctors to avoid cfi check on mod->ctors[i](). Signed-off-by: Joey Jiao --- kernel/module/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/module/main.c b/kernel/module/main.c index e1e8a7a9d6c1..d51e63795637 100644 --- a/kernel/module/main.c +++ b/kernel/module/main.c @@ -2453,6 +2453,7 @@ static int post_relocation(struct module *mod, const struct load_info *info) } /* Call module constructors. */ +__nocfi static void do_mod_ctors(struct module *mod) { #ifdef CONFIG_CONSTRUCTORS -- 2.43.2