From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9BCD71428FC; Thu, 13 Jun 2024 11:38:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718278695; cv=none; b=rXQ/xUWkK9LVO9AB0AG7Tdww6DJxB55Tnew/YC+r/wJ7TumSXS5MdOOuCRzzmolwLCGdcZ6hFgbRfFN/FUURvTtvVC9ug5Ad6jfe22zWWzvSkz89W2y519ZuXl+Xg4kRiiP4ANS4R6WSiJXoNhZphZmq89RXyQDVbeUILRJmhPI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718278695; c=relaxed/simple; bh=mMvlOT/SmG/jZkc6OgjK5vx02IELpKsZap9lBtMW9cM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=P0tNs0d+Ww+Ep4DdXwupSugqBInRHJVC76zIYNOvmxfxwSW6jFQAnBDbV6V6vx7cNYZV2y7VV+5FEbiSW6SyzI7IhN09nBA20nLQBhmr2amuJf43Y7dlhCJR9vWb2bvuDSLvHO/TIr6Lp+5IaQkG8AetXlkwLkMm9evS28FIPxk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=JmwPT8/u; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="JmwPT8/u" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 23DEDC2BBFC; Thu, 13 Jun 2024 11:38:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1718278695; bh=mMvlOT/SmG/jZkc6OgjK5vx02IELpKsZap9lBtMW9cM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JmwPT8/uh8HnPWArtC8T6BO+Sp1/pnT/5c31gXWAYmw6/YkhC9yhzLt/BCC9oPGan onMykfCmiXspQRSTwPFLLBVr5/XuqpBaahEFFOiqH1Pl2NNYgE67D18sLSSWr7iVnR cRuoPdTsb3bQsvf/pdfO/W/BI2wqfSJmfXJZ/E6Y= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Arnd Bergmann , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 4.19 038/213] ACPI: disable -Wstringop-truncation Date: Thu, 13 Jun 2024 13:31:26 +0200 Message-ID: <20240613113229.470452713@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240613113227.969123070@linuxfoundation.org> References: <20240613113227.969123070@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Arnd Bergmann [ Upstream commit a3403d304708f60565582d60af4316289d0316a0 ] gcc -Wstringop-truncation warns about copying a string that results in a missing nul termination: drivers/acpi/acpica/tbfind.c: In function 'acpi_tb_find_table': drivers/acpi/acpica/tbfind.c:60:9: error: 'strncpy' specified bound 6 equals destination size [-Werror=stringop-truncation] 60 | strncpy(header.oem_id, oem_id, ACPI_OEM_ID_SIZE); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/acpi/acpica/tbfind.c:61:9: error: 'strncpy' specified bound 8 equals destination size [-Werror=stringop-truncation] 61 | strncpy(header.oem_table_id, oem_table_id, ACPI_OEM_TABLE_ID_SIZE); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The code works as intended, and the warning could be addressed by using a memcpy(), but turning the warning off for this file works equally well and may be easier to merge. Fixes: 47c08729bf1c ("ACPICA: Fix for LoadTable operator, input strings") Link: https://lore.kernel.org/lkml/CAJZ5v0hoUfv54KW7y4223Mn9E7D4xvR7whRFNLTBqCZMUxT50Q@mail.gmail.com/#t Signed-off-by: Arnd Bergmann Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/acpi/acpica/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/acpi/acpica/Makefile b/drivers/acpi/acpica/Makefile index 8ce51f0f40ce5..dec40cb81cc42 100644 --- a/drivers/acpi/acpica/Makefile +++ b/drivers/acpi/acpica/Makefile @@ -5,6 +5,7 @@ ccflags-y := -D_LINUX -DBUILDING_ACPICA ccflags-$(CONFIG_ACPI_DEBUG) += -DACPI_DEBUG_OUTPUT +CFLAGS_tbfind.o += $(call cc-disable-warning, stringop-truncation) # use acpi.o to put all files here into acpi.o modparam namespace obj-y += acpi.o -- 2.43.0