From nobody Sat Nov 1 11:04:57 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1741879984; cv=none; d=zohomail.com; s=zohoarc; b=jfbfLWJgAGeeXy/zqb9jvuAPb3akF2m0tv3O2/9r9R1MAWPs3h+4/UW2E7WmsCHKsp0pBNbP53E8qL7N6dOyMiYopF4aMK+OufpIZmBWXd8etpDR4Ata05XeuevStDBmV8XUDCBUzRPuCk5jTllVOFPqfHGXIfYvAKBzZQ/X9ZU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741879984; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=gnMyX9kFHyXzrDrfsJ2RlCItrD8ia9EDnLZKJ/omKus=; b=S7Nglg8yxYV0BG24o4a/cYmFSpVuToO21uvG5XXfjd2agv8z5/2z8tMEHhIa5ydjjVbjwx0Q4yMw32G337VREhFHumN0eqfdZz7Un3OeVU39ykGZRmOuhDiHDNilPyo60LLRHg34OvaNh0Id4E9NZ+OHzHTLW/20Hh2ifTO6kyY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1741879984019696.3773458212411; Thu, 13 Mar 2025 08:33:04 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.912516.1318807 (Exim 4.92) (envelope-from ) id 1tskY4-00018S-La; Thu, 13 Mar 2025 15:32:40 +0000 Received: by outflank-mailman (output) from mailman id 912516.1318807; Thu, 13 Mar 2025 15:32:40 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tskY4-00017J-FA; Thu, 13 Mar 2025 15:32:40 +0000 Received: by outflank-mailman (input) for mailman id 912516; Thu, 13 Mar 2025 15:32:39 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tskY3-0008Nv-ET for xen-devel@lists.xenproject.org; Thu, 13 Mar 2025 15:32:39 +0000 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [2a00:1450:4864:20::62f]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 62931b43-0020-11f0-9898-31a8f345e629; Thu, 13 Mar 2025 16:32:34 +0100 (CET) Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-ac2ab99e16eso233239866b.0 for ; Thu, 13 Mar 2025 08:32:36 -0700 (PDT) Received: from localhost ([84.78.159.3]) by smtp.gmail.com with UTF8SMTPSA id a640c23a62f3a-ac3149d0bfbsm93599266b.95.2025.03.13.08.32.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Mar 2025 08:32:35 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 62931b43-0020-11f0-9898-31a8f345e629 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1741879955; x=1742484755; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gnMyX9kFHyXzrDrfsJ2RlCItrD8ia9EDnLZKJ/omKus=; b=GIPIRQOvE3hhiNoGpD34hgcMMkBoeRNEAWdi5vBfls6AiScmg1yNyx/G65rbgPyDTj 8+/mVP/Wsw/gF1xvqLFV5OHHnwP+f2k5qvo3HkomYulH+Dw/YSr6ZWxvP5LlLC1EGTK+ rwySg6vMnIlt0AbE8atOJ9Ze702g+V9on2EkQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741879955; x=1742484755; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gnMyX9kFHyXzrDrfsJ2RlCItrD8ia9EDnLZKJ/omKus=; b=IkULa+xuEu7dg9kwBGShTr1E/qWGstDctu3Ay6akHL+kmMu+bQ4kT6U0rMbtBiklUq eIcRg3jvoHVY3La3WSpywX3hlMMUubGFhFGz9Iq+McyQqb1WgGz3BrYjjNDPD2+ciArj DSypyzH92eGfbUkrk5GxxGt3H2WRu4tdAhP3AnjQIcL5O0UFubICVr8huH5hg0dMODK7 w8gNsSNHLkslVb1LY9cSDnrucq16LACa7fVFFrEGttJzYXeG40tuIIA9hmZJbyTCCExb xhj0vFkiXFmmHPT+VMiZMibBsVM70lI5osVcfZBBPBXwjoR9kBrqp3zOQwrOW786bC07 8WLw== X-Gm-Message-State: AOJu0YxoViB8wLYgxl2P2AqxQKQGKdyZ7/ISuNlhaEY+6Lr1CiJbRz0M an9FgSzrUYtQdAerLxZy+hSFefpbUZgrMQ7Thi9zVouWwfL5kMVDy6Mu08fmmmEhzQtSqTU7gYg s X-Gm-Gg: ASbGnct2Lldi5QMB34GywbH+DfbCVcIozpnwFeRdFMqYh2donAIVou1MwfaoTm+/MYo z4H686ey8a+C0spFQOTGVu4P7B4pzt5LQDfUdV/jWSQty0H7WAShiwoXZfDJkrZ5ae6DwHmr8dh Gy+r9+oq36X/4THLPViB4E5PhxdbxAQ0l2XihbHgSlMKlF/P/YDNm9fKUoF3K/CTk8AstBgWcZX mPIjX47++AXiiLdQYxBa3v7tvAjJCzLSyFLscFO9JQdMG+y1pgo95Gnx+gPNhWaHELfBWVC3XZ7 R5Kd8HtnJ8NgEfTWx9bDLAf8Qw9fiZcFiIVJc6H2Ub5FMiAQxg== X-Google-Smtp-Source: AGHT+IEy6NxcmWXZESHR0NTpVyBjvtdeWnjyAkUl4iE6wnO5CzM/jxUr7S1Yw5MDBj7Cuf+wfrmC0A== X-Received: by 2002:a17:906:4758:b0:ac2:7d72:c2ab with SMTP id a640c23a62f3a-ac27d72d558mr2103799466b.47.1741879955460; Thu, 13 Mar 2025 08:32:35 -0700 (PDT) From: Roger Pau Monne To: xen-devel@lists.xenproject.org Cc: Roger Pau Monne , Andrew Cooper , Anthony PERARD , Michal Orzel , Jan Beulich , Julien Grall , Stefano Stabellini , Doug Goldstein Subject: [PATCH 7/7] kconfig/randconfig: enable UBSAN for randconfig Date: Thu, 13 Mar 2025 16:30:29 +0100 Message-ID: <20250313153029.93347-8-roger.pau@citrix.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250313153029.93347-1-roger.pau@citrix.com> References: <20250313153029.93347-1-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1741879985496019000 Introduce an additional Kconfig check to only offer the option if the compiler supports -fsanitize=3Dundefined. We no longer use Travis CI, so the original motivation for not enabling UBSAN might no longer present. Regardless, the option won't be present in the first place if the compiler doesn't support -fsanitize=3Dundefined. Signed-off-by: Roger Pau Monn=C3=A9 --- xen/Kconfig | 4 ++++ xen/Kconfig.debug | 2 +- xen/tools/kconfig/allrandom.config | 1 - 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/xen/Kconfig b/xen/Kconfig index 72fdb8376087..2128f0ccfc0b 100644 --- a/xen/Kconfig +++ b/xen/Kconfig @@ -37,6 +37,10 @@ config CC_HAS_VISIBILITY_ATTRIBUTE config CC_SPLIT_SECTIONS bool =20 +# Compiler supports -fsanitize=3Dundefined +config CC_HAS_UBSAN + def_bool $(cc-option,-fsanitize=3Dundefined) + # Set code alignment. # # Allow setting on a boolean basis, and then convert such selection to an diff --git a/xen/Kconfig.debug b/xen/Kconfig.debug index c4a8d86912e0..f7cc5ffaabd7 100644 --- a/xen/Kconfig.debug +++ b/xen/Kconfig.debug @@ -98,7 +98,7 @@ config SCRUB_DEBUG =20 config UBSAN bool "Undefined behaviour sanitizer" - depends on HAS_UBSAN + depends on HAS_UBSAN && CC_HAS_UBSAN help Enable undefined behaviour sanitizer. It uses compiler to insert code snippets so that undefined behaviours in C are detected during runtime. diff --git a/xen/tools/kconfig/allrandom.config b/xen/tools/kconfig/allrand= om.config index 76f74320b5b0..c7753ac4addb 100644 --- a/xen/tools/kconfig/allrandom.config +++ b/xen/tools/kconfig/allrandom.config @@ -1,4 +1,3 @@ # Explicit option choices not subject to regular RANDCONFIG =20 CONFIG_GCOV_FORMAT_AUTODETECT=3Dy -CONFIG_UBSAN=3Dn --=20 2.48.1