Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2185328imm; Thu, 20 Sep 2018 09:02:12 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ6M66JK0XBUf3vkDWbofrc5cr0RC5XdT3qEKeKjt3YU9nNVZh6VmRsSXB1DOa9OeveaS0J X-Received: by 2002:a65:4384:: with SMTP id m4-v6mr37500791pgp.265.1537459332735; Thu, 20 Sep 2018 09:02:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537459332; cv=none; d=google.com; s=arc-20160816; b=BwHj0OeXBKSHqCEhvWZNIH/KJNgNm8CugIfQgBVjKUpuA1F9fWzoDDtnImWK7YJ61k Na0mXLkvoA1Sxrf6wg/KmwGa0t/tpEh83Ao3VDn4PFDL82SHfnDAGjrkQPLNspeYdI28 iicmaPYn/iPKm/feymD1wSGhzEslivqFxoDFnGcW0CHMpwfnCUznR1huYqfIrlNWJKSh rj/Gy4epAnjrYTHElwjpau3IQoJROjor3rdynyBOd2dnxidZq4PZ1hDkJ/k/UdFNDk6E bZ8Xe/g/wbN6HisWdm/4V990Djmvk4TmeOGUjNFodY7Je/34BiCyu6EY52/tkHob342P r9hA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=ODB4YhYAlxF9IdUC/cpQTQpHH585NORYuHoXcvqB5iA=; b=XAxFcBumuue96qiUoR0aE1tEymsTRsbks7d+hAQ5KsPLj/4ffDj5Vd9iS4SJNLcEZd hnmbEW0RoInzyymljvAi1mHfJb+32TYTEXXYiVQUcmAfuuPNPpU3lg3yykOBPg4cWlFI aTbw12KcQ6UiRvHHxndsHt2fa8hIC6OocUlC3kUEqyYRjzSmi9Em0fgPREDXwScdLGAv 7x+Leip6SRLzi5Mpj7PMnLjJjhqsdjVmznz+g7Ybsglhl+f+85qpTGDmKFowHRbSsPPm D3FtmzSMTx8w1Yt4+QlI6ID/OklkhFY6muK1jDUve+ZyDTPmdrV4+3SBlMJX6dsxEB8+ nvlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=ex2JSk+q; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u26-v6si21803197pge.590.2018.09.20.09.01.51; Thu, 20 Sep 2018 09:02:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=ex2JSk+q; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727556AbeITVpr (ORCPT + 99 others); Thu, 20 Sep 2018 17:45:47 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:40609 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725876AbeITVpr (ORCPT ); Thu, 20 Sep 2018 17:45:47 -0400 Received: by mail-pg1-f195.google.com with SMTP id l63-v6so4639602pga.7 for ; Thu, 20 Sep 2018 09:01:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=ODB4YhYAlxF9IdUC/cpQTQpHH585NORYuHoXcvqB5iA=; b=ex2JSk+qgrnfhhFZFiuc1VjksHvB3Cn5Xz8U033W1GQH7sLr/JwqITHbJTjpemUsUf k1vLNOws13HzrwkhpxyDpBaBEk2y2gVpnx6dCVQATztifcfyshmfeWEQIIVY6b8NhZsc R0A4wjt6RLC1nnMXAuPUhXRnwnBM7YW7fOvJCFBIzpQIEGWNirA0NIiCwfKkOKsqEM2N KfIQ3eqRCamhsgLhVFnjQF4kpab/zL4bgPXbRAZO1gr+mT9qsLAygU1Iw/1GUs38+Zkn tXPKDV6UWkYGGsgNE+U6irTD9l3Pd51761dYHGPHV50bKMbdVXibL4QoVel0iqjowihr SnCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=ODB4YhYAlxF9IdUC/cpQTQpHH585NORYuHoXcvqB5iA=; b=iEMWmQFmF7huWIXs4e16K9OwmsEhW1gtn6+GaF6ciGcSZqPa9q2i46nnZo6bYqK1TZ pbrT6Y+dIYMdKh5GA9UxFZ/of3/vZhhtz022RTI4Jlm32cT765Ak4W7VdloPyI9dMUMS KPbKVjInx4XazF3s7Wh+OjWNCXJcrUYq2FVsty8uIyLaFg0nPdx5UYC3Nkj3PODbnSmM SVpv2U8TkmOvpazPlIZrPIk68MbPoX+EqA4nKqzeAnG4+mm7/YjSbyvS06oUxLWdHQoV 2P3FQYd5tORfbg2tbO8lxfa/75gaT6AUXZDPzojx7/TfLE6fq6sMpL+GqCPqK2VKOU7t ZwuQ== X-Gm-Message-State: APzg51C4P54J3lgSktOiGzHQQ9XrH36dqr6zYUkDS4IrOqlvbF2248g+ hU15GDtmdXhyotz+r/+Te7wuAw== X-Received: by 2002:a62:398c:: with SMTP id u12-v6mr42563390pfj.9.1537459298126; Thu, 20 Sep 2018 09:01:38 -0700 (PDT) Received: from ?IPv6:2601:646:c200:7429:a59f:b13a:b56d:725f? ([2601:646:c200:7429:a59f:b13a:b56d:725f]) by smtp.gmail.com with ESMTPSA id f62-v6sm34654312pfg.74.2018.09.20.09.01.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Sep 2018 09:01:37 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: [PATCH net-next v5 02/20] zinc: introduce minimal cryptography library From: Andy Lutomirski X-Mailer: iPhone Mail (15G77) In-Reply-To: Date: Thu, 20 Sep 2018 09:01:36 -0700 Cc: "Jason A. Donenfeld" , Arnd Bergmann , Eric Biggers , Linux Kernel Mailing List , "" , "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , "David S. Miller" , Greg Kroah-Hartman , Samuel Neves , Andy Lutomirski , Jean-Philippe Aumasson Content-Transfer-Encoding: quoted-printable Message-Id: <043F588D-4F40-49AB-9F19-1C6180F0393E@amacapital.net> References: <20180918161646.19105-1-Jason@zx2c4.com> <20180918161646.19105-3-Jason@zx2c4.com> To: Ard Biesheuvel Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Sep 20, 2018, at 8:41 AM, Ard Biesheuvel wr= ote: >=20 > (+ Arnd, Eric) >=20 > On 18 September 2018 at 09:16, Jason A. Donenfeld wrote:= > ... >=20 >> diff --git a/lib/zinc/Makefile b/lib/zinc/Makefile >> new file mode 100644 >> index 000000000000..83dfd63988c0 >> --- /dev/null >> +++ b/lib/zinc/Makefile >> @@ -0,0 +1,4 @@ >=20 > Apologies for not spotting these before: >=20 >> +ccflags-y :=3D -O3 >=20 > -O3 optimization has been problematic in the past, at least on x86 but > I think on other architectures as well. Please stick with -O2. >=20 >> +ccflags-y +=3D -Wframe-larger-than=3D$(if (CONFIG_KASAN),16384,8192) >=20 > There is no way we can support code in the kernel with that kind of > stack space requirements. I will let Arnd comment on what we typically > allow, since he deals with such issues on a regular basis. To make matters worse, KASAN is incompatible with VMAP_STACK right now, and K= ASAN is not so good at detecting stack overflow. >=20 >> +ccflags-y +=3D -D'pr_fmt(fmt)=3D"zinc: " fmt' >> +ccflags-$(CONFIG_ZINC_DEBUG) +=3D -DDEBUG >> -- >> 2.19.0 >>=20