Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp677317rdg; Wed, 11 Oct 2023 02:18:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEn/Z7bBVC0elaKOYJ3g5HFACWtj4CSrU+PUj6DonBLodbDuME0vwdUzjiBVqk4qE4K76nc X-Received: by 2002:a25:2691:0:b0:d9a:6c74:49b with SMTP id m139-20020a252691000000b00d9a6c74049bmr4102659ybm.2.1697015908956; Wed, 11 Oct 2023 02:18:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697015908; cv=none; d=google.com; s=arc-20160816; b=EsvrJbhIYJ9PBEBTkx4a6zCjvCYtgSdOwdD7MJLEyxhMM6rys6XBzBIibzfIBcAucC nZLdfGILgegdbfiW6MNJ8F3/umv9HrvBec4zSe14Y+PDN+jfhcfsWjxmy52xi749X2Ik 8N3ImSYqIxT5WJTcEer4pAHCDRrdTD3LCqFN2AUM/EpUTemsENLW5AMvnatUlH7w6mgb 2J6ShRd2WNEGebTmT8G8Amc4Oc+AzZCKdXYR0nBv0rp8tazBhoeVUeJPanG66ZD9jqKU pASWB4xjA1hkI1H1Zsm8OGkalt+7EDT2aSWfBA0WRhcg9gDi/+f1Vi1ct2c6CX19IRS3 CLaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=oGgGbaBco1/FzkPRFUqCDogOFbDLRW7RiYj5ONt/tPU=; fh=8fO2Dn5S985cb/xLHq1DbTnH8R9pgHCpVq+alLaNF/Y=; b=emNkp24XvianBQMkJR+cUN4CGKBA+wnklB4y5JJzp/bNnuOdy6O48w2OLE+JmATuGf Gd1Fzhm0S+dZGJKXAwJrj8poOXZQ8W1ZDrJIPvm5jfiiUfxVJVJ1AcHR5ISgsxoWCqP1 gMawqSakeAwbCdKWHYuYXIoHYj2xHmLUxuCG6338zBwO3u64aGsm2r+aB7Lgs+SBQAXS +fwm7C/2X1qFHap5BF7Wq0i6GGM+cE1mAaq7H3qxhlsV99agJpPbQ3SWza2loUWuQ0ie RygsjlMmwiinP6ijCfWwVvGJq3aTM8omAkGsnW4xJPQAUUlzxd322sun2MOK4wS0nU6r yPNQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id g4-20020a056a001a0400b0068fe2453ab6si11824797pfv.353.2023.10.11.02.18.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 02:18:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id DA73980F9CA2; Wed, 11 Oct 2023 02:18:25 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345769AbjJKJSJ (ORCPT + 99 others); Wed, 11 Oct 2023 05:18:09 -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> X-Spam-Status: No, score=2.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 11 Oct 2023 02:18:26 -0700 (PDT) X-Spam-Level: ** * 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