Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1088108rwd; Thu, 25 May 2023 07:55:47 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7zt+svWkQEzhV/Jtz+CBHxoP8jwZ2uVgA+hyKSBbLhyWVtrzIun8WyBkNxWYqFnFt+HBjs X-Received: by 2002:a17:90a:674d:b0:253:3dd9:79e6 with SMTP id c13-20020a17090a674d00b002533dd979e6mr2034797pjm.0.1685026547467; Thu, 25 May 2023 07:55:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685026547; cv=none; d=google.com; s=arc-20160816; b=wiZjnUCB03KI6YLU9lbZrm2l9Bp5YEZlgUcuPvSBRt6T2LEgoW6NT9Gl4l79X6Xt37 yQl8vkDGWHOIoaPxfD9mp0m+Ls5yGmfGgGv7MJLWua4Wb9BGinb7I31mHvJKivzTgICh 7Bhx66Br1EPotMCO4qOG63N5pkxyJM8qVX36DwZ47cXK42lo9wUHSLKd9rkK20ZSOlRW lbMR+nHHqjb1hOfScmzqG+BEeWnCq70jOM5FCCY25HKG0DGlx5PwIJcumIUghHZzkW36 9q90nCIBP+cLRaT3y64EPJKKpATCVMLdDK5gMd5EJoZ1UHwSMntfzC0UzDdw+C1x2SUI VlVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=KABNbqgRSF0ElKxd5/lulUsYdIV0ZGlWkswDAW4GXS0=; b=OYPV+/4/a5kXYyoAN4Bq+aMd64g7Z/8Vf3rpcdOucp3cbUVayg9O2VIqH7aeWBw4BE 0PN+/4fhQwEto06/O9ZWvBqnAcuJsc70qnfttrUcRkcjF8dzip796HlisAOF3ie7Ayze yZhNgAeKIcf+6pxjpYdWYuotwuNhZ1iUDkAe2+OLnGDNJ0I3IH0DaxSNG/Litw0zOma1 1AEochGWV4doBhlS8YBVP11G8cvpvvK/nPAmrjKUnj2/aPvzfxpMvxABqxzi9xrFCHGM 5gNGe1RqZ+N6w4Rmh+jJcBXwq4S4yTwBPGjyNzFSnTzCIyV8MueK4+mPF4DyVvq/QxLO 2E7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=LI7VgDt2; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o5-20020a639205000000b005139e0d2b5csi1318007pgd.487.2023.05.25.07.55.34; Thu, 25 May 2023 07:55:47 -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=@gmail.com header.s=20221208 header.b=LI7VgDt2; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241455AbjEYO2H (ORCPT + 99 others); Thu, 25 May 2023 10:28:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240925AbjEYO2G (ORCPT ); Thu, 25 May 2023 10:28:06 -0400 Received: from mail-vs1-xe29.google.com (mail-vs1-xe29.google.com [IPv6:2607:f8b0:4864:20::e29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4665A195; Thu, 25 May 2023 07:28:05 -0700 (PDT) Received: by mail-vs1-xe29.google.com with SMTP id ada2fe7eead31-439554d9a69so709629137.1; Thu, 25 May 2023 07:28:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685024884; x=1687616884; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=KABNbqgRSF0ElKxd5/lulUsYdIV0ZGlWkswDAW4GXS0=; b=LI7VgDt2YvGlufUmETttGA0dMPhUSaOePjgRZfDvPh654KQmqMTZaA9nyEmvKEdHdD 6JeqEDYtriVnbHpDlSGE2l3Z2wwTeVYgQIZCnmg/j/u+xCYK639DUxl40vBu94F2ks4h ru8Y36StcH7ic/upryppG/EO0VBssQEElcn237Y1A3O41mxzQs2Gtr1Qc9XzSHHu/vxI bC/UTvjgeGWY+JKWeM/fYIgIODntdQYfVh+zI8bzYUGASEeDmArKwGgXfOm/TS1+fxsf r8+vV/wXAeKySN+BcL3hgdB8tkwg6Z37X9M3IxKnTYahGZefZjjCmXP0ut4XEqiEKBKV aawg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685024884; x=1687616884; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KABNbqgRSF0ElKxd5/lulUsYdIV0ZGlWkswDAW4GXS0=; b=VzIvRSdiX1Sr3Nab1xLE80UgbHqUf4xFUTnCpvzEBNtgi/bD35xt3KN6+WstOWc/j9 TLokrupw/7WxxM+2iaekf+zpS3e9cPe0FA0ECyagR2m1K4bnrQFbjHgd9ittynRWaS8+ OuVqTEjVV5l3uPZG71U98SjjVkFbP9Ch1vwN3EDloCmaoJuda9kKd+odWNSZUyUnSim9 Djgw4dOk3OtH8WNR7jILw+lA0N3swn8oVMAhcZhwOT6cWVcTpylEqQO1OGu60pty1aoq kAHamSc0I7jJ9pMjJFGJJ0ogwEK64o5+Nilas7BhzV03zdS64hNDiD/LN3YWQTF9SxZd u/7g== X-Gm-Message-State: AC+VfDzRoouOo07VpCjyhFvQ1mZrQMG4etnm7yLBueo2KEjLybTB/Hea p0CskvpE4ArgN35PhitlfQsFcQ3dUsrsi0NSb3M= X-Received: by 2002:a05:6102:126e:b0:42e:5b08:ec71 with SMTP id q14-20020a056102126e00b0042e5b08ec71mr853836vsg.11.1685024884316; Thu, 25 May 2023 07:28:04 -0700 (PDT) MIME-Version: 1.0 References: <20230523223944.691076-1-Kenny.Ho@amd.com> <01936d68-85d3-4d20-9beb-27ff9f62d826@lunn.ch> <5b1355b8-17f7-49c8-b7b5-3d9ecdb146ce@lunn.ch> <30d65ea9170d4f60bd76ed516541cb46@AcuMS.aculab.com> In-Reply-To: <30d65ea9170d4f60bd76ed516541cb46@AcuMS.aculab.com> From: Kenny Ho Date: Thu, 25 May 2023 10:27:53 -0400 Message-ID: Subject: Re: [PATCH] Remove hardcoded static string length To: David Laight Cc: Andrew Lunn , Marc Dionne , Kenny Ho , David Howells , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "linux-afs@lists.infradead.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" 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,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On Thu, May 25, 2023 at 5:14=E2=80=AFAM David Laight wrote: > > I does rather beg the question as what is in UTS_RELEASE when > it exceeds (IIRC) about 48 characters? Thanks for the question as it made me dig deeper. UTS_RELEASE is actually capped at 64: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Makef= ile?#n1317 """ uts_len :=3D 64 define filechk_utsrelease.h if [ `echo -n "$(KERNELRELEASE)" | wc -c ` -gt $(uts_len) ]; then \ echo '"$(KERNELRELEASE)" exceeds $(uts_len) characters' >&2; \ exit 1; \ ... """ So UTS_RELEASE on its own would fit perfectly by coincidence (and it is also why UTS_RELEASE with the pre and postfix exceeds the limit.) That makes me wonder if the content / format of the version matter and looks like it sort of does by looking at when the string was introduced: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/net= /rxrpc/local_object.c?id=3D44ba06987c0b10faa998b9324850e8a6564c714d "The standard formulation seems to be: built --
" That commit also confirms the size and null termination requirement. I will create a separate patch with your suggestion. Regards, Kenny