Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2692231rdg; Mon, 16 Oct 2023 11:45:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFVm3VjAuOw37n+Dw1yteTPW/o5sC9xL+Lh0vX2kOg241Y3+t4O8+Cvmhoq1LMUYSO1xlpV X-Received: by 2002:a17:903:1cf:b0:1c9:e257:f88 with SMTP id e15-20020a17090301cf00b001c9e2570f88mr193095plh.10.1697481936320; Mon, 16 Oct 2023 11:45:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697481936; cv=none; d=google.com; s=arc-20160816; b=0NoIusutu6JCgz2UhZut9WqcvOdEqf4tj1wp4rtZwP3PZL8X6rR4zzvPvUcREkR+hM O+jRa2neeY9p2JbtAXqv9bnwZX+zZExBrmPixy3e0ZYKp2l3iYLQaOosORufvmRk0gaA MpPv8T/VyhyuVGhFk0GgKvg0ytWIQukGjm3VN1sD0hYpN4l4KA41h/KupnysQxww39tc r0+9JcS+RB/Q/+KsQ6l/t4Zu6uDas4LPWI5hvIZlsTjW2go+aEuYMKe3sTaEqn+TIlma oo0dlYfOsYKw5yso5Qrxt3bISi8noLQ7NjIgtOEpMB5zje3DXFt17lmJChLf0KRkWOkH BSGg== 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:dkim-signature; bh=QCz1V3HEqcMYQTB0QeHpe/Wi3esxCjn9YddwwH6xwXw=; fh=PdHJz2EHAsI5C1MmepYuof0eJQvKJvcT3odfGFtfi44=; b=LuL9VxOYbsEawlUeB4YBJ1B7EKHNSsWcjQzTMwwMB13sCy5Ek7883X/WoJDhvrMcbz b53XX9+WVVPLNN5Zd0vJgi4ByrDbpQVJbfIHUql5EJ5QfCKo2mVOHfZ5Grpi3GoEzFZj nSxTVU5R37VqCJ6vda5ZjAODwn9fyj5wcWDpg8lSuinX0Ta/N6VT33y2TdathXoacQxy qjA50peu+X+TpTMvYi24cS8Pm+z9salMi3UkSPlsil7olmMCpgmZLReew+W2DW70oV9K m1/+8Nc/+3NrzECV9eyXNDNS51cVpWFwsMvngVC0bgCaS+9X1lVPaUJglKZxaAcROvXL V6FQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JNRtjw+b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id li11-20020a170903294b00b001c9e765e151si9010551plb.116.2023.10.16.11.45.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 11:45:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JNRtjw+b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id AAD2A804913F; Mon, 16 Oct 2023 11:45:33 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234117AbjJPSpI (ORCPT + 99 others); Mon, 16 Oct 2023 14:45:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229459AbjJPSpF (ORCPT ); Mon, 16 Oct 2023 14:45:05 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D210810A for ; Mon, 16 Oct 2023 11:45:03 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E381C433C8; Mon, 16 Oct 2023 18:45:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1697481903; bh=vgzd4eTVpzoyROz5ChuEfS83hMsFcUkJXTV9BMlYwOk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JNRtjw+bDHYpjs77EYs4lr/3oUKnO9jxzCCL2/J6IdfyFuuAPN6ifRG4JI77f9BLB cv8stzf5p44LwVBaNl8QL7VYy5xVdWxngSoi+NH14AN3FKNWhe5nxmlhJRkG1jBNRz utUBmtKhxjmj33aIbRADxQBkNZx0bntw37EebWZk= Date: Mon, 16 Oct 2023 20:45:00 +0200 From: Greg Kroah-Hartman To: Tony Lindgren Cc: Petr Mladek , Steven Rostedt , John Ogness , Sergey Senozhatsky , Jiri Slaby , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] printk: Check valid console index for preferred console Message-ID: <2023101649-gladly-scarily-329c@gregkh> References: <20231012064300.50221-1-tony@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231012064300.50221-1-tony@atomide.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.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 (howler.vger.email [0.0.0.0]); Mon, 16 Oct 2023 11:45:33 -0700 (PDT) On Thu, Oct 12, 2023 at 09:42:56AM +0300, Tony Lindgren wrote: > Let's check for valid console index values for preferred console to avoid > bogus console index numbers from kernel command line. > > Let's also return an error for negative index numbers for the preferred > console. Unlike for device drivers, a negative index is not valid for the > preferred console. > > Let's also constify idx while at it. > > Signed-off-by: Tony Lindgren Reviewed-by: Greg Kroah-Hartman