From nobody Thu Mar 28 14:03:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1557918233; cv=none; d=zoho.com; s=zohoarc; b=W6pzuU3TjK8XYFb+kPsq2+6uOgPYB6RDSO+bl7gEeLDWBSt/j2P154dZyoMZlaPmyyXlA1oudqWoaMhKPOVTmubekza3ejEkGWmw1K9C6Y71I7Q5n2xwm0mT5o/c+GrUR/EujXyWDdzhpe0kTUMSzonlk5C0yFLt4vkX1p6AONA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557918233; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=7N0+6fRPtx6+cHOdHKXG+W68OJp6O4zIfjNPVlSAqDw=; b=CCQgNzT7uXTSkD9rqwqWXjaC8G9ffjX1BaQgnhvnXJEvMcfidffRI4XGLSiv5NpJc7/DGi6Jfc67zK8VbsFmdCboNalxG/JKKXAKt1Bq9O20Vb4c4oFXIxUxr2LlCWZ1XetZhr+Gl4oIipPrOS1AgAkWlRAWk53AUZ33nYfuhlU= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1557918233092782.235059463153; Wed, 15 May 2019 04:03:53 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hQrfo-0000yR-89; Wed, 15 May 2019 11:02:12 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hQrfn-0000yL-40 for xen-devel@lists.xenproject.org; Wed, 15 May 2019 11:02:11 +0000 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id e260501c-7700-11e9-8980-bc764e045a96; Wed, 15 May 2019 11:02:09 +0000 (UTC) X-Inumbo-ID: e260501c-7700-11e9-8980-bc764e045a96 Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=ian.jackson@eu.citrix.com; spf=SoftFail smtp.mailfrom=Ian.Jackson@citrix.com; spf=None smtp.helo=postmaster@MIAPEX02MSOL02.citrite.net Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa4.hc3370-68.iphmx.com: no sender authenticity information available from domain of ian.jackson@eu.citrix.com) identity=pra; client-ip=23.29.105.83; receiver=esa4.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="ian.jackson@eu.citrix.com"; x-conformance=sidf_compatible Received-SPF: SoftFail (esa4.hc3370-68.iphmx.com: domain of Ian.Jackson@citrix.com is inclined to not designate 23.29.105.83 as permitted sender) identity=mailfrom; client-ip=23.29.105.83; receiver=esa4.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="Ian.Jackson@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 mx include:spf.citrix.com include:spf2.citrix.com include:ironport.citrix.com include:_spf.salesforce.com ~all" Received-SPF: None (esa4.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@MIAPEX02MSOL02.citrite.net) identity=helo; client-ip=23.29.105.83; receiver=esa4.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="postmaster@MIAPEX02MSOL02.citrite.net"; x-conformance=sidf_compatible IronPort-SDR: rfejwD5h7yyK9pn1dq5ruf5FpDR8wOz323vomhnrg6UtXa2y283Fe3jE6eSPo9FrALbUrxRcM+ QmHF5gupK4bNO20jOReQ37lK6U0hsRLhdEjnRRAD9oQA6idEtAkmiUmgDrXDDs5v/Zt4hk5ceM 9MDpjB402t+OxX7cLhwPiguFrqHEF2KdaLGoSm9xvvyi8IXcxRasflpvxkdmoYakCorPislk0d oxllEpfslBRmZEkWJvpcWhCsTOEB5QqxrkOUuwSLGzTfGBAldYc25M/1CudBwodEbgxrvRawa2 DZA= X-SBRS: 2.7 X-MesageID: 458588 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 23.29.105.83 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.60,472,1549947600"; d="scan'208";a="458588" From: Ian Jackson To: Date: Wed, 15 May 2019 12:01:25 +0100 Message-ID: <20190515110125.16882-1-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH STABLE for-4.8] x86emul/test: don't use *_len symbols X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Andrew Cooper , Wei Liu , Ian Jackson , Jan Beulich Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" From: Jan Beulich ... as they don't work as intended with -fPIC. I did prefer them over *_end ones at the time because older gcc would cause .L* symbols to be public, due to issuing .globl for all referenced externals. And labels at the end of instructions collide with the ones at the start of the next instruction, making disassembly harder to grok. Luckily recent gcc no longer issues those .globl directives, and hence .L* labels, staying local by default, no longer get in the way. Reported-by: Wei Liu Signed-off-by: Jan Beulich Reviewed-by: Wei Liu Tested-by: Wei Liu (cherry picked from commit 9315fa0ef736d1153c98ce42bff5853da5ec697f) This backport had some conflicts. Notably 5ad98e3c7fa92f46d77a788e1109b7d282bd1256 x86emul: support ADCX/ADOX contains a change to the definition of set_insn. This is not mentioned in the commit message and therefore lacks any kind of justification. I strongly deprecate this; that change ought to have been split out into its own commit, no matter that it's very small. After consultation I have decided to drop rather than backport that change to the definition of set_insn. CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu Signed-off-by: Ian Jackson --- tools/tests/x86_emulator/test_x86_emulator.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/tests/x86_emulator/test_x86_emulator.c b/tools/tests/x86= _emulator/test_x86_emulator.c index 7b467fe021..f902d0b99b 100644 --- a/tools/tests/x86_emulator/test_x86_emulator.c +++ b/tools/tests/x86_emulator/test_x86_emulator.c @@ -766,15 +766,15 @@ int main(int argc, char **argv) goto fail; printf("okay\n"); =20 -#define decl_insn(which) extern const unsigned char which[], which##_len[] +#define decl_insn(which) extern const unsigned char which[], \ + which##_end[] asm ( ".L" #which "_end" ) #define put_insn(which, insn) ".pushsection .test, \"ax\", @progbits\n" \ #which ": " insn "\n" \ - ".equ " #which "_len, .-" #which "\n" \ + ".L" #which "_end:\n" \ ".popsection" #define set_insn(which) (regs.eip =3D (unsigned long)memcpy(instr, which, \ - (unsigned long)which##_len)) -#define check_eip(which) (regs.eip =3D=3D (unsigned long)instr + \ - (unsigned long)which##_len) + (unsigned long)which##_end - (unsigned long)(which))) +#define check_eip(which) (regs.eip =3D=3D (unsigned long)which##_end) =20 printf("%-40s", "Testing movq %mm3,(%ecx)..."); if ( stack_exec && cpu_has_mmx ) --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel