Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp382331imm; Fri, 1 Jun 2018 02:35:28 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJxrowXJX64zX5keUsx4EG7RXdU14d0nJV+52KA3okTuGZLYugEHfg0o1qjeOsOrs+vCtz6 X-Received: by 2002:a65:41c6:: with SMTP id b6-v6mr8322108pgq.372.1527845728033; Fri, 01 Jun 2018 02:35:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527845728; cv=none; d=google.com; s=arc-20160816; b=GUL0hwEmbIU2aNw71bsIyH11qHThkjajGfE/Lpi376bv9EywVobX+dpu0Hr8zpWJ8O UwqvQ9TSEKaL0TxJelp+4zIHfjFAwV8tbg5LSWR33e/FErjv5k86C79T8+VksUQ28uPR uEB5fFeAgHRsYFnfuyKRSj93Kk6/OWvLWQiNDC+DHaDgfMyxrKEQ4K9FBFFpfcE1Cd+o 1p7fD4P3CAGAiEZqLehBw0T+5kjrIlF+iyGwr+rXLoTYMw1Gx1hc/jNJGGyeiYQ0i63V JkQOPRaSD13114tkaF8q+0OI4ivBF5jJWW28JSwWQX6iRH+HI6uI4O481k0Q90q7A2Gl +8TQ== 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=VKgeECGIIqylhfgcXIZH4lenzab3IqqXVkGdMfKJaWs=; b=K/HCiPcYrYjJ0e1qrgnZmszrBPMf4Hl+UE7wr2gIBDBmTRrtfALlS6oCnFjZQnw3sd OkmimUcXKj6GATqGpkOjZaECm0UitHtlLpjWwv4lSRzxXaxXSAkeVJGJIWuPX7V1icTV iiK1jWzomnMmJS433fs1HH9Hp+RbVjq3Z2ghEDDfU3PJCJ36gzCHPQJ3Jb96p+1Bpkif DcYAFY2eeORHJRrPJ1hD2xbxoYZo53BE3ss+FAkZk83Wu0UUF07wdH1Y/6fAykAl2rsC MwxT6jhNM/oPGSw2/eqXi+P9h8DVSh9ty0t0g+EA3HiA75YFmAKjJL8iqeRZEfXkXSQ+ eXbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LPVB0deV; 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 i6-v6si40294888pfc.186.2018.06.01.02.35.14; Fri, 01 Jun 2018 02:35:27 -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=LPVB0deV; 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 S1751866AbeFAJeO (ORCPT + 99 others); Fri, 1 Jun 2018 05:34:14 -0400 Received: from mail-pl0-f67.google.com ([209.85.160.67]:39557 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751655AbeFAJeI (ORCPT ); Fri, 1 Jun 2018 05:34:08 -0400 Received: by mail-pl0-f67.google.com with SMTP id f1-v6so14574862plt.6 for ; Fri, 01 Jun 2018 02:34:07 -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=VKgeECGIIqylhfgcXIZH4lenzab3IqqXVkGdMfKJaWs=; b=LPVB0deVRxW5X8KNucE4UeNBPVEF51MEfZbl4VIdVr1GEsang9cvVc6BoLerbDGjMi iRPJbR6k47CN8PkRTPhnnX5CjFrboh6qq+dbntY7+SbFK45c1MnsFoCDMGgeo/P3H6vS Hv8RJZCc/cKrdntxvjOf0Tl94jgKyUAfVgythTgdKoU5nKpEj/0Jma7GhpJyLKD2eZG2 4Y/lRKuxOGEVwRfLEEnYxl/77zZQlWuIlfOmJ6NOrm1kgGor3BPWwhoMP2SmsIBxHCF5 b2DmNLl18rquTTMQAxBx3GrMUQRvzdC+QNtPqYn9KlJwONkIe4PB/qT97syj+qqh5Ow9 wGNg== 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=VKgeECGIIqylhfgcXIZH4lenzab3IqqXVkGdMfKJaWs=; b=SW2lFRMu2SMY0FeMX6Per5X3y2tD4UVDu+Qc4G669HlZc5T1g4Tzy2FE9AGEZ+2T6p p+w4IUmcSZwZRC/++yijn2a1ihW0oqVbNmI1bOnxseLnp163rt45+nyY1p85ZHy10NVl ySYgKcaUZVx15ORLkh4NS2+UwjwnBBh6IimPimgbkbOsH2CxdjhTd10QkWhjBPu5DSKp SemUM5yRhBqhHvGo/TE5FniZTfexwB9MEvdHt2dbMKbq73AZe77VkaDCw77IkcpkB0An cDoznHDkQdjWS6zk8pvq8ekvpU2HZoIs45mChgp4Z8i+SR/jPr4OvXK9NQxkIqWhrjui LrLA== X-Gm-Message-State: ALKqPwea7vnek60/nRbEe+i9NPq2SqLLWdmkgMDUbIiMFnYiQc6pC+Ms Rqve0b65K9i4CZ2TpFDRkfmXBvHU X-Received: by 2002:a17:902:bc4a:: with SMTP id t10-v6mr10442214plz.133.1527845647471; Fri, 01 Jun 2018 02:34:07 -0700 (PDT) Received: from localhost ([39.7.51.205]) by smtp.gmail.com with ESMTPSA id m11-v6sm48545259pgv.48.2018.06.01.02.34.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Jun 2018 02:34:06 -0700 (PDT) Date: Fri, 1 Jun 2018 18:34:02 +0900 From: Sergey Senozhatsky To: Vaneet Narang Cc: Petr Mladek , Sergey Senozhatsky , Maninder Singh , "sergey.senozhatsky@gmail.com" , "rostedt@goodmis.org" , "linux-kernel@vger.kernel.org" , AMIT SAHRAWAT , PANKAJ MISHRA Subject: Re: [PATCH 2/2] printk: make sure to print log on console. Message-ID: <20180601093402.GB1841@jagdpanzerIV> References: <20180601044050.GA5687@jagdpanzerIV> <20180531102246epcas5p2f1cbc6ff217172e12e2f78bb88eb4a7e~zs5h59tMh2250222502epcas5p2S@epcas5p2.samsung.com> <20180531105215.GF477@jagdpanzerIV> <20180531122112.bfeqtmwpl2qc67a5@pathway.suse.cz> <20180601084236epcms5p5063cd250524f105a334d8d553302ab51@epcms5p5> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180601084236epcms5p5063cd250524f105a334d8d553302ab51@epcms5p5> 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 Hello, On (06/01/18 14:12), Vaneet Narang wrote: > > CPU0 CPU1 > > > > set console verbose > > > > dump_backtrace() > > { > > // for (;;) print frames > > printk("%pS\n", frame0); > > printk("%pS\n", frame1); > > printk("%pS\n", frame2); > > printk("%pS\n", frame3); > > ... console_loglevel = CONSOLE_LOGLEVEL_SILENT; > > printk("%pS\n", frame12); > > printk("%pS\n", frame13); > > } > > > > This is not printk issue, its printk usage issue. User need to handle this part using some protection. > > What we highlighted is issue related to printk, Where usage is correct > but still printk can miss some logs due to printk design of asynchronous printing. Yeah, I understand your example from the commit message. What I said was "the patch does not fully address the problem". One way or another we still can miss logs due to the very same problem: either console_loglevel manipulation on another CPU, or printk_safe(), etc. May be there other scenarios that are broken. So if we are going to apply the patch [I don't have real objections, and Petr seems to be fine], then I'd probably ask for a better commit messages. Namely, I really want to document cases that are not addressed and are still known to be broken. -ss