Development discussion of WireGuard
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@toke.dk>
To: "WireGuard mailing list" <wireguard@lists.zx2c4.com>
Subject: Re: [WireGuard] Error building against grsec-enabled kernel
Date: Wed, 19 Oct 2016 18:07:37 +0200	[thread overview]
Message-ID: <87zim0wcdy.fsf@toke.dk> (raw)
In-Reply-To: <87a8e0jucl.fsf@toke.dk> ("Toke =?utf-8?Q?H=C3=B8iland-J?= =?utf-8?Q?=C3=B8rgensen=22's?= message of "Wed, 19 Oct 2016 16:18:02 +0200")

Toke H=C3=B8iland-J=C3=B8rgensen <toke@toke.dk> writes:

> Toke H=C3=B8iland-J=C3=B8rgensen <toke@toke.dk> writes:
>
>> I'm getting build errors when building WireGuard against a grsec-enabled
>> kernel (on Arch linux):
>>
>> DKMS make.log for wireguard-0.0.20161014 for kernel 4.7.8.201610161720-1=
-grsec (x86_64)
>> Wed 19 Oct 14:59:25 CEST 2016
>> make: Entering directory '/usr/lib/modules/4.7.8.201610161720-1-grsec/bu=
ild'
>>   LD      /var/lib/dkms/wireguard/0.0.20161014/build/built-in.o
>>   CC [M]  /var/lib/dkms/wireguard/0.0.20161014/build/main.o
>> /var/lib/dkms/wireguard/0.0.20161014/build/main.o: warning: objtool: mod=
_exit(): can't find starting instruction
>>   CC [M]  /var/lib/dkms/wireguard/0.0.20161014/build/noise.o
>>   CC [M]  /var/lib/dkms/wireguard/0.0.20161014/build/device.o
>> /var/lib/dkms/wireguard/0.0.20161014/build/device.c:330:29: error: const=
ified variable =E2=80=98link_ops=E2=80=99 placed into writable section ".da=
ta..read_mostly"
>>  static struct rtnl_link_ops link_ops __read_mostly =3D {
>>                              ^~~~~~~~
>> make[1]: *** [scripts/Makefile.build:290: /var/lib/dkms/wireguard/0.0.20=
161014/build/device.o] Error 1
>> make: *** [Makefile:1465: _module_/var/lib/dkms/wireguard/0.0.20161014/b=
uild] Error 2
>> make: Leaving directory '/usr/lib/modules/4.7.8.201610161720-1-grsec/bui=
ld'
>>
>> Any idea how to fix this?
>
> OK, so turns out just getting rid of the __read_mostly fixes things.
> This could conceivably be conditioned on CONSTIFY_PLUGIN in the upstream
> source? :)

... but though I managed to get it to build, there's an overflow
somewhere in the RX path with causes PAX to kill the interrupt handler
(and thus crash the kernel). Don't have a backtrace, sorry :(

-Toke

  reply	other threads:[~2016-10-19 16:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-19 13:03 Toke Høiland-Jørgensen
2016-10-19 14:18 ` Toke Høiland-Jørgensen
2016-10-19 16:07   ` Toke Høiland-Jørgensen [this message]
2016-10-19 22:35     ` Jason A. Donenfeld
2016-10-20  2:19     ` Jason A. Donenfeld
2016-10-21  0:24       ` PaX Team
2016-10-21  2:32         ` Jason A. Donenfeld
2016-10-21  8:02           ` PaX Team
2016-10-21  8:47             ` Jason A. Donenfeld
2016-10-21  9:46               ` PaX Team
2016-10-22  7:56                 ` Jason A. Donenfeld
2016-10-21  9:53               ` Toke Høiland-Jørgensen
2016-10-22  8:03                 ` Jason A. Donenfeld
2016-10-22 13:10                   ` Toke Høiland-Jørgensen
2016-10-23 10:23                     ` Jason A. Donenfeld

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zim0wcdy.fsf@toke.dk \
    --to=toke@toke.dk \
    --cc=wireguard@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).