Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp532389imm; Mon, 9 Jul 2018 06:22:10 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfv23oSNiHKCARwcmxMjO/CZeVil8iCs/VDskbEabDSbLx38vgxUErnn06AmKO+Fnxa0DZa X-Received: by 2002:a63:b91c:: with SMTP id z28-v6mr18942927pge.22.1531142530509; Mon, 09 Jul 2018 06:22:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531142530; cv=none; d=google.com; s=arc-20160816; b=gskFdM0otVgCYtemj5ZWqns/JkYppkBTpheYsILOT/fZJN/dksaxtiokTrrLpGvSEj 0fNxGyfsR/M0FMcNjNTTJM2woiBybehG/O5EoCsOS6IJommaDUyh0IR1rc/KEvEcGqfN G62234yqH9yAx4M+Z0AX9mg2n4/8p2aJw1DhutMizgXBxqut1bY9h+0rjN1gs1lcVwOp kEOk/m38+O26nJIrogHu2RlCcDvvjyUdR2/6oetZpIj49Erq6eHHcG029i4MLjZbBFeL Jvm2tMa8PFjEhcZ5crYy7JEpyC9UwVQXKsN7N93uH8CV9r5fSh3t0rh3wEu3NmvhsADX in1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from :arc-authentication-results; bh=rPfP8tvPc2Sd4Qdp1xuSlBnJRnrLGfSIQWAu0ypScbc=; b=lUV3ptOtwtWlrLS3hIgYEzXyEaCSvfhppigpn/iXqHgogcFbhmU9Gl4KDLS1eI+5Je SSMfTZF8EPZmfOY+LatSMHHKgJkLDt0phM7FvYRgEqt47SkdKW8Qxk8ry5iy6Hx7VgiW AQQ5zuSPkEI9joWsVr50HsEKes4piHRgKSBefmlOgJ+0EsEy1YcNa8AbPwlobBRGRBZ8 xCKzvrU6sjA7Ez3IqzjpJs9kXnHPvPU+tl/A2WbXlxvN68YVLYYjzd9YQvNQA6limHlK GLfJCATluMZSJYZHcyCniAU+I4ZtNdwcQlVpyy8Q91n9lorUs0LthIJEzgkBzgsmJUpa qBWg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k128-v6si7271745pfc.181.2018.07.09.06.21.55; Mon, 09 Jul 2018 06:22:10 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754527AbeGINVK convert rfc822-to-8bit (ORCPT + 99 others); Mon, 9 Jul 2018 09:21:10 -0400 Received: from smtp-out6.electric.net ([192.162.217.192]:64497 "EHLO smtp-out6.electric.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754437AbeGINVI (ORCPT ); Mon, 9 Jul 2018 09:21:08 -0400 Received: from 1fcW68-0008V2-Tg by out6c.electric.net with emc1-ok (Exim 4.90_1) (envelope-from ) id 1fcW6A-0008fJ-T8; Mon, 09 Jul 2018 06:21:02 -0700 Received: by emcmailer; Mon, 09 Jul 2018 06:21:02 -0700 Received: from [156.67.243.126] (helo=AcuMS.aculab.com) by out6c.electric.net with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1fcW68-0008V2-Tg; Mon, 09 Jul 2018 06:21:00 -0700 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) by AcuMS.aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Mon, 9 Jul 2018 14:22:39 +0100 Received: from AcuMS.Aculab.com ([fe80::43c:695e:880f:8750]) by AcuMS.aculab.com ([fe80::43c:695e:880f:8750%12]) with mapi id 15.00.1347.000; Mon, 9 Jul 2018 14:22:39 +0100 From: David Laight To: 'Peter Zijlstra' , Tetsuo Handa CC: Ingo Molnar , "mingo@redhat.com" , "linux-kernel@vger.kernel.org" , Tetsuo Handa , Andy Lutomirski , Borislav Petkov , Josh Poimboeuf , "Linus Torvalds" , Thomas Gleixner Subject: RE: [PATCH] x86: Avoid pr_cont() in show_opcodes() Thread-Topic: [PATCH] x86: Avoid pr_cont() in show_opcodes() Thread-Index: AQHUF2IXOw2g4hxHjEejYvq2wFVyxKSG37zw Date: Mon, 9 Jul 2018 13:22:39 +0000 Message-ID: References: <1530943625-3288-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp> <20180707111209.GA27768@gmail.com> <20180709084953.GB2476@hirez.programming.kicks-ass.net> In-Reply-To: <20180709084953.GB2476@hirez.programming.kicks-ass.net> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.33] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Outbound-IP: 156.67.243.126 X-Env-From: David.Laight@ACULAB.COM X-Proto: esmtps X-Revdns: X-HELO: AcuMS.aculab.com X-TLS: TLSv1.2:ECDHE-RSA-AES256-SHA384:256 X-Authenticated_ID: X-PolicySMART: 3396946, 3397078 X-Virus-Status: Scanned by VirusSMART (c) X-Virus-Status: Scanned by VirusSMART (s) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peter Zijlstra > Sent: 09 July 2018 09:50 > On Sat, Jul 07, 2018 at 10:54:28PM +0900, Tetsuo Handa wrote: > > >> Since syzbot is confused by concurrent printk() messages [1], > > >> this patch changes show_opcodes() to use snprintf(). snprintf() is probably the wrong function. You want the variant that always returns the number of characters added to the buffer - not the number that would have been added were the buffer infinite length. > But how big of a problem is that really? We can't very well remove all > pr_cont stuff from the kernel. On my ubuntu 17.10 system with a 4.13 kernel some messages printed with pr_cont end up split when displayed by dmesg. (These are from one of our drivers, I've not looked very hard at it though.) So maybe removing pr_cont isn't a bad idea. David