Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10002192ybi; Wed, 24 Jul 2019 13:58:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqxfnhXsyouTFVJP0pG5NoSGxmsdK+U3nu2aPgp8mJ38RrqXL9KxKvsG07WSYLHyb6Q8A0Xa X-Received: by 2002:a17:90a:8c06:: with SMTP id a6mr91154495pjo.45.1564001890425; Wed, 24 Jul 2019 13:58:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564001890; cv=none; d=google.com; s=arc-20160816; b=a/VyJK85jqc9mu4wnPhx+p0f2aD4rX4iU33/0RLPoFmBO54ZBeIMQ11LXoITLgBPaq /T7nE4lPSavQgqG9CBX/7XE+TtAP8zD4LqyuWvM14aHxK2CO9HLsIjJRdmZ3Jyr+Ew1C nrf7lrUHV6Kh4LHSKernTBaDwb5ilTJZ5jgDodHjPXMfRR8OIC/ylWYmcWdZaRzYKbeU AgFtqDmvD7iVlBiea4MqQzu04aMUUPV9r12JLYsLsG9AjiR+jTHAcqWC1tfUaoG56NUu bUYQ8vHC0kOYtJSLgd/VPnZ8+w2DZohD+STIfNgbHd/nyNemulPoJHQKxnMxaZfN9uLd X+CQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=uKJBy2iaUBCua8Sau5lsnnlge7l0Cz16fffzcwsA5cs=; b=Qhy/RIUeklOjAw9uzQoqly2286MoFbkcmqvL+QSRJFu24uFNUbPrdBCBWqlPx4Nohs Jo8QysO9vptARCFNdtX6X6hYmipfSz7g2eczoONvhVJ22M7IjcXAVNLUmGN70K8PNH1J 7cY4dARNsUXhTrqhwzUsXUOV4MmkMfpQYE2ig6qd4yJGnEG3HVaeTZ1Iv4U4r7zRRS7d X/ZTMazlsjn4xPURvb26xRDBPEsyZiNmxSWEnGamu8HiWwdWHVq5dMeG/gxwa7za51Mu UDUVV7ziU9K6crOPjRVQ1+Yun1KHEzo42XpnUWOwwofbwwl8jfW/NCojWh7EQlwg7tKj ONHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=v1fdWobT; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e23si14889009pgv.528.2019.07.24.13.57.55; Wed, 24 Jul 2019 13:58:10 -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=@google.com header.s=20161025 header.b=v1fdWobT; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728150AbfGXUz7 (ORCPT + 99 others); Wed, 24 Jul 2019 16:55:59 -0400 Received: from mail-io1-f65.google.com ([209.85.166.65]:37093 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726591AbfGXUz7 (ORCPT ); Wed, 24 Jul 2019 16:55:59 -0400 Received: by mail-io1-f65.google.com with SMTP id q22so92537401iog.4 for ; Wed, 24 Jul 2019 13:55:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=uKJBy2iaUBCua8Sau5lsnnlge7l0Cz16fffzcwsA5cs=; b=v1fdWobTFZAmP2WoM31GjI+NFuvU3O+BPgFxE3fw8z8pQsD9+1tkE0+CpxhE/J10A6 28yp+dIM/1fRnlYIzs2C3XP/KGUhcXYDV8rgL445AjvxSYq7tMtGs4ZyUFpB6oup2aCt oJh4M2T9NjdDtCXHBigCMF1YJMngAGz/6Erv97zTxjzmopH91PASt66xjGxRlwCqzKqv O5hsPLtvwD71rKMyHdC4hixA83PUlj7VAp/nnziSpyJQYsVgY0KxLEdAcrPbDlkEKaCg DNC9TGigoDYwq0u4fhUgPSZOHprHAmwPBxU5a3+nvtYbBoqtM2+KdG9QeFgql9y2+Jcy 2sIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=uKJBy2iaUBCua8Sau5lsnnlge7l0Cz16fffzcwsA5cs=; b=Y9eE+svDr6he3JZ3mdUqugMy75WTUigCLBorSzRnRiNo8UVWLRuOBBdkf/RPJnDDUP mn4uCEsJRcJJtjmX+NsNjdgdoYkvAEEhlCt62Kvu/cmfo6j8f00SYtXyChtdlHuQ/A6s JBkQXXeXsYJCBwqrRhsVV774uNrwYxCvUnFlOmGdWrcA4jX7forRr5logS1JuLFBbJf+ P/lGjPfpZOOxCRF5XeTHgPHlCTyQMibhcrwkCEV/reMhXTwQzcEvD5PcxVFakqyymmt6 rPOVqTjt1d8zdCW04QnOUElKcZE9JLzxyr/TA8ZGs5U9M1crZ16+qcJemHI0fgR2oMVQ sngA== X-Gm-Message-State: APjAAAXbRcyGf3ACNhAyv03BO1KI7ckl3lVKf13Z1/daQwJ5SILsS7Nv 8JLQlEqAs8Y0bIwz3qBnIKL7FBU6YIOV5JSe5WRXUw== X-Received: by 2002:a6b:ec06:: with SMTP id c6mr79740045ioh.198.1564001758141; Wed, 24 Jul 2019 13:55:58 -0700 (PDT) MIME-Version: 1.0 References: <20190723212418.36379-1-ndesaulniers@google.com> In-Reply-To: From: Vaibhav Rustagi Date: Wed, 24 Jul 2019 13:55:47 -0700 Message-ID: Subject: Re: [PATCH v3 1/2] x86/purgatory: do not use __builtin_memcpy and __builtin_memset To: Thomas Gleixner Cc: Nick Desaulniers , Ingo Molnar , Borislav Petkov , Peter Zijlstra , clang-built-linux , LKML , yamada.masahiro@socionext.com, stable@vger.kernel.org, Manoj Gupta , Alistair Delva , "H. Peter Anvin" , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , Enrico Weigelt , Allison Randal , Uros Bizjak , Chao Fan , Greg Kroah-Hartman , Alexios Zavras Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 24, 2019 at 3:33 AM Thomas Gleixner wrote: > > On Tue, 23 Jul 2019, Nick Desaulniers wrote: > > Instead, reuse an implementation from arch/x86/boot/compressed/string.c > > if we define warn as a symbol. Also, Clang may lower memcmp's that > > compare against 0 to bcmp's, so add a small definition, too. See also: > > commit 5f074f3e192f ("lib/string.c: implement a basic bcmp") > > > > Cc: stable@vger.kernel.org > > Fixes: 8fc5b4d4121c ("purgatory: core purgatory functionality") > > Link: https://bugs.chromium.org/p/chromium/issues/detail?id=984056 > > Reported-by: Vaibhav Rustagi > > Debugged-by: Vaibhav Rustagi > > Debugged-by: Manoj Gupta > > Suggested-by: Alistair Delva > > Signed-off-by: Vaibhav Rustagi > > Signed-off-by: Nick Desaulniers > > That SOB chain is weird. Is Vaibhav the author? > No, Nick Desaulniers is the author of v3. > > +/* > > + * Clang may lower `memcmp == 0` to `bcmp == 0`. > > + */ > > +int bcmp(const void *s1, const void *s2, size_t len) { > > + return memcmp(s1, s2, len); > > +} > > foo() > { > } > > please. > > Thanks, > > tglx Thanks, Vaibhav