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

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

  • To: Julien Grall <julien@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 14 Jun 2021 14:02:23 +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=ANbCd3cO3EaUbi2pY7tnLHJdKBi2wDGigy4Oyzq6I2Q=; b=F0GPzGS/0B2knsu7BUnucu3aeSdfoSu0aUTx6XRSygF8TD2Y8bkJHt/0Qz/pBsnLg9hHyLQK2xbiDm1LUavJzYg0/FbleDfKEpjVUl1FsgA/j3rw+km5mziAtopP4uhdmL4WyZ9OGGqrUYMJGJ9T4PWtE0mor6FtSKaXlkjYEoB1RqlkIvSbQ5xbq7Qg9oHVX5e3bNRjxqhAgKiq0BqvR5r4BmUs0Oy22q+0dUfmiNj2EHc81I44WaGvTT0szcTazNeFixqJ+gjUU2Zh3R2aoWR6na36oTDCCAnzfA2fTdLLrYIrohuoKzNtXzc8KDO9qJCfpz5EZMUj+qyGj+aRsw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L1+Pg6fc/u0UthblUjiE4vEoVfqFW9v7w+lD4eqLVr0ng8YVqPJXAgi7i5yjxOJy2IMOK6YeKDUW2b2MMaWKu0D325YogFMJGZhNkqsxztop0KyGjHGJVmqKvMcQCZGwDPmmu1aVGcbCr31ZmfenSDF9XzX1eLYJDaDmYJsGJ/cuDfSZQ2S+1njQPGpLWBpEehoi0elYLGkbi5pscb7lQE+7StwmqWGWtHNg0rOujwNV9P+nTkrW29VyM4l1am9M2xcGSmLs17MV2Qkec91EFejHDDg4xP87Ml8HELV0NnSrE/uRfxkMQ8BpVUdOXWBam5lRDesvwtsCFKUBHr/4UQ==
  • Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 14 Jun 2021 12:02:31 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 14.06.2021 12:54, Julien Grall wrote:
> On 14/06/2021 12:40, Jan Beulich wrote:
>> On 14.06.2021 11:57, Julien Grall wrote:
>>> On 11/06/2021 11:19, Jan Beulich wrote:
>>>> 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.
>>> I don't quite understand why this wasn't really a problem for .init.data
>>> but it is a problem for .rodata. Can you expand your thought?
>> I've said "probably" for a reason, and my thinking here goes along
>> the lines of what I've said on the other patch regarding .init.*:
>> There's perhaps not overly much reason to be picky about the
>> attributes of .init.*, and at least on x86 there is also a case
>> (the EFI binary) where we fold all .init.* into just .init anyway.
> Makese sense. Thanks for the explanation.
>> The alternative to the present description that I see would be to
>> go with just the 1st sentence. But I would be afraid in such a
>> case that you would come back and tell me this is too little of a
>> description.
> How about:
> "xen/arm: .proc.info doesn't need to be executable
> The section .proc.info lives in .rodata as it doesn't contain any 
> executable code. However, the section is still marked as executable as 
> the consequence .rodata will also be marked executable.
> Xen doesn't use the ELF permissions to decide the page-table mapping 
> permission. However, this will confuse disassemblers.
> #execinstr is now removed on all the pushsection dealing with .proc.info".
> I can update the commit message on commit.

I'm fine with the new commit message, but I'd prefer the title to
remain as is, as that aspect is what did trigger me making this




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