From nobody Mon Apr 29 12:50:52 2024 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; 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=fail(p=none dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1590676873; cv=none; d=zohomail.com; s=zohoarc; b=CdWl7GClC/9u3TTQP4ofO+djww6lFuFVNspkEabV/QSCPV/+od+XGlDJR2d9p08mUKUJ3jly6Tsca/Xv0/+ncfXfc22/D4mqRVkc0dXalcGNNOvOONPe9QsQGqaegFlKjsf3hnnWt2MXlJUdf2nTUW31wtyOCTwdZHVLhC/ep6Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590676873; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=p4ncxJe/qEiiqDtlGbDc7prf4FRd83LPPezlFXBg7iI=; b=HwUmh7yYnLXROA+sG1l1aDaOUVJHQsrIt/z67fv3Nkc5lE91HmN87Jc1jXL3sHuh/Fs2bmUi+lToApXGyZF7mejWd4Kk92BoyB6Us7+I8/tYC0rm0An9c0uYYgf4Y4BMj34GtLYLCSTjhL53OiXrhlYZwKyefESlfeacmlaCa1Q= ARC-Authentication-Results: i=1; mx.zohomail.com; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1590676873102227.3913178211161; Thu, 28 May 2020 07:41:13 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jeJi3-0006bx-Qy; Thu, 28 May 2020 14:40:39 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jeJi3-0006bs-09 for xen-devel@lists.xenproject.org; Thu, 28 May 2020 14:40:39 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 307906d6-a0f1-11ea-81bc-bc764e2007e4; Thu, 28 May 2020 14:40:35 +0000 (UTC) X-Inumbo-ID: 307906d6-a0f1-11ea-81bc-bc764e2007e4 Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: sU2tFkgZwZH7RR6JIykLm+24ucLQq/ISXqXaqfdXSK70ubCNcimGSaTkRQMkKYPwvZoD9u3H3K u5lpE8lSe50tvxqDJRPca5ff+kY4wPKYjjPtVOEzxN72byOJ7XWeGF0b4qzmQIXWyktKCymmeI 8Gn21imQ/6E6nwIuEVUqBemenlq9BZ/emfRDMHrqG0QUhr/j9Lg7u6UD8xB1hxXm+Mma5rOs30 gdinRYU9Z3l5EurwvImTMwSoH4F/LWOIUlc71H8DJgh4H65E4gQnU8CaKlSEeLLm+cNc1VdSwK Boo= X-SBRS: 2.7 X-MesageID: 18922173 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.73,445,1583211600"; d="scan'208";a="18922173" From: Roger Pau Monne To: Subject: [PATCH v2 1/3] x86/mm: do not attempt to convert _PAGE_GNTTAB to a boolean Date: Thu, 28 May 2020 16:40:21 +0200 Message-ID: <20200528144023.10814-2-roger.pau@citrix.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200528144023.10814-1-roger.pau@citrix.com> References: <20200528144023.10814-1-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Andrew Cooper , Wei Liu , Jan Beulich , Roger Pau Monne Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Clang 10 complains with: mm.c:1239:10: error: converting the result of '<<' to a boolean always eval= uates to true [-Werror,-Wtautological-constant-compare] if ( _PAGE_GNTTAB && (l1e_get_flags(l1e) & _PAGE_GNTTAB) && ^ xen/include/asm/x86_64/page.h:161:25: note: expanded from macro '_PAGE_GNTT= AB' #define _PAGE_GNTTAB (1U<<22) ^ Remove the conversion of _PAGE_GNTTAB to a boolean and instead use a preprocessor conditional to check if _PAGE_GNTTAB is defined. Signed-off-by: Roger Pau Monn=C3=A9 Acked-by: Jan Beulich --- Changes since v1: - Use a preprocessor conditional. --- xen/arch/x86/mm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index 54980b4eb1..7bcac17e2e 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -1236,7 +1236,8 @@ void put_page_from_l1e(l1_pgentry_t l1e, struct domai= n *l1e_owner) * (Note that the undestroyable active grants are not a security hole = in * Xen. All active grants can safely be cleaned up when the domain die= s.) */ - if ( _PAGE_GNTTAB && (l1e_get_flags(l1e) & _PAGE_GNTTAB) && +#if _PAGE_GNTTAB + if ( (l1e_get_flags(l1e) & _PAGE_GNTTAB) && !l1e_owner->is_shutting_down && !l1e_owner->is_dying ) { gdprintk(XENLOG_WARNING, @@ -1244,6 +1245,7 @@ void put_page_from_l1e(l1_pgentry_t l1e, struct domai= n *l1e_owner) l1e_get_intpte(l1e)); domain_crash(l1e_owner); } +#endif =20 /* * Remember we didn't take a type-count of foreign writable mappings --=20 2.26.2 From nobody Mon Apr 29 12:50:52 2024 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; 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=fail(p=none dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1590676876; cv=none; d=zohomail.com; s=zohoarc; b=ZttRUfHvrhMRXtccPEU/hx65B6Iiyss+AVGpz2QBT3y7x2z2HwqWbWLn4EXUgHt/mzXitEIJA2N859t3OVfBF1PIvpISL17WYkajZlkAOTGSbgU2nzVZJThCuekThZgZX0F/EqUBYTDQWxrjKSzzfc7z23qN8jpnAg1ObIIl6jU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590676876; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=OpnQmDuhAopFdk6i8wHd8jutZE4TT090T0zA5gd+KW0=; b=RdWIiC5IOknvR8ZJ1ekEFZnPkEzaHIQN828igZgD5n29iAJd73ZhyEeTJhSD/ESbf+TQkTOs+bl5i2RLKb4cquNV1Bj4l7LZraeuFwR82tIZ24AUIZYlK8N8y27VOi0tPY+Ezi8JcK85FcpHbzyOm+SjqwjVoJpxYlVf6oJ3RM4= ARC-Authentication-Results: i=1; mx.zohomail.com; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1590676876113626.6672555195423; Thu, 28 May 2020 07:41:16 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jeJi9-0006cS-2h; Thu, 28 May 2020 14:40:45 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jeJi8-0006cM-0i for xen-devel@lists.xenproject.org; Thu, 28 May 2020 14:40:44 +0000 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 318dd56a-a0f1-11ea-81bc-bc764e2007e4; Thu, 28 May 2020 14:40:36 +0000 (UTC) X-Inumbo-ID: 318dd56a-a0f1-11ea-81bc-bc764e2007e4 Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: n0X8arZrp+V6NldKp9SgBONEnoWCNEfodvtEjriYw2SWvek747YOBU8ZTr1bEibCB3W1RbTfCE hUjUStG/LOStGHyfxQArWMBR2RU1P2DoYgIMP/cqoYoRuMglw34XWImAhxfWzUf56qpnh1AjaL Kfn9ewuEATU/dLbzSI2Mb3X7rlVE8Eg48tY1u5SZJfvDbLOYFaiNsQ6Lpjym0wRwNavybmCdNJ +1tAs8q9NZGR+GVK9ySDQXshjbr/405zed5LGXWBWYc5GWYbA+H8S8RkZZGBgDpLceHDs8Lp1n bpM= X-SBRS: 2.7 X-MesageID: 19406330 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.73,445,1583211600"; d="scan'208";a="19406330" From: Roger Pau Monne To: Subject: [PATCH v2 2/3] build32: don't discard .shstrtab in linker script Date: Thu, 28 May 2020 16:40:22 +0200 Message-ID: <20200528144023.10814-3-roger.pau@citrix.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200528144023.10814-1-roger.pau@citrix.com> References: <20200528144023.10814-1-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Andrew Cooper , Wei Liu , Jan Beulich , Roger Pau Monne Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" LLVM linker doesn't support discarding .shstrtab, and complains with: ld -melf_i386_fbsd -N -T build32.lds -o reloc.lnk reloc.o ld: error: discarding .shstrtab section is not allowed Add an explicit .shstrtab section to the linker script after the text section in order to make LLVM LD happy. Signed-off-by: Roger Pau Monn=C3=A9 Acked-by: Jan Beulich --- xen/arch/x86/boot/build32.lds | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xen/arch/x86/boot/build32.lds b/xen/arch/x86/boot/build32.lds index 97454b40ff..5bd42ee4d9 100644 --- a/xen/arch/x86/boot/build32.lds +++ b/xen/arch/x86/boot/build32.lds @@ -50,6 +50,11 @@ SECTIONS *(.got.plt) } =20 + .shstrtab : { + /* Discarding .shstrtab is not supported by LLD (LLVM LD). */ + *(.shstrtab) + } + /DISCARD/ : { /* * Discard everything else, to prevent linkers from putting --=20 2.26.2 From nobody Mon Apr 29 12:50:52 2024 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; 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=fail(p=none dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1590676874; cv=none; d=zohomail.com; s=zohoarc; b=fveedAPYHqt4aTgu+ACtEfMW+G+ZagiYIh1D22oS9xALkC7F9FvLIHQu9UZbHBXWqz3mnpf7oodYcoNPqZGrrR+1I0oVAIPfnQR/ulByhEGO2x5RgDMtWCsrXPYLIcnXlnUuJKn1eD/EbhhmLqJHJGwcWK8qL5ZQ5WlQ3gwT7os= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590676874; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=GoQcWhjPpxoOQpBdNxr8aOhCdoevvEbwIRZUZiLOQVA=; b=Ja4CBJTQPP3dZ6pO98eDg3B6fgYaXrvpW2Rd5xQZCGvUhR1om/pWvB0lU+TX68gOCh/GJ+dnqRpc5bPdsk13JmjDqxUvlEbOnbuUwRo6bdpy8FyqJDljCbqCr0hZDaF74yxiiQrCVJyPN0Qq81bW0ZqJ3/iEc2RPzU4ftqn+9p0= ARC-Authentication-Results: i=1; mx.zohomail.com; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1590676874597250.01245020274212; Thu, 28 May 2020 07:41:14 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jeJiD-0006d7-Ap; Thu, 28 May 2020 14:40:49 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jeJiD-0006cz-0D for xen-devel@lists.xenproject.org; Thu, 28 May 2020 14:40:49 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 33b9ef18-a0f1-11ea-81bc-bc764e2007e4; Thu, 28 May 2020 14:40:40 +0000 (UTC) X-Inumbo-ID: 33b9ef18-a0f1-11ea-81bc-bc764e2007e4 Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: B0tPt1oZmZtfZVk0/L0NGOLQ+wfZvyCCx2fkWMTTmrRNQcfGuApvslZJ44ku2jKqeCz3HbY1Wb ma8CcyoNOAm91tGEuQ9dldiOkBM1Zn3xCh5ojXFlP5nblUVGHs49aNn1BWjeZoMvP4zOQpqdCf 2TbfKobJwDikEaNjr4VKWLjG07LiaQnHah0jXfLbxB8F40YwP2mZBCucnyL95enV//7LT5dtV1 mj3UsWRczggiAFkFnckph0GZmdcyWIDzDXlsbHTAVbA0TkolSIQAzgVkmtX3se5JciIsY4QbtA krY= X-SBRS: 2.7 X-MesageID: 18922185 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.73,445,1583211600"; d="scan'208";a="18922185" From: Roger Pau Monne To: Subject: [PATCH v2 3/3] clang: don't define nocall Date: Thu, 28 May 2020 16:40:23 +0200 Message-ID: <20200528144023.10814-4-roger.pau@citrix.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200528144023.10814-1-roger.pau@citrix.com> References: <20200528144023.10814-1-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Julien Grall , Wei Liu , Andrew Cooper , Ian Jackson , George Dunlap , Jan Beulich , Roger Pau Monne Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Clang doesn't support attribute error, and the possible equivalents like diagnose_if don't seem to work well in this case as they trigger when when the function is not called (just by being used by the APPEND_CALL macro). Define nocall to a noop on clang until a proper solution can be found. Signed-off-by: Roger Pau Monn=C3=A9 Acked-by: Julien Grall --- xen/include/xen/compiler.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xen/include/xen/compiler.h b/xen/include/xen/compiler.h index c22439b7a4..225e09e5f7 100644 --- a/xen/include/xen/compiler.h +++ b/xen/include/xen/compiler.h @@ -20,7 +20,11 @@ =20 #define __weak __attribute__((__weak__)) =20 -#define nocall __attribute__((error("Nonstandard ABI"))) +#if !defined(__clang__) +# define nocall __attribute__((error("Nonstandard ABI"))) +#else +# define nocall +#endif =20 #if (!defined(__clang__) && (__GNUC__ =3D=3D 4) && (__GNUC_MINOR__ < 5)) #define unreachable() do {} while (1) --=20 2.26.2