[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 59.5/65] x86: Introduce helpers/checks for endbr64 instructions


  • To: Andrew Cooper <amc96@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 6 Dec 2021 09:04:05 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9J+hbBIj1avDe+Vi9V13D4/4hloqmCBy6Qf5jdxfXmc=; b=iOluXtM5sNf0gEuAw1IJBATaea+hVYqIwn4ibNF4/WT2l7SBsnpSzW0g6m/ixlDO8/vnfQaI4iK3HAgnqbxr5cKTlVcTtLGkmerLB1yWoQaZjFgug6Rrc7uZSWuPhUuGtoFWgUHGoLio31DK5xkdQ+ILv8oRIFw4F4LUjUTFYH6AT7XBxxg2EysnLtJp0pXhGsnG+HWWEsk90cFzs2gmsLvai22qywShNg8oezUf4rFqQ3C52/PhU+wasAS/J3P70FVJ/aQcAcdovBsswByWdc5RFiNhZ1LUc7uej6exv5BuC9F4nJ9lNesyOvGPCVv34NFiLjThlvVz1FNjA/i4TA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mA0MuzyQimkgducQ1NJkFK+oPyUa7YRPkDULK4UXTD4up0V0QnCiVMaXgN340lNyGmbtz5TfkKUIrkC5IO+aG0CRgwdOjeclQUPQKE/dkUzW8FWgZ9B4k+RTGEsja4U53PhZWXeJm77L753U95S9qe2jZcig3q5sAMilI/DDXp0POmz5D0CsMaELF4HMhF0q1Rk7CNOGwZZ4Fjot1H7iIED78OhzEKP+uocIQWW/wcUpEU1cW/MgtnrtQLPd5CMR6l6t+dLQxmvDYpP42JrbszHQaces11EndyEhnS9zWZUf/eTnXzz+cLz01gQlf143GRJ9/lVej8jyf9WXCvMF0Q==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 06 Dec 2021 08:04:44 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 03.12.2021 15:10, Andrew Cooper wrote:
> On 03/12/2021 13:59, Jan Beulich wrote:
>> On 26.11.2021 17:33, Andrew Cooper wrote:
>>> --- a/xen/arch/x86/Makefile
>>> +++ b/xen/arch/x86/Makefile
>>> @@ -190,6 +190,10 @@ $(TARGET)-syms: prelink.o xen.lds
>>>     $(MAKE) -f $(BASEDIR)/Rules.mk efi-y= $(@D)/.$(@F).1.o
>>>     $(LD) $(XEN_LDFLAGS) -T xen.lds -N prelink.o $(build_id_linker) \
>>>         $(@D)/.$(@F).1.o -o $@
>>> +ifeq ($(CONFIG_XEN_IBT),y)
>>> +   $(OBJDUMP) -d $@ | grep 0xfa1e0ff3 >/dev/null && \
>>> +           { echo "Found embedded endbr64 instructions" >&2; false; } || :
>> I guess I'm confused: The "false;" suggests to me you want to make the
>> build fail in such a case. The "|| :" otoh suggests you want to silence
>> errors (and not just the one from grep when not finding the pattern
>> aiui).
> 
> The exit code of grep needs inverting for the build to proceed
> correctly.  Without || :, all builds fail when they've not got the pattern.

But doesn't this invert not only failure of grep, but also the
unconditional "failure" of "false"? IOW doesn't this step therefore
always succeed, making the message merely a warning-like one? Or if
that's the intended behavior, what's the "false" good for?

>> Also isn't passing -q to grep standard enough (and shorter) to use in
>> place of redirecting its output to /dev/null?
> 
> That caused problems on the BSDs.  c/s e632d56f0f5 went through several
> iterations before settling on this pattern.

Odd. The commit message doesn't mention any of this. v2 of that patch
already didn't use -q, and also doesn't identify a respective change
from v1. I wasn't able to locate v1.

Jan




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.