* Re: fs/btrfs/extent-tree.c:8430:9: error: format not a string literal and no format arguments [not found] ` <CAGXu5jLoG00u2svBW6W5h9QsfYw1zZwYhZ1k4HG2UsvcWPHxuQ@mail.gmail.com> @ 2013-11-20 4:05 ` Fengguang Wu 2013-11-20 16:04 ` Kees Cook 2013-11-20 17:30 ` Chris Mason 0 siblings, 2 replies; 6+ messages in thread From: Fengguang Wu @ 2013-11-20 4:05 UTC (permalink / raw) To: Kees Cook; +Cc: Linux Btrfs On Tue, Nov 19, 2013 at 07:56:35PM -0800, Kees Cook wrote: > Hi! > > Which tree is 'devel-snb'? I don't see that on the kernel.org trees. It's my local merge branch, based on the latest upstream release. Let's CC the btrfs developers for this warning. :) Thanks, Fengguang > On Tue, Nov 19, 2013 at 5:01 PM, kbuild test robot > <fengguang.wu@intel.com> wrote: > > tree: devel-snb-x86_64-201311200240 > > head: 1a985a0807ea34f37a4c5287089abd1cd2f65049 > > commit: a9b93a3684dd6ebfb7cfa173f78a79c09de81207 Merge 'kees/format-security' into devel-snb-x86_64-201311200240 > > date: 6 hours ago > > config: make ARCH=x86_64 allmodconfig > > > > All error/warnings: > > > > fs/btrfs/extent-tree.c:6201:12: sparse: symbol 'get_raid_name' was not declared. Should it be static? > > fs/btrfs/extent-tree.c:2469:28: sparse: context imbalance in 'run_clustered_refs' - unexpected unlock > > fs/btrfs/extent-tree.c:8304:9: sparse: context imbalance in 'btrfs_put_block_group_cache' - wrong count at exit > > fs/btrfs/extent-tree.c: In function '__link_block_group': > >>> fs/btrfs/extent-tree.c:8430:9: error: format not a string literal and no format arguments [-Werror=format-security] > > get_raid_name(index)); > > ^ > > cc1: some warnings being treated as errors > > > > vim +8430 fs/btrfs/extent-tree.c > > > > 8414 return 0; > > 8415 } > > 8416 > > 8417 static void __link_block_group(struct btrfs_space_info *space_info, > > 8418 struct btrfs_block_group_cache *cache) > > 8419 { > > 8420 int index = get_block_group_index(cache); > > 8421 > > 8422 down_write(&space_info->groups_sem); > > 8423 if (list_empty(&space_info->block_groups[index])) { > > 8424 struct kobject *kobj = &space_info->block_group_kobjs[index]; > > 8425 int ret; > > 8426 > > 8427 kobject_get(&space_info->kobj); /* put in release */ > > 8428 ret = kobject_init_and_add(kobj, &btrfs_raid_ktype, > > 8429 &space_info->kobj, > >> 8430 get_raid_name(index)); > > 8431 if (ret) { > > 8432 pr_warn("btrfs: failed to add kobject for block cache. ignoring.\n"); > > 8433 kobject_put(&space_info->kobj); > > 8434 } > > 8435 } > > 8436 list_add_tail(&cache->list, &space_info->block_groups[index]); > > 8437 up_write(&space_info->groups_sem); > > 8438 } > > > > --- > > 0-DAY kernel build testing backend Open Source Technology Center > > http://lists.01.org/mailman/listinfo/kbuild Intel Corporation > > > > -- > Kees Cook > Chrome OS Security ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: fs/btrfs/extent-tree.c:8430:9: error: format not a string literal and no format arguments 2013-11-20 4:05 ` fs/btrfs/extent-tree.c:8430:9: error: format not a string literal and no format arguments Fengguang Wu @ 2013-11-20 16:04 ` Kees Cook 2013-11-21 1:03 ` Fengguang Wu 2013-11-20 17:30 ` Chris Mason 1 sibling, 1 reply; 6+ messages in thread From: Kees Cook @ 2013-11-20 16:04 UTC (permalink / raw) To: Fengguang Wu; +Cc: Linux Btrfs On Tue, Nov 19, 2013 at 8:05 PM, Fengguang Wu <fengguang.wu@intel.com> wrote: > On Tue, Nov 19, 2013 at 07:56:35PM -0800, Kees Cook wrote: >> Hi! >> >> Which tree is 'devel-snb'? I don't see that on the kernel.org trees. > > It's my local merge branch, based on the latest upstream release. Hm, which release? I don't see it in 3.12, Linus's tree, nor linux-next. > Let's CC the btrfs developers for this warning. :) Sounds good. I wanted to see what get_raid_name() uses for return values in case gcc was being dumb, but adding "%s" before it should fix the problem. -Kees > > Thanks, > Fengguang > >> On Tue, Nov 19, 2013 at 5:01 PM, kbuild test robot >> <fengguang.wu@intel.com> wrote: >> > tree: devel-snb-x86_64-201311200240 >> > head: 1a985a0807ea34f37a4c5287089abd1cd2f65049 >> > commit: a9b93a3684dd6ebfb7cfa173f78a79c09de81207 Merge 'kees/format-security' into devel-snb-x86_64-201311200240 >> > date: 6 hours ago >> > config: make ARCH=x86_64 allmodconfig >> > >> > All error/warnings: >> > >> > fs/btrfs/extent-tree.c:6201:12: sparse: symbol 'get_raid_name' was not declared. Should it be static? >> > fs/btrfs/extent-tree.c:2469:28: sparse: context imbalance in 'run_clustered_refs' - unexpected unlock >> > fs/btrfs/extent-tree.c:8304:9: sparse: context imbalance in 'btrfs_put_block_group_cache' - wrong count at exit >> > fs/btrfs/extent-tree.c: In function '__link_block_group': >> >>> fs/btrfs/extent-tree.c:8430:9: error: format not a string literal and no format arguments [-Werror=format-security] >> > get_raid_name(index)); >> > ^ >> > cc1: some warnings being treated as errors >> > >> > vim +8430 fs/btrfs/extent-tree.c >> > >> > 8414 return 0; >> > 8415 } >> > 8416 >> > 8417 static void __link_block_group(struct btrfs_space_info *space_info, >> > 8418 struct btrfs_block_group_cache *cache) >> > 8419 { >> > 8420 int index = get_block_group_index(cache); >> > 8421 >> > 8422 down_write(&space_info->groups_sem); >> > 8423 if (list_empty(&space_info->block_groups[index])) { >> > 8424 struct kobject *kobj = &space_info->block_group_kobjs[index]; >> > 8425 int ret; >> > 8426 >> > 8427 kobject_get(&space_info->kobj); /* put in release */ >> > 8428 ret = kobject_init_and_add(kobj, &btrfs_raid_ktype, >> > 8429 &space_info->kobj, >> >> 8430 get_raid_name(index)); >> > 8431 if (ret) { >> > 8432 pr_warn("btrfs: failed to add kobject for block cache. ignoring.\n"); >> > 8433 kobject_put(&space_info->kobj); >> > 8434 } >> > 8435 } >> > 8436 list_add_tail(&cache->list, &space_info->block_groups[index]); >> > 8437 up_write(&space_info->groups_sem); >> > 8438 } >> > >> > --- >> > 0-DAY kernel build testing backend Open Source Technology Center >> > http://lists.01.org/mailman/listinfo/kbuild Intel Corporation >> >> >> >> -- >> Kees Cook >> Chrome OS Security -- Kees Cook Chrome OS Security ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: fs/btrfs/extent-tree.c:8430:9: error: format not a string literal and no format arguments 2013-11-20 16:04 ` Kees Cook @ 2013-11-21 1:03 ` Fengguang Wu 0 siblings, 0 replies; 6+ messages in thread From: Fengguang Wu @ 2013-11-21 1:03 UTC (permalink / raw) To: Kees Cook; +Cc: Linux Btrfs On Wed, Nov 20, 2013 at 08:04:58AM -0800, Kees Cook wrote: > On Tue, Nov 19, 2013 at 8:05 PM, Fengguang Wu <fengguang.wu@intel.com> wrote: > > On Tue, Nov 19, 2013 at 07:56:35PM -0800, Kees Cook wrote: > >> Hi! > >> > >> Which tree is 'devel-snb'? I don't see that on the kernel.org trees. > > > > It's my local merge branch, based on the latest upstream release. > > Hm, which release? I don't see it in 3.12, Linus's tree, nor linux-next. 'devel-snb' is one of my private branch, starting from v3.12, merging several public git branches (eg. btrfs-next, kees/format-security, ...) and finally do compile tests on top of it. This effectively tests all of the merged public branches in one go. :) Thanks, Fengguang ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: fs/btrfs/extent-tree.c:8430:9: error: format not a string literal and no format arguments 2013-11-20 4:05 ` fs/btrfs/extent-tree.c:8430:9: error: format not a string literal and no format arguments Fengguang Wu 2013-11-20 16:04 ` Kees Cook @ 2013-11-20 17:30 ` Chris Mason 2013-11-20 18:05 ` Jeff Mahoney 1 sibling, 1 reply; 6+ messages in thread From: Chris Mason @ 2013-11-20 17:30 UTC (permalink / raw) To: Fengguang Wu, Kees Cook, Jeff Mahoney, Josef Bacik; +Cc: Linux Btrfs Quoting Fengguang Wu (2013-11-19 23:05:51) > On Tue, Nov 19, 2013 at 07:56:35PM -0800, Kees Cook wrote: > > Hi! > > > > Which tree is 'devel-snb'? I don't see that on the kernel.org trees. > > It's my local merge branch, based on the latest upstream release. > > Let's CC the btrfs developers for this warning. :) > > Thanks, > Fengguang > > > On Tue, Nov 19, 2013 at 5:01 PM, kbuild test robot > > <fengguang.wu@intel.com> wrote: > > > tree: devel-snb-x86_64-201311200240 > > > head: 1a985a0807ea34f37a4c5287089abd1cd2f65049 > > > commit: a9b93a3684dd6ebfb7cfa173f78a79c09de81207 Merge 'kees/format-security' into devel-snb-x86_64-201311200240 > > > date: 6 hours ago > > > config: make ARCH=x86_64 allmodconfig > > > > > > All error/warnings: > > > > > > fs/btrfs/extent-tree.c:6201:12: sparse: symbol 'get_raid_name' was not declared. Should it be static? > > > fs/btrfs/extent-tree.c:2469:28: sparse: context imbalance in 'run_clustered_refs' - unexpected unlock > > > fs/btrfs/extent-tree.c:8304:9: sparse: context imbalance in 'btrfs_put_block_group_cache' - wrong count at exit > > > fs/btrfs/extent-tree.c: In function '__link_block_group': > > >>> fs/btrfs/extent-tree.c:8430:9: error: format not a string literal and no format arguments [-Werror=format-security] > > > get_raid_name(index)); This comes from the btrfs-next tree, with Jeff's sysfs patches, so I've added Jeff. -chris ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: fs/btrfs/extent-tree.c:8430:9: error: format not a string literal and no format arguments 2013-11-20 17:30 ` Chris Mason @ 2013-11-20 18:05 ` Jeff Mahoney 2013-11-20 18:37 ` Kees Cook 0 siblings, 1 reply; 6+ messages in thread From: Jeff Mahoney @ 2013-11-20 18:05 UTC (permalink / raw) To: Chris Mason, Fengguang Wu, Kees Cook, Josef Bacik; +Cc: Linux Btrfs [-- Attachment #1: Type: text/plain, Size: 1646 bytes --] On 11/20/13, 12:30 PM, Chris Mason wrote: > Quoting Fengguang Wu (2013-11-19 23:05:51) >> On Tue, Nov 19, 2013 at 07:56:35PM -0800, Kees Cook wrote: >>> Hi! >>> >>> Which tree is 'devel-snb'? I don't see that on the kernel.org trees. >> >> It's my local merge branch, based on the latest upstream release. >> >> Let's CC the btrfs developers for this warning. :) >> >> Thanks, >> Fengguang >> >>> On Tue, Nov 19, 2013 at 5:01 PM, kbuild test robot >>> <fengguang.wu@intel.com> wrote: >>>> tree: devel-snb-x86_64-201311200240 >>>> head: 1a985a0807ea34f37a4c5287089abd1cd2f65049 >>>> commit: a9b93a3684dd6ebfb7cfa173f78a79c09de81207 Merge 'kees/format-security' into devel-snb-x86_64-201311200240 >>>> date: 6 hours ago >>>> config: make ARCH=x86_64 allmodconfig >>>> >>>> All error/warnings: >>>> >>>> fs/btrfs/extent-tree.c:6201:12: sparse: symbol 'get_raid_name' was not declared. Should it be static? >>>> fs/btrfs/extent-tree.c:2469:28: sparse: context imbalance in 'run_clustered_refs' - unexpected unlock >>>> fs/btrfs/extent-tree.c:8304:9: sparse: context imbalance in 'btrfs_put_block_group_cache' - wrong count at exit >>>> fs/btrfs/extent-tree.c: In function '__link_block_group': >>>>>> fs/btrfs/extent-tree.c:8430:9: error: format not a string literal and no format arguments [-Werror=format-security] >>>> get_raid_name(index)); > > This comes from the btrfs-next tree, with Jeff's sysfs patches, so I've > added Jeff. Thanks for the heads up. I have a few other fixes that need to go into that patch set WRT cleanup too. -Jeff -- Jeff Mahoney SUSE Labs [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 841 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: fs/btrfs/extent-tree.c:8430:9: error: format not a string literal and no format arguments 2013-11-20 18:05 ` Jeff Mahoney @ 2013-11-20 18:37 ` Kees Cook 0 siblings, 0 replies; 6+ messages in thread From: Kees Cook @ 2013-11-20 18:37 UTC (permalink / raw) To: Jeff Mahoney; +Cc: Chris Mason, Fengguang Wu, Josef Bacik, Linux Btrfs On Wed, Nov 20, 2013 at 10:05 AM, Jeff Mahoney <jeffm@suse.com> wrote: > On 11/20/13, 12:30 PM, Chris Mason wrote: >> Quoting Fengguang Wu (2013-11-19 23:05:51) >>> On Tue, Nov 19, 2013 at 07:56:35PM -0800, Kees Cook wrote: >>>> Hi! >>>> >>>> Which tree is 'devel-snb'? I don't see that on the kernel.org trees. >>> >>> It's my local merge branch, based on the latest upstream release. >>> >>> Let's CC the btrfs developers for this warning. :) >>> >>> Thanks, >>> Fengguang >>> >>>> On Tue, Nov 19, 2013 at 5:01 PM, kbuild test robot >>>> <fengguang.wu@intel.com> wrote: >>>>> tree: devel-snb-x86_64-201311200240 >>>>> head: 1a985a0807ea34f37a4c5287089abd1cd2f65049 >>>>> commit: a9b93a3684dd6ebfb7cfa173f78a79c09de81207 Merge 'kees/format-security' into devel-snb-x86_64-201311200240 >>>>> date: 6 hours ago >>>>> config: make ARCH=x86_64 allmodconfig >>>>> >>>>> All error/warnings: >>>>> >>>>> fs/btrfs/extent-tree.c:6201:12: sparse: symbol 'get_raid_name' was not declared. Should it be static? >>>>> fs/btrfs/extent-tree.c:2469:28: sparse: context imbalance in 'run_clustered_refs' - unexpected unlock >>>>> fs/btrfs/extent-tree.c:8304:9: sparse: context imbalance in 'btrfs_put_block_group_cache' - wrong count at exit >>>>> fs/btrfs/extent-tree.c: In function '__link_block_group': >>>>>>> fs/btrfs/extent-tree.c:8430:9: error: format not a string literal and no format arguments [-Werror=format-security] >>>>> get_raid_name(index)); >> >> This comes from the btrfs-next tree, with Jeff's sysfs patches, so I've >> added Jeff. Ah, found it: http://git.kernel.org/cgit/linux/kernel/git/josef/btrfs-next.git/tree/fs/btrfs/extent-tree.c > > Thanks for the heads up. I have a few other fixes that need to go into > that patch set WRT cleanup too. It looks like gcc is being stupid (const strings again). If you don't want to change the call from kobject_init_and_add(..., get_raid_name(index)); to kobject_init_and_add(..., "%s", get_raid_name(index)); that's fine -- I can whitelist it since it's a string constant. But since it's not critical path, it would be nice to gain the "%s" just to be defensive if get_raid_name ever changes, etc. Thanks for taking a look! -Kees -- Kees Cook Chrome OS Security ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-11-21 1:03 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <528c09f9.S0ecVwNN2c+fnUkv%fengguang.wu@intel.com>
[not found] ` <CAGXu5jLoG00u2svBW6W5h9QsfYw1zZwYhZ1k4HG2UsvcWPHxuQ@mail.gmail.com>
2013-11-20 4:05 ` fs/btrfs/extent-tree.c:8430:9: error: format not a string literal and no format arguments Fengguang Wu
2013-11-20 16:04 ` Kees Cook
2013-11-21 1:03 ` Fengguang Wu
2013-11-20 17:30 ` Chris Mason
2013-11-20 18:05 ` Jeff Mahoney
2013-11-20 18:37 ` Kees Cook
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).