Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp2573602rdg; Mon, 14 Aug 2023 06:59:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF/BhiCdSFxztZQrXQeu0y7Ev3HzJoyntEJtFmw956DW6iGkIOy8Q7FMdsUjh25IVnknsKA X-Received: by 2002:a17:903:1252:b0:1b7:c166:f197 with SMTP id u18-20020a170903125200b001b7c166f197mr9249747plh.29.1692021561873; Mon, 14 Aug 2023 06:59:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692021561; cv=none; d=google.com; s=arc-20160816; b=BB2PN5NP5/EFuJB/CtL8IPPHl8cXj+8iZqayEIX1lBFgnrNpEchJW9pp8g18LzZqnR RpHkPErCpCn+kIXSwYOtTd3obk+IiMAnOww3BI3F6ARx7JFMVdqQuKLQyiQg4LyrrDCI J8S25nM41TQ09K8pMH5BtJdR75+IvFLqHNlyBG0xV97AwDUqjKHXREqrTrhhIP6E7W8w dEcFVkAEclWw7F0vrntp/7rhd327+/6jT7ut5uDK4okj4uGVzzetd7sWyE26TjBQ7vPK tNMOpmiSQsiN5yoj6WR0hUvStd4hdcRTAtFl2EDAxo4Y07CG1A/fBN78pPBGZW8AiBT2 x9Tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=CfjLGRNDjQ2wfBPrTce9v4Y5ovLDKc2Td8U4k4EEWXw=; fh=rAB6VT2F66Vpny9FxFERhzdSf6TlRghw1wHTNsMUiS0=; b=OVqReKrdi9F7fc26OAVG9lMFKk5TE72pqlSp14A2eIC+dnDDbrxgmWsmC1MAbYJRCG 6a4aznf/adAojvRANvq1p6WwkeOKjKqNvLIBW+3M86ajPkqumj3ahMZH3RwaY298qwPb FUDVUqoJcoocJfCj4WnA2PQSNgButiLjUlzQCFrv7xfEfIM6q/oJ1yCH3F4CKI2l4ACX QLve/xi1yzeZDKyq9ilXzIeCajxWXWbbN/+2TVTKZ01RMkdVE3XRI2D2MYYOBRIo7ask nyYaKuBYsHBFAeYtGnoIliRq3b+AT8Zx7Cvho+AYbGmH/PTSrqrqr5dH+UzPM6mmxUZ8 ypIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=sHpaqgkp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id iz1-20020a170902ef8100b001b895a2c09esi7953448plb.381.2023.08.14.06.59.09; Mon, 14 Aug 2023 06:59:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=sHpaqgkp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230157AbjHNMbl (ORCPT + 99 others); Mon, 14 Aug 2023 08:31:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230118AbjHNMbO (ORCPT ); Mon, 14 Aug 2023 08:31:14 -0400 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FCBFCC; Mon, 14 Aug 2023 05:31:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1692016271; bh=CfjLGRNDjQ2wfBPrTce9v4Y5ovLDKc2Td8U4k4EEWXw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=sHpaqgkpaP54Siurk4UI0Qr+zOKMeBAJyZQOSG5g0/bC/sMMqK8p7uUjzplFp8AVF LQZxg8SJhhh8nJp2tRP+WIGyphQtpubxRJU9eVBqfao+nC2lHpernYv9A2eKAF3hAc oEhLYUDrbstezKYBk5QD1nfUBS6Ag8bX7DQOMvlLIwO0z2l6V28t9ulOeeLlBc7/08 1RBk5gyv+ZHCZsq+hkPi/L1Xv6y4GUcVq+8fyVV+p5YhuXJDMcZDmFbJqcp4Af6ssj 2sc3nmRSolh+F85iyN+ao8hgewfoy0NJ4ZM5MMlY4b5uIB3l/uQu7Sii398N/V9g/1 wFQkLbj0vNEmQ== Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4RPYfR2WVPz4wb8; Mon, 14 Aug 2023 22:31:11 +1000 (AEST) From: Michael Ellerman To: Justin Stitt , Geoff Levand , Nicholas Piggin , Christophe Leroy Cc: linux-hardening@vger.kernel.org, Kees Cook , Nick Desaulniers , Nathan Chancellor , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC 0/3] powerpc/ps3: refactor strncpy usage In-Reply-To: References: <20230811-strncpy-arch-powerpc-platforms-ps3-v1-0-301052a5663e@google.com> Date: Mon, 14 Aug 2023 22:31:10 +1000 Message-ID: <87cyzperg1.fsf@mail.lhotse> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Justin Stitt writes: > On Fri, Aug 11, 2023 at 2:19=E2=80=AFPM Justin Stitt wrote: >> >> Within this RFC-series I want to get some comments on two ideas that I >> have for refactoring the current `strncpy` usage in repository.c. >> >> When looking at `make_first_field` we see a u64 is being used to store >> up to 8 bytes from a literal string. This is slightly suspect to me but >> it works? In regards to `strncpy` here, it makes the code needlessly >> complex imo. >> >> Please see my two ideas to change this and let me know if any other >> approaches are more reasonable. >> >> Link: https://github.com/KSPP/linux/issues/90 >> Signed-off-by: Justin Stitt >> --- >> Justin Stitt (3): >> [RFC] powerpc/ps3: refactor strncpy usage attempt 1 >> [RFC] powerpc/ps3: refactor strncpy usage attempt 2 >> [RFC] powerpc/ps3: refactor strncpy usage attempt 2.5 > Errhm, It looks like the diffs after attempt 1 came out poorly and > probably won't apply cleanly because they were inter-diffed with the > first patch. Is there a way to let b4 know I wanted each patch diff'd > against the same SHA and not each other sequentially? I don't think there is. It always assumes they're a series. cheers