linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the kspp-gustavo tree
@ 2021-09-29 23:59 Stephen Rothwell
  2021-09-30  0:11 ` Gustavo A. R. Silva
  0 siblings, 1 reply; 28+ messages in thread
From: Stephen Rothwell @ 2021-09-29 23:59 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Kees Cook, Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

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

In file included from include/linux/bpf_verifier.h:9,
                 from kernel/bpf/verifier.c:12:
kernel/bpf/verifier.c: In function 'jit_subprogs':
include/linux/filter.h:366:4: error: cast between incompatible function types from 'unsigned int (*)(const void *, const struct bpf_insn *)' to 'u64 (*)(u64,  u64,  u64,  u64,  u64)' {aka 'long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)'} [-Werror=cast-function-type]
  366 |   ((u64 (*)(u64, u64, u64, u64, u64))(x))
      |    ^
kernel/bpf/verifier.c:12472:16: note: in expansion of macro 'BPF_CAST_CALL'
12472 |    insn->imm = BPF_CAST_CALL(func[subprog]->bpf_func) -
      |                ^~~~~~~~~~~~~
kernel/bpf/verifier.c: In function 'do_misc_fixups':
include/linux/filter.h:366:4: error: cast between incompatible function types from 'void * (* const)(struct bpf_map *, void *)' to 'u64 (*)(u64,  u64,  u64,  u64,  u64)' {aka 'long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)'} [-Werror=cast-function-type]
  366 |   ((u64 (*)(u64, u64, u64, u64, u64))(x))
      |    ^
kernel/bpf/verifier.c:12953:17: note: in expansion of macro 'BPF_CAST_CALL'
12953 |     insn->imm = BPF_CAST_CALL(ops->map_lookup_elem) -
      |                 ^~~~~~~~~~~~~
include/linux/filter.h:366:4: error: cast between incompatible function types from 'int (* const)(struct bpf_map *, void *, void *, u64)' {aka 'int (* const)(struct bpf_map *, void *, void *, long long unsigned int)'} to 'u64 (*)(u64,  u64,  u64,  u64,  u64)' {aka 'long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)'} [-Werror=cast-function-type]
  366 |   ((u64 (*)(u64, u64, u64, u64, u64))(x))
      |    ^
kernel/bpf/verifier.c:12957:17: note: in expansion of macro 'BPF_CAST_CALL'
12957 |     insn->imm = BPF_CAST_CALL(ops->map_update_elem) -
      |                 ^~~~~~~~~~~~~
include/linux/filter.h:366:4: error: cast between incompatible function types from 'int (* const)(struct bpf_map *, void *)' to 'u64 (*)(u64,  u64,  u64,  u64,  u64)' {aka 'long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)'} [-Werror=cast-function-type]
  366 |   ((u64 (*)(u64, u64, u64, u64, u64))(x))
      |    ^
kernel/bpf/verifier.c:12961:17: note: in expansion of macro 'BPF_CAST_CALL'
12961 |     insn->imm = BPF_CAST_CALL(ops->map_delete_elem) -
      |                 ^~~~~~~~~~~~~
include/linux/filter.h:366:4: error: cast between incompatible function types from 'int (* const)(struct bpf_map *, void *, u64)' {aka 'int (* const)(struct bpf_map *, void *, long long unsigned int)'} to 'u64 (*)(u64,  u64,  u64,  u64,  u64)' {aka 'long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)'} [-Werror=cast-function-type]
  366 |   ((u64 (*)(u64, u64, u64, u64, u64))(x))
      |    ^
kernel/bpf/verifier.c:12965:17: note: in expansion of macro 'BPF_CAST_CALL'
12965 |     insn->imm = BPF_CAST_CALL(ops->map_push_elem) -
      |                 ^~~~~~~~~~~~~
include/linux/filter.h:366:4: error: cast between incompatible function types from 'int (* const)(struct bpf_map *, void *)' to 'u64 (*)(u64,  u64,  u64,  u64,  u64)' {aka 'long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)'} [-Werror=cast-function-type]
  366 |   ((u64 (*)(u64, u64, u64, u64, u64))(x))
      |    ^
kernel/bpf/verifier.c:12969:17: note: in expansion of macro 'BPF_CAST_CALL'
12969 |     insn->imm = BPF_CAST_CALL(ops->map_pop_elem) -
      |                 ^~~~~~~~~~~~~
include/linux/filter.h:366:4: error: cast between incompatible function types from 'int (* const)(struct bpf_map *, void *)' to 'u64 (*)(u64,  u64,  u64,  u64,  u64)' {aka 'long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)'} [-Werror=cast-function-type]
  366 |   ((u64 (*)(u64, u64, u64, u64, u64))(x))
      |    ^
kernel/bpf/verifier.c:12973:17: note: in expansion of macro 'BPF_CAST_CALL'
12973 |     insn->imm = BPF_CAST_CALL(ops->map_peek_elem) -
      |                 ^~~~~~~~~~~~~
include/linux/filter.h:366:4: error: cast between incompatible function types from 'int (* const)(struct bpf_map *, u32,  u64)' {aka 'int (* const)(struct bpf_map *, unsigned int,  long long unsigned int)'} to 'u64 (*)(u64,  u64,  u64,  u64,  u64)' {aka 'long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)'} [-Werror=cast-function-type]
  366 |   ((u64 (*)(u64, u64, u64, u64, u64))(x))
      |    ^
kernel/bpf/verifier.c:12977:17: note: in expansion of macro 'BPF_CAST_CALL'
12977 |     insn->imm = BPF_CAST_CALL(ops->map_redirect) -
      |                 ^~~~~~~~~~~~~
cc1: all warnings being treated as errors

Caused by commit

  ffea83dd8823 ("Makefile: Enable -Wcast-function-type")

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] 28+ messages in thread

* Re: linux-next: build failure after merge of the kspp-gustavo tree
  2021-09-29 23:59 linux-next: build failure after merge of the kspp-gustavo tree Stephen Rothwell
@ 2021-09-30  0:11 ` Gustavo A. R. Silva
  0 siblings, 0 replies; 28+ messages in thread
From: Gustavo A. R. Silva @ 2021-09-30  0:11 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Gustavo A. R. Silva, Kees Cook, Linux Kernel Mailing List,
	Linux Next Mailing List

On Thu, Sep 30, 2021 at 09:59:32AM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the kspp-gustavo tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> In file included from include/linux/bpf_verifier.h:9,
>                  from kernel/bpf/verifier.c:12:

[..]

>       |                 ^~~~~~~~~~~~~
> include/linux/filter.h:366:4: error: cast between incompatible function types from 'int (* const)(struct bpf_map *, u32,  u64)' {aka 'int (* const)(struct bpf_map *, unsigned int,  long long unsigned int)'} to 'u64 (*)(u64,  u64,  u64,  u64,  u64)' {aka 'long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)'} [-Werror=cast-function-type]
>   366 |   ((u64 (*)(u64, u64, u64, u64, u64))(x))
>       |    ^
> kernel/bpf/verifier.c:12977:17: note: in expansion of macro 'BPF_CAST_CALL'
> 12977 |     insn->imm = BPF_CAST_CALL(ops->map_redirect) -
>       |                 ^~~~~~~~~~~~~
> cc1: all warnings being treated as errors

All these are already fixed in bpf-next.

> Caused by commit
> 
>   ffea83dd8823 ("Makefile: Enable -Wcast-function-type")
> 
> I have reverted that commit for today.

I've just removed that commit from my -next tree, while I
take a look at the ftrace warnings.

Thanks!
--
Gustavo



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

* Re: linux-next: build failure after merge of the kspp-gustavo tree
  2023-11-21 16:31 ` Gustavo A. R. Silva
@ 2023-11-21 23:15   ` Stephen Rothwell
  0 siblings, 0 replies; 28+ messages in thread
From: Stephen Rothwell @ 2023-11-21 23:15 UTC (permalink / raw)
  To: Gustavo A. R. Silva; +Cc: Linux Kernel Mailing List, Linux Next Mailing List

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

Hi Gustavo,

On Tue, 21 Nov 2023 10:31:16 -0600 "Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:
>
> I wonder if you could help me catch the rest of these issues by disabling
> WERROR (so we can get all the warnings) and letting your builds run with the
> following patch on top:

That seems to be working OK.  I moved your tree to merge just after the
fixes for the current release and added a CONFIG_WERROR=n to all the
builds.  I'll keep it like that for a while and then go back to getting
errors.

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the kspp-gustavo tree
  2023-11-21  2:19 Stephen Rothwell
@ 2023-11-21 16:31 ` Gustavo A. R. Silva
  2023-11-21 23:15   ` Stephen Rothwell
  0 siblings, 1 reply; 28+ messages in thread
From: Gustavo A. R. Silva @ 2023-11-21 16:31 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Linux Kernel Mailing List, Linux Next Mailing List

Hi Stephen,

On 11/20/23 20:19, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the kspp-gustavo tree, today's linux-next build (powerpc
> pseries_le_defconfig) failed like this:
> 
> arch/powerpc/crypto/aes-gcm-p10-glue.c: In function 'gcmp10_init':
> arch/powerpc/crypto/aes-gcm-p10-glue.c:120:9: error: 'gcm_init_htable' accessing 256 bytes in a region of size 224 [-Werror=stringop-overflow=]
>    120 |         gcm_init_htable(hash->Htable+32, hash->H);
>        |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> arch/powerpc/crypto/aes-gcm-p10-glue.c:120:9: note: referencing argument 1 of type 'unsigned char[256]'
> arch/powerpc/crypto/aes-gcm-p10-glue.c:120:9: note: referencing argument 2 of type 'unsigned char[16]'
> arch/powerpc/crypto/aes-gcm-p10-glue.c:40:17: note: in a call to function 'gcm_init_htable'
>     40 | asmlinkage void gcm_init_htable(unsigned char htable[256], unsigned char Xi[16]);
>        |                 ^~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
> 
> Caused by commit
> 
>    167820dd258d ("Makefile: Enable -Wstringop-overflow globally")
> 
> I have used the kspp-gustavo tree from next-20231120 for today.
> 

Thanks a lot for the report, again!

We are pretty close to enabling this compiler option, and it seems you
are catching issues that neither 0-day folks nor I have caught before.

I wonder if you could help me catch the rest of these issues by disabling
WERROR (so we can get all the warnings) and letting your builds run with the
following patch on top:

diff --git a/Makefile b/Makefile
index ede0bd241056..596c33e6319b 100644
--- a/Makefile
+++ b/Makefile
@@ -982,6 +982,8 @@ NOSTDINC_FLAGS += -nostdinc
  # perform bounds checking.
  KBUILD_CFLAGS += $(call cc-option, -fstrict-flex-arrays=3)

+KBUILD_CFLAGS += $(call cc-option, -Wstringop-overflow)
+
  # disable invalid "can't wrap" optimizations for signed / pointers
  KBUILD_CFLAGS  += -fno-strict-overflow

diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
index 2fe6f2828d37..1527199161d7 100644
--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
@@ -106,7 +106,6 @@ KBUILD_CFLAGS += $(call cc-option, -Wunused-const-variable)
  KBUILD_CFLAGS += $(call cc-option, -Wpacked-not-aligned)
  KBUILD_CFLAGS += $(call cc-option, -Wformat-overflow)
  KBUILD_CFLAGS += $(call cc-option, -Wformat-truncation)
-KBUILD_CFLAGS += $(call cc-option, -Wstringop-overflow)
  KBUILD_CFLAGS += $(call cc-option, -Wstringop-truncation)

  KBUILD_CPPFLAGS += -Wundef
@@ -122,7 +121,6 @@ KBUILD_CFLAGS += $(call cc-disable-warning, restrict)
  KBUILD_CFLAGS += $(call cc-disable-warning, packed-not-aligned)
  KBUILD_CFLAGS += $(call cc-disable-warning, format-overflow)
  KBUILD_CFLAGS += $(call cc-disable-warning, format-truncation)
-KBUILD_CFLAGS += $(call cc-disable-warning, stringop-overflow)
  KBUILD_CFLAGS += $(call cc-disable-warning, stringop-truncation)

  ifdef CONFIG_CC_IS_CLANG


Thank you!
--
Gustavo


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

* linux-next: build failure after merge of the kspp-gustavo tree
@ 2023-11-21  2:19 Stephen Rothwell
  2023-11-21 16:31 ` Gustavo A. R. Silva
  0 siblings, 1 reply; 28+ messages in thread
From: Stephen Rothwell @ 2023-11-21  2:19 UTC (permalink / raw)
  To: Gustavo A. R. Silva; +Cc: Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

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

arch/powerpc/crypto/aes-gcm-p10-glue.c: In function 'gcmp10_init':
arch/powerpc/crypto/aes-gcm-p10-glue.c:120:9: error: 'gcm_init_htable' accessing 256 bytes in a region of size 224 [-Werror=stringop-overflow=]
  120 |         gcm_init_htable(hash->Htable+32, hash->H);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/crypto/aes-gcm-p10-glue.c:120:9: note: referencing argument 1 of type 'unsigned char[256]'
arch/powerpc/crypto/aes-gcm-p10-glue.c:120:9: note: referencing argument 2 of type 'unsigned char[16]'
arch/powerpc/crypto/aes-gcm-p10-glue.c:40:17: note: in a call to function 'gcm_init_htable'
   40 | asmlinkage void gcm_init_htable(unsigned char htable[256], unsigned char Xi[16]);
      |                 ^~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Caused by commit

  167820dd258d ("Makefile: Enable -Wstringop-overflow globally")

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

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the kspp-gustavo tree
  2023-11-17  0:33 Stephen Rothwell
@ 2023-11-17  0:39 ` Gustavo A. R. Silva
  0 siblings, 0 replies; 28+ messages in thread
From: Gustavo A. R. Silva @ 2023-11-17  0:39 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Gustavo A. R. Silva, Linux Kernel Mailing List, Linux Next Mailing List




> arch/powerpc/lib/sstep.c:289:23: error: writing 8 bytes into a region of size 0 [-Werror=stringop-overflow=]
>    289 |                 up[2] = byterev_8(up[1]);
>        |                 ~~~~~~^~~~~~~~~~~~~~~~~~
> arch/powerpc/lib/sstep.c: In function 'emulate_loadstore':
> arch/powerpc/lib/sstep.c:681:11: note: at offset 16 into destination object 'u' of size 16
>    681 |         } u = {};
>        |           ^
> arch/powerpc/lib/sstep.c:681:11: note: at offset 16 into destination object 'u' of size 16
> arch/powerpc/lib/sstep.c:681:11: note: at offset 16 into destination object 'u' of size 16
> cc1: all warnings being treated as errors
> 
> Caused by commit
> 
>    c94c73da81d7 ("Makefile: Enable -Wstringop-overflow globally")
> 
> I have used te kspp-gustavo tree from next-20231116 for today.
> 
I'll address those issues right away.

Thanks for the report, Stephen.
--
Gustavo




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

* linux-next: build failure after merge of the kspp-gustavo tree
@ 2023-11-17  0:33 Stephen Rothwell
  2023-11-17  0:39 ` Gustavo A. R. Silva
  0 siblings, 1 reply; 28+ messages in thread
From: Stephen Rothwell @ 2023-11-17  0:33 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Gustavo A. R. Silva, Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

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

In function 'do_byte_reverse',
    inlined from 'do_vec_store' at arch/powerpc/lib/sstep.c:722:3,
    inlined from 'emulate_loadstore' at arch/powerpc/lib/sstep.c:3510:9:
arch/powerpc/lib/sstep.c:287:23: error: writing 8 bytes into a region of size 0 [-Werror=stringop-overflow=]
  287 |                 up[3] = tmp;
      |                 ~~~~~~^~~~~
arch/powerpc/lib/sstep.c: In function 'emulate_loadstore':
arch/powerpc/lib/sstep.c:708:11: note: at offset [24, 39] into destination object 'u' of size 16
  708 |         } u;
      |           ^
In function 'do_byte_reverse',
    inlined from 'do_vec_store' at arch/powerpc/lib/sstep.c:722:3,
    inlined from 'emulate_loadstore' at arch/powerpc/lib/sstep.c:3510:9:
arch/powerpc/lib/sstep.c:289:23: error: writing 8 bytes into a region of size 0 [-Werror=stringop-overflow=]
  289 |                 up[2] = byterev_8(up[1]);
      |                 ~~~~~~^~~~~~~~~~~~~~~~~~
arch/powerpc/lib/sstep.c: In function 'emulate_loadstore':
arch/powerpc/lib/sstep.c:708:11: note: at offset 16 into destination object 'u' of size 16
  708 |         } u;
      |           ^
In function 'do_byte_reverse',
    inlined from 'do_vec_load' at arch/powerpc/lib/sstep.c:691:3,
    inlined from 'emulate_loadstore' at arch/powerpc/lib/sstep.c:3439:9:
arch/powerpc/lib/sstep.c:287:23: error: writing 8 bytes into a region of size 0 [-Werror=stringop-overflow=]
  287 |                 up[3] = tmp;
      |                 ~~~~~~^~~~~
arch/powerpc/lib/sstep.c: In function 'emulate_loadstore':
arch/powerpc/lib/sstep.c:681:11: note: at offset [24, 39] into destination object 'u' of size 16
  681 |         } u = {};
      |           ^
arch/powerpc/lib/sstep.c:681:11: note: at offset [24, 39] into destination object 'u' of size 16
arch/powerpc/lib/sstep.c:681:11: note: at offset [24, 39] into destination object 'u' of size 16
In function 'do_byte_reverse',
    inlined from 'do_vec_load' at arch/powerpc/lib/sstep.c:691:3,
    inlined from 'emulate_loadstore' at arch/powerpc/lib/sstep.c:3439:9:
arch/powerpc/lib/sstep.c:289:23: error: writing 8 bytes into a region of size 0 [-Werror=stringop-overflow=]
  289 |                 up[2] = byterev_8(up[1]);
      |                 ~~~~~~^~~~~~~~~~~~~~~~~~
arch/powerpc/lib/sstep.c: In function 'emulate_loadstore':
arch/powerpc/lib/sstep.c:681:11: note: at offset 16 into destination object 'u' of size 16
  681 |         } u = {};
      |           ^
arch/powerpc/lib/sstep.c:681:11: note: at offset 16 into destination object 'u' of size 16
arch/powerpc/lib/sstep.c:681:11: note: at offset 16 into destination object 'u' of size 16
cc1: all warnings being treated as errors

Caused by commit

  c94c73da81d7 ("Makefile: Enable -Wstringop-overflow globally")

I have used te kspp-gustavo tree from next-20231116 for today.

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the kspp-gustavo tree
  2021-10-25 19:31     ` Gustavo A. R. Silva
@ 2021-10-25 19:34       ` Kees Cook
  0 siblings, 0 replies; 28+ messages in thread
From: Kees Cook @ 2021-10-25 19:34 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Gustavo A. R. Silva, Stephen Rothwell, Linux Kernel Mailing List,
	Linux Next Mailing List

On Mon, Oct 25, 2021 at 02:31:02PM -0500, Gustavo A. R. Silva wrote:
> On Mon, Oct 25, 2021 at 12:19:15PM -0700, Kees Cook wrote:
> > On Mon, Oct 25, 2021 at 12:55:34PM +1100, Stephen Rothwell wrote:
> > > Hi all,
> > > 
> > > On Mon, 18 Oct 2021 19:30:48 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > >
> > > > Hi all,
> > > > 
> > > > After merging the kspp-gustavo tree, today's linux-next build (sparc64
> > > > defconfig) failed like this:
> > > > 
> > > > sparc64-linux-gcc: error: unrecognized command line option '-Wcast-function-type'; did you mean '-Wbad-function-cast'?
> > > > 
> > > > $ sparc64-linux-gcc --version
> > > > sparc64-linux-gcc (Custom f51944395b6aa154) 7.3.1 20180130
> > > > 
> > > > Caused by commit
> > > > 
> > > >   21078041965e ("Makefile: Enable -Wcast-function-type")
> > > > 
> > > > I have reverted that commit for today.
> > > 
> > > I am still reverting that commit ...
> > 
> > Gustavo, can you please switch this to using cc-option?
> 
> Yeah; I actually removed all the patches related to -Wcast-function-type
> from my -next branch a few minutes ago:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git/log/?h=for-next/kspp
> 
> I'm currently working on resolving all these conflicts in a separate branch
> before merging them again in my -next tree.

Great; that sounds ideal. :) Thank you!

-Kees

-- 
Kees Cook

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

* Re: linux-next: build failure after merge of the kspp-gustavo tree
  2021-10-25 19:19   ` Kees Cook
@ 2021-10-25 19:31     ` Gustavo A. R. Silva
  2021-10-25 19:34       ` Kees Cook
  0 siblings, 1 reply; 28+ messages in thread
From: Gustavo A. R. Silva @ 2021-10-25 19:31 UTC (permalink / raw)
  To: Kees Cook
  Cc: Gustavo A. R. Silva, Stephen Rothwell, Linux Kernel Mailing List,
	Linux Next Mailing List

On Mon, Oct 25, 2021 at 12:19:15PM -0700, Kees Cook wrote:
> On Mon, Oct 25, 2021 at 12:55:34PM +1100, Stephen Rothwell wrote:
> > Hi all,
> > 
> > On Mon, 18 Oct 2021 19:30:48 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > >
> > > Hi all,
> > > 
> > > After merging the kspp-gustavo tree, today's linux-next build (sparc64
> > > defconfig) failed like this:
> > > 
> > > sparc64-linux-gcc: error: unrecognized command line option '-Wcast-function-type'; did you mean '-Wbad-function-cast'?
> > > 
> > > $ sparc64-linux-gcc --version
> > > sparc64-linux-gcc (Custom f51944395b6aa154) 7.3.1 20180130
> > > 
> > > Caused by commit
> > > 
> > >   21078041965e ("Makefile: Enable -Wcast-function-type")
> > > 
> > > I have reverted that commit for today.
> > 
> > I am still reverting that commit ...
> 
> Gustavo, can you please switch this to using cc-option?

Yeah; I actually removed all the patches related to -Wcast-function-type
from my -next branch a few minutes ago:

https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git/log/?h=for-next/kspp

I'm currently working on resolving all these conflicts in a separate branch
before merging them again in my -next tree.

Thanks
--
Gustavo

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

* Re: linux-next: build failure after merge of the kspp-gustavo tree
  2021-10-25  1:55 ` Stephen Rothwell
@ 2021-10-25 19:19   ` Kees Cook
  2021-10-25 19:31     ` Gustavo A. R. Silva
  0 siblings, 1 reply; 28+ messages in thread
From: Kees Cook @ 2021-10-25 19:19 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Stephen Rothwell, Linux Kernel Mailing List, Linux Next Mailing List

On Mon, Oct 25, 2021 at 12:55:34PM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> On Mon, 18 Oct 2021 19:30:48 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > Hi all,
> > 
> > After merging the kspp-gustavo tree, today's linux-next build (sparc64
> > defconfig) failed like this:
> > 
> > sparc64-linux-gcc: error: unrecognized command line option '-Wcast-function-type'; did you mean '-Wbad-function-cast'?
> > 
> > $ sparc64-linux-gcc --version
> > sparc64-linux-gcc (Custom f51944395b6aa154) 7.3.1 20180130
> > 
> > Caused by commit
> > 
> >   21078041965e ("Makefile: Enable -Wcast-function-type")
> > 
> > I have reverted that commit for today.
> 
> I am still reverting that commit ...

Gustavo, can you please switch this to using cc-option?

-- 
Kees Cook

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

* Re: linux-next: build failure after merge of the kspp-gustavo tree
  2021-10-25  4:30       ` Stephen Rothwell
@ 2021-10-25 11:35         ` Steven Rostedt
  0 siblings, 0 replies; 28+ messages in thread
From: Steven Rostedt @ 2021-10-25 11:35 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Gustavo A. R. Silva, Gustavo A. R. Silva,
	Linux Kernel Mailing List, Linux Next Mailing List

On Mon, 25 Oct 2021 15:30:29 +1100
Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> > Which shouldn't need this fix.  
> 
> Well, that is in your tree today, but (1) doesn't help with the build
> failure in Gustavo's tree on its own (i.e. it creates a dependency
> between Gustavo's tree and your tree) and (2) now I will get a conflict
> between the two trees today.  Oh, well.

Gustavo was only holding that commit so that he can have his commit still
build. We knew of the dependency, and was going to let Linus know of it too.

Gustavo should be able to remove the conflicting commit now.

-- Steve

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

* Re: linux-next: build failure after merge of the kspp-gustavo tree
  2021-10-25  2:42     ` Steven Rostedt
@ 2021-10-25  4:30       ` Stephen Rothwell
  2021-10-25 11:35         ` Steven Rostedt
  0 siblings, 1 reply; 28+ messages in thread
From: Stephen Rothwell @ 2021-10-25  4:30 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: Gustavo A. R. Silva, Gustavo A. R. Silva,
	Linux Kernel Mailing List, Linux Next Mailing List

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

Hi Steven,

On Sun, 24 Oct 2021 22:42:15 -0400 Steven Rostedt <rostedt@goodmis.org> wrote:
>
> On Sun, 24 Oct 2021 21:11:19 -0500
> "Gustavo A. R. Silva" <gustavoars@kernel.org> wrote:
> 
> > On Mon, Oct 25, 2021 at 12:54:46PM +1100, Stephen Rothwell wrote:  
> > > > --- a/include/linux/ftrace.h
> > > > +++ b/include/linux/ftrace.h
> > > > @@ -45,6 +45,7 @@ struct ftrace_ops;
> > > >  void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip);
> > > >  #else
> > > >  # define FTRACE_FORCE_LIST_FUNC 0
> > > > +struct ftrace_regs;
> > > >  void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip,
> > > >  			       struct ftrace_ops *op, struct ftrace_regs *fregs);
> > > >  #endif
> > > > -- 
> > > > 2.33.0    
> > > 
> > > I am still applying this fix ...    
> > 
> > I will add this fix to the original patch for my tomorrow's -next tree.  
> 
> Hmm, I pushed my version to my for-next branch. Do you have this in the
> next tree?
> 
>   34cdd18b8d245f3e901e5325 ("tracing: Use linker magic instead of recasting
>   ftrace_ops_list_func()")
> 
> Which shouldn't need this fix.

Well, that is in your tree today, but (1) doesn't help with the build
failure in Gustavo's tree on its own (i.e. it creates a dependency
between Gustavo's tree and your tree) and (2) now I will get a conflict
between the two trees today.  Oh, well.

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the kspp-gustavo tree
  2021-10-25  2:11   ` Gustavo A. R. Silva
@ 2021-10-25  2:42     ` Steven Rostedt
  2021-10-25  4:30       ` Stephen Rothwell
  0 siblings, 1 reply; 28+ messages in thread
From: Steven Rostedt @ 2021-10-25  2:42 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Stephen Rothwell, Gustavo A. R. Silva, Linux Kernel Mailing List,
	Linux Next Mailing List

On Sun, 24 Oct 2021 21:11:19 -0500
"Gustavo A. R. Silva" <gustavoars@kernel.org> wrote:

> On Mon, Oct 25, 2021 at 12:54:46PM +1100, Stephen Rothwell wrote:
> > > --- a/include/linux/ftrace.h
> > > +++ b/include/linux/ftrace.h
> > > @@ -45,6 +45,7 @@ struct ftrace_ops;
> > >  void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip);
> > >  #else
> > >  # define FTRACE_FORCE_LIST_FUNC 0
> > > +struct ftrace_regs;
> > >  void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip,
> > >  			       struct ftrace_ops *op, struct ftrace_regs *fregs);
> > >  #endif
> > > -- 
> > > 2.33.0  
> > 
> > I am still applying this fix ...  
> 
> I will add this fix to the original patch for my tomorrow's -next tree.

Hmm, I pushed my version to my for-next branch. Do you have this in the
next tree?

  34cdd18b8d245f3e901e5325 ("tracing: Use linker magic instead of recasting
  ftrace_ops_list_func()")

Which shouldn't need this fix.

-- Steve

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

* Re: linux-next: build failure after merge of the kspp-gustavo tree
  2021-10-25  1:54 ` Stephen Rothwell
@ 2021-10-25  2:11   ` Gustavo A. R. Silva
  2021-10-25  2:42     ` Steven Rostedt
  0 siblings, 1 reply; 28+ messages in thread
From: Gustavo A. R. Silva @ 2021-10-25  2:11 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Gustavo A. R. Silva, Steven Rostedt, Linux Kernel Mailing List,
	Linux Next Mailing List

On Mon, Oct 25, 2021 at 12:54:46PM +1100, Stephen Rothwell wrote:
> > --- a/include/linux/ftrace.h
> > +++ b/include/linux/ftrace.h
> > @@ -45,6 +45,7 @@ struct ftrace_ops;
> >  void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip);
> >  #else
> >  # define FTRACE_FORCE_LIST_FUNC 0
> > +struct ftrace_regs;
> >  void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip,
> >  			       struct ftrace_ops *op, struct ftrace_regs *fregs);
> >  #endif
> > -- 
> > 2.33.0
> 
> I am still applying this fix ...

I will add this fix to the original patch for my tomorrow's -next tree.

Thanks, Stephen.
--
Gustavo


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

* Re: linux-next: build failure after merge of the kspp-gustavo tree
  2021-10-18  8:30 Stephen Rothwell
  2021-10-20 16:18 ` Gustavo A. R. Silva
@ 2021-10-25  1:55 ` Stephen Rothwell
  2021-10-25 19:19   ` Kees Cook
  1 sibling, 1 reply; 28+ messages in thread
From: Stephen Rothwell @ 2021-10-25  1:55 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Kees Cook, Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

On Mon, 18 Oct 2021 19:30:48 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
> 
> After merging the kspp-gustavo tree, today's linux-next build (sparc64
> defconfig) failed like this:
> 
> sparc64-linux-gcc: error: unrecognized command line option '-Wcast-function-type'; did you mean '-Wbad-function-cast'?
> 
> $ sparc64-linux-gcc --version
> sparc64-linux-gcc (Custom f51944395b6aa154) 7.3.1 20180130
> 
> Caused by commit
> 
>   21078041965e ("Makefile: Enable -Wcast-function-type")
> 
> I have reverted that commit for today.

I am still reverting that commit ...

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the kspp-gustavo tree
  2021-10-18  7:15 Stephen Rothwell
  2021-10-18 17:13 ` Gustavo A. R. Silva
@ 2021-10-25  1:54 ` Stephen Rothwell
  2021-10-25  2:11   ` Gustavo A. R. Silva
  1 sibling, 1 reply; 28+ messages in thread
From: Stephen Rothwell @ 2021-10-25  1:54 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Steven Rostedt, Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

On Mon, 18 Oct 2021 18:15:59 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the kspp-gustavo tree, today's linux-next build (powerpc
> pseries_le_defconfig) failed like this:
> 
> In file included from include/linux/perf_event.h:49,
>                  from arch/powerpc/perf/callchain.c:9:
> include/linux/ftrace.h:49:41: error: 'struct ftrace_regs' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
>    49 |           struct ftrace_ops *op, struct ftrace_regs *fregs);
>       |                                         ^~~~~~~~~~~
> cc1: all warnings being treated as errors
> 
> (many of these)
> 
> Caused by commit
> 
>   c45ede6c2781 ("ftrace: Fix -Wmissing-prototypes errors")
> 
> I have added the following fixup for today.
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Mon, 18 Oct 2021 17:56:30 +1100
> Subject: [PATCH] fixup for "ftrace: Fix -Wmissing-prototypes errors"
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  include/linux/ftrace.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
> index 871b51bec170..ada656c6824d 100644
> --- a/include/linux/ftrace.h
> +++ b/include/linux/ftrace.h
> @@ -45,6 +45,7 @@ struct ftrace_ops;
>  void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip);
>  #else
>  # define FTRACE_FORCE_LIST_FUNC 0
> +struct ftrace_regs;
>  void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip,
>  			       struct ftrace_ops *op, struct ftrace_regs *fregs);
>  #endif
> -- 
> 2.33.0

I am still applying this fix ...

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the kspp-gustavo tree
  2021-10-20 16:18 ` Gustavo A. R. Silva
@ 2021-10-20 16:20   ` Kees Cook
  0 siblings, 0 replies; 28+ messages in thread
From: Kees Cook @ 2021-10-20 16:20 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Stephen Rothwell, Gustavo A. R. Silva, Linux Kernel Mailing List,
	Linux Next Mailing List

On Wed, Oct 20, 2021 at 11:18:51AM -0500, Gustavo A. R. Silva wrote:
> Hi Stephen,
> 
> On Mon, Oct 18, 2021 at 07:30:48PM +1100, Stephen Rothwell wrote:
> > Hi all,
> > 
> > After merging the kspp-gustavo tree, today's linux-next build (sparc64
> > defconfig) failed like this:
> > 
> > sparc64-linux-gcc: error: unrecognized command line option '-Wcast-function-type'; did you mean '-Wbad-function-cast'?
> > 
> > $ sparc64-linux-gcc --version
> > sparc64-linux-gcc (Custom f51944395b6aa154) 7.3.1 20180130
> 
> I think this should work just fine with GCC 8.x

Does -Wcast-function-type need to be used via cc-option ?

-Kees

> 
> Thanks
> --
> Gustavo
> 
> > 
> > Caused by commit
> > 
> >   21078041965e ("Makefile: Enable -Wcast-function-type")
> > 
> > I have reverted that commit for today.
> > 
> > -- 
> > Cheers,
> > Stephen Rothwell
> 
> 

-- 
Kees Cook

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

* Re: linux-next: build failure after merge of the kspp-gustavo tree
  2021-10-18  8:30 Stephen Rothwell
@ 2021-10-20 16:18 ` Gustavo A. R. Silva
  2021-10-20 16:20   ` Kees Cook
  2021-10-25  1:55 ` Stephen Rothwell
  1 sibling, 1 reply; 28+ messages in thread
From: Gustavo A. R. Silva @ 2021-10-20 16:18 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Gustavo A. R. Silva, Kees Cook, Linux Kernel Mailing List,
	Linux Next Mailing List

Hi Stephen,

On Mon, Oct 18, 2021 at 07:30:48PM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the kspp-gustavo tree, today's linux-next build (sparc64
> defconfig) failed like this:
> 
> sparc64-linux-gcc: error: unrecognized command line option '-Wcast-function-type'; did you mean '-Wbad-function-cast'?
> 
> $ sparc64-linux-gcc --version
> sparc64-linux-gcc (Custom f51944395b6aa154) 7.3.1 20180130

I think this should work just fine with GCC 8.x

Thanks
--
Gustavo

> 
> Caused by commit
> 
>   21078041965e ("Makefile: Enable -Wcast-function-type")
> 
> I have reverted that commit for today.
> 
> -- 
> Cheers,
> Stephen Rothwell



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

* Re: linux-next: build failure after merge of the kspp-gustavo tree
  2021-10-18  7:15 Stephen Rothwell
@ 2021-10-18 17:13 ` Gustavo A. R. Silva
  2021-10-25  1:54 ` Stephen Rothwell
  1 sibling, 0 replies; 28+ messages in thread
From: Gustavo A. R. Silva @ 2021-10-18 17:13 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Gustavo A. R. Silva, Steven Rostedt, Linux Kernel Mailing List,
	Linux Next Mailing List

Thanks, Stephen.
--
Gustavo

On Mon, Oct 18, 2021 at 06:15:59PM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the kspp-gustavo tree, today's linux-next build (powerpc
> pseries_le_defconfig) failed like this:
> 
> In file included from include/linux/perf_event.h:49,
>                  from arch/powerpc/perf/callchain.c:9:
> include/linux/ftrace.h:49:41: error: 'struct ftrace_regs' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
>    49 |           struct ftrace_ops *op, struct ftrace_regs *fregs);
>       |                                         ^~~~~~~~~~~
> cc1: all warnings being treated as errors
> 
> (many of these)
> 
> Caused by commit
> 
>   c45ede6c2781 ("ftrace: Fix -Wmissing-prototypes errors")
> 
> I have added the following fixup for today.
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Mon, 18 Oct 2021 17:56:30 +1100
> Subject: [PATCH] fixup for "ftrace: Fix -Wmissing-prototypes errors"
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  include/linux/ftrace.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
> index 871b51bec170..ada656c6824d 100644
> --- a/include/linux/ftrace.h
> +++ b/include/linux/ftrace.h
> @@ -45,6 +45,7 @@ struct ftrace_ops;
>  void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip);
>  #else
>  # define FTRACE_FORCE_LIST_FUNC 0
> +struct ftrace_regs;
>  void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip,
>  			       struct ftrace_ops *op, struct ftrace_regs *fregs);
>  #endif
> -- 
> 2.33.0
> 
> -- 
> Cheers,
> Stephen Rothwell



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

* linux-next: build failure after merge of the kspp-gustavo tree
@ 2021-10-18  8:30 Stephen Rothwell
  2021-10-20 16:18 ` Gustavo A. R. Silva
  2021-10-25  1:55 ` Stephen Rothwell
  0 siblings, 2 replies; 28+ messages in thread
From: Stephen Rothwell @ 2021-10-18  8:30 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Kees Cook, Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

After merging the kspp-gustavo tree, today's linux-next build (sparc64
defconfig) failed like this:

sparc64-linux-gcc: error: unrecognized command line option '-Wcast-function-type'; did you mean '-Wbad-function-cast'?

$ sparc64-linux-gcc --version
sparc64-linux-gcc (Custom f51944395b6aa154) 7.3.1 20180130

Caused by commit

  21078041965e ("Makefile: Enable -Wcast-function-type")

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] 28+ messages in thread

* linux-next: build failure after merge of the kspp-gustavo tree
@ 2021-10-18  7:15 Stephen Rothwell
  2021-10-18 17:13 ` Gustavo A. R. Silva
  2021-10-25  1:54 ` Stephen Rothwell
  0 siblings, 2 replies; 28+ messages in thread
From: Stephen Rothwell @ 2021-10-18  7:15 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Steven Rostedt, Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

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

In file included from include/linux/perf_event.h:49,
                 from arch/powerpc/perf/callchain.c:9:
include/linux/ftrace.h:49:41: error: 'struct ftrace_regs' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
   49 |           struct ftrace_ops *op, struct ftrace_regs *fregs);
      |                                         ^~~~~~~~~~~
cc1: all warnings being treated as errors

(many of these)

Caused by commit

  c45ede6c2781 ("ftrace: Fix -Wmissing-prototypes errors")

I have added the following fixup for today.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 18 Oct 2021 17:56:30 +1100
Subject: [PATCH] fixup for "ftrace: Fix -Wmissing-prototypes errors"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 include/linux/ftrace.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index 871b51bec170..ada656c6824d 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -45,6 +45,7 @@ struct ftrace_ops;
 void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip);
 #else
 # define FTRACE_FORCE_LIST_FUNC 0
+struct ftrace_regs;
 void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip,
 			       struct ftrace_ops *op, struct ftrace_regs *fregs);
 #endif
-- 
2.33.0

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the kspp-gustavo tree
  2021-10-15  0:07 ` Gustavo A. R. Silva
@ 2021-10-15  8:02   ` Stephen Rothwell
  0 siblings, 0 replies; 28+ messages in thread
From: Stephen Rothwell @ 2021-10-15  8:02 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Gustavo A. R. Silva, Kees Cook, Linux Kernel Mailing List,
	Linux Next Mailing List, Daniel Borkmann, Alexei Starovoitov,
	Networking, David Miller

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

Hi Gustavo,

On Thu, 14 Oct 2021 19:07:52 -0500 "Gustavo A. R. Silva" <gustavoars@kernel.org> wrote:
>
> On Fri, Oct 15, 2021 at 10:48:40AM +1100, Stephen Rothwell wrote:
> > 
> > After merging the kspp-gustavo tree, today's linux-next build (x86_64
> > allmodconfig) failed like this:
> > 
> > In file included from include/linux/bpf_verifier.h:9,
> >                  from kernel/bpf/verifier.c:12:
> > kernel/bpf/verifier.c: In function 'jit_subprogs':
> > include/linux/filter.h:366:4: error: cast between incompatible function types from 'unsigned int (*)(const void *, const struct bpf_insn *)' to 'u64 (*)(u64,  u64,  u64,  u64,  u64)' {aka 'long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)'} [-Werror=cast-function-type]
> >   366 |   ((u64 (*)(u64, u64, u64, u64, u64))(x))  
> [..]
> > 
> >   21078041965e ("Makefile: Enable -Wcast-function-type")
> > 
> > I have used the kspp-gustavo tree from next-20211013 for today.  
> 
> Please, merge my -next tree. All the warnings above are already fixed in
> bpf-next by commit:
> 
> 	3d717fad5081 ("bpf: Replace "want address" users of BPF_CAST_CALL with BPF_CALL_IMM")
> 
> So, once you merge bpf-next, those warnings will go away.

Well, I really prefer for trees in linux-next to have no dependencies
like this.  For one thing, you cannot test your tree as Linus will
because an allmodconfig build of your tree alone fails.  For another,
if Linus merges your tree before net-next (which will merge bpf-next
before the merge window), he will yell at you (and me) for breaking his
tree.  And in the general case, it could be possible that Linus will
decide to not merge the tree containing the fix (unlikely for the
net-next tree).

Also, the trees in linux-next are merged in whatever order I take a
fancy to (and sometimes I do move them around).  I could not have known
that there was a dependency between these 2 trees (well, actually I
could have if I could remember back to Sept 30 when I first reported
this :-( ) and (given that I merge over 350 trees) it would be a pain
to have to keep track (and keep moving trees around.

So it is a pity that 3d717fad5081 was not in a small branch that could
be merged into both trees.  You could, of course, also apply it to your
tree and we could put up with any resulting conflicts.

This discussion has been had before ... trees that Linus is asked to
merge should be fairly much standalone ...
-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the kspp-gustavo tree
  2021-10-14 23:48 Stephen Rothwell
@ 2021-10-15  0:07 ` Gustavo A. R. Silva
  2021-10-15  8:02   ` Stephen Rothwell
  0 siblings, 1 reply; 28+ messages in thread
From: Gustavo A. R. Silva @ 2021-10-15  0:07 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Gustavo A. R. Silva, Kees Cook, Linux Kernel Mailing List,
	Linux Next Mailing List

Stephen,

On Fri, Oct 15, 2021 at 10:48:40AM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the kspp-gustavo tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> In file included from include/linux/bpf_verifier.h:9,
>                  from kernel/bpf/verifier.c:12:
> kernel/bpf/verifier.c: In function 'jit_subprogs':
> include/linux/filter.h:366:4: error: cast between incompatible function types from 'unsigned int (*)(const void *, const struct bpf_insn *)' to 'u64 (*)(u64,  u64,  u64,  u64,  u64)' {aka 'long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)'} [-Werror=cast-function-type]
>   366 |   ((u64 (*)(u64, u64, u64, u64, u64))(x))
[..]
> 
>   21078041965e ("Makefile: Enable -Wcast-function-type")
> 
> I have used the kspp-gustavo tree from next-20211013 for today.

Please, merge my -next tree. All the warnings above are already fixed in
bpf-next by commit:

	3d717fad5081 ("bpf: Replace "want address" users of BPF_CAST_CALL with BPF_CALL_IMM")

So, once you merge bpf-next, those warnings will go away.

Thanks
--
Gustavo

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

* linux-next: build failure after merge of the kspp-gustavo tree
@ 2021-10-14 23:48 Stephen Rothwell
  2021-10-15  0:07 ` Gustavo A. R. Silva
  0 siblings, 1 reply; 28+ messages in thread
From: Stephen Rothwell @ 2021-10-14 23:48 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Kees Cook, Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

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

In file included from include/linux/bpf_verifier.h:9,
                 from kernel/bpf/verifier.c:12:
kernel/bpf/verifier.c: In function 'jit_subprogs':
include/linux/filter.h:366:4: error: cast between incompatible function types from 'unsigned int (*)(const void *, const struct bpf_insn *)' to 'u64 (*)(u64,  u64,  u64,  u64,  u64)' {aka 'long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)'} [-Werror=cast-function-type]
  366 |   ((u64 (*)(u64, u64, u64, u64, u64))(x))
      |    ^
kernel/bpf/verifier.c:12472:16: note: in expansion of macro 'BPF_CAST_CALL'
12472 |    insn->imm = BPF_CAST_CALL(func[subprog]->bpf_func) -
      |                ^~~~~~~~~~~~~
kernel/bpf/verifier.c: In function 'do_misc_fixups':
include/linux/filter.h:366:4: error: cast between incompatible function types from 'void * (* const)(struct bpf_map *, void *)' to 'u64 (*)(u64,  u64,  u64,  u64,  u64)' {aka 'long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)'} [-Werror=cast-function-type]
  366 |   ((u64 (*)(u64, u64, u64, u64, u64))(x))
      |    ^
kernel/bpf/verifier.c:12953:17: note: in expansion of macro 'BPF_CAST_CALL'
12953 |     insn->imm = BPF_CAST_CALL(ops->map_lookup_elem) -
      |                 ^~~~~~~~~~~~~
include/linux/filter.h:366:4: error: cast between incompatible function types from 'int (* const)(struct bpf_map *, void *, void *, u64)' {aka 'int (* const)(struct bpf_map *, void *, void *, long long unsigned int)'} to 'u64 (*)(u64,  u64,  u64,  u64,  u64)' {aka 'long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)'} [-Werror=cast-function-type]
  366 |   ((u64 (*)(u64, u64, u64, u64, u64))(x))
      |    ^
kernel/bpf/verifier.c:12957:17: note: in expansion of macro 'BPF_CAST_CALL'
12957 |     insn->imm = BPF_CAST_CALL(ops->map_update_elem) -
      |                 ^~~~~~~~~~~~~
include/linux/filter.h:366:4: error: cast between incompatible function types from 'int (* const)(struct bpf_map *, void *)' to 'u64 (*)(u64,  u64,  u64,  u64,  u64)' {aka 'long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)'} [-Werror=cast-function-type]
  366 |   ((u64 (*)(u64, u64, u64, u64, u64))(x))
      |    ^
kernel/bpf/verifier.c:12961:17: note: in expansion of macro 'BPF_CAST_CALL'
12961 |     insn->imm = BPF_CAST_CALL(ops->map_delete_elem) -
      |                 ^~~~~~~~~~~~~
include/linux/filter.h:366:4: error: cast between incompatible function types from 'int (* const)(struct bpf_map *, void *, u64)' {aka 'int (* const)(struct bpf_map *, void *, long long unsigned int)'} to 'u64 (*)(u64,  u64,  u64,  u64,  u64)' {aka 'long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)'} [-Werror=cast-function-type]
  366 |   ((u64 (*)(u64, u64, u64, u64, u64))(x))
      |    ^
kernel/bpf/verifier.c:12965:17: note: in expansion of macro 'BPF_CAST_CALL'
12965 |     insn->imm = BPF_CAST_CALL(ops->map_push_elem) -
      |                 ^~~~~~~~~~~~~
include/linux/filter.h:366:4: error: cast between incompatible function types from 'int (* const)(struct bpf_map *, void *)' to 'u64 (*)(u64,  u64,  u64,  u64,  u64)' {aka 'long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)'} [-Werror=cast-function-type]
  366 |   ((u64 (*)(u64, u64, u64, u64, u64))(x))
      |    ^
kernel/bpf/verifier.c:12969:17: note: in expansion of macro 'BPF_CAST_CALL'
12969 |     insn->imm = BPF_CAST_CALL(ops->map_pop_elem) -
      |                 ^~~~~~~~~~~~~
include/linux/filter.h:366:4: error: cast between incompatible function types from 'int (* const)(struct bpf_map *, void *)' to 'u64 (*)(u64,  u64,  u64,  u64,  u64)' {aka 'long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)'} [-Werror=cast-function-type]
  366 |   ((u64 (*)(u64, u64, u64, u64, u64))(x))
      |    ^
kernel/bpf/verifier.c:12973:17: note: in expansion of macro 'BPF_CAST_CALL'
12973 |     insn->imm = BPF_CAST_CALL(ops->map_peek_elem) -
      |                 ^~~~~~~~~~~~~
include/linux/filter.h:366:4: error: cast between incompatible function types from 'int (* const)(struct bpf_map *, u32,  u64)' {aka 'int (* const)(struct bpf_map *, unsigned int,  long long unsigned int)'} to 'u64 (*)(u64,  u64,  u64,  u64,  u64)' {aka 'long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)'} [-Werror=cast-function-type]
  366 |   ((u64 (*)(u64, u64, u64, u64, u64))(x))
      |    ^
kernel/bpf/verifier.c:12977:17: note: in expansion of macro 'BPF_CAST_CALL'
12977 |     insn->imm = BPF_CAST_CALL(ops->map_redirect) -
      |                 ^~~~~~~~~~~~~
cc1: all warnings being treated as errors

Caused by commit

  21078041965e ("Makefile: Enable -Wcast-function-type")

I have used the kspp-gustavo tree from next-20211013 for today.
-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the kspp-gustavo tree
  2020-08-17 23:38 Stephen Rothwell
@ 2020-08-18  0:06 ` Gustavo A. R. Silva
  0 siblings, 0 replies; 28+ messages in thread
From: Gustavo A. R. Silva @ 2020-08-18  0:06 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Linux Next Mailing List, Linux Kernel Mailing List

Hi Stephen,

On 8/17/20 18:38, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the kspp-gustavo tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
> 
> arch/powerpc/boot/inflate.c: In function 'zlib_inflate':
> arch/powerpc/boot/inflate.c:399:3: error: 'fallthrough' undeclared (first use in this function)
>   399 |   fallthrough;
>       |   ^~~~~~~~~~~
> arch/powerpc/boot/inflate.c:399:3: note: each undeclared identifier is reported only once for each function it appears in
> In file included from ./arch/powerpc/boot/decompress_inflate.c:12,
>                  from /home/sfr/next/next/arch/powerpc/boot/decompress.c:33:
> ./arch/powerpc/boot/inflate.c: In function 'zlib_inflate':
> ./arch/powerpc/boot/inflate.c:399:3: error: 'fallthrough' undeclared (first use in this function)
>   399 |   fallthrough;
>       |   ^~~~~~~~~~~
> ./arch/powerpc/boot/inflate.c:399:3: note: each undeclared identifier is reported only once for each function it appears in
> 
> Caused by commit
> 
>   02b894b985cb ("treewide: Use fallthrough pseudo-keyword")
> 
> I have used the kspp-gustavo tree from next-20200817 for today.
> 

Sorry for the inconvenience. This is a huge treewide patch and I
overlooked some erroneous conversions.  I'll fix this up for
tomorrow's linux-next.

Thanks
--
Gustavo


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

* Re: linux-next: build failure after merge of the kspp-gustavo tree
  2020-08-17 23:34 Stephen Rothwell
@ 2020-08-17 23:46 ` Gustavo A. R. Silva
  0 siblings, 0 replies; 28+ messages in thread
From: Gustavo A. R. Silva @ 2020-08-17 23:46 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Linux Next Mailing List, Linux Kernel Mailing List

Hi Stephen,

On 8/17/20 18:34, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the kspp-gustavo tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
> 
> In file included from include/linux/compiler_types.h:65,
>                  from <command-line>:
> arch/powerpc/net/bpf_jit_comp64.c: In function 'bpf_jit_build_body':
> include/linux/compiler_attributes.h:214:41: error: attribute 'fallthrough' not preceding a case label or default label [-Werror]
>   214 | # define fallthrough                    __attribute__((__fallthrough__))
>       |                                         ^~~~~~~~~~~~~
> arch/powerpc/net/bpf_jit_comp64.c:847:4: note: in expansion of macro 'fallthrough'
>   847 |    fallthrough;
>       |    ^~~~~~~~~~~
> 
> Caused by commit
> 
>   02b894b985cb ("treewide: Use fallthrough pseudo-keyword")
> 
> I have added the following patch for today.
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Tue, 18 Aug 2020 09:26:47 +1000
> Subject: [PATCH] revert part of "treewide: Use fallthrough pseudo-keyword"
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  arch/powerpc/net/bpf_jit_comp64.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/net/bpf_jit_comp64.c b/arch/powerpc/net/bpf_jit_comp64.c
> index 57412af338fb..022103c6a201 100644
> --- a/arch/powerpc/net/bpf_jit_comp64.c
> +++ b/arch/powerpc/net/bpf_jit_comp64.c
> @@ -844,7 +844,7 @@ static int bpf_jit_build_body(struct bpf_prog *fp, u32 *image,
>  		case BPF_JMP32 | BPF_JSET | BPF_K:
>  		case BPF_JMP32 | BPF_JSET | BPF_X:
>  			true_cond = COND_NE;
> -			fallthrough;
> +			/* Fall through */
>  
>  cond_branch:
>  			switch (code) {
> 

Thanks a lot for the patch. I will fix this up in my -next tree for
tomorrow's linux-next. :)

--
Gustavo

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

* linux-next: build failure after merge of the kspp-gustavo tree
@ 2020-08-17 23:38 Stephen Rothwell
  2020-08-18  0:06 ` Gustavo A. R. Silva
  0 siblings, 1 reply; 28+ messages in thread
From: Stephen Rothwell @ 2020-08-17 23:38 UTC (permalink / raw)
  To: Gustavo A. R. Silva; +Cc: Linux Next Mailing List, Linux Kernel Mailing List

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

Hi all,

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

arch/powerpc/boot/inflate.c: In function 'zlib_inflate':
arch/powerpc/boot/inflate.c:399:3: error: 'fallthrough' undeclared (first use in this function)
  399 |   fallthrough;
      |   ^~~~~~~~~~~
arch/powerpc/boot/inflate.c:399:3: note: each undeclared identifier is reported only once for each function it appears in
In file included from ./arch/powerpc/boot/decompress_inflate.c:12,
                 from /home/sfr/next/next/arch/powerpc/boot/decompress.c:33:
./arch/powerpc/boot/inflate.c: In function 'zlib_inflate':
./arch/powerpc/boot/inflate.c:399:3: error: 'fallthrough' undeclared (first use in this function)
  399 |   fallthrough;
      |   ^~~~~~~~~~~
./arch/powerpc/boot/inflate.c:399:3: note: each undeclared identifier is reported only once for each function it appears in

Caused by commit

  02b894b985cb ("treewide: Use fallthrough pseudo-keyword")

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

-- 
Cheers,
Stephen Rothwell

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

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

* linux-next: build failure after merge of the kspp-gustavo tree
@ 2020-08-17 23:34 Stephen Rothwell
  2020-08-17 23:46 ` Gustavo A. R. Silva
  0 siblings, 1 reply; 28+ messages in thread
From: Stephen Rothwell @ 2020-08-17 23:34 UTC (permalink / raw)
  To: Gustavo A. R. Silva; +Cc: Linux Next Mailing List, Linux Kernel Mailing List

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

Hi all,

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

In file included from include/linux/compiler_types.h:65,
                 from <command-line>:
arch/powerpc/net/bpf_jit_comp64.c: In function 'bpf_jit_build_body':
include/linux/compiler_attributes.h:214:41: error: attribute 'fallthrough' not preceding a case label or default label [-Werror]
  214 | # define fallthrough                    __attribute__((__fallthrough__))
      |                                         ^~~~~~~~~~~~~
arch/powerpc/net/bpf_jit_comp64.c:847:4: note: in expansion of macro 'fallthrough'
  847 |    fallthrough;
      |    ^~~~~~~~~~~

Caused by commit

  02b894b985cb ("treewide: Use fallthrough pseudo-keyword")

I have added the following patch for today.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 18 Aug 2020 09:26:47 +1000
Subject: [PATCH] revert part of "treewide: Use fallthrough pseudo-keyword"

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

diff --git a/arch/powerpc/net/bpf_jit_comp64.c b/arch/powerpc/net/bpf_jit_comp64.c
index 57412af338fb..022103c6a201 100644
--- a/arch/powerpc/net/bpf_jit_comp64.c
+++ b/arch/powerpc/net/bpf_jit_comp64.c
@@ -844,7 +844,7 @@ static int bpf_jit_build_body(struct bpf_prog *fp, u32 *image,
 		case BPF_JMP32 | BPF_JSET | BPF_K:
 		case BPF_JMP32 | BPF_JSET | BPF_X:
 			true_cond = COND_NE;
-			fallthrough;
+			/* Fall through */
 
 cond_branch:
 			switch (code) {
-- 
2.28.0

-- 
Cheers,
Stephen Rothwell

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

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

end of thread, other threads:[~2023-11-21 23:15 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-29 23:59 linux-next: build failure after merge of the kspp-gustavo tree Stephen Rothwell
2021-09-30  0:11 ` Gustavo A. R. Silva
  -- strict thread matches above, loose matches on Subject: below --
2023-11-21  2:19 Stephen Rothwell
2023-11-21 16:31 ` Gustavo A. R. Silva
2023-11-21 23:15   ` Stephen Rothwell
2023-11-17  0:33 Stephen Rothwell
2023-11-17  0:39 ` Gustavo A. R. Silva
2021-10-18  8:30 Stephen Rothwell
2021-10-20 16:18 ` Gustavo A. R. Silva
2021-10-20 16:20   ` Kees Cook
2021-10-25  1:55 ` Stephen Rothwell
2021-10-25 19:19   ` Kees Cook
2021-10-25 19:31     ` Gustavo A. R. Silva
2021-10-25 19:34       ` Kees Cook
2021-10-18  7:15 Stephen Rothwell
2021-10-18 17:13 ` Gustavo A. R. Silva
2021-10-25  1:54 ` Stephen Rothwell
2021-10-25  2:11   ` Gustavo A. R. Silva
2021-10-25  2:42     ` Steven Rostedt
2021-10-25  4:30       ` Stephen Rothwell
2021-10-25 11:35         ` Steven Rostedt
2021-10-14 23:48 Stephen Rothwell
2021-10-15  0:07 ` Gustavo A. R. Silva
2021-10-15  8:02   ` Stephen Rothwell
2020-08-17 23:38 Stephen Rothwell
2020-08-18  0:06 ` Gustavo A. R. Silva
2020-08-17 23:34 Stephen Rothwell
2020-08-17 23:46 ` Gustavo A. R. Silva

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).