Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3705031ybl; Sun, 15 Dec 2019 16:11:30 -0800 (PST) X-Google-Smtp-Source: APXvYqzjf0wevrKCbFawPJp5+27jttrVFVfba45/P0qUBsKb7Gbdpuz3t8jW4O9v2AXPq8tQqEJx X-Received: by 2002:a9d:74c4:: with SMTP id a4mr29541506otl.119.1576455090746; Sun, 15 Dec 2019 16:11:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576455090; cv=none; d=google.com; s=arc-20160816; b=ZhIT09V/EllDVDk/Rdpn/bbSfvoLDcposgAxTPYGYNy9B7foMEQXk/wEqFKrzEA3vx +TN7OH1EIDsYe5VPtFRokexPVtvCRK6sR5+osz9Wwkfvp9dHGZ8c3EG51Q8488+8fTMj 5m7XI+olCN3UeK6OgK31ZQ7EwH0iVwnU1o/GsFvgNH2pJBhli39mCVuaT+yiR8eT8YHu 9OukhbeibTulS06EsoOkhIy3CqgHd+RqIVOC1Gl8Br92znU6UXzpBiungJeweV8JwWFx R2+fhckdMEpbsVlWNG1IMnfXzoeJw6Lel4/cF38uXMtujlCjZV7Ha1a2WzBuQH4WHMkg reCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=02nHTNZq4CJvxVIEF5n1eljn6AqBUqu1Mz2qDkoB8g4=; b=SVQSI8q8yzROUE9KTXSTHrZ7MgVZG55a0edXfMiVho+VVzMpF0yIMNhLBL1qgO3FOF lmBa34dclRIKIkhOUWPlpao/PHKzmSqCIgh+PkQ3NOMBtuJPUoMpFOmdQbSwwFXak3OQ VpjA5cWQ6vt59mq0V9dWhACQjQSjkmD6C+FBN8FAE2v+9CiJZQP4Mw+f5iYFfAPe9aZi keSpwi/sQLeFTU/1t8z2nhs1Wuyq9BDXXcnMruB2Hwp/wvj+dJZf/IeTXxeN0NCWnTuy p8kyQS8J36qR1PffelE+Jh4/nbg38Pel73swA1CYZ/oESehitjkFTXzVCpEFLQ9PxAL7 qCcg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i2si8961978otc.130.2019.12.15.16.11.18; Sun, 15 Dec 2019 16:11:30 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726454AbfLPAKM (ORCPT + 99 others); Sun, 15 Dec 2019 19:10:12 -0500 Received: from gate.crashing.org ([63.228.1.57]:47746 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726299AbfLPAKM (ORCPT ); Sun, 15 Dec 2019 19:10:12 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id xBG09YtQ028879; Sun, 15 Dec 2019 18:09:35 -0600 Message-ID: <0511b917d8ebcf594480349b79fcb9f14aa882f9.camel@kernel.crashing.org> Subject: Re: [RFC/PATCH] printk: Fix preferred console selection with multiple matches From: Benjamin Herrenschmidt To: Petr Mladek Cc: linux-kernel@vger.kernel.org, Sergey Senozhatsky , Steven Rostedt , Linus Torvalds , AlekseyMakarov Date: Mon, 16 Dec 2019 11:09:33 +1100 In-Reply-To: <20191211091740.p6bgjy7sy75maenw@pathway.suse.cz> References: <20191210091502.qoq55fdjad6aixab@pathway.suse.cz> <50d2c44a15960760c6a9d24442a93fa4b31b7594.camel@kernel.crashing.org> <20191211091740.p6bgjy7sy75maenw@pathway.suse.cz> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2019-12-11 at 10:17 +0100, Petr Mladek wrote: > The reverse search of list of console does not work for ttySX > consoles because the number is omitted when matching. And the messages > will appear only on the first matched serial console. There is > a paragraph about this in the commit message of my patch. About that specific issue... I see indeed that 8250_core.c registers a "generic" console with index -1 which will match whetever we hit first in the array. This is actually wrong isn't it ? Without any change such as what we've been proposing, it means that an arch doing add_preferred_console of any ttyS* will override anything on the command line, and it also means that a command line with multiple ttyS entries will stop at the first one, not the last one. IE. In both case the code will select a console that isn't preferred_console... or am I missing something subtle ? So yes, fixing that will "regress" in the sense that it will change the behaviour, but to make it match what's documented... am I wrong ? The question then becomes what's the most broken ? Changing the behaviour that might have become expected or leaving the (alledgedly) broken behaviour in place ? Cheers, Ben.