From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0FB31C433EF for ; Mon, 10 Jan 2022 21:52:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2F6646B0071; Mon, 10 Jan 2022 16:52:34 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2A6876B0073; Mon, 10 Jan 2022 16:52:34 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 146CB6B0074; Mon, 10 Jan 2022 16:52:34 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0083.hostedemail.com [216.40.44.83]) by kanga.kvack.org (Postfix) with ESMTP id 024BC6B0071 for ; Mon, 10 Jan 2022 16:52:33 -0500 (EST) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id A70AD8248D52 for ; Mon, 10 Jan 2022 21:52:33 +0000 (UTC) X-FDA: 79015726986.09.6B2B49B Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf11.hostedemail.com (Postfix) with ESMTP id 11CE24000D for ; Mon, 10 Jan 2022 21:52:32 +0000 (UTC) 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 ams.source.kernel.org (Postfix) with ESMTPS id D13FDB81616 for ; Mon, 10 Jan 2022 21:52:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8F216C36AEF for ; Mon, 10 Jan 2022 21:52:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1641851550; bh=IMxkpo2WkVBDcJMl1/+rdaD8rw+g8IvPBclg7vp4uOM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=PTrJ7KNRRd5VT0gAlGL8xOe6IjNPXsW+vUdgiVArAv06ByRUPFmclbSmmjRjG4fhk HwA8zvobWnjHQB2NFKS0Borww6hylkNuf6AFSI8ZoAW0qGqH2cxyYhC3G8w6u4zsLH qEIFy078loD9xSLoD8OMtG+JqRSFbdf+aqoRDQ+2brIkoCblohflI2+snpHLFzOy3b L2kCrZTfAPp9Dqdn+u5/1T/vBtYTB/QfsDIqpy1qVxOZLZInTwy1kiIjh6HmWyxc3a EjeC+uxpr383fdhCgmwiJc/Uj/teLDsweQIaLOZE548KY9X5yePXhN1SyIaxA7TLe5 HK2hRtkL0qXqg== Received: by mail-yb1-f173.google.com with SMTP id g14so13363288ybs.8 for ; Mon, 10 Jan 2022 13:52:30 -0800 (PST) X-Gm-Message-State: AOAM532fF93iOdnEQht5NyFFTcmNFwEeDPmF5DwJ+V5CZvCTPBJwzFPA T3g68L+hWBH1jjlcq0VrMpxIOnGhErfEWm0URAA= X-Google-Smtp-Source: ABdhPJySTgDyiG+REF5Was+jXfGH6D38Ny3k03FfV4JLRO5TpymLhTrSdv+9Jq9bTLQVae9NAntENmakroDwF9mp1lg= X-Received: by 2002:a25:8d0d:: with SMTP id n13mr2349233ybl.208.1641851549683; Mon, 10 Jan 2022 13:52:29 -0800 (PST) MIME-Version: 1.0 References: <202201060848.nagWejwv-lkp@intel.com> <20220108005854.658596-1-christylee@fb.com> In-Reply-To: <20220108005854.658596-1-christylee@fb.com> From: Song Liu Date: Mon, 10 Jan 2022 13:52:18 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH bpf-next] Fix incorrect integer literal used for marking scratched registers in verifier logs To: Christy Lee Cc: Dan Carpenter , Alexei Starovoitov , kbuild-all@lists.01.org, kbuild@lists.01.org, Linux-MM , bpf , Kernel Team , christyc.y.lee@gmail.com, kernel test robot Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 11CE24000D X-Stat-Signature: 77uy69aa8asz7t8hxb4du8nfacebu7f5 Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=PTrJ7KNR; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf11.hostedemail.com: domain of song@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=song@kernel.org X-HE-Tag: 1641851552-209693 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Jan 7, 2022 at 4:59 PM Christy Lee wrote: > > env->scratched_stack_slots is a 64-bit value, we should use ULL > instead of UL literal values. > > Reported-by: kernel test robot > Reported-by: Dan Carpenter > Signed-off-by: Christy Lee The fix looks good to me. Thus: Acked-by: Song Liu However, the patch looks corrupted. Also, the subject is probably too long (./scripts/checkpatch.pl should complain about it). Thanks, Song > --- > kernel/bpf/verifier.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c > index bfb45381fb3f..a8587210907d 100644 > --- a/kernel/bpf/verifier.c > +++ b/kernel/bpf/verifier.c > @@ -616,7 +616,7 @@ static void mark_reg_scratched(struct bpf_verifier_env *env, u32 regno) > > static void mark_stack_slot_scratched(struct bpf_verifier_env *env, u32 spi) > { > - env->scratched_stack_slots |= 1UL << spi; > + env->scratched_stack_slots |= 1ULL << spi; > } > > static bool reg_scratched(const struct bpf_verifier_env *env, u32 regno) > @@ -637,14 +637,14 @@ static bool verifier_state_scratched(const struct bpf_verifier_env *env) > static void mark_verifier_state_clean(struct bpf_verifier_env *env) > { > env->scratched_regs = 0U; > - env->scratched_stack_slots = 0UL; > + env->scratched_stack_slots = 0ULL; > } > > /* Used for printing the entire verifier state. */ > static void mark_verifier_state_scratched(struct bpf_verifier_env *env) > { > env->scratched_regs = ~0U; > - env->scratched_stack_slots = ~0UL; > + env->scratched_stack_slots = ~0ULL; > } > > /* The reg state of a pointer or a bounded scalar was saved when > -- > 2.30.2 >