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

[PATCH] Arm32: avoid .rodata to be marked as executable


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 11 Jun 2021 11:19:15 +0200
  • 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-SenderADCheck; bh=lKEcglE5r0lHaY0ElKUC9DDU4DNKyO6COr+pggkSwLY=; b=CT1OPRtdzhQp8B1YjYqkJDD64Xg/3JDuVW1sPXFDrxISkqK9tj4Th0PToyIukZDWU3j8uQDsnPqdT/kMEWHc66pKfkLmyLf4YWaumqwCxetyT3dR+cDMpfU3Op4L2BoyAemCyUoMCQyUBAsmII0kcO6s2y0F1tftBj+C1c2KE5YKbs2BTbgVQoommYWqrC4QMKfJuiICW0YmJHhxvEZUxUyfsg+G+CYJcJIc2zF/uy8QU2Y+kxSwvSXZ+i0UdeIxTJUb2CbbKEhOV70raeHsDigaD73uH5WWtPSLoRZH951SZcP/6r/pjEJWtTofC/Or8UjM9AFDYK7AnKRzcZ/0sw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lJsn829xi1UVDXQxOw/Tt+q334wIwpT49Z/GBnklr2FwoMVjNi6iOZ2SbvTUBbakZZ2rkm3q/juC5Kd1Dl68C8d9rX2AHv8ZXdkgZuqlB9evPEvsDyiIimKrZQeUus/204SefofXk9nwI6IDS33O8AewFRg0m7kxJiHBHD9ZZubUts8kt6g2pXDZAam7v0jf23uEb0cKGBXcAI5AvrFNp20BMr9XoJ2AeeaklQeRlK0vM3nC1t1mZnCIQl/E6qcPWcMv8a27ZTGx32Qf876d9rbLSO/hShVu+sLz1eQH7trARAHt6zPEUQ3rzv3YYLnXoCi8GaZa1HJOCdSjv/IKnw==
  • Authentication-results: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=suse.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>
  • Delivery-date: Fri, 11 Jun 2021 09:19:24 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

This confuses disassemblers, at the very least. When this data still
lived in .init.*, this probably didn't matter much, albeit the
"#execinstr" would have been suspicious to me already then. But the
latest with their movement to .rodata these attributes should have been
dropped.

Fixes: 9cbe093b7b84 ("xen/arm: link: Link proc_info_list in .rodata instead of 
.init.data")
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
The PRINT() macro in head.S is another source of such confusion of code
vs data. While in head.o there are mapping symbols guiding disassemblers,
these mapping symbols are gone when looking at xen-syms. But I realize
adr's reach is too limited to allow for a halfway reasonable approach of
moving those strings (e.g. to, at least, have them all together).

--- a/xen/arch/arm/arm32/proc-v7.S
+++ b/xen/arch/arm/arm32/proc-v7.S
@@ -29,7 +29,7 @@ brahma15mp_init:
         mcr   CP32(r0, ACTLR)
         mov   pc, lr
 
-        .section ".proc.info", #alloc, #execinstr
+        .section ".proc.info", #alloc
         .type __v7_ca15mp_proc_info, #object
 __v7_ca15mp_proc_info:
         .long 0x410FC0F0             /* Cortex-A15 */
@@ -38,7 +38,7 @@ __v7_ca15mp_proc_info:
         .long caxx_processor
         .size __v7_ca15mp_proc_info, . - __v7_ca15mp_proc_info
 
-        .section ".proc.info", #alloc, #execinstr
+        .section ".proc.info", #alloc
         .type __v7_ca7mp_proc_info, #object
 __v7_ca7mp_proc_info:
         .long 0x410FC070             /* Cortex-A7 */
@@ -47,7 +47,7 @@ __v7_ca7mp_proc_info:
         .long caxx_processor
         .size __v7_ca7mp_proc_info, . - __v7_ca7mp_proc_info
 
-        .section ".proc.info", #alloc, #execinstr
+        .section ".proc.info", #alloc
         .type __v7_brahma15mp_proc_info, #object
 __v7_brahma15mp_proc_info:
         .long 0x420F00F0             /* Broadcom Brahma-B15 */




 


Rackspace

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