Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp315006imm; Fri, 25 May 2018 23:37:24 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoayZhI5rO7PtOcrJqAlRm0hHLlDFFwtnT1BKmxG3ihDG+kmfuWrZbbOo8906a2u7lLhHoS X-Received: by 2002:a17:902:8218:: with SMTP id x24-v6mr5456257pln.57.1527316644202; Fri, 25 May 2018 23:37:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527316644; cv=none; d=google.com; s=arc-20160816; b=f+gSAKZOfeDOq5hCKQIxWBozt8yOKSKtA5un4hj3O+Yu6WCCn9eaZX5WSvJHDjaHKl AwBMG9hHnVia9JUuWdWeAD3ZJEImpGSFyF5WE9Xvi387dkn7cdpwNRob6XbFJfdPgK1X WXaJLJ0dxD6AeHiXgzkT2v+SrYbrQpoqBKACWZOvCeWo0lwaUuczIZd3erZ2l/3cD3SU ftb5c/Nwu8DDl0+TW0eHUQbKdjPHdOC2D0sFmY09TAGz5aZ01D1t6REUbP8zvv73XgIy a6RsHekT0Ejwi41cPAniO55yyDHEgX4kyST+c/wjsItkWcM7w2tHI6XXNv7NRK5juwDS ACsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=LaZweP8BT/PupR7c2lEDZ3yCDZvDsMyc/IYBv6YDlZY=; b=gmjD+VLzet2KeskOijYtfwLUU1j7bWaRYYxcBw7z//jYUdy9el+85/hAYTwcSkHh+s bxdmIRF/FESaL+RGFZzgS1/BX70FEqyVYXiyEXaRcKX5hB43aJB9MkwKonF1dZdrZvTC npqe7nnNLG56BKGDLItvFS7ZpaOR8BZXh3+2bMmQfD8pZ+unz64MmWYpV1Oj0VKNdA1V kuDoAI64Eud5aVBRH8ds6GqJAwNeUr7l82NUSdF1897hyjuKVqzTz0ChxKkipZbGBj6y dQVn1xHO5tuSg+Rrj9rUuJRSftXcKA9/W3GvPRD4ZxuZtN73CQcZsFc1vq0tCc6cY2OG QUXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=jlqzrj34; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q6-v6si24559961pfh.17.2018.05.25.23.37.09; Fri, 25 May 2018 23:37:24 -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=@google.com header.s=20161025 header.b=jlqzrj34; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031170AbeEZGg7 (ORCPT + 99 others); Sat, 26 May 2018 02:36:59 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:35700 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932664AbeEZGg5 (ORCPT ); Sat, 26 May 2018 02:36:57 -0400 Received: by mail-pl0-f66.google.com with SMTP id i5-v6so4345362plt.2 for ; Fri, 25 May 2018 23:36:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=LaZweP8BT/PupR7c2lEDZ3yCDZvDsMyc/IYBv6YDlZY=; b=jlqzrj34ct2XQ+AMJStEoG1ViKA6lDmtoGwu9rIXKRR0XiXi9MHY9Q1d/XyzxOjUlW de6JYBU4JS+FJpiVWHVH2Kr8ovu2E/0jDV1z5nRtU2wIOvpR9sNRCy/9DZvPFSdrPthi xQalgWiXK1sQ+1aNL0Vk5m3/xUQ8QoEfgqljTnYgqzjK35bf+ZKjWIpQdW+UaIxpyoTQ p0b9dWxXnZClQ3iR2VNopS3+dEYXYArM/Znk8PKHfVTGi8Pj3s9X6kjZLCbgaT+t+kUv QEM/vpWwBPiGxPqOClYFBc+Sjomjbz364bu3SOwtp/UmI0PZin7gdd0a4OET25EQ61E+ pDmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=LaZweP8BT/PupR7c2lEDZ3yCDZvDsMyc/IYBv6YDlZY=; b=rmeuyOd9j/WmiMLCoxDI41HNFOsTUqZK9SMJtVbz9Z1D3J8DaC6WVQQTxObkVRx4S8 Xn8CYgXAC3RpChrCE8TbV4DC48fc0qYl8F2y//Co0jGfV9GEajCmu23IP31MLlYroT/B cDdIdo6zgqqiq2fXtftrxKDW4dO3BsvnpqKN/CUfk5S4MrOrbapulaY+4N0aT4QVQq5+ biCzRhqDMn0K9/5pbGIOwyDI446QGkiO1/Ewpt+9kV10g8PPhaLrNOMj7JPCVc+BfV6Y suSZEzfwnpTEGw8JFqTwSpfCHvmhlGDWRrrW9QBATS5u85AOdR+izZ0LcTnB7rFxqN2E Rhqg== X-Gm-Message-State: ALKqPwdDu/bHB/UcDKAeBUmhiPd6dE6V882opu4vvd8/Fmjuw4eIaCc4 58T3GhvWHyFZYUoPNW+hyLjSsde/napnGCz6aUNhhg== X-Received: by 2002:a17:902:1566:: with SMTP id b35-v6mr5489368plh.107.1527316617221; Fri, 25 May 2018 23:36:57 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a17:90a:d01:0:0:0:0 with HTTP; Fri, 25 May 2018 23:36:36 -0700 (PDT) In-Reply-To: <20180524021451.GA23443@jagdpanzerIV> References: <20180511014515.GA895@jagdpanzerIV> <201805110238.w4B2cIGH079602@www262.sakura.ne.jp> <20180511062151.GA18160@jagdpanzerIV> <20180511095004.GA6575@jagdpanzerIV> <201805112058.AAB05258.HJQFFOMFOVtOSL@I-love.SAKURA.ne.jp> <20180517112135.GB20796@jagdpanzerIV> <20180518121506.wilixxkznbtskw34@pathway.suse.cz> <20180524021451.GA23443@jagdpanzerIV> From: Dmitry Vyukov Date: Sat, 26 May 2018 08:36:36 +0200 Message-ID: Subject: Re: [PATCH] printk: inject caller information into the body of message To: Sergey Senozhatsky Cc: Petr Mladek , Tetsuo Handa , Sergey Senozhatsky , syzkaller , Steven Rostedt , Fengguang Wu , LKML , Linus Torvalds , Andrew Morton Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 24, 2018 at 4:14 AM, Sergey Senozhatsky wrote: >> First, we should ask what we expect from this feature. > > Yeah. Can't really comment on this, it's up to Tetsuo and Dmitry to > decide. So far I've seen slightly different requirements/expectations. The root problem is that it's not possible to make sense out of kernel output if message takes more than 1 line (or output non-atomically with several printk's) because of intermixed output from several tasks/interrupts/etc. For example, it's not generally possible to recover crash stack trace, because one gets random mix of frames. Humans usually, but not always, can restore most of the sense. So the goal is to make this ought-to-be-simple task actually simple and not requiring human intelligence and time each time. Prefixing each line with task/cpu/interrupt context should do the trick as it will be possible to split kernel output into multiple independent streams and analyze them independently. In our context (syzbot testing) we can enable an additional config, and adopt parser to understand additional line prefix. But I don't know how prefixing lines fits into a larger picture. Does it make sense to thought out a potential extension story for this format? E.g. user specifies set of extension records that are dumped before each line, and then can unambiguously parse them? I guess some consoles/interfaces will never be extended to provide access to the extension records, so it can make sense to make them accessible in text format too (optionally).