Received: by 2002:ac0:a874:0:0:0:0:0 with SMTP id c49csp171447ima; Thu, 14 Mar 2019 23:31:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqxXqLmxvDiBHsqtsstIylT5+zvuf+RcrJ7DK6jbt8k1vdik0OmVnTKD4ncgCxn7LqUdY7qb X-Received: by 2002:a17:902:ca4:: with SMTP id 33mr2507458plt.186.1552631508825; Thu, 14 Mar 2019 23:31:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552631508; cv=none; d=google.com; s=arc-20160816; b=S4K/KmeWqB0+P2XZyRN5EtYCGG0XzSXS8+TqNsWSi72au18xqTIGhC8Ugsln34XWVE baziUkJDwoRIu+5vl9cTXa0GQPLyv63sMO8TCq+RIGaHCM83+d4iryFFY20uQ54Ds5MZ CRlq2eIvtdItNS+YHur71PjHrs41dODXOeNDRfVEVIzCvN3Bd1YKxX66vNKwRcipIERv z9VkpoZkYv0EfShXIn6KEjTn2WxFAv22wv0h377mGYjSo8ZbfcfPWXKQE+iRkI94Ux8a 4fPewvsO4Nj4TplFu+eiRoW+5Nsa7gobhU3AhpLimVr3nbzmrB3EEkhQ40vW2Q3W+0WY 6LAA== 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; bh=v5iFDxbjciSFtZB1R2IeWovkTJVrqgtE1OKfT7cAjsA=; b=rHEsL9QWIjWqLtezskQjEj9SReQV9LS6v6Mpf4jZ1XZ41ychx0bu8V06kCB0aCKw3j ybgX/p3kYtcziAcV1h1EZprEoWci93w6D7l5Wj80SY2FT7RN8liivxrJ8eKBTkhNg2OK gTwJx/Q8uIqeCqLcAj3fKzCiej1aRpG+QQB+c08s1tCbS/c3vsEOYSdRq6UncpT0L4Kr qdklyXcfikDoj6+CuLY7KVPba0mwHUuOf43og2KZZShSQcHSB9C1jeEe3hR1Fjx5P7ao 24XYahPW0RjNe+0iTl/IpjiJZgIvaFw2xzzmLo/F077a3a/XI4TRL6RaINy4iaBD8fuv NJkQ== 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 h18si1083055pgg.71.2019.03.14.23.31.33; Thu, 14 Mar 2019 23:31:48 -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 S1728390AbfCOGaj (ORCPT + 99 others); Fri, 15 Mar 2019 02:30:39 -0400 Received: from nautica.notk.org ([91.121.71.147]:56501 "EHLO nautica.notk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728266AbfCOGaj (ORCPT ); Fri, 15 Mar 2019 02:30:39 -0400 Received: by nautica.notk.org (Postfix, from userid 1001) id 38059C009; Fri, 15 Mar 2019 07:30:37 +0100 (CET) Date: Fri, 15 Mar 2019 07:30:22 +0100 From: Dominique Martinet To: Jens Axboe Cc: Steven Rostedt , Ingo Molnar , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 15/18] blktrace: change strncpy+truncation to strlcpy Message-ID: <20190315063022.GA12910@nautica> References: <1531444483-17338-1-git-send-email-asmadeus@codewreck.org> <1531445162-19771-1-git-send-email-asmadeus@codewreck.org> <20190314213721.339979f0@oasis.local.home> <80ab6751-cd34-1da6-91c7-7558d3a17943@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <80ab6751-cd34-1da6-91c7-7558d3a17943@kernel.dk> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jens, Steven, Jens Axboe wrote on Thu, Mar 14, 2019: > On 3/14/19 7:37 PM, Steven Rostedt wrote: > > I noticed this old patch in my inbox. It looks like a legit cleanup. > > Want to take it? > > Indeed, I've applied it. Thanks! Thanks. I am terribly sorry about this patch series to be honest, I did not prepare it properly and sent too many generic patches at once but more importantly some were unsafe (strlcpy expects the input string to be validly formatted, because it basically does strlen() on it to check how much hasn't been copied for its return value) I was pointed out strscpy instead as a safer alternative. In this case `name` comes from bdevname() which is disk_name() in block/partition-generic.c which is a snprintf, so we are guaranted null truncation from there and it should be OK, but I wanted to check and point it out. Anyway, thanks! -- Dominique