Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp3061647lqz; Wed, 3 Apr 2024 17:58:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVHnyRO1N0K2GfwRQnf7jMFZONxK6EAvtOXp4NXVvY2KDld6605swYZRTeSIzjAhRIV5aLF6wdcXJ2A5BUNbjssUIMFfq4e155jA20KdA== X-Google-Smtp-Source: AGHT+IEToiPBVQiUoyZhC4rGgQJtyysFDRq8LUrrd10czlwcAVNXRVtvlqswEsfiUEM74Gf339Ow X-Received: by 2002:a17:906:a02:b0:a4e:2d69:e379 with SMTP id w2-20020a1709060a0200b00a4e2d69e379mr520133ejf.4.1712192292137; Wed, 03 Apr 2024 17:58:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712192292; cv=pass; d=google.com; s=arc-20160816; b=uolBPRVK1BEp4BoH/QyfcS1hM5CNQFTJgQpbwQjDCDeiq5OEh0NF3KmDzw2JxHO+8e s64bu9gB3ZaQZGWQI08Kui1O6rrR4QSyc3I3q5HpEHzUY0G2hDkdC/pLRzlmB51cyNPN OkVxKcc5jGOs0TzJXjwC9Msw4ovK2gM1Q/rH4SlKjIz3MhwErQvmtyLAgjPOjPcRQlu8 tPzEQxj70fRmV9yov3QodtaB6GEvfUN0Gb4dMvNbwqfVacdbfl07IESV9ivY8W/txWux qU90KX5C4TVTMDcqtV/1jtb/LBB7FXw4JBcF/J4dO3H7hO5K+yixW7VNKlEOVfrVx95y FvLw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=GoV4myM+ZN42ACsM1/AClUxe2PcP2u9cAPPacmYwqVE=; fh=NaSPJ6KPXCVuV1d4TdP8NbJdcPe33Sk9zUIYC5mYJpM=; b=bT1cICQ0bNe1vhgaFX4m49bFyVIsGQhYUTOa/EaceNv+GI/yFF3Tva0T7yhkIQTd0P cZNNtxzNasxYa6uk3grhesbAV5cGDTdErRjcgVuGwv556E2OXVB3zn1oqBsg6PLIb2pY 2xbynrFGr6YSJBVPVUv7ZLKFERvbfpjHLU8vJ2mSvmowifGdvjg/4Zq0X6ilVDsDnELy VdO1QWgMh+PW0/KHGbrcbN3vzC50YMYWsLIBANsVUQFh643e1IEoKa0xNVnK2kgTxUk1 JKQykNi4k4p3XC5/Vrr4xuK1OhrDLj4LtlHWIRXo4WwhEobyyAsYfk/5gHsic64Nv2s6 XqEA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=squashfs.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-130795-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130795-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id ho19-20020a1709070e9300b00a4e8eb050e6si2100580ejc.66.2024.04.03.17.58.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 17:58:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-130795-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=squashfs.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-130795-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130795-linux.lists.archive=gmail.com@vger.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 09EEE1F250F0 for ; Thu, 4 Apr 2024 00:57:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6B8E35235; Thu, 4 Apr 2024 00:57:37 +0000 (UTC) Received: from sxb1plsmtpa01-11.prod.sxb1.secureserver.net (sxb1plsmtpa01-11.prod.sxb1.secureserver.net [188.121.53.121]) (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 B834C4C65 for ; Thu, 4 Apr 2024 00:57:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=188.121.53.121 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712192256; cv=none; b=nUOT5Ke//T3o0uWlZwkySmSCvro/uzSQm7dqupukjVBOQvAqshIwTKC9XndRv8xcEYw+o3SAFkMsTx6iH2d6ZP4do7RrVBSD3Umu9EDUY7HH63wqh7cgh6pH3i1CV0onEBZhmcO12IOs9fVM0OsBKHGaA2DYOnWEhHGfGDFHuKY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712192256; c=relaxed/simple; bh=wkVVPzfd0UQTkvZ8xc/BmRhj+WUj2Lu/IgPhkOElz1o=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=QByoSWB58ogMhZJMDCckYbutdpl7+4ezOYjrk/MvzLz6DTLwhh+eYdSdYzkMDdcNuNmuXfzwnIl6iOh5eRncGGAeFrzKqG6SlPqLft+IzEyUHAwes87K/SjI8jGMWohPFgRBvcZcz6fEG+9KyBOTTEg0PTYunDqgSTUvCB3EmOs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=squashfs.org.uk; spf=pass smtp.mailfrom=squashfs.org.uk; arc=none smtp.client-ip=188.121.53.121 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=squashfs.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=squashfs.org.uk Received: from [192.168.178.90] ([82.69.79.175]) by :SMTPAUTH: with ESMTPA id sB7er3FFsvAPUsB7frsYBM; Wed, 03 Apr 2024 17:38:32 -0700 X-CMAE-Analysis: v=2.4 cv=R+XIGsRX c=1 sm=1 tr=0 ts=660df688 a=84ok6UeoqCVsigPHarzEiQ==:117 a=84ok6UeoqCVsigPHarzEiQ==:17 a=IkcTkHD0fZMA:10 a=FXvPX3liAAAA:8 a=W08pmZW3enM1sLpWauQA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=UObqyxdv-6Yh2QiB9mM_:22 X-SECURESERVER-ACCT: phillip@squashfs.org.uk Message-ID: <356bd1ed-9877-461d-9593-bbf1b23b3d8c@squashfs.org.uk> Date: Thu, 4 Apr 2024 01:38:30 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] Squashfs: replace deprecated strncpy with strscpy To: Justin Stitt Cc: linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org References: <20240328-strncpy-fs-squashfs-namei-c-v1-1-5c7bcbbeb675@google.com> <594a6365-5cc6-4778-aec5-c5ad2a4b2930@squashfs.org.uk> Content-Language: en-GB From: Phillip Lougher In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4xfBq20SukAjsHUGUSD81ZufCFLj2kOVSbjtsHJxDyR/RYet6SRJVmHlsADOcDUkZyYBBOFeMIBvOVZLXPTw3bitAkOGgGp0utu0wfwHWSvsgYAQt41tz9 /gBKeMmU2ckl8QthIAXK4vuu+psXeUDL+R2kANNGLtgpszVHStA8bIKFxZcjOlgv7peYlopIw2CUMrOCHOZ5t8fkGohWUhYUIef3W6G5kgEJBaCvrehEtVzl Rpv0g2bmmvbqrpH8cnYkHl2y3QXBw/i4t0ANDDMvMAXWsw0UtE7tAxoo5kS0YO88 On 04/04/2024 01:30, Justin Stitt wrote: > On Wed, Apr 3, 2024 at 12:32 PM Phillip Lougher wrote: >> A better way to remove the strncpy() is to remove the unnecessary string >> copy, which I have done in this patch here: > > Great! Cleaning up this code while removing strncpy() is a two for one. Yes - thanks for your reply. Phillip