From: Kees Cook <kees@kernel.org>
To: Mirsad Todorovac <mtodorovac69@gmail.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"Gustavo A. R. Silva" <gustavoars@kernel.org>,
Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
"Matthew Wilcox (Oracle)" <willy@infradead.org>,
Al Viro <viro@zeniv.linux.org.uk>,
Jeff Layton <jlayton@kernel.org>,
reiserfs-devel@vger.kernel.org
Subject: Re: [PROBLEM linux-next] fs/reiserfs/do_balan.c:1147:13: error: variable ‘leaf_mi’ set but not used [-Werror=unused-but-set-variable]
Date: Wed, 10 Jul 2024 11:17:42 -0700 [thread overview]
Message-ID: <202407101116.2E9836EBAF@keescook> (raw)
In-Reply-To: <39591663-9151-42f9-9906-4684acaa685c@gmail.com>
On Wed, Jul 10, 2024 at 08:09:27PM +0200, Mirsad Todorovac wrote:
> Dear all,
>
> On the linux-next vanilla next-20240709 tree, I have attempted the seed KCONFIG_SEED=0xEE7AB52F
> which was known from before to trigger various errors in compile and build process.
>
> Though this might seem as contributing to channel noise, Linux refuses to build this config,
> treating warnings as errors, using this build line:
>
> $ time nice make W=1 -k -j 36 |& tee ../err-next-20230709-01a.log; date
>
> As I know that the Chief Penguin doesn't like warnings, but I am also aware that there are plenty
> left, there seems to be more tedious work ahead to make the compilers happy.
>
> The compiler output is:
>
> ---------------------------------------------------------------------------------------------------------
> fs/reiserfs/do_balan.c: In function ‘balance_leaf_new_nodes_paste_whole’:
> fs/reiserfs/do_balan.c:1147:13: error: variable ‘leaf_mi’ set but not used [-Werror=unused-but-set-variable]
> 1147 | int leaf_mi;
> | ^~~~~~~
> CC fs/reiserfs/lbalance.o
> fs/reiserfs/fix_node.c: In function ‘dc_check_balance_leaf’:
> fs/reiserfs/fix_node.c:1938:13: error: variable ‘maxsize’ set but not used [-Werror=unused-but-set-variable]
> 1938 | int maxsize, ret;
> | ^~~~~~~
> fs/reiserfs/fix_node.c:1935:13: error: variable ‘levbytes’ set but not used [-Werror=unused-but-set-variable]
> 1935 | int levbytes;
> | ^~~~~~~~
> fs/reiserfs/prints.c: In function ‘prepare_error_buf’:
> fs/reiserfs/prints.c:221:17: error: function ‘prepare_error_buf’ might be a candidate for ‘gnu_printf’ format attribute [-Werror=suggest-attribute=format]
> 221 | p += vscnprintf(p, end - p, fmt1, args);
> | ^
> fs/reiserfs/prints.c:260:9: error: function ‘prepare_error_buf’ might be a candidate for ‘gnu_printf’ format attribute [-Werror=suggest-attribute=format]
> 260 | p += vscnprintf(p, end - p, fmt1, args);
> | ^
> make[4]: Target 'arch/x86/kernel/' not remade because of errors.
> make[3]: *** [scripts/Makefile.build:485: arch/x86/kernel] Error 2
> make[3]: Target 'arch/x86/' not remade because of errors.
> make[2]: *** [scripts/Makefile.build:485: arch/x86] Error 2
> fs/reiserfs/lbalance.c: In function ‘leaf_copy_items’:
> fs/reiserfs/lbalance.c:524:29: error: variable ‘dest’ set but not used [-Werror=unused-but-set-variable]
> 524 | struct buffer_head *dest;
> | ^~~~
> cc1: all warnings being treated as errors
> make[4]: *** [scripts/Makefile.build:244: fs/reiserfs/do_balan.o] Error 1
> cc1: all warnings being treated as errors
> make[4]: *** [scripts/Makefile.build:244: fs/reiserfs/prints.o] Error 1
> cc1: all warnings being treated as errors
> make[4]: *** [scripts/Makefile.build:244: fs/reiserfs/fix_node.o] Error 1
> ---------------------------------------------------------------------------------------------------------
>
> In fs/reiserfs/fix_node.c:1938:13, fs/reiserfs/fix_node.c:1935:13, and fs/reiserfs/lbalance.c:524:29,
> the problem seem to lie within the construct RFALSE(), like
>
> 521 static int leaf_copy_items(struct buffer_info *dest_bi, struct buffer_head *src,
> 522 int last_first, int cpy_num, int cpy_bytes)
> 523 {
> 524 struct buffer_head *dest;
> 525 int pos, i, src_nr_item, bytes;
> 526
> 527 dest = dest_bi->bi_bh;
> 528 RFALSE(!dest || !src, "vs-10210: !dest || !src");
> 529 RFALSE(last_first != FIRST_TO_LAST && last_first != LAST_TO_FIRST,
> 530 "vs-10220:last_first != FIRST_TO_LAST && last_first != LAST_TO_FIRST");
> 531 RFALSE(B_NR_ITEMS(src) < cpy_num,
> 532 "vs-10230: No enough items: %d, req. %d", B_NR_ITEMS(src),
> 533 cpy_num);
> 534 RFALSE(cpy_num < 0, "vs-10240: cpy_num < 0 (%d)", cpy_num);
Can you prepare a patch to solve these? It should be possible to just
wrap the offending variables as done for RFALSE itself:
#ifdef CONFIG_REISERFS_CHECK
struct buffer_head *dest;
#endif
etc...
--
Kees Cook
next prev parent reply other threads:[~2024-07-10 18:17 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-10 18:09 Mirsad Todorovac
2024-07-10 18:17 ` Kees Cook [this message]
2024-07-10 19:14 ` Mirsad Todorovac
2024-07-15 17:28 ` Jan Kara
2024-07-16 17:17 ` Mirsad Todorovac
2024-07-17 15:44 ` Jan Kara
2024-07-17 22:14 ` Mirsad Todorovac
2024-07-18 9:39 ` Jan Kara
2024-07-19 20:51 ` Mirsad Todorovac
2024-08-02 16:31 ` Mirsad Todorovac
2024-08-05 13:04 ` Jan Kara
2024-08-05 21:24 ` Mirsad Todorovac
2024-08-06 8:25 ` Jan Kara
2024-08-11 13:34 ` Mirsad Todorovac
2024-08-11 20:52 ` Mirsad Todorovac
2024-08-27 9:24 ` Jan Kara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202407101116.2E9836EBAF@keescook \
--to=kees@kernel.org \
--cc=brauner@kernel.org \
--cc=gustavoars@kernel.org \
--cc=jack@suse.cz \
--cc=jlayton@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mtodorovac69@gmail.com \
--cc=reiserfs-devel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®