Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp455899lqh; Thu, 28 Mar 2024 07:05:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXPFldk+rXjco1woqvwI2IRjQp0468ObglP8YQlylD0+cSVzIm+/nFDdXKrEU+PObgxl/oyVmIlBXE/B+fdCF0/3eQNXYh9h9nUnWdPSA== X-Google-Smtp-Source: AGHT+IHYWOun7yEGrTKu5GDeAPXkrjUBUE2rSuY8E9ZFvEUJwZv2VAxO5ogNackQalubFu2sxwN4 X-Received: by 2002:a05:6a00:1acd:b0:6ea:afdb:6d03 with SMTP id f13-20020a056a001acd00b006eaafdb6d03mr2951339pfv.19.1711634744093; Thu, 28 Mar 2024 07:05:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711634744; cv=pass; d=google.com; s=arc-20160816; b=U+s0b/+BE116P+lfWkMUnP/Fbp65a9IgU/IcXrVGZ5lx9Rh34ksqhrknBaOzoBohbx Nwno8VHcTUncfUoCdBBAY21mkEF7Rf7gZxSGE8icUOOq/NYOunOnQc+uSs54zM+STbQu +WkafKVCEifNid+TUFyFOgdlmmkdrkW9fFmg2SMAuQ7ZYDfpim11iiFol48vGV7j0UIT meoyPACVRJzqyEwmYa2lWXV3uhr7yZbZ/o04r+gVJ9RBTtd9yFUIgCMuO4U3OvhUxbNq 8GLC2jjxyK3tMTlFQzQlBsF4qv1+8nKNq3TIDdYP4mF3pLvGS6OwNtMo8ku796dYKbVB 2xbg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=NFCkON1dLpInFJ/KC5nI9pBg2Veqen6jkkmL4TtDOU8=; fh=GvhpUfuvgg4Xa1RiOhnFGAlzSvW2NYYZ8RqwFie40FI=; b=MCAC4zhfCwSHXz3FFgQnwtdZ3sdoGHbo9xbzr/uOLE2OMBFKdsVbPUBu4ex07q4K67 l75QBaZxqLinX+pNzjzGKKls4NUQ9Gy60xRud+cNanwDKGuG83zaztp0mJSAbg58dBcZ 2lBKb/OBUey0N7Se3H6U5JRLvkKKZsLwNNikuFxFLxmAR3rinM3mP+ot/abvvZl95hca BtuJibK7jVun+3FHhz4y4Yb80mDaR4ve6/APvGtJKIefUTvVDkeGhgat5+7cGu0tErx5 +H3AjB2gVZvTuN/gGyucTDLJYx5ZiIs1sbhyPRyWLWYGsDwQjZ2NJAVXnAWFvF2SABuD v0ng==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="YSIBj/z8"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-123014-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-123014-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id j13-20020aa7800d000000b006ea871c00e5si1548314pfi.83.2024.03.28.07.05.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 07:05:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-123014-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="YSIBj/z8"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-123014-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-123014-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 5D2A129950A for ; Thu, 28 Mar 2024 14:05:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7FA3A82894; Thu, 28 Mar 2024 14:05:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YSIBj/z8" 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 81B553D387; Thu, 28 Mar 2024 14:05:30 +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=1711634730; cv=none; b=E+zMxlSPbsuLL5OX4zUG0+FOsWMO86pY6EujB3kXagcw414q2UQIfnV31G4nEc5yAbkl1JmEZ4imlljV4mknjnWMZfYOcSuqnfM7F+myMfUNTOEm5iuvgAFTpwtuTf31gGqpfm1HHyotu9gzH3XVhNbmoBKRNNUS213hb43wEwA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711634730; c=relaxed/simple; bh=DyPPajVzJsQEhnad3V3XmULXNURr7x/hE7W3jpIhYHU=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=g1a6ueWB4BUtbTRLzwtIjeug+VyHDG5UvL6xj82XS3hDxWFktUwbUaDjZl9Et6JwybgAUsRJsAjk0v9MvoWyGQDGLy7CEWC9Ici3a8Ky4RoLSqETaGrAV1orI3/WIM8p1zEUNU4SRHIAsa3ird99hlqbDdDbM0KOw+LJvSxKRw8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YSIBj/z8; arc=none smtp.client-ip=10.30.226.201 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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(-) -- 2.39.2 Cc: "Richard Russon Cc: Jens Axboe Cc: Robert Moore Cc: "Rafael J. Wysocki" Cc: Len Brown Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Viresh Kumar Cc: Johan Hovold Cc: Alex Elder Cc: Greg Kroah-Hartman Cc: Florian Fainelli Cc: Broadcom internal kernel review list Cc: Mike Marshall Cc: Martin Brandenburg Cc: Steven Rostedt Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Masahiro Yamada Cc: Nathan Chancellor Cc: Nicolas Schier Cc: Arnd Bergmann Cc: Kees Cook Cc: Alexey Starikovskiy Cc: linux-ntfs-dev@lists.sourceforge.net Cc: linux-block@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-acpi@vger.kernel.org Cc: acpica-devel@lists.linux.dev Cc: linux-scsi@vger.kernel.org Cc: greybus-dev@lists.linaro.org Cc: linux-staging@lists.linux.dev Cc: linux-rpi-kernel@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Cc: devel@lists.orangefs.org Cc: linux-trace-kernel@vger.kernel.org Cc: linux-kbuild@vger.kernel.org