Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp631435imm; Fri, 28 Sep 2018 04:23:52 -0700 (PDT) X-Google-Smtp-Source: ACcGV6363e7EKb3j6pZkAo2P3V3cObadQ87TnU7ErEDMD9lrn2XZw9414RLOSRXbbLgTvrW9ctdZ X-Received: by 2002:a65:5188:: with SMTP id h8-v6mr14568922pgq.288.1538133832770; Fri, 28 Sep 2018 04:23:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538133832; cv=none; d=google.com; s=arc-20160816; b=iTbZqdxbT5MC0FtMf4hwBPdvuxKWiU+NZW+BkPGjtc16Qv9cA5REL7GM0i+kwvuEpt oR/ECj/NDQZgZx71MMNESvgpoeJ8y2M/7MaZx0/0hJuuqqng05VxiuT4yLF8VRvxxGjf 2IqWhTAeGUO0ILPWJxS5HtR6HjATjksu+uEaABpyPNftKMAgvFS/VSSaJCNUKiULUaRX y1qsetfvl9eEBfw24nrs28LUUSFBpMtyO4kaVGd3gyfzkEEfwTtl8/gIuCk0yqK8g1nv KQm4xO40/ypvMVlBYB/ZB+bQJ7FAocI5kL/HeRp57nze0pe5GJdRSVTIUC1ArCbrAFhn 6h6Q== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=/CATS6MoqSd4jdauyJOV+FEfcC+oqqflxITViYelY74=; b=j7/8CC0vR2sxPbjDTaNwfXemvA+P8VeVF0gttVqvE7zaxAVmK/MjVLDe38FNumNqnx XwDoWBIInCDnyEm0hABvs9tS+/++D2VfJLQmNaDN1kD5OBWnCdw5WNktm86Er4scsHao hb8IHM0WdeF+j3RY/GOHvPF9oJ3VxQEqSJsKeiJ2iPAQVJPC10TnMVzG2dJ22hLaTkpl c+rmTVEL4R0/wW7PJzSeWhhdb+YugyWS79atdH3oqYr9sDaixRfsFTwWuBxSJIDpP7Vp SG+IKVImmCxZ0HJYLy09oKxLoFlP54Ava+OKHEtwFLKm+AEWjdpwHDdbg5rVRM/pgvpE H3yw== 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 t190-v6si4781943pfb.344.2018.09.28.04.23.34; Fri, 28 Sep 2018 04:23:52 -0700 (PDT) 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 S1729397AbeI1RpT (ORCPT + 99 others); Fri, 28 Sep 2018 13:45:19 -0400 Received: from www262.sakura.ne.jp ([202.181.97.72]:45635 "EHLO www262.sakura.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729089AbeI1RpS (ORCPT ); Fri, 28 Sep 2018 13:45:18 -0400 Received: from fsav304.sakura.ne.jp (fsav304.sakura.ne.jp [153.120.85.135]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id w8SBLwTC097191; Fri, 28 Sep 2018 20:21:59 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav304.sakura.ne.jp (F-Secure/fsigk_smtp/530/fsav304.sakura.ne.jp); Fri, 28 Sep 2018 20:21:58 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/530/fsav304.sakura.ne.jp) Received: from [192.168.1.8] (softbank060157066051.bbtec.net [60.157.66.51]) (authenticated bits=0) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id w8SBLwKO097186 (version=TLSv1.2 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 28 Sep 2018 20:21:58 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Subject: Re: [PATCH] printk: inject caller information into the body of message To: Sergey Senozhatsky Cc: Sergey Senozhatsky , Petr Mladek , Steven Rostedt , Alexander Potapenko , Dmitriy Vyukov , kbuild test robot , syzkaller , LKML , Linus Torvalds , Andrew Morton References: <20180912120548.4280f04a@vmware.local.home> <20180913071204.GA604@jagdpanzerIV> <20180913122625.6ieyexpcmlc5z2it@pathway.suse.cz> <20180913142802.GB517@tigerII.localdomain> <20180914065728.GA515@jagdpanzerIV> <49d22738-17ad-410a-be0a-d27d76ba9f37@i-love.sakura.ne.jp> <20180914115028.GB20572@tigerII.localdomain> <20180914122217.GA518@tigerII.localdomain> <20180928085648.GC1160@jagdpanzerIV> From: Tetsuo Handa Message-ID: <802130a3-b8c1-3973-933b-d6dc5ff2930d@i-love.sakura.ne.jp> Date: Fri, 28 Sep 2018 20:21:58 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180928085648.GC1160@jagdpanzerIV> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018/09/28 17:56, Sergey Senozhatsky wrote: > The good thing about cont buffer is that we flush it on panic. E.g. > core/arch early boot stage can do: > > pr_cont("going to call early_init_foo()..."); > early_init_foo(); > pr_cont("OK\n"); > Is printing going to call early_init_foo()...OK in one line so critically important? If caller information is prefixed, we would no longer need to support KERN_CONT. That is, we could do printk("going to call early_init_foo()...\n"); early_init_foo(); printk("OK\n"); and get output like below. T0: going to call early_init_foo()... T0: OK Even if "going to call early_init_foo()..." part became too long, T0: going to call T0: early_init_foo()... T0: OK will not be so bad. > should early_init_foo() panic the system we will have > "going to call early_init_foo()" on the serial console. This can > be addressed if you'd iterate printk_buffers[] in flush_on_panic(). Yes, flush on panic() would also be possible. > Tetsuo, do you still want to have a fixed size array of printk buffers? For my intended users where printk() is used for reporting errors (e.g. stack backtrace, GFP_ATOMIC memory allocation failure, lockdep splat), being prepared for already tight stack is preferable. > > What do others think? Yes, I want to hear from others.