Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1967053rdb; Tue, 3 Oct 2023 06:41:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF3/nxA4yJqRG19py6kJEes34B7cyTPo4RXSw7Vh+m7JeMlHhx/kb5rB9fo2JQ+7w4JNxUv X-Received: by 2002:a17:903:2309:b0:1c3:6e38:3940 with SMTP id d9-20020a170903230900b001c36e383940mr14910241plh.7.1696340472833; Tue, 03 Oct 2023 06:41:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696340472; cv=none; d=google.com; s=arc-20160816; b=XVh8I7HUNRa7Hts+NfvN2uAcYF1oFpjUg0QZRFS+l0ZRstCFoc6BPsZh8gdCc2PwOY GvxL/LFeYNkHck1g/ySG11yuDgTJx2bJmhfbY5aS/C4Aszfx613iGa27TyZVDVKWZjqc +gs+wbOCo7xXSorJTuM7asAXbrHSopcb9uaeFVXVCyBwak2B+3+AAFrEIIgS++HniVaF fEuVZT4MTzdFtZ8kweuEzO7RHhXnB1k7ZFAcgpkhUHtMQiw2auUYqedM6vzagqErZbuB JEqsLiK9LtncCm373lId7KLlXh4hY6KMYkHXhUbqoW0/TbJJyjieHOsNcvBr35UZSEHC TPNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:subject:cc:to:from :date:references:in-reply-to:message-id:mime-version:user-agent :feedback-id:dkim-signature:dkim-signature; bh=pFiUCM0Cn00jPD1kU6gNbpIBQuIHykihdnFgCoeT11M=; fh=9V6j1TgXAUVNY1MpbqRyHvrOJfBQ2FIZIF28B0ijxTU=; b=z1wTVrgp06A0f2nKkfFhyiDkFkBllMyVzameUWnRi9sLi+wJSi8dz8xWGAjdMBOEYZ y6jQSGC/mUHYJJl35snPZY8bdd8BRnb6C5V2C55/+ycYnvfPfQeGgBKlnG4WTeDxiOfM 0TvL8UZ2lRv6ltfsNQxJH+OWp3dAw12Bkq4FETZt7ZC+W71thDdL4ErTV3GZPbmh6YVS Zp6feRwrhTWa0t/mGnh40JE+jsjTAFMdzVts3zuaj/DPyshvRxaVq9m0A06wk6hTzucS lJeiPbHhA9B1QsZP0lHdLd0pDweoQuQ692+kGm3rWq7K6kcpkt+zoOV7q5BbZrj3RvLQ 0JDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm1 header.b=N1rsup18; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=X8xWX1F8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id h12-20020a170902f2cc00b001c589ba4a0bsi1374873plc.195.2023.10.03.06.41.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 06:41:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm1 header.b=N1rsup18; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=X8xWX1F8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 8389F8039873; Tue, 3 Oct 2023 06:40:58 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232390AbjJCNky (ORCPT + 99 others); Tue, 3 Oct 2023 09:40:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232169AbjJCNkx (ORCPT ); Tue, 3 Oct 2023 09:40:53 -0400 Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14591AD; Tue, 3 Oct 2023 06:40:49 -0700 (PDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 8AB133200B40; Tue, 3 Oct 2023 09:40:45 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Tue, 03 Oct 2023 09:40:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1696340445; x=1696426845; bh=pFiUCM0Cn00jPD1kU6gNbpIBQuIHykihdnF gCoeT11M=; b=N1rsup18Lf/e/7bOBtifmqIztvYO5QZengtcNpzCJUyAeIOrTTQ RwSPWXxrpgkpGub37RnfhA4l8kNZQ2/6ISAtp4cXBp4pd3EKcIhdhuISJbqMH3QW VqmrZPyWiiojsQA5j+Bq7TWvI7emjjNTTN97CZt1V3mWhIJWVUJQuhxqkN9PWg/v LRsQuH3JdNmtHO9nOBgsU8298q1dSBXlrhbpGNJfHdzpTlRkTe1EgY800b63u7Kb BE87xNSa8uC4A/ZlPsfVjAUyBOFSn3Vdg+iypFhO55M2CVb0AeST8iyxupVigOkg ZzNy4a+XxzwvQjdzhcXceRKkfi/dSkqG9TA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1696340445; x=1696426845; bh=pFiUCM0Cn00jPD1kU6gNbpIBQuIHykihdnF gCoeT11M=; b=X8xWX1F87dFRO3w8fBnHCxAjOlmej7UIeTtFEDQO3JFj/z8xhhD aqjCsFoshVqquyrxj81l2OdqYMGnfHAoT/nqTkKtWiJf1IHJu7mnbaf3Z3PuCYs9 b2sM7M3PJmxAbYOTRr89zA4YghcmGNN23VyItGXPLMnhNfFmxRHKF2Y/p31zrZv3 DF9LC44mfcQ40ZFJUDlywjvAn5wtDgx+gcB11wfUg46FGB+GOkxW2me4VD3jXMEt HEjHxcA4Regb8zAABd97Eh+CtQ3ZujpuRyzA5jWMBKBNjnLTgdEOeerC58PD2e44 lyRKaXA+a0Lr+HSchP8KNTHjK15YI4eq2cw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrfeeigdeihecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgfgsehtqhertderreejnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepgfekueelgeeigefhudduledtkeefffejueelheelfedutedttdfgveeufeef ieegnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrrhhnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 0F0E8B6008D; Tue, 3 Oct 2023 09:40:44 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-958-g1b1b911df8-fm-20230927.002-g1b1b911d MIME-Version: 1.0 Message-Id: <0174c612-ed97-44f3-bec5-1f512f135d21@app.fastmail.com> In-Reply-To: <20231003.ahPha5bengee@digikod.net> References: <20231003.ahPha5bengee@digikod.net> Date: Tue, 03 Oct 2023 15:40:23 +0200 From: "Arnd Bergmann" To: =?UTF-8?Q?Micka=C3=ABl_Sala=C3=BCn?= , "Stephen Rothwell" Cc: "Konstantin Meskhidze" , "Linux Kernel Mailing List" , linux-next , "Willem de Bruijn" , gnoack3000@gmail.com, linux-security-module@vger.kernel.org, Netdev , netfilter-devel@vger.kernel.org, yusongping@huawei.com, artem.kuzin@huawei.com, "Geert Uytterhoeven" , "Randy Dunlap" Subject: Re: linux-next: build warning after merge of the landlock tree Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS 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: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 03 Oct 2023 06:40:58 -0700 (PDT) On Tue, Oct 3, 2023, at 15:15, Micka=C3=ABl Sala=C3=BCn wrote: > PowerPC-64 follows the LP64 data model and then uses int-l64.h (instea= d of > int-ll64.h like most architectures) for user space code. > > Here is the same code with the (suggested) "%lu" token on x86_86: > > samples/landlock/sandboxer.c: In function =E2=80=98populate_ruleset_= net=E2=80=99: > samples/landlock/sandboxer.c:170:77: error: format =E2=80=98%lu=E2=80= =99 expects=20 > argument of type =E2=80=98long unsigned int=E2=80=99, but argument 3 h= as type =E2=80=98__u64=E2=80=99=20 > {aka =E2=80=98long long unsigned int=E2=80=99} [-Werror=3Dformat=3D] > 170 | "Failed to update the rulese= t=20 > with port \"%lu\": %s\n", > | = =20 > ~~^ > | = =20 > | > | = =20 > long unsigned int > | = =20 > %llu > 171 | net_port.port,=20 > strerror(errno)); > | ~~~~~~~~~~~~~ > | | > | __u64 {aka long long=20 > unsigned int} > > > We would then need to cast __u64 to unsigned long long to avoid this w= arning, > which may look useless, of even buggy, for people taking a look at thi= s sample. > > Anyway, it makes more sense to cast it to __u16 because it is the > expected type for a TCP port. I'm updating the patch with that. > Konstantin, please take this fix for the next series: > https://git.kernel.org/mic/c/fc9de206a61a > > > On Tue, Oct 03, 2023 at 02:27:37PM +1100, Stephen Rothwell wrote: >> Hi all, >>=20 >> After merging the landlock tree, today's linux-next build (powerpc >> allyesconfig) produced this warning: >>=20 >> samples/landlock/sandboxer.c: In function 'populate_ruleset_net': >> samples/landlock/sandboxer.c:170:78: warning: format '%llu' expects a= rgument of type 'long long unsigned int', but argument 3 has type '__u64= ' {aka 'long unsigned int'} [-Wformat=3D] >> 170 | "Failed to update the ruleset= with port \"%llu\": %s\n" I think defining the __SANE_USERSPACE_TYPES__ macro should take care of = this, then __u64 has the same type as it does in the kernel. Arnd