From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756607AbdLVQns (ORCPT ); Fri, 22 Dec 2017 11:43:48 -0500 Received: from mx2.suse.de ([195.135.220.15]:44148 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753456AbdLVQnp (ORCPT ); Fri, 22 Dec 2017 11:43:45 -0500 Date: Fri, 22 Dec 2017 17:43:34 +0100 From: Borislav Petkov To: Juergen Gross Cc: Linux Kernel Mailing List , Thomas Gleixner Subject: Re: Bug in patch "x86/pti: Add the pti= cmdline option and documentation" Message-ID: <20171222164334.eyiyudqqj5wpenrr@pd.tnic> References: <52b2f3c6-2e5e-2033-87d6-5abb3eb27b35@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <52b2f3c6-2e5e-2033-87d6-5abb3eb27b35@suse.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 22, 2017 at 05:41:32PM +0100, Juergen Gross wrote: > The patch in the tip tree with commit 506bcdf68b07a0335751e1fe8be37 > ("x86/pti: Add the pti= cmdline option and documentation") is completely > wrong: cmdline_find_option() will return -1 in case the otion isn't > found and the len of the argument in case it has been found. It is not completely wrong - we still walk into the if-branch. Besides, we moved the xen check upwards, before that so it is not relevant for the xen case. Regardless, I'll send a correction soon to check the retval directly. -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --