Received: by 2002:a05:7412:b795:b0:e2:908c:2ebd with SMTP id iv21csp496020rdb; Thu, 2 Nov 2023 09:23:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGj3W/Y3QytfcSgtpXFxMTUO4UZPOBj00Bblw0HI8aHu8r9s9d9Fpobw8vUKFSk0tvpAZ9x X-Received: by 2002:a05:6a00:b85:b0:6c3:4597:a936 with SMTP id g5-20020a056a000b8500b006c34597a936mr1078232pfj.30.1698942194640; Thu, 02 Nov 2023 09:23:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698942194; cv=none; d=google.com; s=arc-20160816; b=MiRqH8jhhHAm7yOaBUs7Oz443vixQbu/+garjJC83mza2rrCkFiF5U4hnry2jlthAZ rvQu/9tVtGqSJQG+/BLZNQ55kHxxLqytCn+7m2mJByUF3zVPjfMW3LjCeZ4IaNYJwHLR sPGML1o3HWu98Z/Eq7YwyOVZM8qKNF7/ErRItjXY4CT2gub8PBWAX4QvaMBmtwVV+Lpu 3AQRfKhOMInRVE+5L3K/nsZNj9rQb0QtSYh5s8sRqyiKN68c5yiAMgnsUeIbe5A3rpg1 gxBJAvxbiPtBrgFrkDuNt7bX2nlHs8HMcLn/Zcj7H3oR2g6t/n8YF2bMOjJXH05n5Fr/ YKhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature; bh=GnHfnbxRW6xCASM+FghP5ql9o3nJhCS/JsgSRYW7wTg=; fh=HwwmB8hnkfrL5t7FdIIJuzpSZaXOWB/dq2gmsgP5Hqw=; b=UieUW5sWak1elpPh3hZxcAZKXBsAVoN2+gnOgJWr4+pyKg2XScabXl355rqOCzEbGv JHtKxJqZ4cMYk9obpZ22bUc6qpiYVfrHic5R//AMGfoicV7pvc9s0u1Zk8sKOLmBdbOw IiZoC12Y4vU8TssHHht2p2AzWqnNSaSTSCQomCwMYmsLHHngJ3ei9NFjhWQXU/UCYGG9 xwjsQh+mftJ3+ZOmG2BVoYj6jEmzIsKsdt3A5zfMb90n5lSWY2vXipEmQyYjE+HNz9Ld TgDhvDmHTKyL5/SL8hFI+5hVmfzPoYw42IEg/30ujHWETv5mAVnj0RyfA9lyobYbiSQ6 Uiog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b="O/VU74RF"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id p18-20020a056a000b5200b0068fcff1dc3asi66092pfo.339.2023.11.02.09.23.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 09:23:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b="O/VU74RF"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 7C3998288180; Thu, 2 Nov 2023 09:23:04 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376886AbjKBQWy (ORCPT + 99 others); Thu, 2 Nov 2023 12:22:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344919AbjKBQWx (ORCPT ); Thu, 2 Nov 2023 12:22:53 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 713F8137 for ; Thu, 2 Nov 2023 09:22:47 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 02108218A9; Thu, 2 Nov 2023 16:22:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1698942166; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GnHfnbxRW6xCASM+FghP5ql9o3nJhCS/JsgSRYW7wTg=; b=O/VU74RFkrUSN7aTui1xuUmqQdRpSycdS/nvysJF25G+mo+kET34FGNyVZ/ZnEW1EDQJos /buIPAUCXGsNGeEPyah6x42AzFIbipKmA/x3mYin8uw5B0JN/CIOJ8RqdHTekw/F77Ao3k Tt31BTKLbkFaLWcfM9w38cx56GJIo7s= Received: from suse.cz (pmladek.udp.ovpn2.prg.suse.de [10.100.201.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 362F22D42D; Thu, 2 Nov 2023 16:22:45 +0000 (UTC) Date: Thu, 2 Nov 2023 17:22:45 +0100 From: Petr Mladek To: Linus Torvalds Cc: Sergey Senozhatsky , Steven Rostedt , John Ogness , Andy Shevchenko , Rasmus Villemoes , Sebastian Andrzej Siewior , Thomas Gleixner , Jan Kara , Peter Zijlstra , linux-kernel@vger.kernel.org Subject: [GIT PULL] printk for 6.7 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 02 Nov 2023 09:23:04 -0700 (PDT) Hi Linus, please pull the latest printk changes from git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux.git tags/printk-for-6.7 ================================ - Another preparation step for introducing printk kthreads. The main piece is a per-console lock with several features: - Support three priorities: normal, emergency, and panic. They will be defined by a context where the lock is taken. A context with a higher priority is allowed to take over the lock from a context with a lower one. The plan is to use the emergency context for Oops and WARN() messages, and also by watchdogs. The panic() context will be used on panic CPU. - The owner might enter/exit regions where it is not safe to take over the lock. It allows the take over the lock a safe way in the middle of a message. For example, serial drivers emit characters one by one. And the serial port is in a safe state in between. Only the final console_flush_in_panic() will be allowed to take over the lock even in the unsafe state (last chance, pray, and hope). - A higher priority context might busy wait with a timeout. The current owner is informed about the waiter and releases the lock on exit from the unsafe state. - The new lock is safe even in atomic contexts, including NMI. Another change is a safe manipulation of per-console sequence number counter under the new lock. - simple_strntoull() micro-optimization - Reduce pr_flush() pooling time. - Calm down false warning about possible buffer invalid access to console buffers when CONFIG_PRINTK is disabled. ---------------------------------------------------------------- Alexey Dobriyan (1): vsprintf: uninline simple_strntoull(), reorder arguments John Ogness (3): printk: Make static printk buffers available to nbcon printk: fix illegal pbufs access for !CONFIG_PRINTK printk: flush consoles before checking progress Li kunyu (1): printk: printk: Remove unnecessary statements'len = 0;' Petr Mladek (5): Merge branch 'rework/misc-cleanups' into for-linus printk: Reduce pr_flush() pooling time Merge branch 'for-6.7' into for-linus Merge branch 'rework/misc-cleanups' into for-linus Merge branch 'rework/nbcon-base' into for-linus Thomas Gleixner (7): printk: Add non-BKL (nbcon) console basic infrastructure printk: nbcon: Add acquire/release logic printk: nbcon: Add buffer management printk: nbcon: Add ownership state functions printk: nbcon: Add sequence handling printk: nbcon: Add emit function and callback function for atomic printing printk: nbcon: Allow drivers to mark unsafe regions and check state include/linux/console.h | 129 ++++++ kernel/printk/Makefile | 2 +- kernel/printk/internal.h | 31 ++ kernel/printk/nbcon.c | 1029 ++++++++++++++++++++++++++++++++++++++++++++++ kernel/printk/printk.c | 158 ++++--- lib/vsprintf.c | 25 +- 6 files changed, 1295 insertions(+), 79 deletions(-) create mode 100644 kernel/printk/nbcon.c