Development discussion of WireGuard
 help / color / mirror / Atom feed
* gcc 8 warning
@ 2018-01-30 15:38 Bruno Wolff III
  2018-01-30 16:32 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Bruno Wolff III @ 2018-01-30 15:38 UTC (permalink / raw)
  To: wireguard

While there were a few other warnings about sibling call from callable 
instruction with modified stack frame, the following looked more significant if 
it isn't a gcc bug.
  CC [M]  /home/bruno/WireGuard/src/crypto/chacha20poly1305.o
In file included from ./include/linux/bitmap.h:9,
                 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:21,
                 from ./arch/x86/include/asm/cpufeature.h:5,
                 from ./arch/x86/include/asm/thread_info.h:53,
                 from ./include/linux/thread_info.h:38,
                 from ./arch/x86/include/asm/preempt.h:7,
                 from ./include/linux/preempt.h:81,
                 from ./include/linux/spinlock.h:51,
                 from ./include/linux/seqlock.h:36,
                 from ./include/linux/time.h:6,
                 from ./include/linux/skbuff.h:19,
                 from ./include/linux/ip.h:20,
                 from /home/bruno/WireGuard/src/compat/compat.h:583,
                 from <command-line>:
In function ‘memcpy’,
    inlined from ‘poly1305_update’ at /home/bruno/WireGuard/src/crypto/chacha20poly1305.c:549:4,
    inlined from ‘chacha20poly1305_encrypt_sg’ at /home/bruno/WireGuard/src/crypto/chacha20poly1305.c:673:4:
./include/linux/string.h:344:9: warning: ‘__builtin_memcpy’ forming offset [233, 272] is out of the bounds [0, 232] of object ‘poly1305_state’ with type ‘struct poly1305_ctx’ [-Warray-bounds]
  return __builtin_memcpy(p, q, size);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/bruno/WireGuard/src/crypto/chacha20poly1305.c: In function ‘chacha20poly1305_encrypt_sg’:
/home/bruno/WireGuard/src/crypto/chacha20poly1305.c:652:22: note: ‘poly1305_state’ declared here
  struct poly1305_ctx poly1305_state;
                      ^~~~~~~~~~~~~~
In file included from ./include/linux/bitmap.h:9,
                 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:21,
                 from ./arch/x86/include/asm/cpufeature.h:5,
                 from ./arch/x86/include/asm/thread_info.h:53,
                 from ./include/linux/thread_info.h:38,
                 from ./arch/x86/include/asm/preempt.h:7,
                 from ./include/linux/preempt.h:81,
                 from ./include/linux/spinlock.h:51,
                 from ./include/linux/seqlock.h:36,
                 from ./include/linux/time.h:6,
                 from ./include/linux/skbuff.h:19,
                 from ./include/linux/ip.h:20,
                 from /home/bruno/WireGuard/src/compat/compat.h:583,
                 from <command-line>:
In function ‘memcpy’,
    inlined from ‘poly1305_update’ at /home/bruno/WireGuard/src/crypto/chacha20poly1305.c:549:4,
    inlined from ‘chacha20poly1305_decrypt_sg’ at /home/bruno/WireGuard/src/crypto/chacha20poly1305.c:789:4:
./include/linux/string.h:344:9: warning: ‘__builtin_memcpy’ forming offset [233, 272] is out of the bounds [0, 232] of object ‘poly1305_state’ with type ‘struct poly1305_ctx’ [-Warray-bounds]
  return __builtin_memcpy(p, q, size);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/bruno/WireGuard/src/crypto/chacha20poly1305.c: In function ‘chacha20poly1305_decrypt_sg’:
/home/bruno/WireGuard/src/crypto/chacha20poly1305.c:764:22: note: ‘poly1305_state’ declared here
  struct poly1305_ctx poly1305_state;
                      ^~~~~~~~~~~~~~

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

* Re: gcc 8 warning
  2018-01-30 15:38 gcc 8 warning Bruno Wolff III
@ 2018-01-30 16:32 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2018-01-30 16:32 UTC (permalink / raw)
  To: Bruno Wolff III; +Cc: wireguard

On Tue, Jan 30, 2018 at 09:38:59AM -0600, Bruno Wolff III wrote:
> While there were a few other warnings about sibling call from callable
> instruction with modified stack frame, the following looked more significant
> if it isn't a gcc bug.
>  CC [M]  /home/bruno/WireGuard/src/crypto/chacha20poly1305.o
> In file included from ./include/linux/bitmap.h:9,
>                 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:21,
>                 from ./arch/x86/include/asm/cpufeature.h:5,
>                 from ./arch/x86/include/asm/thread_info.h:53,
>                 from ./include/linux/thread_info.h:38,
>                 from ./arch/x86/include/asm/preempt.h:7,
>                 from ./include/linux/preempt.h:81,
>                 from ./include/linux/spinlock.h:51,
>                 from ./include/linux/seqlock.h:36,
>                 from ./include/linux/time.h:6,
>                 from ./include/linux/skbuff.h:19,
>                 from ./include/linux/ip.h:20,
>                 from /home/bruno/WireGuard/src/compat/compat.h:583,
>                 from <command-line>:
> In function ‘memcpy’,
>    inlined from ‘poly1305_update’ at /home/bruno/WireGuard/src/crypto/chacha20poly1305.c:549:4,
>    inlined from ‘chacha20poly1305_encrypt_sg’ at /home/bruno/WireGuard/src/crypto/chacha20poly1305.c:673:4:
> ./include/linux/string.h:344:9: warning: ‘__builtin_memcpy’ forming offset [233, 272] is out of the bounds [0, 232] of object ‘poly1305_state’ with type ‘struct poly1305_ctx’ [-Warray-bounds]
>  return __builtin_memcpy(p, q, size);
>         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /home/bruno/WireGuard/src/crypto/chacha20poly1305.c: In function ‘chacha20poly1305_encrypt_sg’:
> /home/bruno/WireGuard/src/crypto/chacha20poly1305.c:652:22: note: ‘poly1305_state’ declared here

I don't think the kernel builds properly with gcc8 just yet, so I
wouldn't worry too much about stuff like this.

Try building the 4.15 kernel release with gcc8 and see what happens :)

thanks,

greg k-h

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

end of thread, other threads:[~2018-01-30 16:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-30 15:38 gcc 8 warning Bruno Wolff III
2018-01-30 16:32 ` Greg KH

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