Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp385737imm; Fri, 1 Jun 2018 02:40:14 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIUVqLoI+NM+4ub2KaGJaLlrQRUQwMruL2SL0/fBmTkA0AdH0WDShP4Soc7n5cU/zhi7RZX X-Received: by 2002:a17:902:b410:: with SMTP id x16-v6mr10478770plr.324.1527846014895; Fri, 01 Jun 2018 02:40:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527846014; cv=none; d=google.com; s=arc-20160816; b=haB8/vclbKksrD6Z7Vt5JvcG7spQjcB1f/fzK5bIulRWfvJXfCmCu2EU/bkCAnBmMR f2fQMhVkEh12IfwE0rmmW3MoP6jWXOQxQK9ZnRIVMpYVmuMVNVYgOHfsac1gWSsIzMA/ pMgpwk+sKYMtoi/5+ngIBjIyr4EsmETReUzt4Txs4PjfKa3/+6h/hoazs5krU4X8WvpS 9C44e9qKYiQPIjlmVg0N0WorrnEj5rhg33RXLIn7BxW/M5nsxVDRs4dMh5LiVj1cSo+i RwvwAInkJuvx8doXFLZVDOLtX5LHrMpXbpd7Vhbxe2IctQdS23Vkj+JRlV/nb3hMbGRR pYqA== 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=ptGmhl7WNCxUqaSsyQM3bgQXsf0fbDRvkip7zA09+bg=; b=QIrq8qErDlieebEZcSlSb/O6ncpAF01Rl4GYfVaHQmF5rgWOs/yJLj9MhLh8QS96Op PvOthferE4GMHM+Y7llzMHNYwlDvOOYmo3TOBalA9kc9NPhZFldNE1cMpyt2fMiJ4AQu fs09KA2ouSqGHfmbp/ZYHeJZ/o48vVQdEPcpWJHVD9D9rz5cz8x/RoCxpV+VaRmHYZ6K sXF1XEzAySjJBfcemZUmbG9GOPCcs2f2eCneA6uxvcHaKM43KahvNB1/Sxety1TLxDjt 1Tuk/aHMphj6uwIbGvqHU4VV9XftuFqtCWvBiKIQP7uw/IZQnypKiXDaAUKOdwUIWU1D iN0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=k61M07Fp; 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 e5-v6si7531924pgp.105.2018.06.01.02.39.58; Fri, 01 Jun 2018 02:40:14 -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=k61M07Fp; 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 S1751740AbeFAJho (ORCPT + 99 others); Fri, 1 Jun 2018 05:37:44 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:40306 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750770AbeFAJhn (ORCPT ); Fri, 1 Jun 2018 05:37:43 -0400 Received: by mail-pf0-f194.google.com with SMTP id f189-v6so12255820pfa.7 for ; Fri, 01 Jun 2018 02:37:43 -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=ptGmhl7WNCxUqaSsyQM3bgQXsf0fbDRvkip7zA09+bg=; b=k61M07Fp6q5R5EB7ZqfMu/pduznRRRbKSmYtvss3plyMycocOOIqGX1TRzrsB6WLAs /WVTIzfk9WMPtz+9KUSkSzeoRN8/vK9QfDfyUDqSrqGAlTbNmrnLAWHf9kmTfyjlM01Y czivHu3juk99mfGSObOL01LYSc9uvpXpB5SFgP5dznmGLn9pkIg9b58fKa2NUt0tfJJh N17hcvmYD9ZQUH5IsGKVVZYwpupCTvk7d5aquaXbKn+DsGm4jl14CLqi9v5ax6iW9cpM 2LWyNRNq5QyTB0v5ZHMgYQpFyFJ+5gKyoBcOlRxP8ljaRjao0FKEcKqQT+3myw4PrV/I zeQg== 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=ptGmhl7WNCxUqaSsyQM3bgQXsf0fbDRvkip7zA09+bg=; b=RAx/pvIWsq/7rLLUvWQT35xuMQgjJgHSE3WVXKkpxSxAxlGm7F3YPTV99rr6pb5k54 vNXijJlr8p+CnoghFKnJ8ZYUeVD9d5bnA5wFa7rRi/rMFCSIESUgkEzLlKGKEBD8BcSp AW2XOA+nUDahZW7XMjJCu+mJFZjrX1ydVGdnc6t0NKSGv4oIjokRxc007yHxlVKmuqYa y9af11D30kW8kEmlUa/F2vy60jhUB+8NPEdGIDdQFj4LlZA2ysys+TG4aixCQE0zWLuX wYfaL9HEHCXl3WCJJCf0SE+xT31kHMiRjIDdiHSW4RmTEOwwpMBa/rjNRcA2eMSfZk78 oBEw== X-Gm-Message-State: ALKqPwfCfhelyYxCnUEnfuC5AztxM4Iuey8McYhwT65VB89c1KHzHs7O oJUzXVfXq294X2oIqyvfiiI= X-Received: by 2002:a62:9e0b:: with SMTP id s11-v6mr10189705pfd.198.1527845863253; Fri, 01 Jun 2018 02:37:43 -0700 (PDT) Received: from localhost ([39.7.51.205]) by smtp.gmail.com with ESMTPSA id w14-v6sm17083867pfn.40.2018.06.01.02.37.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Jun 2018 02:37:42 -0700 (PDT) Date: Fri, 1 Jun 2018 18:37:38 +0900 From: Sergey Senozhatsky To: Petr Mladek Cc: Sergey Senozhatsky , Maninder Singh , sergey.senozhatsky@gmail.com, rostedt@goodmis.org, linux-kernel@vger.kernel.org, a.sahrawat@samsung.com, pankaj.m@samsung.com, v.narang@samsung.com Subject: Re: [PATCH 2/2] printk: make sure to print log on console. Message-ID: <20180601093738.GC1841@jagdpanzerIV> References: <20180531102246epcas5p2f1cbc6ff217172e12e2f78bb88eb4a7e~zs5h59tMh2250222502epcas5p2S@epcas5p2.samsung.com> <20180531105215.GF477@jagdpanzerIV> <20180531122112.bfeqtmwpl2qc67a5@pathway.suse.cz> <20180601044050.GA5687@jagdpanzerIV> <20180601085356.kncuat7epkbtythv@pathway.suse.cz> <20180601090942.ek3j4bpbhschljrw@pathway.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180601090942.ek3j4bpbhschljrw@pathway.suse.cz> 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/01/18 11:09), Petr Mladek wrote: > > [...] > > > > > So I'd say that most likely the following scenarios can suffer: > > > > > > - NMI comes in, sets loglevel to X, printk-s some data, restores the > > > loglevel back to Y > > > - IRQ comes in [like sysrq, etc] comes in and does the same thing > > > - software exception comes in and does the same thing [e.g. bust_spinlocks() > > > at arch/s390/mm/fault.c] > > I forgot to say that it was a great point and analyze. Thanks :) > > My view is: > > > > The race with another printk() (console_lock owner) is much more > > likely than a race between two CPUs manipulating console_loglevel. > > > > The proposed patch seems to be in the right direction. It is supposed > > to fix the most likely scenario. We could block it and request full > > solution but I wonder if it is worth it. > > > > I am personally fine with this partial solution for now. We could > > always make it better if people meet the other scenarios. > > I am still fine with the partial solution. Well, I will think > more about it before approving any patch. Same here. I don't mind the patch and can agree with this partial solution [may be we are missing more cases?]. Probably will need a little bit more time. -ss