From patchwork Tue Jun 24 03:01:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: preeti.sachan@intel.com X-Patchwork-Id: 65573 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72897C7EE30 for ; Tue, 24 Jun 2025 12:14:48 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) by mx.groups.io with SMTP id smtpd.web11.198.1750734075450729591 for ; Mon, 23 Jun 2025 20:01:15 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.com header.s=Intel header.b=Sm+Ftq0v; spf=pass (domain: intel.com, ip: 192.198.163.10, mailfrom: preeti.sachan@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1750734076; x=1782270076; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=JyroI3xiHGzbk0f05JB0orhS6cxZMRsQzcZOa9sQ9QA=; b=Sm+Ftq0vovguT2XjLXFVwDcPiEU58smAZZmkW0UcyWMhD0HYQ/G0ynzP nh/brpbj/2OC/1xLb9KN7GFjxytYThjWuBUhSlUEpDYq8jZohQF2GAdTg hhGngVC+2DrBKiL+MktUpHrmEGEALYf3VMgvd3y9FUROH47nU1XQIzqSt yNq+Bavagr8ixf2WeD3OoltsnuQUWp0YMR0PAD73P+br77w4zOUjONp7G cfW4QBRggYnxQ7/mTZ5B5UC8TFgDzZos38ff553l+MobU+flL2R+2tl+8 aYcGqRJAWxPC/kdIvVE+uXa4bt1UzT3+3UYg4MPta4o6phWVxyLiriP5U A==; X-CSE-ConnectionGUID: yB/n9ApjS0myp8yg23FbxQ== X-CSE-MsgGUID: K+DZ+c+4Q4u8sMhTulIVow== X-IronPort-AV: E=McAfee;i="6800,10657,11473"; a="64319925" X-IronPort-AV: E=Sophos;i="6.16,260,1744095600"; d="scan'208";a="64319925" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jun 2025 20:01:15 -0700 X-CSE-ConnectionGUID: GnEUjq0bRDGFsH4lQZT5Yw== X-CSE-MsgGUID: 5rGJjXhkSia6jQS4razpVw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.16,260,1744095600"; d="scan'208";a="156160482" Received: from ubuntu-22174.iind.intel.com ([10.49.1.8]) by orviesa003.jf.intel.com with ESMTP; 23 Jun 2025 20:01:13 -0700 From: preeti.sachan@intel.com To: openembedded-core@lists.openembedded.org Subject: [scarthgap][PATCH] ltp: backport patch to fix compilation error for x86_64 Date: Tue, 24 Jun 2025 08:31:49 +0530 Message-Id: <20250624030149.2779188-1-preeti.sachan@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 24 Jun 2025 12:14:48 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/219258 From: Preeti Sachan When the input compiler enables AVX, stack realignment requirements causes gcc to fail to omit %rbp use, due to which the test fails to clobber %rbp in inline asm. Disable AVX to build the test on x86_64 so that the test continues working. Fix compilation with gcc v13.4+. Cherry picked from oe-core, master branch. Signed-off-by: Preeti Sachan --- ...cve-2015-3290-Disable-AVX-for-x86_64.patch | 42 +++++++++++++++++++ meta/recipes-extended/ltp/ltp_20240129.bb | 1 + 2 files changed, 43 insertions(+) create mode 100644 meta/recipes-extended/ltp/ltp/0001-cve-2015-3290-Disable-AVX-for-x86_64.patch diff --git a/meta/recipes-extended/ltp/ltp/0001-cve-2015-3290-Disable-AVX-for-x86_64.patch b/meta/recipes-extended/ltp/ltp/0001-cve-2015-3290-Disable-AVX-for-x86_64.patch new file mode 100644 index 0000000000..c6fae88eb9 --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/0001-cve-2015-3290-Disable-AVX-for-x86_64.patch @@ -0,0 +1,42 @@ +From 28d823a63ee29f5d72c2aba781a06a7e2651cadc Mon Sep 17 00:00:00 2001 +From: Siddhesh Poyarekar +Date: Mon, 7 Apr 2025 06:24:47 -0400 +Subject: [PATCH] cve-2015-3290: Disable AVX for x86_64 + +When the input compiler enables AVX, stack realignment requirements +causes gcc to fail to omit %rbp use, due to which the test fails to +clobber %rbp in inline asm. Disable AVX to build the test on x86_64 so +that the test continues working. + +Link: https://lore.kernel.org/ltp/20250407102448.2605506-2-siddhesh@gotplt.org/ + +Upstream-Status: Backport [https://github.com/linux-test-project/ltp/commit/28d823a63ee29f5d72c2aba781a06a7e2651cadc] + +Reviewed-by: Martin Doucha +Reviewed-by: Petr Vorel +Signed-off-by: Siddhesh Poyarekar + +--- + testcases/cve/Makefile | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/testcases/cve/Makefile b/testcases/cve/Makefile +index 01b9b9ccb..98c38e908 100644 +--- a/testcases/cve/Makefile ++++ b/testcases/cve/Makefile +@@ -22,6 +22,12 @@ ifneq (,$(filter $(HOST_CPU),x86 x86_64)) + meltdown: CFLAGS += -msse2 + endif + ++# The test needs to clobber %rbp, which requires frame pointer omission. Also ++# for x86_64, disable AVX since that could sometimes require a stack ++# realignment, which gets in the way of frame pointer omission. + cve-2015-3290: CFLAGS += -pthread -fomit-frame-pointer ++ifeq ($(HOST_CPU),x86_64) ++cve-2015-3290: CFLAGS += -mno-avx ++endif + + include $(top_srcdir)/include/mk/generic_leaf_target.mk +-- +2.37.3 + diff --git a/meta/recipes-extended/ltp/ltp_20240129.bb b/meta/recipes-extended/ltp/ltp_20240129.bb index f8e6d3987e..18c6439283 100644 --- a/meta/recipes-extended/ltp/ltp_20240129.bb +++ b/meta/recipes-extended/ltp/ltp_20240129.bb @@ -30,6 +30,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git;branch=master;protocol=ht file://0001-Remove-OOM-tests-from-runtest-mm.patch \ file://0001-scenario_groups-default-remove-connectors.patch \ file://0001-sched_stress-Use-time_t-instead-of-long-for-type.patch \ + file://0001-cve-2015-3290-Disable-AVX-for-x86_64.patch \ " S = "${WORKDIR}/git"