Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp180084imm; Thu, 20 Sep 2018 21:17:14 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ/DMY1dwibHsdG7BMiYKthvCaByD/weuTFSgp8G+FgG1QjOj/b2GkiNyi3L6iurisvbbVL X-Received: by 2002:a63:68c7:: with SMTP id d190-v6mr6723451pgc.135.1537503433955; Thu, 20 Sep 2018 21:17:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537503433; cv=none; d=google.com; s=arc-20160816; b=IyqywQIWoMhn3/2seOPQmy2DQPzhZ0MMF6siczHAMUSdykYNluWqCn0dDeQ+oFwrdv Kdm3oIqlHmCANKP6pcJPNmg2UDXDMy5jTPFGR1VRMUBFF4ziNHA3evjLtSqL65IrKwce zRyqrujs1MvmhQoCjp1um2HTaFVq69aA2O0xFDXW6njI1qDj4Gg8kw+u2zreprzNEK46 YvYm6ze+me/W09xzue559mpwUZZzirdmxm5VZpceg1ooRy1XyrznreP7K0IFuNO1h7k9 mr1Y15/u7js40LLPn8Fn4ozd8dh/pJalenHGMIuzfKuIk42p4gC/WVID3rYfVo4ap76P et7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=ok0g1VV9JFxL2BB59t9GdE6kKED5+buMHiAchob8pyw=; b=duA4M92rYo0Ywex1EhfLplGQJbNQfOz4x50ik/iwG4IY169nL9c2QXL37BdZSU/ZrH AUCrK3zAc5OgVUoHwl+iWH1oTchiVZ0O5ez/Wu5yubceCRUjdRBKeawzEsGdh9JhHJiV Vu3dGQ77TmA6eLqSXFG6WomNZoDpRY4VrEaGSBLqtUXP7b07wzxTo5sDUJW3wPV7P+z5 7ItLdLzjA/mmxlfQ1y79TWnb1ueqtEB0l8wiwNuboVE/xiM4KRxiPK9muqE5fYulcRYA cBcU5d2uJbTXwVRTFrJnaTMaZohs7QlqgeTe9azlB+I9UTP9fhE6Dzmh9MfZrjnIGate jRew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b=zL900dMg; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p1-v6si25644536plb.197.2018.09.20.21.16.58; Thu, 20 Sep 2018 21:17:13 -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=@zx2c4.com header.s=mail header.b=zL900dMg; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389090AbeIUKC7 (ORCPT + 99 others); Fri, 21 Sep 2018 06:02:59 -0400 Received: from frisell.zx2c4.com ([192.95.5.64]:48265 "EHLO frisell.zx2c4.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389010AbeIUKC7 (ORCPT ); Fri, 21 Sep 2018 06:02:59 -0400 Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTP id dabe48db; Fri, 21 Sep 2018 03:58:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=zx2c4.com; h=mime-version :references:in-reply-to:from:date:message-id:subject:to:cc :content-type:content-transfer-encoding; s=mail; bh=8QfnaCuM0dxs CaigjyeDr2rFBOQ=; b=zL900dMgclMhLbdwavVM29VwlonNqk+Yej9EnsgIbcrg 4JHHasX+DXpFAjeIIbuLCBs0t5eSG3LsLWU7zPT3Gdenj5Jwo/PDYtwX6fgKn/KT sTaQTazTvY1ji9y+5uyAQma9KkIWBPPRMuZy0vlWD01g2qoQ6ti0Fdz/fnwxNnMH oPsQ9v5R/Xb+/9hwlST6X66+ppzP4tcEK+vaAcfugw3FF2UhwegOjHp6R6J6cYzH llceJKqY4jfIbQjsw+8/h5yl3G+sAuT7b5c4AuXO1yuIiwj6wpjh5uRm1W9n6uuW y8cVrdjDPxznM/cLd7bJRjPK5fxoJifJ4fBlARLDYQ== Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id a69cae28 (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128:NO); Fri, 21 Sep 2018 03:58:06 +0000 (UTC) Received: by mail-ot1-f46.google.com with SMTP id j9-v6so11757716otl.2; Thu, 20 Sep 2018 21:15:59 -0700 (PDT) X-Gm-Message-State: APzg51DAp4tVn4mqbd676vSuDM1LoGUJpg6+BK4hFp5mv54KRUuiPonU Ssrii+mxt//oV7f+4Nex9zGYvqrKjuM3wXfbQ7Q= X-Received: by 2002:a9d:6554:: with SMTP id q20-v6mr24856004otl.209.1537503358074; Thu, 20 Sep 2018 21:15:58 -0700 (PDT) MIME-Version: 1.0 References: <20180918161646.19105-1-Jason@zx2c4.com> <20180918161646.19105-3-Jason@zx2c4.com> <20180921031255.GB11109@lunn.ch> <8FA361E3-FBCB-469E-88DC-F4085BD91175@amacapital.net> In-Reply-To: <8FA361E3-FBCB-469E-88DC-F4085BD91175@amacapital.net> From: "Jason A. Donenfeld" Date: Fri, 21 Sep 2018 06:15:46 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH net-next v5 02/20] zinc: introduce minimal cryptography library To: Andy Lutomirski Cc: Andrew Lunn , Arnd Bergmann , Ard Biesheuvel , Eric Biggers , LKML , Netdev , Linux Crypto Mailing List , David Miller , Greg Kroah-Hartman , Samuel Neves , Andrew Lutomirski , Jean-Philippe Aumasson Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andy, On Fri, Sep 21, 2018 at 5:23 AM Andy Lutomirski wrote= : > At the risk on suggesting something awful: on x86_64, since we turn preem= ption off for simd, it wouldn=E2=80=99t be *completely* insane to do the cr= ypto on the irq stack. It would look like: > > kernel_fpu_call(func, arg); > > And this helper would disable preemption, enable FPU, switch to the irq s= tack, call func(arg), disable FPU, enable preemption, and return. And we ca= n have large IRQ stacks. > > I refuse to touch this with a ten-foot pole until the lazy FPU restore pa= tches land. Haha. That's fun, and maybe we'll do that at some point, but I have some other reasons too for being on a workqueue now. > > All that being said, why are these frames so large? It sounds like somet= hing may be spilling that ought not to. They're not. Well, they're not anymore. I had a silly thing before like "u8 buffer[1 << 12]" in some debugging code, which is what prompted the ccflag-y addition. I cleaned up the mistakes like that and frames are now reasonable everywhere. Non-issue. Jason