linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the kspp tree
@ 2018-07-27  9:02 Stephen Rothwell
  2018-07-27  9:06 ` Stephen Rothwell
  0 siblings, 1 reply; 111+ messages in thread
From: Stephen Rothwell @ 2018-07-27  9:02 UTC (permalink / raw)
  To: Kees Cook
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Alexander Popov

[-- Attachment #1: Type: text/plain, Size: 437 bytes --]

Hi Kees,

After merging the kspp tree, today's linux-next build (x86_64
allmodconfig) failed like this:

cc1: error: plugin stackleak_plugin should be specified before -fplugin-arg-stackleak_plugin-disable in the command line

Maybe caused by commit

  a8b9eaddb9c0 ("gcc-plugins: Add STACKLEAK plugin for tracking the kernel stack")

I have used the kspp tree from next-20180726 for today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 111+ messages in thread
* linux-next: build failure after merge of the kspp tree
@ 2024-03-05  3:50 Stephen Rothwell
  2024-03-05  9:54 ` Kees Cook
  0 siblings, 1 reply; 111+ messages in thread
From: Stephen Rothwell @ 2024-03-05  3:50 UTC (permalink / raw)
  To: Kees Cook; +Cc: Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 3397 bytes --]

Hi all,

After merging the kspp tree, today's linux-next build (x86_64
allmodconfig) failed like this:

In file included from lib/string_kunit.c:8:
lib/string_kunit.c: In function 'test_strspn':
lib/string_kunit.c:176:25: error: format '%d' expects argument of type 'int', but argument 7 has type 'size_t' {aka 'long unsigned int'} [-Werror=format=]
  176 |                         "i:%d", i);
      |                         ^~~~~~  ~
      |                                 |
      |                                 size_t {aka long unsigned int}
include/kunit/test.h:597:37: note: in definition of macro '_KUNIT_FAILED'
  597 |                                     fmt,                                       \
      |                                     ^~~
include/kunit/test.h:722:9: note: in expansion of macro 'KUNIT_BASE_BINARY_ASSERTION'
  722 |         KUNIT_BASE_BINARY_ASSERTION(test,                                      \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:1253:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
 1253 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
lib/string_kunit.c:175:17: note: in expansion of macro 'KUNIT_ASSERT_EQ_MSG'
  175 |                 KUNIT_ASSERT_EQ_MSG(test, s->a, strspn(s->str, s->accept),
      |                 ^~~~~~~~~~~~~~~~~~~
lib/string_kunit.c:176:29: note: format string is defined here
  176 |                         "i:%d", i);
      |                            ~^
      |                             |
      |                             int
      |                            %ld
lib/string_kunit.c:178:25: error: format '%d' expects argument of type 'int', but argument 7 has type 'size_t' {aka 'long unsigned int'} [-Werror=format=]
  178 |                         "i:%d", i);
      |                         ^~~~~~  ~
      |                                 |
      |                                 size_t {aka long unsigned int}
include/kunit/test.h:597:37: note: in definition of macro '_KUNIT_FAILED'
  597 |                                     fmt,                                       \
      |                                     ^~~
include/kunit/test.h:722:9: note: in expansion of macro 'KUNIT_BASE_BINARY_ASSERTION'
  722 |         KUNIT_BASE_BINARY_ASSERTION(test,                                      \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:1253:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
 1253 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
lib/string_kunit.c:177:17: note: in expansion of macro 'KUNIT_ASSERT_EQ_MSG'
  177 |                 KUNIT_ASSERT_EQ_MSG(test, s->r, strcspn(s->str, s->reject),
      |                 ^~~~~~~~~~~~~~~~~~~
lib/string_kunit.c:178:29: note: format string is defined here
  178 |                         "i:%d", i);
      |                            ~^
      |                             |
      |                             int
      |                            %ld
cc1: all warnings being treated as errors

Caused by commit

  578914ebade8 ("string: Convert selftest to KUnit")

I have used the kspp tree from next-20240304 for today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 111+ messages in thread
* linux-next: build failure after merge of the kspp tree
@ 2023-09-14  1:50 Stephen Rothwell
  2023-09-14  3:07 ` Kees Cook
  0 siblings, 1 reply; 111+ messages in thread
From: Stephen Rothwell @ 2023-09-14  1:50 UTC (permalink / raw)
  To: Kees Cook
  Cc: Alexey Dobriyan, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 552 bytes --]

Hi all,

After merging the kspp tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

In file included from security/selinux/include/initial_sid_to_string.h:3,
                 from scripts/selinux/genheaders/genheaders.c:19:
include/uapi/linux/stddef.h:59:2: error: #endif without #if
   59 | #endif /* _UAPI_LINUX_STDDEF_H */
      |  ^~~~~

Caused by commit

  366c47121bf6 ("uapi: stddef.h: Fix header guard location")

I have used the kspp tree from next-20230913 for today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 111+ messages in thread
* linux-next: build failure after merge of the kspp tree
@ 2023-01-05  2:25 Stephen Rothwell
  2023-01-05  3:22 ` Kees Cook
  0 siblings, 1 reply; 111+ messages in thread
From: Stephen Rothwell @ 2023-01-05  2:25 UTC (permalink / raw)
  To: Kees Cook; +Cc: Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 2340 bytes --]

Hi all,

After merging the kspp tree, today's linux-next build (x86_64
allmodconfig) failed like this:

In file included from include/linux/string.h:253,
                 from include/linux/bitmap.h:11,
                 from include/linux/cpumask.h:12,
                 from arch/x86/include/asm/paravirt.h:17,
                 from arch/x86/include/asm/cpuid.h:62,
                 from arch/x86/include/asm/processor.h:19,
                 from arch/x86/include/asm/cpufeature.h:5,
                 from arch/x86/include/asm/thread_info.h:53,
                 from include/linux/thread_info.h:60,
                 from arch/x86/include/asm/preempt.h:9,
                 from include/linux/preempt.h:78,
                 from include/linux/percpu.h:6,
                 from include/linux/prandom.h:13,
                 from include/linux/random.h:153,
                 from include/linux/net.h:18,
                 from net/rxrpc/output.c:10:
In function 'fortify_memcpy_chk',
    inlined from 'rxrpc_fill_out_ack' at net/rxrpc/output.c:158:2:
include/linux/fortify-string.h:520:25: error: call to '__write_overflow_field' declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror=attribute-warning]
  520 |                         __write_overflow_field(p_size_field, size);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Exposed by commit

  f7cd05c76c70 ("fortify: Use __builtin_dynamic_object_size() when available")

I applied the following patch.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 5 Jan 2023 12:56:39 +1100
Subject: [PATCH] rxrpc: replace zero-lenth array with DECLARE_FLEX_ARRAY() helper

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 net/rxrpc/ar-internal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h
index 18092526d3c8..c7186484fc5f 100644
--- a/net/rxrpc/ar-internal.h
+++ b/net/rxrpc/ar-internal.h
@@ -783,7 +783,7 @@ struct rxrpc_txbuf {
 			u8	data[RXRPC_JUMBO_DATALEN]; /* Data packet */
 			struct {
 				struct rxrpc_ackpacket ack;
-				u8 acks[0];
+				DECLARE_FLEX_ARRAY(u8, acks);
 			};
 		};
 	} __aligned(64);
-- 
2.35.1

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 111+ messages in thread
* linux-next: build failure after merge of the kspp tree
@ 2022-12-01  3:07 Stephen Rothwell
  2022-12-01 16:31 ` Kees Cook
  0 siblings, 1 reply; 111+ messages in thread
From: Stephen Rothwell @ 2022-12-01  3:07 UTC (permalink / raw)
  To: Kees Cook
  Cc: Linux Kernel Mailing List, Linux Next Mailing List, Luis Chamberlain

[-- Attachment #1: Type: text/plain, Size: 1295 bytes --]

Hi all,

After merging the kspp tree, today's linux-next build (x86_64
allmodconfig) failed like this:

kernel/panic.c: In function 'check_panic_on_warn':
kernel/panic.c:238:25: error: format '%s' expects argument of type 'char *', but argument 2 has type 'unsigned int' [-Werror=format=]
  238 |                 panic("%s: system warned too often (kernel.warn_limit is %d)",
      |                        ~^
      |                         |
      |                         char *
      |                        %d
  239 |                       warn_limit);
      |                       ~~~~~~~~~~
      |                       |
      |                       unsigned int
kernel/panic.c:238:75: error: format '%d' expects a matching 'int' argument [-Werror=format=]
  238 |                 panic("%s: system warned too often (kernel.warn_limit is %d)",
      |                                                                          ~^
      |                                                                           |
      |                                                                           int

Caused by commit

  480e0e1d4817 ("panic: Introduce warn_limit")

I have used the kspp tree from next-20221130 for today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 111+ messages in thread
* linux-next: build failure after merge of the kspp tree
@ 2022-07-28 10:55 Stephen Rothwell
  2022-07-28 15:12 ` Matthias Kaehlcke
  0 siblings, 1 reply; 111+ messages in thread
From: Stephen Rothwell @ 2022-07-28 10:55 UTC (permalink / raw)
  To: Kees Cook, Alasdair G Kergon, Mike Snitzer
  Cc: Matthias Kaehlcke, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 2603 bytes --]

Hi all,

After merging the kspp tree, today's linux-next build (powerpc
allyesconfig) failed like this:

drivers/md/dm-verity-loadpin.c: In function 'dm_verity_loadpin_is_bdev_trusted':
drivers/md/dm-verity-loadpin.c:61:13: error: implicit declaration of function 'dm_table_get_num_targets'; did you mean 'dm_table_resume_targets'? [-Werror=implicit-function-declaration]
   61 |         if (dm_table_get_num_targets(table) != 1)
      |             ^~~~~~~~~~~~~~~~~~~~~~~~
      |             dm_table_resume_targets
drivers/md/dm-verity-loadpin.c:64:14: error: implicit declaration of function 'dm_table_get_target'; did you mean 'dm_table_add_target'? [-Werror=implicit-function-declaration]
   64 |         ti = dm_table_get_target(table, 0);
      |              ^~~~~~~~~~~~~~~~~~~
      |              dm_table_add_target
drivers/md/dm-verity-loadpin.c:64:12: error: assignment to 'struct dm_target *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
   64 |         ti = dm_table_get_target(table, 0);
      |            ^

Caused by commit

  b6c1c5745ccc ("dm: Add verity helpers for LoadPin")

interacting with commits

  2aec377a2925 ("dm table: remove dm_table_get_num_targets() wrapper")
  564b5c5476cd ("dm table: audit all dm_table_get_target() callers")

from the device-mapper tree.

I have applied the following merge fix patch for today.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 28 Jul 2022 20:28:41 +1000
Subject: [PATCH] fix up for "dm: Add verity helpers for LoadPin"

interacting with

  2aec377a2925 ("dm table: remove dm_table_get_num_targets() wrapper")
  564b5c5476cd ("dm table: audit all dm_table_get_target() callers")

from the device-mapper tree.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/md/dm-verity-loadpin.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/md/dm-verity-loadpin.c b/drivers/md/dm-verity-loadpin.c
index 10c18bc1652c..387ec43aef72 100644
--- a/drivers/md/dm-verity-loadpin.c
+++ b/drivers/md/dm-verity-loadpin.c
@@ -5,6 +5,7 @@
 #include <linux/dm-verity-loadpin.h>
 
 #include "dm.h"
+#include "dm-core.h"
 #include "dm-verity.h"
 
 #define DM_MSG_PREFIX	"verity-loadpin"
@@ -58,7 +59,7 @@ bool dm_verity_loadpin_is_bdev_trusted(struct block_device *bdev)
 
 	table = dm_get_live_table(md, &srcu_idx);
 
-	if (dm_table_get_num_targets(table) != 1)
+	if (table->num_targets != 1)
 		goto out;
 
 	ti = dm_table_get_target(table, 0);
-- 
2.35.1

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 111+ messages in thread
* linux-next: build failure after merge of the kspp tree
@ 2022-05-05  7:40 Stephen Rothwell
  2022-05-07 17:18 ` Kees Cook
  0 siblings, 1 reply; 111+ messages in thread
From: Stephen Rothwell @ 2022-05-05  7:40 UTC (permalink / raw)
  To: Kees Cook
  Cc: Mark Rutland, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1932 bytes --]

Hi all,

After merging the kspp tree, today's linux-next build (x86_64
allmodconfig) failed like this:

drivers/misc/lkdtm/stackleak.c: In function 'check_stackleak_irqoff':
drivers/misc/lkdtm/stackleak.c:30:46: error: implicit declaration of function 'stackleak_task_low_bound' [-Werror=implicit-function-declaration]
   30 |         const unsigned long task_stack_low = stackleak_task_low_bound(current);
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/misc/lkdtm/stackleak.c:31:47: error: implicit declaration of function 'stackleak_task_high_bound'; did you mean 'stackleak_task_init'? [-Werror=implicit-function-declaration]
   31 |         const unsigned long task_stack_high = stackleak_task_high_bound(current);
      |                                               ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                                               stackleak_task_init
drivers/misc/lkdtm/stackleak.c:33:50: error: 'struct task_struct' has no member named 'lowest_stack'; did you mean 'ret_stack'?
   33 |         const unsigned long lowest_sp = current->lowest_stack;
      |                                                  ^~~~~~~~~~~~
      |                                                  ret_stack
drivers/misc/lkdtm/stackleak.c:74:23: error: implicit declaration of function 'stackleak_find_top_of_poison' [-Werror=implicit-function-declaration]
   74 |         poison_high = stackleak_find_top_of_poison(task_stack_low, untracked_high);
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Caused by commit

  f4cfacd92972 ("lkdtm/stackleak: rework boundary management")

or maybe commit

  cbe7edb47d3c ("stackleak: rework stack low bound handling")

CONFIG_GCC_PLUGIN_STACKLEAK is not set for this build.

I have used the kspp tree from next-20220504 for today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 111+ messages in thread
* linux-next: build failure after merge of the kspp tree
@ 2022-03-16  7:32 Stephen Rothwell
  2022-03-17  1:01 ` Linus Walleij
  0 siblings, 1 reply; 111+ messages in thread
From: Stephen Rothwell @ 2022-03-16  7:32 UTC (permalink / raw)
  To: Kees Cook
  Cc: Jonathan Neuschäfer, Linus Walleij, Tomer Maimon,
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 2882 bytes --]

Hi all,

After merging the kspp tree, today's linux-next build (x86_64
allmodconfig) failed like this:

In file included from include/linux/bitmap.h:9,
                 from include/linux/cpumask.h:12,
                 from arch/x86/include/asm/paravirt.h:17,
                 from arch/x86/include/asm/irqflags.h:63,
                 from include/linux/irqflags.h:16,
                 from include/linux/rcupdate.h:26,
                 from include/linux/rculist.h:11,
                 from include/linux/pid.h:5,
                 from include/linux/sched.h:14,
                 from include/linux/ratelimit.h:6,
                 from include/linux/dev_printk.h:16,
                 from include/linux/device.h:15,
                 from drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c:5:
drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c: In function 'npcmgpio_irq_handler':
include/linux/find.h:40:23: error: array subscript 'long unsigned int[0]' is partly outside array bounds of 'u32[1]' {aka 'unsigned int[1]'} [-Werror=array-bounds]
   40 |                 val = *addr & GENMASK(size - 1, offset);
      |                       ^~~~~
drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c:219:13: note: while referencing 'sts'
  219 |         u32 sts, en, bit;
      |             ^~~

Caused by commit

  3b588e43ee5c ("pinctrl: nuvoton: add NPCM7xx pinctrl and GPIO driver")

probably exposed by commit

  a1d1e0e3d80a ("pinctrl: nuvoton: Add driver for WPCM450")

from the pinctrl tree and enabling -Werror=array-bounds.

I have applied the following hack patch for today.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 16 Mar 2022 18:12:14 +1100
Subject: [PATCH] fixup for "pinctrl: nuvoton: add NPCM7xx pinctrl and GPIO driver"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
index 41136f63014a..fddcb7d6bdf4 100644
--- a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
+++ b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
@@ -216,7 +216,8 @@ static void npcmgpio_irq_handler(struct irq_desc *desc)
 	struct gpio_chip *gc;
 	struct irq_chip *chip;
 	struct npcm7xx_gpio *bank;
-	u32 sts, en, bit;
+	unsigned long sts, bit;
+	u32 en;
 
 	gc = irq_desc_get_handler_data(desc);
 	bank = gpiochip_get_data(gc);
@@ -225,7 +226,7 @@ static void npcmgpio_irq_handler(struct irq_desc *desc)
 	chained_irq_enter(chip, desc);
 	sts = ioread32(bank->base + NPCM7XX_GP_N_EVST);
 	en  = ioread32(bank->base + NPCM7XX_GP_N_EVEN);
-	dev_dbg(bank->gc.parent, "==> got irq sts %.8x %.8x\n", sts,
+	dev_dbg(bank->gc.parent, "==> got irq sts %.8lx %.8x\n", sts,
 		en);
 
 	sts &= en;
-- 
2.34.1

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 111+ messages in thread
* linux-next: build failure after merge of the kspp tree
@ 2022-03-09 10:10 Stephen Rothwell
  2022-03-09 16:52 ` Kees Cook
  0 siblings, 1 reply; 111+ messages in thread
From: Stephen Rothwell @ 2022-03-09 10:10 UTC (permalink / raw)
  To: Kees Cook, Hans de Goede, Mark Gross
  Cc: Mark Pearson, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1071 bytes --]

Hi all,

After merging the kspp tree, today's linux-next build (x86_64
allmodconfig) failed like this:

In file included from include/linux/bitops.h:33,
                 from include/linux/kernel.h:22,
                 from drivers/platform/x86/thinkpad_acpi.c:37:
drivers/platform/x86/thinkpad_acpi.c: In function 'tpacpi_dytc_profile_init':
arch/x86/include/asm/bitops.h:207:22: error: array subscript 'long unsigned int[0]' is partly outside array bounds of 'int[1]' [-Werror=array-bounds]
  207 |                 (addr[nr >> _BITOPS_LONG_SHIFT])) != 0;
      |                 ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/platform/x86/thinkpad_acpi.c:10385:18: note: while referencing 'output'
10385 |         int err, output;
      |                  ^~~~~~

Actually the test_bit() in line 10409.

Caused by commit

  e1c21608e3cf ("platform/x86: thinkpad_acpi: Add PSC mode support")

from the drivers-x86 tree interacting with the enablement of
-Werror=array-bounds.

I have reverted that commit for today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 111+ messages in thread
* linux-next: build failure after merge of the kspp tree
@ 2022-02-28 22:27 Stephen Rothwell
  2022-02-28 23:02 ` Kees Cook
  0 siblings, 1 reply; 111+ messages in thread
From: Stephen Rothwell @ 2022-02-28 22:27 UTC (permalink / raw)
  To: Kees Cook; +Cc: Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1674 bytes --]

Hi all,

After merging the kspp tree, today's linux-next build (x86_64
allmodconfig) failed like this:

drivers/gpu/drm/drm_dp_helper.c: In function 'drm_dp_pcon_dsc_bpp_incr':
drivers/gpu/drm/drm_dp_helper.c:3130:28: error: array subscript 12 is outside array bounds of 'const u8[12]' {aka 'const unsigned char[12]'} [-Werror=array-bounds]
 3130 |         buf = pcon_dsc_dpcd[DP_PCON_DSC_BPP_INCR - DP_PCON_DSC_ENCODER];
      |               ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/drm_dp_helper.c:3126:39: note: while referencing 'pcon_dsc_dpcd'
 3126 | int drm_dp_pcon_dsc_bpp_incr(const u8 pcon_dsc_dpcd[DP_PCON_DSC_ENCODER_CAP_SIZE])
      |                              ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/drm_dp_helper.c: In function 'drm_dp_get_adjust_request_post_cursor':
drivers/gpu/drm/drm_dp_helper.c:59:27: error: array subscript 10 is outside array bounds of 'const u8[6]' {aka 'const unsigned char[6]'} [-Werror=array-bounds]
   59 |         return link_status[r - DP_LANE0_1_STATUS];
      |                ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/drm_dp_helper.c:147:51: note: while referencing 'link_status'
  147 | u8 drm_dp_get_adjust_request_post_cursor(const u8 link_status[DP_LINK_STATUS_SIZE],
      |                                          ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

I can't see what in the kspp tree suddenly brought this on, so I have
used the kspp tree from next-20220228 for today.

In case it matters: x86_64-linux-gnu-gcc (Debian 11.2.0-9) 11.2.0
-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 111+ messages in thread
* linux-next: build failure after merge of the kspp tree
@ 2022-01-30 23:09 Stephen Rothwell
  2022-01-31  4:04 ` Kees Cook
  0 siblings, 1 reply; 111+ messages in thread
From: Stephen Rothwell @ 2022-01-30 23:09 UTC (permalink / raw)
  To: Kees Cook
  Cc: Leon Romanovsky, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 2982 bytes --]

Hi all,

After merging the kspp tree, today's linux-next build (x86_64
allmodconfig) failed like this:

In file included from include/linux/string.h:253,
                 from include/linux/bitmap.h:11,
                 from include/linux/cpumask.h:12,
                 from arch/x86/include/asm/cpumask.h:5,
                 from arch/x86/include/asm/msr.h:11,
                 from arch/x86/include/asm/processor.h:22,
                 from arch/x86/include/asm/timex.h:5,
                 from include/linux/timex.h:65,
                 from include/linux/time32.h:13,
                 from include/linux/time.h:60,
                 from include/linux/skbuff.h:15,
                 from include/linux/tcp.h:17,
                 from drivers/net/ethernet/mellanox/mlx5/core/en_tx.c:33:
In function 'fortify_memcpy_chk',
    inlined from 'mlx5e_insert_vlan' at drivers/net/ethernet/mellanox/mlx5/core/en_tx.c:211:2,
    inlined from 'mlx5e_sq_xmit_wqe' at drivers/net/ethernet/mellanox/mlx5/core/en_tx.c:496:4:
include/linux/fortify-string.h:325:25: error: call to '__write_overflow_field' declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror=attribute-warning]
  325 |                         __write_overflow_field(p_size_field, size);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/string.h:253,
                 from include/linux/bitmap.h:11,
                 from include/linux/cpumask.h:12,
                 from arch/x86/include/asm/cpumask.h:5,
                 from arch/x86/include/asm/msr.h:11,
                 from arch/x86/include/asm/processor.h:22,
                 from arch/x86/include/asm/timex.h:5,
                 from include/linux/timex.h:65,
                 from include/linux/time32.h:13,
                 from include/linux/time.h:60,
                 from include/linux/ktime.h:24,
                 from include/linux/timer.h:6,
                 from include/linux/netdevice.h:24,
                 from include/trace/events/xdp.h:8,
                 from include/linux/bpf_trace.h:5,
                 from drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c:33:
In function 'fortify_memcpy_chk',
    inlined from 'mlx5e_xmit_xdp_frame' at drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c:344:3:
include/linux/fortify-string.h:325:25: error: call to '__write_overflow_field' declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror=attribute-warning]
  325 |                         __write_overflow_field(p_size_field, size);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Caused by various commits in the mlx5 driver interacting with the new
memcpy checking.

I have disabled CONFIG_MLX5_CORE_EN for today while this gets sorted
out properly.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 111+ messages in thread
* linux-next: build failure after merge of the kspp tree
@ 2022-01-30 22:34 Stephen Rothwell
  2022-01-30 23:24 ` Herbert Xu
  0 siblings, 1 reply; 111+ messages in thread
From: Stephen Rothwell @ 2022-01-30 22:34 UTC (permalink / raw)
  To: Kees Cook
  Cc: Gustavo A. R. Silva, Herbert Xu, Shijith Thotton, Srujana Challa,
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 3149 bytes --]

Hi all,

After merging the kspp tree, today's linux-next build (x86_64
allmodconfig) failed like this:

In file included from include/linux/printk.h:555,
                 from include/asm-generic/bug.h:22,
                 from arch/x86/include/asm/bug.h:84,
                 from include/linux/bug.h:5,
                 from include/linux/mmdebug.h:5,
                 from include/linux/gfp.h:5,
                 from include/linux/firmware.h:7,
                 from drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c:5:
drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c: In function 'otx2_cpt_print_uc_dbg_info':
include/linux/dynamic_debug.h:162:33: error: array subscript 4 is above array bounds of 'u32[4]' {aka 'unsigned int[4]'} [-Werror=array-bounds]
  162 |         _dynamic_func_call(fmt, __dynamic_pr_debug,             \
      |                                 ^
include/linux/dynamic_debug.h:134:17: note: in definition of macro '__dynamic_func_call'
  134 |                 func(&id, ##__VA_ARGS__);               \
      |                 ^~~~
include/linux/dynamic_debug.h:162:9: note: in expansion of macro '_dynamic_func_call'
  162 |         _dynamic_func_call(fmt, __dynamic_pr_debug,             \
      |         ^~~~~~~~~~~~~~~~~~
include/linux/printk.h:570:9: note: in expansion of macro 'dynamic_pr_debug'
  570 |         dynamic_pr_debug(fmt, ##__VA_ARGS__)
      |         ^~~~~~~~~~~~~~~~
drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c:1798:41: note: in expansion of macro 'pr_debug'
 1798 |                                         pr_debug("Mask: %8.8x %8.8x %8.8x %8.8x %8.8x",
      |                                         ^~~~~~~~
drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c:1756:13: note: while referencing 'mask'
 1756 |         u32 mask[4];
      |             ^~~~

Caused by commit

  d9d7749773e8 ("crypto: octeontx2 - add apis for custom engine groups")

from Linus' tree interacting with commit

  a8712a32665f ("Makefile: Enable -Warray-bounds")

from the kspp tree.

I have applied the following patch for now.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 31 Jan 2022 09:28:12 +1100
Subject: [PATCH] fix up for otx2_cptpf_ucode.c out of bound reference

Fixes: d9d7749773e8 ("crypto: octeontx2 - add apis for custom engine groups")
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c b/drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c
index 4c8ebdf671ca..e990405c7f33 100644
--- a/drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c
+++ b/drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c
@@ -1753,7 +1753,7 @@ void otx2_cpt_print_uc_dbg_info(struct otx2_cptpf_dev *cptpf)
 	char engs_info[2 * OTX2_CPT_NAME_LENGTH];
 	struct otx2_cpt_eng_grp_info *grp;
 	struct otx2_cpt_engs_rsvd *engs;
-	u32 mask[4];
+	u32 mask[5];
 	int i, j;
 
 	pr_debug("Engine groups global info");
-- 
2.34.1

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 111+ messages in thread
* linux-next: build failure after merge of the kspp tree
@ 2022-01-25  3:50 Stephen Rothwell
  2022-01-25  7:44 ` Kees Cook
  0 siblings, 1 reply; 111+ messages in thread
From: Stephen Rothwell @ 2022-01-25  3:50 UTC (permalink / raw)
  To: Kees Cook
  Cc: Masami Hiramatsu, Steven Rostedt (VMware),
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1405 bytes --]

Hi all,

After merging the kspp tree, today's linux-next build (powerpc
allmodconfig) failed like this:

In file included from include/linux/string.h:253,
                 from include/linux/bitmap.h:11,
                 from include/linux/cpumask.h:12,
                 from include/linux/mm_types_task.h:14,
                 from include/linux/mm_types.h:5,
                 from include/linux/buildid.h:5,
                 from include/linux/module.h:14,
                 from samples/trace_events/trace-events-sample.c:2:
In function '__fortify_strcpy',
    inlined from 'perf_trace_foo_rel_loc' at samples/trace_events/./trace-events-sample.h:519:1:
include/linux/fortify-string.h:47:33: error: '__builtin_strcpy' offset 12 is out of the bounds [0, 4] [-Werror=array-bounds]
   47 | #define __underlying_strcpy     __builtin_strcpy
      |                                 ^
include/linux/fortify-string.h:445:24: note: in expansion of macro '__underlying_strcpy'
  445 |                 return __underlying_strcpy(p, q);
      |                        ^~~~~~~~~~~~~~~~~~~

Exposed by (probably) commit

  602670289b69 ("fortify: Detect struct member overflows in memcpy() at compile-time")

Introduced by commit

  b466b1332164 ("samples/trace_event: Add '__rel_loc' using sample event")

I have reverted that latter commit for today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 111+ messages in thread
* linux-next: build failure after merge of the kspp tree
@ 2022-01-25  3:24 Stephen Rothwell
  2022-01-25  3:43 ` Kees Cook
  0 siblings, 1 reply; 111+ messages in thread
From: Stephen Rothwell @ 2022-01-25  3:24 UTC (permalink / raw)
  To: Kees Cook
  Cc: Gustavo A. R. Silva, Bryant G. Ly, Michael Cyr,
	Nicholas Bellinger, Steven Royer, Tyrel Datwyler,
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 3834 bytes --]

Hi all,

After merging the kspp tree, today's linux-next build (powerpc
allyesconfig) failed like this:


drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c: In function 'ibmvscsis_send_messages':
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c:1934:44: error: array subscript 'struct viosrp_crq[0]' is partly outside array bounds of 'u64[1]' {aka 'long long unsigned int[1]'} [-Werror=array-bounds]
 1934 |                                         crq->valid = VALID_CMD_RESP_EL;
      |                                            ^~
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c:1875:13: note: while referencing 'msg_hi'
 1875 |         u64 msg_hi = 0;
      |             ^~~~~~
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c:1935:44: error: array subscript 'struct viosrp_crq[0]' is partly outside array bounds of 'u64[1]' {aka 'long long unsigned int[1]'} [-Werror=array-bounds]
 1935 |                                         crq->format = cmd->rsp.format;
      |                                            ^~
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c:1875:13: note: while referencing 'msg_hi'
 1875 |         u64 msg_hi = 0;
      |             ^~~~~~
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c:1938:52: error: array subscript 'struct viosrp_crq[0]' is partly outside array bounds of 'u64[1]' {aka 'long long unsigned int[1]'} [-Werror=array-bounds]
 1938 |                                                 crq->status = VIOSRP_ADAPTER_FAIL;
      |                                                    ^~
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c:1875:13: note: while referencing 'msg_hi'
 1875 |         u64 msg_hi = 0;
      |             ^~~~~~
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c:1940:44: error: array subscript 'struct viosrp_crq[0]' is partly outside array bounds of 'u64[1]' {aka 'long long unsigned int[1]'} [-Werror=array-bounds]
 1940 |                                         crq->IU_length = cpu_to_be16(cmd->rsp.len);
      |                                            ^~
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c:1875:13: note: while referencing 'msg_hi'
 1875 |         u64 msg_hi = 0;
      |             ^~~~~~

Exposed by commit

  4ba545781e20 ("Makefile: Enable -Warray-bounds")

Probably introduced by commit

  88a678bbc34c ("ibmvscsis: Initial commit of IBM VSCSI Tgt Driver")

I applied the following hack for now:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 25 Jan 2022 14:18:36 +1100
Subject: [PATCH] scsi: hack for building with -Warray-bounds

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
index 61f06f6885a5..89fcf98c61c3 100644
--- a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
+++ b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
@@ -1872,11 +1872,11 @@ static void srp_snd_msg_failed(struct scsi_info *vscsi, long rc)
  */
 static void ibmvscsis_send_messages(struct scsi_info *vscsi)
 {
-	u64 msg_hi = 0;
+	u64 msg_hi[2] = { };
 	/* note do not attempt to access the IU_data_ptr with this pointer
 	 * it is not valid
 	 */
-	struct viosrp_crq *crq = (struct viosrp_crq *)&msg_hi;
+	struct viosrp_crq *crq = (struct viosrp_crq *)msg_hi;
 	struct ibmvscsis_cmd *cmd, *nxt;
 	long rc = ADAPT_SUCCESS;
 	bool retry = false;
@@ -1940,7 +1940,7 @@ static void ibmvscsis_send_messages(struct scsi_info *vscsi)
 					crq->IU_length = cpu_to_be16(cmd->rsp.len);
 
 					rc = h_send_crq(vscsi->dma_dev->unit_address,
-							be64_to_cpu(msg_hi),
+							be64_to_cpu(msg_hi[0]),
 							be64_to_cpu(cmd->rsp.tag));
 
 					dev_dbg(&vscsi->dev, "send_messages: cmd %p, tag 0x%llx, rc %ld\n",
-- 
2.34.1

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 111+ messages in thread
* linux-next: build failure after merge of the kspp tree
@ 2022-01-25  2:55 Stephen Rothwell
  2022-01-25  3:02 ` Stephen Rothwell
  0 siblings, 1 reply; 111+ messages in thread
From: Stephen Rothwell @ 2022-01-25  2:55 UTC (permalink / raw)
  To: Kees Cook
  Cc: Gustavo A. R. Silva, Linux Kernel Mailing List,
	Linux Next Mailing List, Edmund Dea, Maarten Lankhorst,
	Anitha Chrisanthus, Sam Ravnborg, Daniel Vetter,
	Thomas Zimmermann

[-- Attachment #1: Type: text/plain, Size: 2466 bytes --]

Hi all,

After merging the kspp tree, today's linux-next build (powerpc
allyesconfig) failed like this:

drivers/gpu/drm/kmb/kmb_plane.c: In function 'kmb_plane_atomic_disable':
drivers/gpu/drm/kmb/kmb_plane.c:165:34: error: array subscript 3 is above array bounds of 'struct layer_status[2]' [-Werror=array-bounds]
  165 |                 kmb->plane_status[plane_id].ctrl = LCD_CTRL_GL2_ENABLE;
      |                 ~~~~~~~~~~~~~~~~~^~~~~~~~~~
In file included from drivers/gpu/drm/kmb/kmb_plane.c:17:
drivers/gpu/drm/kmb/kmb_drv.h:61:41: note: while referencing 'plane_status'
   61 |         struct layer_status             plane_status[KMB_MAX_PLANES];
      |                                         ^~~~~~~~~~~~
drivers/gpu/drm/kmb/kmb_plane.c:162:34: error: array subscript 2 is above array bounds of 'struct layer_status[2]' [-Werror=array-bounds]
  162 |                 kmb->plane_status[plane_id].ctrl = LCD_CTRL_GL1_ENABLE;
      |                 ~~~~~~~~~~~~~~~~~^~~~~~~~~~
In file included from drivers/gpu/drm/kmb/kmb_plane.c:17:
drivers/gpu/drm/kmb/kmb_drv.h:61:41: note: while referencing 'plane_status'
   61 |         struct layer_status             plane_status[KMB_MAX_PLANES];
      |                                         ^~~~~~~~~~~~

Exposed by commit

  4ba545781e20 ("Makefile: Enable -Warray-bounds")

Originally introduced by commmit

  7f7b96a8a0a1 ("drm/kmb: Add support for KeemBay Display")

Maybe should have been fixed by

  c026565fe9be ("drm/kmb: Enable alpha blended second plane")

I have applied the following hack for now.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 25 Jan 2022 13:45:26 +1100
Subject: [PATCH] hack for building with -Warray-bounds

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/gpu/drm/kmb/kmb_plane.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/kmb/kmb_plane.c b/drivers/gpu/drm/kmb/kmb_plane.c
index 00404ba4126d..c12e900c6c93 100644
--- a/drivers/gpu/drm/kmb/kmb_plane.c
+++ b/drivers/gpu/drm/kmb/kmb_plane.c
@@ -161,9 +161,11 @@ static void kmb_plane_atomic_disable(struct drm_plane *plane,
 	case LAYER_2:
 		kmb->plane_status[plane_id].ctrl = LCD_CTRL_GL1_ENABLE;
 		break;
+#if 0
 	case LAYER_3:
 		kmb->plane_status[plane_id].ctrl = LCD_CTRL_GL2_ENABLE;
 		break;
+#endif
 	}
 
 	kmb->plane_status[plane_id].disable = true;
-- 
2.34.1

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 111+ messages in thread
* linux-next: build failure after merge of the kspp tree
@ 2022-01-25  0:57 Stephen Rothwell
  2022-01-25  3:35 ` Kees Cook
  2022-01-25 14:07 ` David Sterba
  0 siblings, 2 replies; 111+ messages in thread
From: Stephen Rothwell @ 2022-01-25  0:57 UTC (permalink / raw)
  To: Kees Cook, David Sterba
  Cc: David Sterba, Omar Sandoval, Linux Kernel Mailing List,
	Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 3283 bytes --]

Hi all,

After merging the kspp tree, today's linux-next build (x86_64
allmodconfig) failed like this:

In file included from include/linux/string.h:253,
                 from include/linux/bitmap.h:11,
                 from include/linux/cpumask.h:12,
                 from arch/x86/include/asm/cpumask.h:5,
                 from arch/x86/include/asm/msr.h:11,
                 from arch/x86/include/asm/processor.h:22,
                 from arch/x86/include/asm/cpufeature.h:5,
                 from arch/x86/include/asm/thread_info.h:53,
                 from include/linux/thread_info.h:60,
                 from arch/x86/include/asm/preempt.h:7,
                 from include/linux/preempt.h:78,
                 from include/linux/spinlock.h:55,
                 from include/linux/wait.h:9,
                 from include/linux/mempool.h:8,
                 from include/linux/bio.h:8,
                 from fs/btrfs/ioctl.c:7:
In function 'fortify_memcpy_chk',
    inlined from 'btrfs_ioctl_encoded_write' at fs/btrfs/ioctl.c:5082:3:
include/linux/fortify-string.h:316:25: error: call to '__write_overflow_field' declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror=attribute-warning]
  316 |                         __write_overflow_field(p_size_field, size);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/fortify-string.h:324:25: error: call to '__read_overflow2_field' declared with attribute warning: detected read beyond size of field (2nd parameter); maybe use struct_group()? [-Werror=attribute-warning]
  324 |                         __read_overflow2_field(q_size_field, size);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Caused by commit

  602670289b69 ("fortify: Detect struct member overflows in memcpy() at compile-time")

interacting with commit

  504e1ebb6316 ("btrfs: add BTRFS_IOC_ENCODED_WRITE")

from the btrfs tree.

I applied the following hack:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 25 Jan 2022 11:47:17 +1100
Subject: [PATCH] fix up for "btrfs: add BTRFS_IOC_ENCODED_WRITE"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 fs/btrfs/ioctl.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 73ad918a05a9..d34620034f8e 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -5079,9 +5079,14 @@ static int btrfs_ioctl_encoded_write(struct file *file, void __user *argp,
 		}
 		args.iov = compat_ptr(args32.iov);
 		args.iovcnt = args32.iovcnt;
-		memcpy(&args.offset, &args32.offset,
-		       sizeof(args) -
-		       offsetof(struct btrfs_ioctl_encoded_io_args, offset));
+		args.offset = args32.offset;
+		args.flags = args32.flags;
+		args.len = args32.len;
+		args.unencoded_len = args32.unencoded_len;
+		args.unencoded_offset = args32.unencoded_offset;
+		args.compression = args32.compression;
+		args.encryption = args32.encryption;
+		memcpy(args.reserved, args32.reserved, sizeof(args.reserved));
 #else
 		return -ENOTTY;
 #endif
-- 
2.34.1

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 111+ messages in thread
* linux-next: build failure after merge of the kspp tree
@ 2021-09-16  3:34 Stephen Rothwell
  2021-09-16  6:00 ` Kees Cook
  0 siblings, 1 reply; 111+ messages in thread
From: Stephen Rothwell @ 2021-09-16  3:34 UTC (permalink / raw)
  To: Kees Cook; +Cc: Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 637 bytes --]

Hi all,

After merging the kspp tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

In file included from include/linux/compiler_types.h:85,
                 from <command-line>:
include/linux/compiler-gcc.h:44: warning: "__compiletime_warning" redefined
   44 | #define __compiletime_warning(message) __attribute__((__warning__(message)))
      | 

And many more.

Caused by commit

  0fc9374deb67 ("compiler_types.h: Remove __compiletime_object_size()")

Something went badly wrong in the rebase :-(

I have used the kspp tree from next-20210916 for today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 111+ messages in thread
* linux-next: build failure after merge of the kspp tree
@ 2021-08-26  7:52 Stephen Rothwell
  2021-08-26 15:38 ` Kees Cook
  0 siblings, 1 reply; 111+ messages in thread
From: Stephen Rothwell @ 2021-08-26  7:52 UTC (permalink / raw)
  To: Kees Cook; +Cc: Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 802 bytes --]

Hi all,

After merging the kspp tree, today's linux-next build (x86_64
allmodconfig) failed like this:

In file included from ./usr/include/linux/posix_types.h:5,
                 from ./usr/include/linux/types.h:9,
                 from ./usr/include/rdma/rdma_user_rxe.h:37,
                 from <command-line>:32:
./usr/include/rdma/rdma_user_rxe.h:134:24: error: unknown type name 'u8'
  134 |   __DECLARE_FLEX_ARRAY(u8, inline_data);
      |                        ^~
./usr/include/linux/stddef.h:42:3: note: in definition of macro '__DECLARE_FLEX_ARRAY'
   42 |   TYPE NAME[]; \
      |   ^~~~

Caused by commit

  a908f2e5a6d0 ("treewide: Replace open-coded flex arrays in unions")

I have used the kspp tree from next-20210825 for today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 111+ messages in thread
* linux-next: build failure after merge of the kspp tree
@ 2020-06-23  3:51 Stephen Rothwell
  2020-06-23  3:56 ` David Miller
  0 siblings, 1 reply; 111+ messages in thread
From: Stephen Rothwell @ 2020-06-23  3:51 UTC (permalink / raw)
  To: Kees Cook, David Miller, Networking
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Parav Pandit

[-- Attachment #1: Type: text/plain, Size: 1949 bytes --]

Hi all,

After merging the kspp tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

net/core/devlink.c: In function 'devlink_nl_port_function_attrs_put':
net/core/devlink.c:586:3: warning: parameter names (without types) in function declaration
  586 |   int uninitialized_var(hw_addr_len);
      |   ^~~
net/core/devlink.c:589:65: error: 'hw_addr_len' undeclared (first use in this function); did you mean 'hw_addr'?
  589 |   err = ops->port_function_hw_addr_get(devlink, port, hw_addr, &hw_addr_len, extack);
      |                                                                 ^~~~~~~~~~~
      |                                                                 hw_addr
net/core/devlink.c:589:65: note: each undeclared identifier is reported only once for each function it appears in

Caused by commit

  2e6d06799c15 ("compiler: Remove uninitialized_var() macro")

interacting with commit

  2a916ecc4056 ("net/devlink: Support querying hardware address of port function")

from the net-next tree.

I have added the following merge fix patch.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 23 Jun 2020 13:43:06 +1000
Subject: [PATCH] net/core/devlink.c: remove new uninitialized_var() usage

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 net/core/devlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/core/devlink.c b/net/core/devlink.c
index 455998a57671..6ae36808c152 100644
--- a/net/core/devlink.c
+++ b/net/core/devlink.c
@@ -583,7 +583,7 @@ devlink_nl_port_function_attrs_put(struct sk_buff *msg, struct devlink_port *por
 
 	ops = devlink->ops;
 	if (ops->port_function_hw_addr_get) {
-		int uninitialized_var(hw_addr_len);
+		int hw_addr_len;
 		u8 hw_addr[MAX_ADDR_LEN];
 
 		err = ops->port_function_hw_addr_get(devlink, port, hw_addr, &hw_addr_len, extack);
-- 
2.27.0

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 111+ messages in thread
* linux-next: build failure after merge of the kspp tree
@ 2020-06-21 13:48 Stephen Rothwell
  2020-06-21 15:36 ` Kees Cook
  0 siblings, 1 reply; 111+ messages in thread
From: Stephen Rothwell @ 2020-06-21 13:48 UTC (permalink / raw)
  To: Kees Cook
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Sargun Dhillon

[-- Attachment #1: Type: text/plain, Size: 967 bytes --]

Hi all,

After merging the kspp tree, today's linux-next build (x86_64 allnoconfig)
failed like this:

x86_64-linux-gnu-ld: fs/file.o: in function `__fd_install_received':
file.c:(.text+0x1010): undefined reference to `sock_from_file'
x86_64-linux-gnu-ld: file.c:(.text+0x104a): undefined reference to `sock_from_file'

Caused by commit

  d3868eea5cbc ("fs: Move __scm_install_fd() to __fd_install_received()")

I reverted these commits for today (from the breaking commit to the end
of the branch):

b29bb87cbb0a selftests/seccomp: Test SECCOMP_IOCTL_NOTIF_ADDFD
af35c3c6a9a5 seccomp: Introduce addfd ioctl to seccomp user notifier
50ca89d3a4fb fs: Expand __fd_install_received() to accept fd
f533d1758f02 pidfd: Replace open-coded partial fd_install_received()
4ab6bcc3ad3b fs: Add fd_install_received() wrapper for __fd_install_received()
d3868eea5cbc fs: Move __scm_install_fd() to __fd_install_received()

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 111+ messages in thread
* linux-next: build failure after merge of the kspp tree
@ 2017-11-08  5:23 Stephen Rothwell
  2017-11-08 23:43 ` Kees Cook
  0 siblings, 1 reply; 111+ messages in thread
From: Stephen Rothwell @ 2017-11-08  5:23 UTC (permalink / raw)
  To: Kees Cook, Darrick J. Wong, David Chinner, linux-xfs
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List,
	David Windsor, Christoph Hellwig

Hi Kees,

After merging the kspp tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

In file included from include/linux/compiler_types.h:58:0,
                 from include/uapi/linux/stddef.h:2,
                 from include/linux/stddef.h:5,
                 from include/uapi/linux/posix_types.h:5,
                 from include/uapi/linux/types.h:14,
                 from include/linux/types.h:6,
                 from fs/xfs/xfs_linux.h:21,
                 from fs/xfs/xfs.h:35,
                 from fs/xfs/xfs_super.c:19:
fs/xfs/xfs_super.c: In function 'xfs_init_zones':
include/linux/compiler-gcc.h:166:2: error: 'xfs_ifork_t {aka struct xfs_ifork}' has no member named 'if_u2'
  __builtin_offsetof(a, b)
  ^
include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
 #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
                                ^
fs/xfs/xfs_super.c:1862:4: note: in expansion of macro 'offsetof'
    offsetof(xfs_inode_t, i_df.if_u2.if_inline_data),
    ^
In file included from include/uapi/linux/posix_types.h:5:0,
                 from include/uapi/linux/types.h:14,
                 from include/linux/types.h:6,
                 from fs/xfs/xfs_linux.h:21,
                 from fs/xfs/xfs.h:35,
                 from fs/xfs/xfs_super.c:19:
fs/xfs/xfs_super.c:1863:34: error: 'xfs_ifork_t {aka struct xfs_ifork}' has no member named 'if_u2'
    sizeof_field(xfs_inode_t, i_df.if_u2.if_inline_data),
                                  ^
include/linux/stddef.h:22:66: note: in definition of macro 'sizeof_field'
 #define sizeof_field(structure, field) sizeof((((structure *)0)->field))
                                                                  ^

Caused by commit

  1d48144b9688 ("xfs: Define usercopy region in xfs_inode slab cache")

interacting with commit

  43518812d297 ("xfs: remove support for inlining data/extents into the inode fork")

from the  tree.

I just reverted the kspp tree commit as it seems like it is no longer
needed.

-- 
Cheers,
Stephen Rothwell

^ permalink raw reply	[flat|nested] 111+ messages in thread
* linux-next: build failure after merge of the kspp tree
@ 2017-06-20  4:56 Stephen Rothwell
  2017-06-20  5:39 ` Kees Cook
  2017-06-20  5:39 ` John Johansen
  0 siblings, 2 replies; 111+ messages in thread
From: Stephen Rothwell @ 2017-06-20  4:56 UTC (permalink / raw)
  To: Kees Cook, James Morris
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, John Johansen

Hi all,

After merging the kspp tree, today's linux-next build (x86_64
allmodconfig) failed like this:

security/apparmor/file.c: In function 'aa_path_link':
security/apparmor/file.c:475:23: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
  struct path link = { new_dir->mnt, new_dentry };
                       ^
security/apparmor/file.c:475:23: note: (near initialization for 'link')
security/apparmor/file.c:475:37: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
  struct path link = { new_dir->mnt, new_dentry };
                                     ^
security/apparmor/file.c:475:37: note: (near initialization for 'link')
security/apparmor/file.c:476:25: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
  struct path target = { new_dir->mnt, old_dentry };
                         ^
security/apparmor/file.c:476:25: note: (near initialization for 'target')
security/apparmor/file.c:476:39: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
  struct path target = { new_dir->mnt, old_dentry };
                                       ^
security/apparmor/file.c:476:39: note: (near initialization for 'target')

Caused by commit

  1a12979f61e4 ("randstruct: Mark various structs for randomization")

interacting with commit

  8014370f1257 ("apparmor: move path_link mediation to using labels")

from the security tree.

I added the following merge fix patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 20 Jun 2017 14:50:36 +1000
Subject: [PATCH] apparmor: put back designators in struct initialisers

Fixes: 8014370f1257 ("apparmor: move path_link mediation to using labels")
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 security/apparmor/file.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/security/apparmor/file.c b/security/apparmor/file.c
index b6e8e5b11e05..3382518b87fa 100644
--- a/security/apparmor/file.c
+++ b/security/apparmor/file.c
@@ -472,8 +472,8 @@ static int profile_path_link(struct aa_profile *profile,
 int aa_path_link(struct aa_label *label, struct dentry *old_dentry,
 		 const struct path *new_dir, struct dentry *new_dentry)
 {
-	struct path link = { new_dir->mnt, new_dentry };
-	struct path target = { new_dir->mnt, old_dentry };
+	struct path link = { .mnt = new_dir->mnt, .dentry = new_dentry };
+	struct path target = { .mnt = new_dir->mnt, .dentry = old_dentry };
 	struct path_cond cond = {
 		d_backing_inode(old_dentry)->i_uid,
 		d_backing_inode(old_dentry)->i_mode
-- 
2.11.0

-- 
Cheers,
Stephen Rothwell

^ permalink raw reply related	[flat|nested] 111+ messages in thread
* linux-next: build failure after merge of the kspp tree
@ 2017-06-16  1:30 Stephen Rothwell
  2017-06-16  2:51 ` Daniel Micay
  0 siblings, 1 reply; 111+ messages in thread
From: Stephen Rothwell @ 2017-06-16  1:30 UTC (permalink / raw)
  To: Kees Cook
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Daniel Micay,
	Andrew Morton

Hi Kees,

After merging the kspp tree, today's linux-next build (x86_64
allmodconfig) failed like this:

In file included from include/linux/bitmap.h:8:0,
                 from include/linux/cpumask.h:11,
                 from arch/x86/include/asm/cpumask.h:4,
                 from arch/x86/include/asm/msr.h:10,
                 from arch/x86/include/asm/processor.h:20,
                 from arch/x86/include/asm/cpufeature.h:4,
                 from arch/x86/include/asm/thread_info.h:52,
                 from include/linux/thread_info.h:37,
                 from arch/x86/include/asm/preempt.h:6,
                 from include/linux/preempt.h:80,
                 from include/linux/spinlock.h:50,
                 from include/linux/mmzone.h:7,
                 from include/linux/gfp.h:5,
                 from include/linux/slab.h:14,
                 from drivers/scsi/csiostor/csio_lnode.c:37:
In function 'memcpy',
    inlined from 'csio_append_attrib' at drivers/scsi/csiostor/csio_lnode.c:248:2,
    inlined from 'csio_ln_fdmi_dprt_cbfn' at drivers/scsi/csiostor/csio_lnode.c:471:2:
include/linux/string.h:309:4: error: call to '__read_overflow2' declared with attribute error: detected read beyond size of object passed as 2nd parameter
    __read_overflow2();
    ^
In function 'memcpy',
    inlined from 'csio_append_attrib' at drivers/scsi/csiostor/csio_lnode.c:248:2,
    inlined from 'csio_ln_fdmi_rhba_cbfn' at drivers/scsi/csiostor/csio_lnode.c:337:2:
include/linux/string.h:309:4: error: call to '__read_overflow2' declared with attribute error: detected read beyond size of object passed as 2nd parameter
    __read_overflow2();
    ^

Caused by commit

  b90d6eba50d7 ("include/linux/string.h: add the option of fortified string.h functions")

I have reverted that commit for today.

-- 
Cheers,
Stephen Rothwell

^ permalink raw reply	[flat|nested] 111+ messages in thread

end of thread, other threads:[~2024-03-05  9:54 UTC | newest]

Thread overview: 111+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-27  9:02 linux-next: build failure after merge of the kspp tree Stephen Rothwell
2018-07-27  9:06 ` Stephen Rothwell
2018-07-27 10:55   ` Stephen Rothwell
2018-07-27 12:55     ` Will Deacon
2018-07-27 13:01       ` Will Deacon
2018-07-27 13:27         ` Will Deacon
2018-07-27 16:00           ` Kees Cook
2018-07-30  7:33       ` Stephen Rothwell
2018-07-30 14:47         ` Laura Abbott
2018-07-30 16:37           ` Will Deacon
2018-07-30 18:31             ` [PATCH] efi/libstub: Only disable stackleak plugin for arm64 Laura Abbott
2018-07-30 19:09               ` Kees Cook
2018-07-31  8:51               ` Will Deacon
2018-07-31 10:09         ` linux-next: build failure after merge of the kspp tree Will Deacon
2018-07-31 11:27           ` Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2024-03-05  3:50 Stephen Rothwell
2024-03-05  9:54 ` Kees Cook
2023-09-14  1:50 Stephen Rothwell
2023-09-14  3:07 ` Kees Cook
2023-01-05  2:25 Stephen Rothwell
2023-01-05  3:22 ` Kees Cook
2023-01-05  4:24   ` Stephen Rothwell
2022-12-01  3:07 Stephen Rothwell
2022-12-01 16:31 ` Kees Cook
2022-07-28 10:55 Stephen Rothwell
2022-07-28 15:12 ` Matthias Kaehlcke
2022-05-05  7:40 Stephen Rothwell
2022-05-07 17:18 ` Kees Cook
2022-03-16  7:32 Stephen Rothwell
2022-03-17  1:01 ` Linus Walleij
2022-03-17  8:24   ` Marc Zyngier
2022-03-09 10:10 Stephen Rothwell
2022-03-09 16:52 ` Kees Cook
2022-03-09 16:58   ` Hans de Goede
2022-03-09 17:18     ` Kees Cook
2022-02-28 22:27 Stephen Rothwell
2022-02-28 23:02 ` Kees Cook
2022-03-02  9:16   ` Stephen Rothwell
2022-03-03  7:29     ` Stephen Rothwell
2022-01-30 23:09 Stephen Rothwell
2022-01-31  4:04 ` Kees Cook
2022-01-31  4:59   ` Stephen Rothwell
2022-01-31  6:19     ` Kees Cook
2022-01-31 19:10       ` Saeed Mahameed
2022-01-31 21:06         ` Kees Cook
2022-01-30 22:34 Stephen Rothwell
2022-01-30 23:24 ` Herbert Xu
2022-01-31  0:15   ` Stephen Rothwell
2022-01-31  0:20     ` Herbert Xu
2022-01-31  0:41       ` Stephen Rothwell
2022-01-25  3:50 Stephen Rothwell
2022-01-25  7:44 ` Kees Cook
2022-01-25 13:27   ` Masami Hiramatsu
2022-01-25 14:01     ` Steven Rostedt
2022-01-25 17:53       ` Kees Cook
2022-01-25 14:31     ` Masami Hiramatsu
2022-01-25 15:49       ` Steven Rostedt
2022-01-25 17:54       ` Kees Cook
2022-01-25 18:41         ` Steven Rostedt
2022-01-25 20:57       ` Kees Cook
2022-01-25 21:23         ` Steven Rostedt
2022-01-25 21:28           ` Steven Rostedt
2022-01-25 22:07             ` Kees Cook
2022-01-25 22:21               ` Steven Rostedt
2022-01-26  0:35                 ` Masami Hiramatsu
2022-01-26  1:16                   ` Steven Rostedt
2022-01-26  3:18                     ` Kees Cook
2022-01-26  3:26                       ` Steven Rostedt
2022-01-26 19:41                         ` Beau Belgrave
2022-01-26 21:00                           ` Steven Rostedt
2022-01-26  3:52                     ` Masami Hiramatsu
2022-01-26  4:06                       ` Steven Rostedt
2022-01-26  3:17                   ` Kees Cook
2022-01-25 22:01           ` Kees Cook
2022-01-25  3:24 Stephen Rothwell
2022-01-25  3:43 ` Kees Cook
2022-02-08  4:42   ` Stephen Rothwell
2022-02-08  6:13     ` Kees Cook
2022-01-25  2:55 Stephen Rothwell
2022-01-25  3:02 ` Stephen Rothwell
2022-01-25  3:22   ` Kees Cook
2022-01-25  0:57 Stephen Rothwell
2022-01-25  3:35 ` Kees Cook
2022-01-25 14:07 ` David Sterba
2021-09-16  3:34 Stephen Rothwell
2021-09-16  6:00 ` Kees Cook
2021-08-26  7:52 Stephen Rothwell
2021-08-26 15:38 ` Kees Cook
2020-06-23  3:51 Stephen Rothwell
2020-06-23  3:56 ` David Miller
2020-06-21 13:48 Stephen Rothwell
2020-06-21 15:36 ` Kees Cook
2017-11-08  5:23 Stephen Rothwell
2017-11-08 23:43 ` Kees Cook
2017-11-09  0:18   ` Darrick J. Wong
2017-11-09  0:31     ` Kees Cook
2017-06-20  4:56 Stephen Rothwell
2017-06-20  5:39 ` Kees Cook
2017-06-20  5:42   ` John Johansen
2017-06-20  5:39 ` John Johansen
2017-06-26 18:19   ` Kees Cook
2017-06-27  3:33     ` James Morris
2017-06-27 22:16       ` Kees Cook
2017-06-28  5:48         ` James Morris
2017-06-16  1:30 Stephen Rothwell
2017-06-16  2:51 ` Daniel Micay
2017-06-16  2:52   ` Daniel Micay
2017-06-16  3:20   ` Kees Cook
2017-06-16  3:31     ` Stephen Rothwell
2017-06-19  0:23       ` Stephen Rothwell
2017-06-19 21:01         ` 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).