From patchwork Thu Mar 28 14:04:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13608618 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2A4DBC54E67 for ; Thu, 28 Mar 2024 14:05:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=qJ8QdA19av0dcevAjcHb8TLFhiEwrZ53fLTskaJ0YvA=; b=OaQvqb+UbUa2PO 25d/Du+JaCMpZOp3X/r+MWuXlqeGRWKxV+gEbeXTlI434/DJCeKQg2SJV5fLkXxg55TtRlr55swpz X3eaZ1K1Pt5lwX/Q4oDacIHTVRgjOVgqw4oIe6F3+uZH57Nk/HXphu5Db7oCKObLS9l0yQsDkP5Zz J8HjL/pkf/LKj+IqI/lByfsOUuavuDNpr4+iCPFCoYjAo3kQWJJSxzxiMcyUHFIlYi1BOeu9bksfd yJGpZK66iKEmGXTglnOhQEQm8JHTpSpIiDEH1goerK1yVq+Q9awAPrA/bMG0xWWEfRP3oBGYALTpE rkp9eYFsw/+/6a1TbXQw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpqNu-0000000EE5l-48gd; Thu, 28 Mar 2024 14:05:38 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpqNr-0000000EE4U-2n2M; Thu, 28 Mar 2024 14:05:37 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 1488ACE2B46; Thu, 28 Mar 2024 14:05:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2767DC433F1; Thu, 28 Mar 2024 14:05:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711634730; bh=DyPPajVzJsQEhnad3V3XmULXNURr7x/hE7W3jpIhYHU=; h=From:To:Cc:Subject:Date:From; b=YSIBj/z8FiuLEgDqBHCsbNl9cmMUDFKkjhDyPYeuiZwdnRhaWzQB1qy5bUc+cEoyn TgUgizmrgNHaRrJXrUOrR+GdgNy6Jcz8XE1oOPfSpaFhiEmf4RgxaXmRRkMfBs3XvJ Wdamgkwsoalajey9FhYVrBXHHnDc3hfmz1/sXLzA38s+j7m8rRsVIbogv2merkfHvl 7NGUhSAkFPNi5a9tOFYSVMmfUJIhgs6J2mztKYfkmZfdJyHIxoNs7A5AsNpAjEutO0 MTG5hno3yJ9IL2S3wchli/Txbu6/jMN5FjWKlXiRfuxNfq/iu1yN/a5CzMTTL577iG hodYTkkA1QuNg== From: Arnd Bergmann To: linux-kernel@vger.kernel.org Cc: Arnd Bergmann , Jens Axboe , Robert Moore , "Rafael J. Wysocki" , Len Brown , "James E.J. Bottomley" , "Martin K. Petersen" , Viresh Kumar , Johan Hovold , Alex Elder , Greg Kroah-Hartman , Florian Fainelli , Broadcom internal kernel review list , Mike Marshall , Martin Brandenburg , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Andrew Morton , Masahiro Yamada , Nathan Chancellor , Nicolas Schier , Kees Cook , Alexey Starikovskiy , linux-ntfs-dev@lists.sourceforge.net, linux-block@vger.kernel.org, linux-acpi@vger.kernel.org, acpica-devel@lists.linux.dev, linux-scsi@vger.kernel.org, greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, devel@lists.orangefs.org, linux-trace-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org Subject: [PATCH 00/11] address remaining stringop-truncation warnings Date: Thu, 28 Mar 2024 15:04:44 +0100 Message-Id: <20240328140512.4148825-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240328_070536_271398_45B9E34C X-CRM114-Status: GOOD ( 13.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Arnd Bergmann We are close to being able to turn on -Wstringop-truncation unconditionally instead of only at the 'make W=1' level, these ten warnings are all that I saw in randconfig testing across compiler versions on arm, arm64 and x86. The final patch is only there for reference at the moment, I hope we can merge the other ones through the subsystem trees first, as there are no dependencies between them. Arnd Arnd Bergmann (11): staging: vc04_services: changen strncpy() to strscpy_pad() scsi: devinfo: rework scsi_strcpy_devinfo() staging: replace weird strncpy() with memcpy() orangefs: convert strncpy() to strscpy() test_hexdump: avoid string truncation warning acpi: avoid warning for truncated string copy block/partitions/ldm: convert strncpy() to strscpy() blktrace: convert strncpy() to strscpy_pad() staging: rtl8723bs: convert strncpy to strscpy staging: greybus: change strncpy() to strscpy() kbuild: enable -Wstringop-truncation globally block/partitions/ldm.c | 6 ++-- drivers/acpi/acpica/tbfind.c | 19 +++++------ drivers/scsi/scsi_devinfo.c | 30 +++++++++++------ drivers/staging/greybus/fw-management.c | 4 +-- .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 5 ++- drivers/staging/rts5208/rtsx_scsi.c | 2 +- .../vc04_services/vchiq-mmal/mmal-vchiq.c | 4 +-- fs/orangefs/dcache.c | 4 +-- fs/orangefs/namei.c | 33 +++++++++---------- fs/orangefs/super.c | 16 ++++----- kernel/trace/blktrace.c | 3 +- lib/test_hexdump.c | 2 +- scripts/Makefile.extrawarn | 1 - 13 files changed, 64 insertions(+), 65 deletions(-)