Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2716975pxb; Tue, 19 Jan 2021 04:30:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJyJtL+U25oG1KWnUUSBR6pgbAT9/l5XtVuLaI18//7CldLI766xD95pSajmJ5f2CrgnAddo X-Received: by 2002:a17:907:c23:: with SMTP id ga35mr2689669ejc.72.1611059438317; Tue, 19 Jan 2021 04:30:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611059438; cv=none; d=google.com; s=arc-20160816; b=AeiXAuZkvGYIyTcEFHDQHuGW/JdfdPA06x2eTjctS/6g4Gws8fU7SB+aRGZqsXwlof xpM0tB/kC1bZDFLbSagF4coSLyHCbVk1zSkNVq4MiA3ocmZcU3WRYyNR5R6XNeAddgyz 6nCvYNnVvgd1/l7p/QHkv77qVN8UZYUv+Cji1Dz+DSBdsahkDDVN8AcCQsaLKL0rQHWH 51Wjlt0tlqpCCM7fvW2905xV0aLuL2PCLlebP7jLLHi8alJtzarCcbEOWhJAjLKIB44q QgOKEdNvdS3+h/dGDCtWJ0GLSKdt4mDRjbsovj5DejTz0dpiFdl4Kfu8vcwh/quj+5Z0 TGJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=utL8UxlPCpk/07YjUgieC46PewvCgHyuan1ont6LOtI=; b=DxQIC+SQ2BKP0n/Pjm3+xlQOVLZAWFBi7UsQIahSEolU3E95xOvEGnfaxoupBcx7l9 e/d4233mnUyBlv6xnUJnb4k5rtZ6G/9GNv/OKCZ1oivfJa4H8jCKtarwDzHVkNHHycHE ZMzzwgQWTJXCd7oTLK6eIDN0a2+N/AwM/ld4aJJTtICQEV10+qLHDmaPefPDxHb7xWGj 8SHUVE8mbkGesrAmHQLRZY7V/+ZDbYyNLFGMjR/9p2IiVJ5If8L2iZgCvi57vjSQcIur x/MGvxueHMGnkJ1yEQv72sqzaZb9F+zlxQhVLvOaipknPugp1XrAZoetU8OgLfbcusuW S1Mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Ac8bzvk5; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bt17si7971861ejb.333.2021.01.19.04.30.14; Tue, 19 Jan 2021 04:30:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Ac8bzvk5; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391938AbhASLz1 (ORCPT + 99 others); Tue, 19 Jan 2021 06:55:27 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:34034 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390178AbhASLpe (ORCPT ); Tue, 19 Jan 2021 06:45:34 -0500 From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1611056687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=utL8UxlPCpk/07YjUgieC46PewvCgHyuan1ont6LOtI=; b=Ac8bzvk56W92wah8bLK27PuYbqb90tbIlmgn17KPvfmQNCmpZ8S3xXPThJps2I7mdNbJmz BBvbcyBIzQgg45T02/reRsdLa3whZOWtkhBpQhkRjWf4l2S9r82THP+hJoeuNEHSaFDx33 Hx7pFReT2JUZ/vg+QamjFXwrfnvfehzUyNT/N015Rzy52yTS004UdqkQYrf9gYPHutnsNE 8X+hvu45hL9opjsLw8HPq58pzAksM8BH00KyHn/MATTTBRj/eueQgq4zBsQga30zAQAE1a V3Fot4hOqQ+3e861WCqhXlui3cqsv60mmx4pJbPAxwrBjwqQ2Szy65s0aKHWSg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1611056687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=utL8UxlPCpk/07YjUgieC46PewvCgHyuan1ont6LOtI=; b=iNY7OASrO377LOVNOz5HI32Oivlm8NoMGM8vJHsNHNYV3MUYX17x2m2YjvGInFOS6zUA0t k0Zpc/4sSwGeCMDw== To: Sergey Senozhatsky Cc: Sergey Senozhatsky , Petr Mladek , Sergey Senozhatsky , Steven Rostedt , Linus Torvalds , linux-kernel@vger.kernel.org Subject: Re: [PATCH] printk: fix buffer overflow potential for print_text() In-Reply-To: References: <20210114170412.4819-1-john.ogness@linutronix.de> <87r1mh5mso.fsf@jogness.linutronix.de> Date: Tue, 19 Jan 2021 12:50:47 +0106 Message-ID: <87bldl5exc.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-01-19, Sergey Senozhatsky wrote: >>> John, how did you spot these problems? >> >> I am preparing my series to remove the logbuf_lock, which also >> refactors and consolidates code from syslog_print_all() and >> kmsg_dump_get_buffer(). While testing/verifying my series, I noticed >> the these oddities in the semantics and decided I should research >> where they came from and if they were actually necessary. > > Any chance you can put those tests somewhere public so that we can > run them regularly? I have a collection of hacked-together tools that I use to test most of the various interfaces of printk. I would need to clean them up if they should be used for any kind of automated regression testing. And where should I make such things available? I could put them in a repo in the Linutronix github account (like I did for the ringbuffer stress testing tool). (??) John