Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp4327742ybp; Mon, 7 Oct 2019 06:56:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqzVK33NuZyh1XSohDZL+iSytSS0jKm3Ac1lbd8HXN1oWHLKyM4Qr8U+Bow97ioX4r1IRGDQ X-Received: by 2002:aa7:ce8b:: with SMTP id y11mr28809681edv.231.1570456576793; Mon, 07 Oct 2019 06:56:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570456576; cv=none; d=google.com; s=arc-20160816; b=or+FU0VMED2AehugrRSNmMPyMD9XRZG2GMZpo9At7FdirT3f/j5p78rB7OuO+LZU5k t9li8mlCphIsQmjJX6R6BSUDsBLOOcM/k/rVmjvn7NgL1j87sXJz8b+0uYv7q0ehCVM1 uwtRpEO85Fzm6o2FuGhjrpmlj/6F4E5hZK0N6XT3QDTD2LE4g73badv+0lNSqsU67aeA VSrd5jHBo0nCjfumJnsaVbt5pKvQU8MclESDo3DE2sPqxEzKUpFkpZCrkD+491XM+R6c LU0S753cKcxpOrq2D5FNpALJIJBYBZSggzRJ1gswc6jszuaEqHOpjrfKVi3n262ScKPt rL9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=nX2WmJNYQbkql4NfD2u3lVA+v/9Gn5nArZELCqeq/d4=; b=o3c7OIumFbWdeT4SIicXoXF0g+AFnpQlpETujTY4keE8DsTH16F2p/3DZvRLseyehn X2AiXUcCqXycaDrLZsqKggRzNsBnzhgB7ugpctKEvZHvE1kB1ZYVipwVCJIKkmebkYIx u9j6bADNq4yzelIhyY0E4QlFgTaQPMtWW+kR2xrRXAEBuGp0p3dkovCO24YG2ISwBels zdqoikiua5dOSA6S7t6DxpG6PoPjXzUxTT+IQPu5XYxyVyiNUAf9otIA/Kvw5X86QBIQ 71APhzlU0ZcJjqpOiGtG0CO/8iH/QgwqSieAoUJ0kxSQCXUCKhyfvjgWzOzhk1iG6Yy7 o9Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=YroiitgR; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h28si9050962edh.278.2019.10.07.06.55.52; Mon, 07 Oct 2019 06:56:16 -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=fail header.i=@gmail.com header.s=20161025 header.b=YroiitgR; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727966AbfJGNzb (ORCPT + 99 others); Mon, 7 Oct 2019 09:55:31 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:34353 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727442AbfJGNzb (ORCPT ); Mon, 7 Oct 2019 09:55:31 -0400 Received: by mail-wr1-f66.google.com with SMTP id j11so9648061wrp.1 for ; Mon, 07 Oct 2019 06:55:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=nX2WmJNYQbkql4NfD2u3lVA+v/9Gn5nArZELCqeq/d4=; b=YroiitgRO4tNgcR2NQYIOturxR5FQKsj1j3yq0J01z6MeOrxs8xoVpUY/7o5WiIk2I iY+wCf4jDxiEeiVocpv8p339BM3mw9sRs4eFc2cKTKAVB1yJdkocg7+a3B9Jm3T2z8Dp k5fuq8Zt74O4P+QIDw8mogv2O6vJAtJCsC1jXgq5maw6joj7yk+2wpmCt50LQ1oyHmKo +u1jR8PDgu0fVBWcPknuA9DxMlPoGi8TZMw+AR1/wnX/sfovKZiqJumuqNRoBX9GrylZ YTwVHPocsQuVhp4dNUTNub7/bx1l2cVCFrpmIAaA/Mj+z9Ys1v5YBDD+ecZL+euSUKwn iHtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=nX2WmJNYQbkql4NfD2u3lVA+v/9Gn5nArZELCqeq/d4=; b=ihwA3xERCZ7Yfcl4PxwMqs9DUcRhi24vebm7ng2PaW/BMAyBX86wt/7JgHi3a7TN6F Hj4VPBNrnjm+lKAg6ItJ8ZRtHwLx/mpO7i6/Vpns1aMslDvEXc1Y12xFXgE5ivBrziJt +wDayk/D2BJnYKsScI/eZZHBYPooWrD0DNQc08JVLcOVtpHPuAiR3nSCvBv7vvA2kACT M2kBUkN//pc6OLaY3jbkY/iG03BrPMFw1Bgm9lpBWItr8ohtwZnOaO+odhd6eUM2zeD2 Dsq0P/3oXcd1VXMO6sD/q/xuo2iJzoKQZqxftDXLxGu5jujANpqS4BZZJAK/CPl46HyT FLgw== X-Gm-Message-State: APjAAAVCiwUDc26cM8GFdPqeZyfoFCZYuaoQWsQMJGXtT9inuWx7grhp AOFR+WR86Zxgvv2p0TG5myM= X-Received: by 2002:adf:ec09:: with SMTP id x9mr23812866wrn.308.1570456529410; Mon, 07 Oct 2019 06:55:29 -0700 (PDT) Received: from gmail.com (2E8B0CD5.catv.pool.telekom.hu. [46.139.12.213]) by smtp.gmail.com with ESMTPSA id g11sm16138156wmh.45.2019.10.07.06.55.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Oct 2019 06:55:28 -0700 (PDT) Date: Mon, 7 Oct 2019 15:55:26 +0200 From: Ingo Molnar To: Hans de Goede Cc: Arvind Sankar , linux-kernel@vger.kernel.org, x86@kernel.org, Borislav Petkov , Thomas Gleixner Subject: Re: kexec breaks with 5.4 due to memzero_explicit Message-ID: <20191007135526.GA10253@gmail.com> References: <20191007030939.GB5270@rani.riverdale.lan> <28f3d204-47a2-8b4f-f6a7-11d73c2d87c8@redhat.com> <0f083019-61e8-7ed5-dde7-99e1aa363d9c@redhat.com> <20191007130942.GA82950@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Hans de Goede wrote: > Hi, > > On 07-10-2019 15:09, Ingo Molnar wrote: > > > > * Hans de Goede wrote: > > > > > Hi, > > > > > > On 07-10-2019 10:50, Hans de Goede wrote: > > > > Hi, > > > > > > > > On 07-10-2019 05:09, Arvind Sankar wrote: > > > > > Hi, arch/x86/purgatory/purgatory.ro has an undefined symbol > > > > > memzero_explicit. This has come from commit 906a4bb97f5d ("crypto: > > > > > sha256 - Use get/put_unaligned_be32 to get input, memzero_explicit") > > > > > according to git bisect. > > > > > > > > Hmm, it (obviously) does build for me and using kexec still also works > > > > for me. > > > > > > > > But it seems that you are right and that this should not build, weird. > > > > > > Ok, I understand now, it seems that the kernel will happily build with > > > undefined symbols in the purgatory and my kexec testing did not hit > > > the sha256 check path (*) so it did not crash. I can reproduce this before my patch: > > > > > > [hans@shalem linux]$ ld arch/x86/purgatory/purgatory.ro > > > ld: warning: cannot find entry symbol _start; defaulting to 0000000000401000 > > > ld: arch/x86/purgatory/purgatory.ro: in function `sha256_transform': > > > sha256.c:(.text+0x1c0c): undefined reference to `memzero_explicit' > > > > I've applied your fix, > > Thank you, unfortunately I was just minutes away from sending a v2 > which adds a missing barrier call (not strictly necessary, more future > proofing). > > Hopefully you can still pick up v2 instead, let me know if you want > an incremental patch instead. Yeah, our mails crossed: I noticed that and didn't push out your fix, so all should be good. Take your time. Thanks, Ingo