From patchwork Fri Mar 24 07:36:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Guo Ren X-Patchwork-Id: 74408 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp442157vqo; Fri, 24 Mar 2023 00:43:07 -0700 (PDT) X-Google-Smtp-Source: AKy350bQfSI83M5TKBMgm9wkHKr3TifGy85HrAzE+W2+ZxIfFoW5f15ysDQW7TTjQ10SAWP/oTC9 X-Received: by 2002:a17:906:175a:b0:92c:8e4a:1a42 with SMTP id d26-20020a170906175a00b0092c8e4a1a42mr1963053eje.32.1679643787291; Fri, 24 Mar 2023 00:43:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679643787; cv=none; d=google.com; s=arc-20160816; b=Aj9tTLMw33Nb6JZKkrEuBvPDsbJJfYV9AGFrKUl7eTC+/PaMPXaYRd11bKpt72lYCF TSQHu2aluaHqvmtILiodwp3XT9+TxfU/giQ0wU61LNSSs2Hxk1H4nGy/9crYCFzORpsq kUyxR9+TmrsdOakHJBUMwvRgdQ1mIAs1UFlREqbormX+sVwPn8Q8z6uDPrMs6Zh11L6N q2SDH1lOiNv9IB+dqpixfkg7oC3R2Qz2hTlshXytjKgbw8vwTdj3XU9m2rjbGPH+eV2B KUntYn0VmbzASK/WkLL5LyQLeu6x0hmGKwfiEMYhvORH9x5Z+XeE2vjlWBK2kEMGPD5P xDIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=VuKg/uepY06WM+c6cn1apWPWJmYfyQHQhDMZZcHJWnw=; b=HXVNQe/nAm+sAMtLeNxly2xsQt0OytNhRcEuZ6EgLCYLZcqDWx6lCtaHgHtwVDnpTA U55qEMi6ltrfMx7x0C6EdNfovzGDHkfKo+kXEMHyKp4RmICM4ZMj+yUGlQsmM1Fc6XDb yOhMhNh9DEpt+HYA4iSN8gU6gB16lt9IdiIxkpV/UPexR5aq8zn9OQbsV0VRvs5dQP1N M1cCHI9chSH+UQB2cJmqsO85VqxI7bg66VEcki8IE+8dE699OhqUCDDstxnEkdEYYY1u ub6CXfM6EZPN26MWBKHLmEFUBk2DXQtxOvyj3/HBlamIj0zri+w/gKiIibXTmZMUqWKk IDHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rDQrw1PN; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l26-20020a1709066b9a00b008c1c6133bc9si20215994ejr.397.2023.03.24.00.42.43; Fri, 24 Mar 2023 00:43:07 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rDQrw1PN; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231683AbjCXHgo (ORCPT + 99 others); Fri, 24 Mar 2023 03:36:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229522AbjCXHgm (ORCPT ); Fri, 24 Mar 2023 03:36:42 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C31A340C0; Fri, 24 Mar 2023 00:36:41 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 524E56296F; Fri, 24 Mar 2023 07:36:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC356C433D2; Fri, 24 Mar 2023 07:36:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679643400; bh=BBS9cSTname+Z1/k6YNt/nmdj4wvYmKElUY7I0mcqBI=; h=From:To:Cc:Subject:Date:From; b=rDQrw1PN087BeT3VrGtecrJalaSgojkdpf8sH9ycPAcc0VFY6USfYCuXf+HzgvtnY ZBKrIykAz+2aq/t8xLXZCtuXq9cyOQ5KRfH6pwn+9h633cZ19+Kegx48iGbQvPX2a/ rPUaVZ0+3vvBrOat7/3QV/XC+xOkLSjUwBrLH3uPGL43Q0zkskOYaj0XMx439stJcp 8NfnYd9S7Haxb5Kni2pjf3swk6A8VWJysCTx5ktEE1jbEKPdukR2n65lkpzX1PZYe4 pH7foapRz5RZa4b16jkHjNxWpRB+XNZypEGbI8+wqD/xgA5hQ2ucUf4furLV82OnoD RI4dApSC69dsQ== From: guoren@kernel.org To: arnd@arndb.de, guoren@kernel.org, palmer@rivosinc.com, conor.dooley@microchip.com, heiko@sntech.de, jszhang@kernel.org, lazyparser@gmail.com, falcon@tinylab.org, chenhuacai@kernel.org, esyr@redhat.com Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Guo Ren , Christoph Hellwig Subject: [PATCH V3] uapi: Fixup strace compile error Date: Fri, 24 Mar 2023 03:36:30 -0400 Message-Id: <20230324073630.161034-1-guoren@kernel.org> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761234164335359966?= X-GMAIL-MSGID: =?utf-8?q?1761234164335359966?= From: Guo Ren Export F_*64 definitions to userspace permanently. "ifndef" usage made it vailable at all times to the userspace, and this change has actually broken building strace with the latest kernel headers. There could be some debate whether having these F_*64 definitions exposed to the user space 64-bit applications, but it seems that were no harm (as they were exposed already for quite some time), and they are useful at least for strace for compat application tracing purposes. Here is the compile error log: ../../../src/xlat/fcntlcmds.h:54:7: error: ‘F_GETLK64’ undeclared here (not in a function); did you mean ‘F_GETLK’? 54 | XLAT(F_GETLK64), | ^~~~~~~~~ ../../../src/xlat.h:64:54: note: in definition of macro ‘XLAT’ 64 | # define XLAT(val) { (unsigned)(val), #val } | ^~~ ../../../src/xlat/fcntlcmds.h:57:7: error: ‘F_SETLK64’ undeclared here (not in a function); did you mean ‘F_SETLK’? 57 | XLAT(F_SETLK64), | ^~~~~~~~~ ../../../src/xlat.h:64:54: note: in definition of macro ‘XLAT’ 64 | # define XLAT(val) { (unsigned)(val), #val } | ^~~ ../../../src/xlat/fcntlcmds.h:60:7: error: ‘F_SETLKW64’ undeclared here (not in a function); did you mean ‘F_SETLKW’? 60 | XLAT(F_SETLKW64), | ^~~~~~~~~~ ../../../src/xlat.h:64:54: note: in definition of macro ‘XLAT’ 64 | # define XLAT(val) { (unsigned)(val), #val } Fixes: 306f7cc1e9061 "uapi: always define F_GETLK64/F_SETLK64/F_SETLKW64 in fcntl.h" Signed-off-by: Guo Ren Signed-off-by: Guo Ren Reported-by: Eugene Syromiatnikov Acked-by: Palmer Dabbelt Cc: Christoph Hellwig Cc: Arnd Bergmann Cc: Heiko Stuebner Reviewed-by: Christoph Hellwig --- Changelog v3: - Add error log v2: https://lore.kernel.org/lkml/20220804025448.1240780-1-guoren@kernel.org/ - Optimize commit log v1: https://lore.kernel.org/lkml/20220613013051.1741434-1-guoren@kernel.org/ --- include/uapi/asm-generic/fcntl.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/uapi/asm-generic/fcntl.h b/include/uapi/asm-generic/fcntl.h index 1ecdb911add8..3a389895328a 100644 --- a/include/uapi/asm-generic/fcntl.h +++ b/include/uapi/asm-generic/fcntl.h @@ -116,13 +116,11 @@ #define F_GETSIG 11 /* for sockets. */ #endif -#if __BITS_PER_LONG == 32 || defined(__KERNEL__) #ifndef F_GETLK64 #define F_GETLK64 12 /* using 'struct flock64' */ #define F_SETLK64 13 #define F_SETLKW64 14 #endif -#endif /* __BITS_PER_LONG == 32 || defined(__KERNEL__) */ #ifndef F_SETOWN_EX #define F_SETOWN_EX 15