Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp874629lqo; Fri, 17 May 2024 04:29:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVMFsYznugUpfRXz9JywxXol1KTmHLWhxRvRxcMNMn1wTOutxmY59Xe+GG3YHT8QY9xEYi2Dv9CPm6YT41mzcH1c681EZYBSW3gP++0pA== X-Google-Smtp-Source: AGHT+IGl8FiTRBamqlIDmHK9hkPcyU8/4twepPwapg2Mphm8zohN7dIZVLDaV6QxR/b20E65FMQ7 X-Received: by 2002:a17:906:cb9b:b0:a55:adec:7139 with SMTP id a640c23a62f3a-a5a2d641857mr1598309866b.60.1715945383951; Fri, 17 May 2024 04:29:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715945383; cv=pass; d=google.com; s=arc-20160816; b=ohzv2DM2ytngHo5jAMlFS+TiwcyqP69R3OJcks7DeqtqyJj3P+87Z9B0+nES4fGnBy o6i71puMvtsannY6UdUyw5Rd674PMJpWQQKLW06C1pjhvAihAPBabRmOnrW1dHgtAji0 WhZaQY9mP5gygwEaDZFskwfD4rVVsPwUDVlLrJiGNNyHggGr4sb9Fb9c88aHtM9J0q0j pwtvH2Xs0FOk0jlAMOhyaGO1+9D2RDvjtGG39qtUnmv1o76VI3b0favLjuDgulQy7xJd 8NSsZhPNwBs2SRT0USp6nh7gg1jaM65NU3wwDDQHn8MvRVg4A14JHoV5ePRB9WYsLtfX 7vSA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date; bh=nlO9hOsvvWncarTJ6TVIoeOrJIY+No0MzifzoPhfPog=; fh=Ni64Hz2rpHK2bav/GO+CfxImfZHN5UeG8O6p2h26cbM=; b=yVn6XhBXg6dg9Urs+fBzLNWaDlxXLvepuXgyVqxd8r/61SjFt65O0PADass6I4cMFD fg1i+8X9iNC0u1m6HVdJEyGs2/sE4WKQ503gTb1UoZ5quRkzAcOBPoAN8Mz87hROEXM+ gn7bo/CjwzX5wXvLQQ9/tpxyqPfmwE6a02dHBu9jyfWFbOx/mD7Kv5xBKy57cHaHFBQb B5Y2kRqNlKHAlF8pvpVcyWie8y0qOdGvTNEjQLDmUg+mrIQelCmS9eWVeTkiTxNrjjwa aO8DLZ+YGNG8H6eC0ccDSZ5KxdWrdQ97sNk0Tnzy6eqJ7JZNa+fmZR9o4SBtGN4JAe0M 2CXg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-182057-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182057-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linux.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a179462e4si932432966b.142.2024.05.17.04.29.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 04:29:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-182057-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-182057-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182057-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linux.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id AFB161F241CF for ; Fri, 17 May 2024 11:29:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AF0243E471; Fri, 17 May 2024 11:29:35 +0000 (UTC) Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 108DC3D541; Fri, 17 May 2024 11:29:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715945375; cv=none; b=BAkMZfv+f+3QabJkb1GtUPgZIvKqtWnE3BYnrseHCQPgQiexJnMEbqCMx0Dupu1HHmoceau1MlKpmD1QcnIF9lpAdvh0bqgpMKrzQeT/lfI4yN7na+j0K0BMf45HGv6NN1xGotgU3t09I7i5QFW/ajODMk4cY/zE8YUM7UAs8vM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715945375; c=relaxed/simple; bh=ZRMJmTKPyB0t+OKgNt95jIX6buVPYN8uYg3tIxBCx+Y=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=dM0z6HHvi53fzlKIFLFvfq4D1kzudkQpw2yyLdiHMEWwi7r+AYQE2IiOEBIL3j5+BlNtxAKXnkxFCXr9NIb6i/v+xGqnGY4OLZgE5q4Hpw4jFzQwf+DIDuA14Jcm+QLatgK0wzVMohKS5LbsC27C94DyEtffWWYZHhgr53rg2kE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.com; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.214.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-1ee38966529so3528215ad.1; Fri, 17 May 2024 04:29:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715945373; x=1716550173; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=nlO9hOsvvWncarTJ6TVIoeOrJIY+No0MzifzoPhfPog=; b=hReZxf9kzSt9bOqWAr+KSAVF/MQ01MGzB2L8sWmryZMvnKSO75Ajl1vunQ2938K01k 89zWRi01W/JpdKn/ojgqYUP2K1O51h5tZwWbKfWUR1BJP2IohxOUTAa24xBbsUGcf7Dy mXr0eXGF7oA9RCb46ymbeLhWCWm4hJjFxrEGiT6B7hzeACxqY8FMlEKA3934/AtunQcj 2mrw7Lm/HGAExdPxV+im90gDJ0m6LQ/EVMhfquJhmTt3IhoreykSrTjWlDeRY3VAqTIx kH7IgcG7wmDNYOR5jMHGEcwiW6NH91ZTYYIxwQ4nvXX9uloph9y1QF0lVZ388MLUUnCl mVqA== X-Forwarded-Encrypted: i=1; AJvYcCUxH4h3T2u9fo8/DcG3SfbBt1R5Uekz4nVkg19aStDFf1F+qmd7sZOo4ivaxTSBfYep+58HZ7RenDR+77Jy2L36iBDU9NQPHh8S5cU/ X-Gm-Message-State: AOJu0YzjKxLsAgZOCbH6DERvv46VWrLNtjMK7ZGtYh7jelOqWazGq6Kw eUHYbGEkStNfrNuolXbn6Cdi+94FRrfw8M4ik8/QyhVP8sptQdO2 X-Received: by 2002:a17:903:22ce:b0:1eb:904:dfd7 with SMTP id d9443c01a7336-1eef9f34562mr409147175ad.2.1715945373309; Fri, 17 May 2024 04:29:33 -0700 (PDT) Received: from localhost (fpd11144dd.ap.nuro.jp. [209.17.68.221]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1ef0c03b2afsm155146735ad.230.2024.05.17.04.29.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 04:29:31 -0700 (PDT) Date: Fri, 17 May 2024 20:29:29 +0900 From: Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= To: Sergio Paracuellos Cc: linux-pci@vger.kernel.org, bhelgaas@google.com, lpieralisi@kernel.org, robh@kernel.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Bjorn Helgaas Subject: Re: [PATCH] PCI: mt7621: Fix possible string truncation in snprintf Message-ID: <20240517112929.GZ202520@rocinante> References: <20240111082704.2259450-1-sergio.paracuellos@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240111082704.2259450-1-sergio.paracuellos@gmail.com> Hello, > The following warning appears when driver is compiled with W=1. > > CC drivers/pci/controller/pcie-mt7621.o > drivers/pci/controller/pcie-mt7621.c: In function ‘mt7621_pcie_probe’: > drivers/pci/controller/pcie-mt7621.c:228:49: error: ‘snprintf’ output may > be truncated before the last format character [-Werror=format-truncation=] > 228 | snprintf(name, sizeof(name), "pcie-phy%d", slot); > | ^ > drivers/pci/controller/pcie-mt7621.c:228:9: note: ‘snprintf’ output between > 10 and 11 bytes into a destination of size 10 > 228 | snprintf(name, sizeof(name), "pcie-phy%d", slot); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Clean this up increasing destination buffer one byte. Applied to controller/mt7621, thank you! [1/1] PCI: mt7621: Fix string truncation in mt7621_pcie_parse_port() https://git.kernel.org/pci/pci/c/fd6eb49a84a8 Krzysztof