Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1793081imm; Sat, 29 Sep 2018 04:13:44 -0700 (PDT) X-Google-Smtp-Source: ACcGV63GbL6Z5vl/CU5MroCFpLYP5DOo87vkIZPtmB9+TVUiECQ4TMMnqcltmAxVA6Z6vMzPazXC X-Received: by 2002:a62:3a43:: with SMTP id h64-v6mr2687589pfa.119.1538219624274; Sat, 29 Sep 2018 04:13:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538219624; cv=none; d=google.com; s=arc-20160816; b=iUm2HKDWqrOu0tTV1e5ixsNWza89UI59klzzrHJhk6Dng89s9Ye9Fn3C7Io0n4DaN5 9lErHD+Xg5/GMMcYFHua3NStU8rntkhdd66dq5jFlEnUxRboAfN/UdWloBQsjJZeCN2x XBB5bLDIJ8l4Pe7T6p40UIEc1PKCBPswAsWYde2HwNDzN1aQkfFtaq9QSUaY/SgrtESy IanZF2a44oTWIePuVIBMJEOX9Lh9Jy2yP6f5aq5nzKN8H7H1C+HfI06ipIbu3EwL6zbq xEe1KYB4bnCYTfRfmufTk0FzUTwDAaGNpwPUowX93EolSVYxeh9K5yLK3/SfsiwyQu89 L8CQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:date:from:dkim-signature; bh=XctN4Oil2ZIMUkzlwW5cB7VzAMDdqsxuCozgYH8Up9U=; b=Of3EevuL+G1+UPG8HfZR7TB+o1vx1yxyxjeKSXEY5ihqT/P7zTI2VersWx4L3oA6Mo OiAMRHt8AymTdstXPX7ylpojoVKnfL3wPJqLnyS6MJOgc6cR9zsudY8I2ZlQBrpti8HP ssv4LkA5ApO7C+/QEoUbBLlpCwhbZLmPIrBtYZ1is19KE6RM42Um+hzRbLZSNQKywTQF GhFqwgUEWtivdALWKLCCLc7Tg2EoPIicdS5HBpaI3Gbz9U+CEYIq1ClNsejDUUhkM+8Z ZRDwAzX8gh0gkzrosV8x6a0F2EtymkgjTRD9P/X9MiVVG0IgGTLkiVKOo7pZJXzJgZch rR/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=m6oTkOhF; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d66-v6si3209812pfc.250.2018.09.29.04.13.29; Sat, 29 Sep 2018 04:13:44 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=m6oTkOhF; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728066AbeI2Rl0 (ORCPT + 99 others); Sat, 29 Sep 2018 13:41:26 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:43842 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727637AbeI2RlZ (ORCPT ); Sat, 29 Sep 2018 13:41:25 -0400 Received: by mail-pf1-f196.google.com with SMTP id j26-v6so5993966pfi.10 for ; Sat, 29 Sep 2018 04:13:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=XctN4Oil2ZIMUkzlwW5cB7VzAMDdqsxuCozgYH8Up9U=; b=m6oTkOhFIIdEq2hTjO+nRt9vhWcU3GXJZmxBtx1s0WJXgINLFKAiWB3AzqIdI8qUPr /NPSK45r26R+tfHv6rYKLzXX5q6Y9E4kNB5jPhU1VIUCNXELyb20cIacAeEga8rlqFoo 1ReUB2DWGpIXtAb/JfmQmTc4V5c+Tm6jwkDaM6sDQnmRguvqbENZe54P+VXEA0nZ+7RS UOVmR+OXms1zaWD90F2RzxvURyPRpWFFt/8yeHsZv+H7LcowocqxVXX3u6WPITSmWWGd Mu9QVe3nGHPw173f/TNXZgHSKCJV5jzGcChDP9zI1gR4PtuLrEIOwi4T8RwI5s76zkMv bmmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=XctN4Oil2ZIMUkzlwW5cB7VzAMDdqsxuCozgYH8Up9U=; b=jn+ObkrHiu+CAGoBLD+1WjqK8Ze2ydufwxLU7orCvcV+cf+P840PoRVQiWYC6kaxI0 wnERpRy6KT6fBV6lEC5vtsfQLwIu26lNWgq/TG5CntdplFdD4BBnU9bjpVrR4+IZf9OA g2uyYITljNhSyvnD5dW1a1PcYLy6589oXZU+EtvGCv6vdy1TAi5J3ZzILHF9hYWqX1+5 7wp6wpIKXvKGqysSqf4sJYN/2Mh8ZLSD7VbeJLc4WOjEUZGH6P4ir5AkGDj9TTC3jxuA ehfbhrp79E7c0stguJcZ2zsV6d/wzDYu7Ipo75wD8oVZc8mL3wjQwMTNElUGKsUy3uJt YDFw== X-Gm-Message-State: ABuFfog6wvcy//mgS2irQ0mDAxTUdQ7CIUbKDhP9GZ+8ABUBj9Zbbhbh 7EUI4Blwf4CAKOWamV0ouaE= X-Received: by 2002:a17:902:8a89:: with SMTP id p9-v6mr2805051plo.183.1538219602447; Sat, 29 Sep 2018 04:13:22 -0700 (PDT) Received: from localhost ([110.70.26.9]) by smtp.gmail.com with ESMTPSA id q85-v6sm11040318pfa.151.2018.09.29.04.13.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 29 Sep 2018 04:13:21 -0700 (PDT) From: Sergey Senozhatsky X-Google-Original-From: Sergey Senozhatsky Date: Sat, 29 Sep 2018 20:13:17 +0900 To: Tetsuo Handa Cc: Sergey Senozhatsky , Sergey Senozhatsky , Petr Mladek , Steven Rostedt , Alexander Potapenko , Dmitriy Vyukov , kbuild test robot , syzkaller , LKML , Linus Torvalds , Andrew Morton Subject: Re: [PATCH] printk: inject caller information into the body of message Message-ID: <20180929111317.GB1392@tigerII.localdomain> References: <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> <802130a3-b8c1-3973-933b-d6dc5ff2930d@i-love.sakura.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <802130a3-b8c1-3973-933b-d6dc5ff2930d@i-love.sakura.ne.jp> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (09/28/18 20:21), Tetsuo Handa wrote: > 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? Could be. If this is the last thing you are about to see on your serial console. panic_on_flush() is not guaranteed to succeed. ... Hmm. But it seems that this has changed. We used to flush "incomplete" cont lines (fragments) from console_unlock(). void console_unlock(void) { ... /* flush buffered message fragment immediately to console */ console_cont_flush(text, sizeof(text)); again: for (;;) { ... } ... } Unless I'm missing something, we don't anymore. Since 5c2992ee7fd8a29d04125dc0aa3522784c5fa5eb. Now we print only log_buf entries. So we either wait for a \n to flush a complete cont buffer, or for a race to preliminary flush cont buffer. > > 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. Agreed. A list of printk buffers has some interesting features and may be we will use it after all. At the same time the functions you have mentioned can use static char buffers for pr_line. > > What do others think? > > Yes, I want to hear from others. Yep. -ss