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 385E71A2FC3; Thu, 6 Jun 2024 14:13:40 +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=1717683220; cv=none; b=rki+FHDcTJdfRP0+KIGqcKP8yzLqKwLUZ21YpxwAGGgEXUBt3E5aRwvsArzF6t1ogeSJNhYCtQ5dJcNyCcxdvsNbUuwHk9QVpQR685C08JqIhmu2XXtCO9vzWJJwR5/uwHfpf/9VtIrlSiuDsF5lAPg5RJoQ25TqyRxmN+PgxV4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717683220; c=relaxed/simple; bh=3gDgIjdoVuKTS4XqpxPUT4V8JCJ9UT463Yl7+k3syjE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZAK9UVbolKs5kY5UmyWPc1Yh0juQliHwSFOv5NQiHILkgL56l951amLLXedUSqvKQj7Af2Lumdv+CQOiSP/GL3l/VM991RHPSIZ+oQKJCAJ+Rj4stbkAwcs8pxfaibK+EmwBur/Um7NtMb1hMOxwFm1N3LgEntjjTjWUP8Za4Ow= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=RVUkl37i; 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="RVUkl37i" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1701FC2BD10; Thu, 6 Jun 2024 14:13:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1717683220; bh=3gDgIjdoVuKTS4XqpxPUT4V8JCJ9UT463Yl7+k3syjE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RVUkl37i91h6d9zYDNpXoOdIhIJs1jsnJJJYT7a5uKKUPUmox7Tm1og29kTunCfS4 v/+7PBv6FrO8WGiis+kLV4HixLaOElQKUDXjsY+/I56T0Gs+z3N6CrSITolRmwmFcA r5duemRVxiqKDhXV/hXAybb0oZqnXbIRiChEFEwc= 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 6.6 162/744] ACPI: disable -Wstringop-truncation Date: Thu, 6 Jun 2024 15:57:14 +0200 Message-ID: <20240606131737.617708312@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240606131732.440653204@linuxfoundation.org> References: <20240606131732.440653204@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-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 30f3fc13c29d1..8d18af396de92 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