From: Andy Lutomirski Subject: Re: [PATCH net-next v5 07/20] zinc: Poly1305 generic C implementations and selftest Date: Tue, 18 Sep 2018 21:13:04 -0700 Message-ID: References: <20180918161646.19105-1-Jason@zx2c4.com> <20180918161646.19105-8-Jason@zx2c4.com> <20180919005054.GC74746@gmail.com> Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Cc: Eric Biggers , LKML , Netdev , Linux Crypto Mailing List , David Miller , Greg Kroah-Hartman , Samuel Neves , Andrew Lutomirski , Jean-Philippe Aumasson To: "Jason A. Donenfeld" Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-crypto.vger.kernel.org > On Sep 18, 2018, at 6:35 PM, Jason A. Donenfeld wrote: >=20 >> On Wed, Sep 19, 2018 at 2:50 AM Eric Biggers wrote:= >> Hardcoding the 'input' array to 600 bytes forces the full amount of space= to be >> reserved in the kernel image for every test vector. Also, if anyone adds= a >> longer test vector they will need to remember to increase the value. >>=20 >> It should be a const pointer instead, like the test vectors in crypto/tes= tmgr.h. >=20 > I know. The agony. This has been really annoying me. I originally did > it the right way, but removed it last week, when I noticed that gcc > failed to put it in the initconst section: >=20 > https://git.zx2c4.com/WireGuard/commit/?id=3Df4698d20f13946afc6ce99e98685b= a3f9adc4474 >=20 > Even changing the (u8[]){ ... } into a (const u8[]){ ... } or even > into a const string literal does not do the trick. It makes it into > the constant data section with const, but it does not make it into the > initconst section. What a bummer. >=20 > I went asking about this on the gcc mailing list, to see if there was > just some aspect of C that I had overlooked: > https://gcc.gnu.org/ml/gcc/2018-09/msg00043.html Can you not uglify the code a bit by using normal (non-compound) liberals as= described in the response to that email?