Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5769133rwd; Wed, 24 May 2023 06:37:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7VG6Yb86+owG9wcs+gt1pzyXE2eK1sjQB8MMAdoxuC7wzvCtyKonIuKzUGRQnEJY9KFD1N X-Received: by 2002:a05:6a21:3293:b0:10b:7b64:706 with SMTP id yt19-20020a056a21329300b0010b7b640706mr12670325pzb.13.1684935425163; Wed, 24 May 2023 06:37:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684935425; cv=none; d=google.com; s=arc-20160816; b=mVYpQR6w1UGZqCLvLhejpPzPjmERzjw7mnFmXQRjRuWlEcb4jztAVVO/fp55Q3PNkO 2xNA8sZUiKasCm5yjBskQdFPS75S0Wt7x7xcAaNwODDu7jWqRnoQ96bx+bbldCjfim42 jKCqTrc0Rl4R30HUoWsffwmBAf/EV3b+Mb5bPc1Qkgq+tWNyz0CaLc4thBxtmSotOQJM C5LhHqaTAIt4R7kfZm7NuCP8NG4XFUtsmmZRGp9jZ2S53O/g0nYor932H8C9lX+xDyDl WcPJlHImAUj9DYcbgWAmSLCCJbxl8jm4r5kfma2UW0+0QqPOXr51gETAw4SYnttNK459 tXbA== 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:date:references:in-reply-to :message-id:mime-version:user-agent:feedback-id:dkim-signature :dkim-signature; bh=GiPY4yhJsIKIhF61iNGa8GklXontEhtTLZkU/4WyhdM=; b=vIqX0Fb08RDxsd9v0b4qf2MAwPBC3d8r94TSkYR7Psg/m70/kk0wsyFfD0gJngWghO O7CkuXU1ru9MbNdothUiP7R3jIBm9uUqkTG3v47YRWUKYFMvEmbD2EAZ+nsBKDvD/Mo4 zFi46BayRpLvAubRc0h6VLFkHlN+3M65MkY+wTMS6V9xkQZUQAIQG5F+iNYHMS+Lf8XJ 9E5sbEWooD/DfH0yHAd7yFExaT3yWpDQPuYZmcBinkWDhqH4Bb+mTQajNY9oaupfJxaR RHZUFcG6ajyfSsgf1VBeosq21rRiYzm403xlZf7cDZmsijWkdGLhktIix7UNneaahU3z ZP+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=AfqXSSE0; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=BkwU785l; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m30-20020a63711e000000b0052c9fa0034fsi8889530pgc.699.2023.05.24.06.36.49; Wed, 24 May 2023 06:37:05 -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=@arndb.de header.s=fm3 header.b=AfqXSSE0; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=BkwU785l; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232079AbjEXN3Q (ORCPT + 99 others); Wed, 24 May 2023 09:29:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230214AbjEXN3L (ORCPT ); Wed, 24 May 2023 09:29:11 -0400 Received: from wnew2-smtp.messagingengine.com (wnew2-smtp.messagingengine.com [64.147.123.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D29E8AA; Wed, 24 May 2023 06:29:09 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailnew.west.internal (Postfix) with ESMTP id 829EF2B063E5; Wed, 24 May 2023 09:29:07 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Wed, 24 May 2023 09:29:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc: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=fm3; t=1684934947; x=1684942147; bh=Gi PY4yhJsIKIhF61iNGa8GklXontEhtTLZkU/4WyhdM=; b=AfqXSSE02JYMjhCrPB IhnSrYEDfNwp6ZTKQCC0WNafkyLTSrRneXdUTQoCXb4Dq0tqDV3cY9uX96ygbjJy /X7/7YYLVmYz2hZWLrw1Wy+M3GY7uwPZF5xscl7z2BxfXiTYXdtEGvGh6zzI8JBk epnaKDNI20xppUukZSTlfG1r+r1rfzAfMAmtgZC3S4pBZomPQyi0y0sV1YUxYnwa /rfWBBe0tG193m9QXCYrZA9oBLiCVKCnFMwigkDYXWHQ2iY9JxT0sir4hyo1zaLr kviH19unfm9qo8foDKhunIAafN/eo8NFu+oGDzJnboI0U11yw16I5HU2kVV/larp dAag== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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=fm1; t=1684934947; x=1684942147; bh=GiPY4yhJsIKIh F61iNGa8GklXontEhtTLZkU/4WyhdM=; b=BkwU785lTFysm6mx9P6nPMhnybzBy 9lyDJSpU86Ex/R68NDtd2SsGHr/JomzKeXEyqSfVYOUFRowmbmYIg9pOdUdaD+eg Xre9jwdleD5xEGZXMXyuiGnfxwDYQxy2/HBspZx8VFkLszACjjKDBO9MktMqelZv a/rfINW3Nb08xZ8y6YHFdYGBNaowwBPXSR7vNvnDvzN1CBX9xt6wT85X9BG7BLnX PUOBfiiFGn/jfe9HmduyyK3RbjLK+4yL2ENhgtmSBYqcqCB+W34vcUJNMnE+kG5q Tu0SAOo+52BmyWpGa1LjyEFPbgajJEN9STmyh1DsRBUFw56iav2F+FGng== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeejhedgieefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepffehueegteeihfegtefhjefgtdeugfegjeelheejueethfefgeeghfektdek teffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id BFF1AB60086; Wed, 24 May 2023 09:29:06 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-441-ga3ab13cd6d-fm-20230517.001-ga3ab13cd Mime-Version: 1.0 Message-Id: In-Reply-To: <3c029fae-cb42-5a75-2858-7b8fc56a8769@meta.com> References: <20230523194930.2116181-1-arnd@kernel.org> <20230523194930.2116181-2-arnd@kernel.org> <3c029fae-cb42-5a75-2858-7b8fc56a8769@meta.com> Date: Wed, 24 May 2023 15:28:46 +0200 From: "Arnd Bergmann" To: "Yonghong Song" , "Arnd Bergmann" , "Alexei Starovoitov" , "Daniel Borkmann" , "Andrii Nakryiko" , "Song Liu" , "Steven Rostedt" , "Masami Hiramatsu" Cc: stable@vger.kernel.org, "Martin KaFai Lau" , "Yonghong Song" , "John Fastabend" , "KP Singh" , "Stanislav Fomichev" , "Hao Luo" , "Jiri Olsa" , "Kumar Kartikeya Dwivedi" , "Dave Marchevsky" , "Joanne Koong" , "Delyan Kratunov" , "Peter Zijlstra" , bpf@vger.kernel.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] [v2] bpf: fix bpf_probe_read_kernel prototype mismatch Content-Type: text/plain 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,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On Wed, May 24, 2023, at 05:12, Yonghong Song wrote: > On 5/23/23 12:43 PM, Arnd Bergmann wrote: >> Aside from the warning, this addresses a bug on 32-bit architectures >> from incorrect argument passing with the mismatched prototype. > > Could you explain what is this '32-bit architectures ... incorrect > argument passing' thing? I've expanded that paragraph now: | Aside from the warning, this addresses a bug on 32-bit architectures | from incorrect argument passing with the mismatched prototype: | BPF_CALL_x() functions use 64-bit arguments that are passed in | pairs of register or on the stack on 32-bit architectures, while the | normal function uses one register per argument. Let me know if you think I should put more details in there. >> @@ -1635,11 +1636,13 @@ bool bpf_opcode_in_insntable(u8 code) >> } >> >> #ifndef CONFIG_BPF_JIT_ALWAYS_ON >> -u64 __weak bpf_probe_read_kernel(void *dst, u32 size, const void *unsafe_ptr) >> +#ifndef CONFIG_BPF_EVENTS >> +int bpf_probe_read_kernel_common(void * dst, u32 size, const void *unsafe_ptr) > > void * dst => void *dst > Fixed now. Thanks, Arnd