Received: by 2002:a05:6358:16cd:b0:dc:6189:e246 with SMTP id r13csp1095344rwl; Fri, 4 Nov 2022 09:42:24 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7Nm146en6q5k6tq9dK30TYi+gQwrwbDw/XxafLuHU/VKOv11n+KWllumGBY2RMtjTD4rUg X-Received: by 2002:a17:902:ed8e:b0:187:27b3:74e5 with SMTP id e14-20020a170902ed8e00b0018727b374e5mr25300047plj.90.1667580143927; Fri, 04 Nov 2022 09:42:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667580143; cv=none; d=google.com; s=arc-20160816; b=LC4+gQvFVVvtMTPn6LeKhqB865ix3zPjHlgacoVmVBWvOKClHzUNdy3Oa7XuCqeeE1 8UUWdSKQqGjO2tODD9hE/+Ts+D0ecgYOcnF0X5zWoqe5aQR4ze4iT4wzvyhKmxaHzXWA p0uCG+2HyjRKbKCU2REpUV/muJ2VBqzc6vYgXm2WooOi4LBQ08yPkFK90CJAdBYRY+ef MKNddGlsPWvCZvEMRgFRidyMm8J9IG038ZBPJpe6DKvSCBH3xgWR8oMk9GInLk9/jIOF 3PAZLxO3tH7NUmOd6rRCYkreGL7c3JGrwkoCrCWgdYCqiUtaUsuTro3e9J4C06vLZ/ww Hx7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=tijLp86GZkQuYvpbkKNsoSVqaYbeBZGTP0NGWpFyyCE=; b=iLiklL/vc7avb+h2X+WNsXMAnhN3KO2JWTsJkjPvKbN4HPugBd7mC+j6jW7uwBHeDP CudflbLF64bPRHHss9MeCUy5D9T/DyuJegEKVepZJFTXuRW9V7SB9IW7ZvPU5oy1J9Sw 6UanoVFhi76IQwLMynMobMDztWzHqhReIN8c/dV2xiHopih+PssR63jNYkXvQc8Pgm3A LyFMrZ56Z4yX/+64uqqHck+MRvdioX4wV976a6K0GZMol2CdvH/qvASJE9Ajd3X5+StJ Da3vczPXmOGlKDsquRQi8Ah6I8ey2FWN50rTqJuvcU5x5yi8Gmi9prkoXdLMKlS9uAZv YuwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=rhX9V8ya; dkim=neutral (no key) header.i=@linutronix.de header.b=03km6Xg2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j15-20020a170902da8f00b00176ab3bdffdsi5812821plx.536.2022.11.04.09.42.11; Fri, 04 Nov 2022 09:42:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=rhX9V8ya; dkim=neutral (no key) header.i=@linutronix.de header.b=03km6Xg2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229861AbiKDQXX (ORCPT + 96 others); Fri, 4 Nov 2022 12:23:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229812AbiKDQXT (ORCPT ); Fri, 4 Nov 2022 12:23:19 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7788C2FC25; Fri, 4 Nov 2022 09:23:17 -0700 (PDT) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1667578996; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=tijLp86GZkQuYvpbkKNsoSVqaYbeBZGTP0NGWpFyyCE=; b=rhX9V8yaFwgNnlHRVbXxSHwqauTFRTjTrQL6BQ1p6vBoQS+MPSPyCmgaN+rVzZbZBMCK8l xo5SiNiRlO3EDC0yfxtSoi8U3Zjuu33rA+FMPViiORyfhqRC19TvEgrnEYVsKhv/m0CUrv 7uo+pCOQcFp6C62wH+xMood/ljqOalG8ogQFvFnOEVZ/zpGls4t+rqTIIxBquItUOK8ZBn rgSqrlIJ74Nh5rH4KOzY24TklkQ8VxiLlwm+QOxJV/3l9cfBRUgmtn4fjiw8RxGTQc6j5P Lo3zjkbgBHbIxinMoz3ykEASjqzkzppFTRmxVuyv60daF7CRQtMVQwq6XOLoIA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1667578996; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=tijLp86GZkQuYvpbkKNsoSVqaYbeBZGTP0NGWpFyyCE=; b=03km6Xg2ZZbUKK1SCAp0bHxpHwoD19D3C1TT2XmKXk1NfLgyr78f44THYoqM/4udhMvv4f SinlmF6qT5x7kCDw== To: Doug Anderson Cc: Petr Mladek , Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, Jason Wessel , Daniel Thompson , Greg Kroah-Hartman , Jiri Slaby , kgdb-bugreport@lists.sourceforge.net, linux-serial@vger.kernel.org Subject: Re: [PATCH printk v2 12/38] tty: serial: kgdboc: use console_is_enabled() In-Reply-To: <87czagf8hf.fsf@jogness.linutronix.de> References: <20221019145600.1282823-1-john.ogness@linutronix.de> <20221019145600.1282823-13-john.ogness@linutronix.de> <87czagf8hf.fsf@jogness.linutronix.de> Date: Fri, 04 Nov 2022 17:29:15 +0106 Message-ID: <87bkpm7kp8.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,INVALID_DATE_TZ_ABSURD, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022-10-24, Doug Anderson wrote: > It actually only holds console_list_lock() even at the end of the > series. Still, it seems weird that we're declaring the `data_race` on > CON_ENABLED but not CON_BOOT ? For my upcoming v3 I decided to drop this patch and will keep the existing direct reading of @flags. Instead of this patch, for v3 the comment will additionally mention why @flags is allowed to be directly read: /* * Hold the console_lock to guarantee that no consoles are * unregistered until the kgdboc_earlycon setup is complete. * Trapping the exit() callback relies on exit() not being * called until the trap is setup. This also allows safe * traversal of the console list and race-free reading of @flags. */ John Ogness