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

Re: [PATCH 2/2] x86: fix setup of brk area


  • To: Juergen Gross <jgross@xxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 23 Jun 2022 10:09:09 +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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=YJ2EBGK9IpOyjiMtgo2Xldv69VXYF9fFvP/n00ISXz0=; b=bxEQp9oQwaPlneqw3PVwqXrZd+Zdbv9LESGy9A9FQsgjP1GGPGR7gJq4pvTLyxJodCitupWGqeXFFpqJ21o8ITf2RnMd9ouiRjOl4opHqRPcTzUiQD8QPqtyKDekIM8QuYk6TaoikdTPalfdKc+pM/4yMfTpEvU1Q35uHKTkIUqI0xbHsj+aoWuQ5TBsQXfB440c9UtpRK11LDJVl2Pzn/FS9VttUqjcHYW+Yt4NS+M2SPQLmrhdlJ1ZWF/JFkMZ1M3tjfVIIuWxFWG9/o+fU1NlYFWl6kvWxDYO7UNYkmenVP/jKdMWb8KshxinoNyiKri+NUPEo01zSg2Jzk8cDg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZJhFpq7OKKJxV1imeH6+lddhdA1Wa5NX9r/GalrKdbhMgV+BvnQscGOAS8cIdfV+MI9hdfNmQKBclr7ZNjIHJuFTzqSBlEsX/z9C2FjHUb1ygGIrEs7tKKenJeC/5j+gjepXV3nJ/2aeUfBXlDbHQJX+6/8UAmPJMvJSwNh0GSpWGd6hlSEUVhOuRZNBcDSRkfYkOmPw2F5ohLKxJA5Nprr+bREq9MTdzbuQvl/CDxk08gtki4SAtnus38vU2ByYOlIZrmAZMX0k0dpYbNkGJD9EfkZVpa9tLJHH8ZekdirWZUxIJXDg2DjecfC8y9TFRGGESKRoJyEX7CvdoozYvA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, x86@xxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
  • Delivery-date: Thu, 23 Jun 2022 08:09:19 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 22.06.2022 18:10, Juergen Gross wrote:
> Commit e32683c6f7d2 ("x86/mm: Fix RESERVE_BRK() for older binutils")
> put the brk area into the .bss segment, causing it not to be cleared
> initially.

This reads contradictively: If the area was put in .bss, it would be
cleared. Thing is it is put in .bss..brk in the object files, while
the linker script puts it in .brk (i.e. outside of .bss).

> As the brk area is used to allocate early page tables, these
> might contain garbage in not explicitly written entries.

I'm surprised this lack of zero-initialization didn't cause any issue
outside of PV Xen. Unless of course there never was the intention for
users of the facility to assume blank pages coming from there, in
which case Xen's use for early page tables would have been wrong (in
not explicitly zeroing the space first).

Jan



 


Rackspace

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