Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp529509imm; Wed, 20 Jun 2018 02:20:07 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI2RnV/AQo9V9CIML4WRGRAwgIspedwp6Oq81K7UhQW80ha97eIK4AbhG6PkW5cKtdYxKqJ X-Received: by 2002:a17:902:345:: with SMTP id 63-v6mr23101972pld.328.1529486406945; Wed, 20 Jun 2018 02:20:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529486406; cv=none; d=google.com; s=arc-20160816; b=Y/PpYPSsTFZfPdBl1YDWphBlYgA9bY7VAEcev5DYdOAveWkjNDPXVMQJepjrKbuGpg K19lFehsibNwR0NpLJPAES2e5ngeRSl07sHwZa/JJyhHJn+cTlmUQTJ0DtsGPcNzlOV/ ndQjMZn4iTZX1uKXbRItJwNfJpWi/9LqzR6+MrsQ6wQdjjNO9qTjelMZEd2pPN//xKJo 8Mh0Yqp1TLAnqO5VzDTbvRT1HCH0YO9pGfTaLo5+OKX/S1y0JTGCRveVmZvFRb93EgxF lwi5AJ8NxLS10DQ0d4/YyglIKOSGoO+UtyfFRhx512cIihl4kTZF0v5rgck/lrDe5Gmd r4ag== 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:from:date:dkim-signature:arc-authentication-results; bh=F6oucZoVVPxdVPmLsjhwZSX7Dd88cfeKGMNnHEPaFDg=; b=xZK19T0V0SJSjqLDa+9KjF9yZa6IxaC+l6zHAyVqCogNQ3kMEqlH4xdsFojp2uNExZ C9paPdYXY0t3VYuwjNCWYmAk68K84sldtBou1U6v9M2qWjXNfOX8oUZFr4eEDyu8l9CH a4YWnYwBb+cbI1YNZPaAu/BLYgJbcJaHchcUFCqF54p6eIAsnTFGqcpZ8ovURTzimhzu 6Lsw1wgkCekY8xCRT980tOEvlX84PUucorPkNIpHRj8HXZ3Nsw5eM7hLoWg8f8CL9g5W FOeGLOgBkc6JcAEfKbxkW3C5du+DglMKO2A4Ag9hK2yo2PyokdzMwqwOgICT9FXIXyhO vIyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LGo7yrT8; 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 q11-v6si1598574pgp.95.2018.06.20.02.19.53; Wed, 20 Jun 2018 02:20:06 -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=LGo7yrT8; 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 S932505AbeFTJS1 (ORCPT + 99 others); Wed, 20 Jun 2018 05:18:27 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:46119 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754308AbeFTJSP (ORCPT ); Wed, 20 Jun 2018 05:18:15 -0400 Received: by mail-pl0-f68.google.com with SMTP id 30-v6so1419498pld.13 for ; Wed, 20 Jun 2018 02:18:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=F6oucZoVVPxdVPmLsjhwZSX7Dd88cfeKGMNnHEPaFDg=; b=LGo7yrT8b5XNhAk0FXtbLMeT6/oA83rXm1GgHgKqMyJpAXvYWDAAIcyNhpjk2bue5a WjLfUIufWIM7/qRafHq1aKvKVEJ4HeVRp6ee5bE1QtpVvmUVHuzq8Z0uysB4kfybxnKe ehTmUPKRihYf2VNBBXTGRd44UkZGofODzW5K/J0W3z22Ot2ikKwZSdo+ioY5po6SZvpj a+yMF3P0DqT6l+qYR6d3EmjaHPMSq4uL8OPHb17iBO0byMGi51HwEzApi5//J0xkaYaj X1sIUZqMm9KhJnF/sQ3Vv/jkp4Ns/2cmpQZIpUWCRi+O5Qh5G2j8jlq0zBaZE+a7NHhR J6yQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=F6oucZoVVPxdVPmLsjhwZSX7Dd88cfeKGMNnHEPaFDg=; b=eXm3agrmqDG/n+hmY8SJaPjAt7DOvQdbJdKon+X69SbhLekQp1pQxlxTnN+2uQH+/e Uj5w30EeVUE0H5zqM7TVRPuP4VK5JVbDFTMQkk+jbtwKPCm75fnPo8i9r6f9YBi6dELZ H8F/kaGWosabDDgaYO1Pk2xMs8nC8KENIk2T7t9jlvB+gqU+oce3n9gNnC0Gbhgtqj4j 9pxE2gGABNxp2BOo0vY9bhlcFh/33mV1qFZmtauptlba0zO8sp7oq6cTNJtA5XcP9C+x CZ2YzbK9/T7qmXcXov/35LKWxwTJP5ae74+5y0okxaI4OocnxRHG+JWCZaCSMqHDnwHJ RRvQ== X-Gm-Message-State: APt69E341fUF5DEkU68ESCPxGekahG9TQKgORtc7i9b8K50Kw9/Mh1z7 OA4K4KTDjVUy2fZUcfqNAC0= X-Received: by 2002:a17:902:8f82:: with SMTP id z2-v6mr22776168plo.203.1529486294823; Wed, 20 Jun 2018 02:18:14 -0700 (PDT) Received: from localhost ([110.70.59.159]) by smtp.gmail.com with ESMTPSA id q82-v6sm3660849pfg.170.2018.06.20.02.18.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Jun 2018 02:18:13 -0700 (PDT) Date: Wed, 20 Jun 2018 18:18:10 +0900 From: Sergey Senozhatsky To: Sergey Senozhatsky Cc: Dmitry Vyukov , Petr Mladek , Tetsuo Handa , Sergey Senozhatsky , syzkaller , Steven Rostedt , Fengguang Wu , LKML , Linus Torvalds , Andrew Morton Subject: Re: [PATCH] printk: inject caller information into the body of message Message-ID: <20180620091541.GB444@jagdpanzerIV> References: <20180511095004.GA6575@jagdpanzerIV> <201805112058.AAB05258.HJQFFOMFOVtOSL@I-love.SAKURA.ne.jp> <20180517112135.GB20796@jagdpanzerIV> <20180518121506.wilixxkznbtskw34@pathway.suse.cz> <20180524021451.GA23443@jagdpanzerIV> <20180620083126.GA477@jagdpanzerIV> <20180620090413.GA444@jagdpanzerIV> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180620090413.GA444@jagdpanzerIV> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (06/20/18 18:06), Sergey Senozhatsky wrote: > > b) printk_safe output is quite uncommon. And we flush per-CPU buffer > from the same CPU which has caused printk_safe output [except for > panic() flush] therefore logging the info available to log_store() > seemed enough. IOW, once again, was a bit unsure if we want to add > some complex code to already complex code, with just one potential > user. BTW, pr_cont() handling is not so simple when we are in printk_safe() context. Unlike vprintk_emit() [normal printk], we don't use any dedicated pr_cont() buffer in printk_safe. So, at a glance, I suspect that injecting context info at every printk_safe_log_store() call for `for (...) pr_cont()' loop is going to produce something like this: I<10> 23 I<10> 43 I<10> 47 .... // Hmm, maybe the line will endup having two prefixes. Once // from printk_safe_log_store, the other from normal printk // log_store(). While the same `for (...) pr_cont()' called from normal printk() context will produce I<10> 32 43 47 .... It could be that I'm wrong. Tetsuo, have you tested pr_cont() from printk_safe() context? -ss