From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 131F1CD6E51 for ; Wed, 11 Oct 2023 09:18:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345838AbjJKJSK (ORCPT ); Wed, 11 Oct 2023 05:18:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232397AbjJKJSI (ORCPT ); Wed, 11 Oct 2023 05:18:08 -0400 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E410894 for ; Wed, 11 Oct 2023 02:18:05 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 1E85F80E1; Wed, 11 Oct 2023 09:18:05 +0000 (UTC) Date: Wed, 11 Oct 2023 12:18:03 +0300 From: Tony Lindgren To: Greg Kroah-Hartman Cc: Petr Mladek , Steven Rostedt , John Ogness , Sergey Senozhatsky , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] printk: Check valid console index for preferred console Message-ID: <20231011091803.GC34982@atomide.com> References: <20231011074330.14487-1-tony@atomide.com> <2023101131-maroon-stubborn-1364@gregkh> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2023101131-maroon-stubborn-1364@gregkh> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Greg Kroah-Hartman [231011 07:53]: > On Wed, Oct 11, 2023 at 10:43:25AM +0300, Tony Lindgren wrote: > > Let's check for valid console index values to avoid bogus console index > > numbers from kernel command line. While struct console uses short for > > index, and negative index values are used by some device drivers, we do > > not want to allow negative values for preferred console. > > What drivers use a negative index for the console? This is based on grepping with $ git grep "co->index =" drivers/tty/ Not sure what all might be stopping making struct console index unsigned. Regards, Tony