From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751299AbeAPP4Z (ORCPT + 1 other); Tue, 16 Jan 2018 10:56:25 -0500 Received: from mx2.suse.de ([195.135.220.15]:39641 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750811AbeAPP4Y (ORCPT ); Tue, 16 Jan 2018 10:56:24 -0500 Subject: Re: [PATCH] x86/acpi: check rsdp address received via bootparams to be valid To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, x86@kernel.org, lenb@kernel.org, rafael.j.wysocki@intel.com, hpa@zytor.com, tglx@linutronix.de, mingo@redhat.com References: <20180116135730.19216-1-jgross@suse.com> <20180116154630.ke53suvokynj73qd@gmail.com> From: Juergen Gross Message-ID: <432c21ab-24d8-1e70-a471-ad8a14357d4e@suse.com> Date: Tue, 16 Jan 2018 16:56:21 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180116154630.ke53suvokynj73qd@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 16/01/18 16:46, Ingo Molnar wrote: > > * Juergen Gross wrote: > >> There seem to exist several grub2 versions trashing >> boot_params.hdr.acpi_rsdp_addr. >> >> So don't just believe this address to be valid, but verify it pointing >> to a valid RSDP table. > > Exactly what kind of values do those Grub2 versions put into that field? Pointer > to something, or random noise? Looks like random noise. On Mike's system it was 0x000000000151. > Also, what exactly does 'validation' mean, how robustly does it filter out of spec > uses of the boot protocol? It validates the RSDP has the correct 8 byte eye catcher in it and the checksum of the structure is correct. Searching the RSDP by scanning memory is using the same checks, so I guess this ought to be okay. Odds are about 1 : 2^80 for false positives. Juergen