Received: by 10.213.65.68 with SMTP id h4csp1344491imn; Wed, 14 Mar 2018 18:09:53 -0700 (PDT) X-Google-Smtp-Source: AG47ELtMnTfwuavNOM+gB/cTXymJ9QC5YiBA3L9n7iLYVApLoQfFEpMrhBw2gXiiXLMeIWEk64ip X-Received: by 10.99.42.83 with SMTP id q80mr5340687pgq.115.1521076193419; Wed, 14 Mar 2018 18:09:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521076193; cv=none; d=google.com; s=arc-20160816; b=kXF4LWURUDbnm4axju9ZNS/iYYxGBojdVlpKL1I+fNyO8NFzXdD5YAPXZFUtXgQ+lC jI9i1+1LlEjIpImvnuof3pmFZ/bOjHMHyk3GoWNamJ8qUfpPfGYhB+Hwyp0Ikq4/EkdV TIbS5PrLsVQAvMXXMhvhXxUBhCdWVisEmlNrwlrAK5kCCuSG1dqWFZDSUBzQQl6q8o0b /6GcdSht7p2ZqMcXTfXggXqA9ZSmLR8Jilb4XEnVVgOZhgwrjuACc0Mz96baqgeFKo4B MbaCN5AkPqKkoIn6zoDmDK/SbUAKLOfdmCN1qSb+R0cIaynOzG/gazxH4waqHXztPRw0 Z8pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=wgZWyuCLr7VzQVPlUKku144H1t+azxjpX3RAauSKrPs=; b=JFLAvvcgaXPIiuNIgo2JmfyOa/nH+N9vdH/ljI5WFBMn+39lwFx/3n6aA8qTC5Lv4h R4P6I1DcUb5PeuCz2DBOlgywzHccouxk9zQV5g7Aeq0txpPHf1D6aWocX6C+Svyz/X08 FL8AWcxYLmdbrAplaX2Uu1+juRV/DvW5cXs5J2gEUqxSW+s9zcEdNvxPVVTCA2zdkk8y ingz8LespIN89eVMFllq6/65N9j16Rj0ug6ddUPrKzmENGKN+HT5BUyC3B4stWvwEKIm Mdi9Azs/uoUNVyHGvX8ttmXq5YE7EqorGjbOSs6S8GiXfLA8CNyIBwFPBcV01blLD+2A hxXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Wz49jV+7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t12si2717822pgo.153.2018.03.14.18.09.36; Wed, 14 Mar 2018 18:09:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Wz49jV+7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751871AbeCOBIP (ORCPT + 99 others); Wed, 14 Mar 2018 21:08:15 -0400 Received: from mail-vk0-f65.google.com ([209.85.213.65]:43237 "EHLO mail-vk0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751753AbeCOBIM (ORCPT ); Wed, 14 Mar 2018 21:08:12 -0400 Received: by mail-vk0-f65.google.com with SMTP id p189so3197916vkd.10 for ; Wed, 14 Mar 2018 18:08:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wgZWyuCLr7VzQVPlUKku144H1t+azxjpX3RAauSKrPs=; b=Wz49jV+7ntc/Ff3+J1+ahH02cZT1VRtvcMjTrFY/ZD+T34JYrnD0zxwY2o7oChpJvn XCBc1VJv69umbMhwsa7e1x25iW44vPoWXK8in7Z1A44wJqUT9DE4tzp5ti/QwEbQA1ae aWxdc8Rize+Ln6ysZi8X7aKRXh3O++ZaN5ql4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wgZWyuCLr7VzQVPlUKku144H1t+azxjpX3RAauSKrPs=; b=T4OGsfQxe/N/xJiUFOpSGnillxXYRRG4lQeW48Rfbyc9bXxL7+NHBtpBiH5JZtCNHh WyeXLPFrKuMGyaCqo6JOiF2QZhUYPOdX6FEUUHc4EhoQUwnT6s6O1d1uzI3emaBsT9je qAa/J7mV0tj3rLVKan7rFEySMyDshYYWvhLHTBKgkGLcZUcR/0F5UnKiGUmxkGJrP4hr RmffWm202YJoMqJQHF+rVda0ARlnquxIv3kQOw9oWnT1CoM25ApZ8wTjwofF8fOeN7uK dQcj0h25sWSHZxyDl5XDBJ5iTr4hbJVAbL/rLZylS+vHbpNACcZUvd2bcTXP+HaIXyI4 6dpQ== X-Gm-Message-State: AElRT7H2+HpgAA9gyTI7AwrVYUCWpcg7k8cIdVPpmViIMjHNW8hWls5Y HvhaiiS9SK0aUt9EEFsJL5DACyaawIyiiMZS3mT9GA== X-Received: by 10.31.84.70 with SMTP id i67mr4856473vkb.56.1521076090808; Wed, 14 Mar 2018 18:08:10 -0700 (PDT) MIME-Version: 1.0 References: <20180314214439.27806-1-djkurtz@chromium.org> <20180314214439.27806-4-djkurtz@chromium.org> In-Reply-To: From: Daniel Kurtz Date: Thu, 15 Mar 2018 01:08:00 +0000 Message-ID: Subject: Re: [PATCH v2 3/3] serial: core: Allow skipping old serial port initialization To: Kees Cook Cc: Greg Kroah-Hartman , adurbin@chromium.org, linux-kernel@vger.kernel.org, "Rafael J. Wysocki" , Len Brown , jslaby@suse.com, Andy Shevchenko , mbrugger@suse.com, dhowells@redhat.com, vigneshr@ti.com, sean@mess.org, Jeffy , Doug Anderson , matt.redfearn@mips.com, marc_gonzalez@sigmadesigns.com, linux-acpi@vger.kernel.org, linux-serial@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 14, 2018 at 6:55 PM Kees Cook wrote: > On Wed, Mar 14, 2018 at 5:23 PM, Daniel Kurtz wrote: > > On Wed, Mar 14, 2018 at 5:00 PM Kees Cook wrote: > > > >> On Wed, Mar 14, 2018 at 3:58 PM, Kees Cook wrote: > >> > On Wed, Mar 14, 2018 at 2:44 PM, Daniel Kurtz > > wrote: > >> > Sorry for being dense. What tree is this against? I can't find mention > >> > of amdcz in Linus's tree nor linux-next. > > > >> As I watched this email send, I noticed the "3/3" in the Subject. ;) I > >> see the amdcz support now. :P > >> https://patchwork.kernel.org/project/LKML/list/?submitter=18441 > > > >> >> diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h > >> >> index a27ef5f56431..02570edaddd8 100644 > >> >> --- a/include/linux/serial_8250.h > >> >> +++ b/include/linux/serial_8250.h > >> >> @@ -136,6 +136,12 @@ struct uart_8250_port { > >> >> struct uart_8250_em485 *em485; > >> >> }; > >> >> > >> >> +#ifdef CONFIG_SERIAL_8250 > >> >> +extern bool serial8250_skip_old_ports; > >> >> +#else > >> >> +static const bool serial8250_skip_old_ports; > >> >> +#endif > >> > > >> > Where does serial8250_skip_old_ports get used where CONFIG_SERIAL_8250 > >> > isn't defined? (i.e. why is the #ifdef needed here?) > > > >> This question still stands, though. > > > > From the same patch: https://patchwork.kernel.org/patch/10283641/ > > > > if (CONFIG_ACPI_SPCR_TABLE && !CONFIG_SERIAL_8250) > > > > in other words, if serial ports are disabled, but we still want to parse > > the APCI_SPCR_TABLE, which "defaults y if X86". > > Perhaps that logic should be changed (no need to parse ACPI SPCR table if > > we are going to disable serial anyway)? > But won't this break? "static const bool ..." but the code tries to > set a value but I'd expect the compiler to still yet about it? er... yeah. > I think you could drop the .h #ifdef and use: > if (IS_ENABLED(CONFIG_SERIAL_825) && amdcz_present(...)) { oooohhh... nice. I like it, will change. > -Kees > -- > Kees Cook > Pixel Security