Message ID | 202212161650404440816@zte.com.cn |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp855889wrn; Fri, 16 Dec 2022 01:08:15 -0800 (PST) X-Google-Smtp-Source: AA0mqf7GvN0aunr45CFg88Gbj5YpCrOopL60ZzM+0hW5LdXlySvkuLPpMUOPt5795jZv1RTXRvzT X-Received: by 2002:a05:6402:5486:b0:467:c3cb:49aa with SMTP id fg6-20020a056402548600b00467c3cb49aamr26137953edb.4.1671181695412; Fri, 16 Dec 2022 01:08:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671181695; cv=none; d=google.com; s=arc-20160816; b=MBINjKKt2F9OYbhl4usMDmWD3Jezg/yWTTHtvY0FbBhAUasPrPz+RA6TtiIpXSaWZu Ddb6XNgi4npRiviQxcxlbR2qffqxIy+IBpBC5uPXBmR+1DRRdVrb58Ul9QDekVZ+R78G yrlml+SSvgPcyOdLOWfJUFULvNhv3deyUzLG1C096Em148s4OBUeSaWNgg+pod9LkrvU 9UPDYSQ5x7ReDCfo7Gu2zbg5ryPUfzZqPzeODA7+uGFYfkOR8IOLSms/NC2/UVQg2qKf AIM7NXZA83inP09eZcC8T84+jkr+PZtunwHbDRty5KTmODE6zZDlgEPArUp75DTfckrb T0JQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:mime-version:message-id:date; bh=C47C5YKsEEOLh7Ov5Yw1SNJT0ACWPQcUkx6/t/V/fus=; b=TXr79SS3xhEpV/EN7vOSjnVUWs3ebh9X/wQmMTzwXuCnNtnXEwqfUbW4BWscj0SbCA oEVWaifQalJPkPFGJaB+Hh3smx/vtOZk6hUXvzhDxhuNmJdG+rm+7WH5zisB/mLD0uoZ 60JYAJDT7cm352lISm5EgYx4qRiasXulp99H/ky3NyJiYa0+WyL+mfXizCbdy5MfB6z9 z+l1DZSsGf+iASpikMG/uqDc1U2vNyMhH3HVofWG+FeoKQM3uZT7EzItdIUstH8IiEtu ZYZCx0yc+Xwkdn1lTAA6UTwRQrZvDnhc1SlfQ5Wyh1JVZVluY1kLkEX34Pe3QtQmQWZJ cpGg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m4-20020a056402430400b0045d5b83114esi2433004edc.112.2022.12.16.01.07.50; Fri, 16 Dec 2022 01:08:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229930AbiLPIu4 (ORCPT <rfc822;jeantsuru.cumc.mandola@gmail.com> + 99 others); Fri, 16 Dec 2022 03:50:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229583AbiLPIuw (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 16 Dec 2022 03:50:52 -0500 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DF696541 for <linux-kernel@vger.kernel.org>; Fri, 16 Dec 2022 00:50:49 -0800 (PST) Received: from mse-fl1.zte.com.cn (unknown [10.5.228.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxhk.zte.com.cn (FangMail) with ESMTPS id 4NYN9L4tYkz8R039; Fri, 16 Dec 2022 16:50:46 +0800 (CST) Received: from xaxapp03.zte.com.cn ([10.88.40.52]) by mse-fl1.zte.com.cn with SMTP id 2BG8obeY048049; Fri, 16 Dec 2022 16:50:38 +0800 (+08) (envelope-from guo.ziliang@zte.com.cn) Received: from mapi (xaxapp02[null]) by mapi (Zmail) with MAPI id mid32; Fri, 16 Dec 2022 16:50:40 +0800 (CST) Date: Fri, 16 Dec 2022 16:50:40 +0800 (CST) X-Zmail-TransId: 2afa639c3160ffffffffb8630f8e X-Mailer: Zmail v1.0 Message-ID: <202212161650404440816@zte.com.cn> Mime-Version: 1.0 From: <guo.ziliang@zte.com.cn> To: <catalin.marinas@arm.com> Cc: <will@kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org>, <huang.junhua@zte.com.cn>, <guo.ziliang@zte.com.cn> Subject: =?utf-8?q?=5BPATCH=5D_arm64/uprobes=3A_change_the_uprobe=5Fopcode?= =?utf-8?q?=5Ft_typedef_to_fix_the_sparse_warning?= Content-Type: text/plain; charset="UTF-8" X-MAIL: mse-fl1.zte.com.cn 2BG8obeY048049 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.250.137.novalocal with ID 639C3166.001 by FangMail milter! X-FangMail-Envelope: 1671180646/4NYN9L4tYkz8R039/639C3166.001/10.5.228.132/[10.5.228.132]/mse-fl1.zte.com.cn/<guo.ziliang@zte.com.cn> X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 639C3166.001/4NYN9L4tYkz8R039 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752361017093489029?= X-GMAIL-MSGID: =?utf-8?q?1752361017093489029?= |
Series |
arm64/uprobes: change the uprobe_opcode_t typedef to fix the sparse warning
|
|
Commit Message
guo.ziliang@zte.com.cn
Dec. 16, 2022, 8:50 a.m. UTC
From: junhua huang <huang.junhua@zte.com.cn> After we fixed the uprobe inst endian in aarch_be, the sparse check report the following warning info: sparse warnings: (new ones prefixed by >>) >> kernel/events/uprobes.c:223:25: sparse: sparse: restricted __le32 degrades to integer >> kernel/events/uprobes.c:574:56: sparse: sparse: incorrect type in argument 4 (different base types) @@ expected unsigned int [addressable] [usertype] opcode @@ got restricted __le32 [usertype] @@ kernel/events/uprobes.c:574:56: sparse: expected unsigned int [addressable] [usertype] opcode kernel/events/uprobes.c:574:56: sparse: got restricted __le32 [usertype] >> kernel/events/uprobes.c:1483:32: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int [usertype] insn @@ got restricted __le32 [usertype] @@ kernel/events/uprobes.c:1483:32: sparse: expected unsigned int [usertype] insn kernel/events/uprobes.c:1483:32: sparse: got restricted __le32 [usertype] use the __le32 to u32 for uprobe_opcode_t, to keep the same. Fixes: 60f07e22a73d ("arm64:uprobe fix the uprobe SWBP_INSN in big-endian") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: junhua huang <huang.junhua@zte.com.cn> --- arch/arm64/include/asm/uprobes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/include/asm/uprobes.h b/arch/arm64/include/asm/uprobes.h index ba4bff5ca674..2b09495499c6 100644 --- a/arch/arm64/include/asm/uprobes.h +++ b/arch/arm64/include/asm/uprobes.h @@ -16,7 +16,7 @@ #define UPROBE_SWBP_INSN_SIZE AARCH64_INSN_SIZE #define UPROBE_XOL_SLOT_BYTES MAX_UINSN_BYTES -typedef u32 uprobe_opcode_t; +typedef __le32 uprobe_opcode_t; struct arch_uprobe_task { };