From patchwork Fri Oct 4 08:17:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uladzimir Bely X-Patchwork-Id: 3844 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 04 Oct 2024 10:29:24 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-pj1-f61.google.com (mail-pj1-f61.google.com [209.85.216.61]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4948TNvr029736 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 4 Oct 2024 10:29:24 +0200 Received: by mail-pj1-f61.google.com with SMTP id 98e67ed59e1d1-2db470aa646sf1772127a91.3 for ; Fri, 04 Oct 2024 01:29:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1728030557; cv=pass; d=google.com; s=arc-20240605; b=VFyQmlHuS0IIw25Qgks6fCiNq8KyhM+6eVIlS24HLOosF0jXi8VqT54lliPIw8TRMD grMQAE3UINzp1rCBjNU9gj7aSLppfjqX9H3dNdWbkv2t//5AMQKavURT+AWvx8Y9QQoK 4242ZLAI5f9oTTfMol8aLRko70bNfiRafGfn3EYLx6wBwNWda62xKIQcxsx9eP4fPunw TSUAzm007LeV6jcVg2lTLvh9LVUHsPTcdKc2ap00VZLm/pjI4S8omI5b6mhSrPlzXJaG Dpf1Zd0IswC1UicTQnFOY/kw2oveYOVox0/5prfeP2C7YziTqHcmm7bQkZnMIhodUHM2 D36g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:message-id:date :subject:to:from:sender:dkim-signature; bh=WRf3svzdZ0U1eDfqQ8cTJvyQRfZiQnUBf2PeDFJ5KM8=; fh=UtgpT/zY1U0Vb2VRwxQFZ6WIvjoG9tObKqX0kVyjZZI=; b=l2/qONPPr1MvZMjSeinNdcvTMBvTouT8v4LkMNpNNp3ZzvvRrJOzTZzT7n0VgGwiiD FbZ/40KMOiE69UVm9M0z9GtMMPXCzLBtlZh2V0ngLEo9V/yPeokI+6MC5yxwXOMGcT25 Bzw4DUgPDFzqFlUaDycmsdtsPAcYp/4TiC5O4RDyWAn9iQVW8EsHEUbYH5C2preVvt1J k6Cqt4e1upUa4bWy80Zv7mwh4k8BnpyUF0+6QG9is4PlROpfOPIZ5PX/eYJbuQ6CqklU iBmPW8BM+KGrMz/BTCx7/umWGTBo8ZSu6iG+yVS+alVQuCHGiYILjPEmj8MWTipbM+JK ivPA==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1728030557; x=1728635357; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:message-id:date:subject:to:from :sender:from:to:cc:subject:date:message-id:reply-to; bh=WRf3svzdZ0U1eDfqQ8cTJvyQRfZiQnUBf2PeDFJ5KM8=; b=aHaIePs2/5StbZEU5d5Q+UXNpNw1vhhgOnfkNutKBurWcvegxxOUqc7sJ7mxUKnV9q htmre5eegmrm+lMjf5dfqL2XMWL4B5XJKO9cwPOamIkrBsSOrVXSDCZ8jhCSapRXIKie GZnJ1KGhx1V/X6BeZu1fpj1y/Ad+vUcKPK8UWZdIhUhXQMkBUhUokv6n8Jx+K0eK+UPi +xK5cm3+tlp8AUuj3NzGpJ2qfOXQfvGm8JHQS8HnDHaw5zOrDyFyLnJ7TWIPL3n3qJTg yqGpB6YYYo3vuJ6dJjexVbgzrFCW2jA+3cS7CYf2fm2QYhH2zPwSmXEfAASIPoo0NT68 M0Qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728030557; x=1728635357; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :message-id:date:subject:to:from:x-beenthere:x-gm-message-state :sender:from:to:cc:subject:date:message-id:reply-to; bh=WRf3svzdZ0U1eDfqQ8cTJvyQRfZiQnUBf2PeDFJ5KM8=; b=P8PLlII3eU7KhhXoeGcpHxTiq1nGcIGmGgivxrULZyqFomBSf5bzm5lOPvSiyRMsxe pRfIgpeAtyUWztyD8pvqavDT2cVgOhJ+bB8dURAp22txqloH30iPcV3InwA+S/GVgDzr B3wvDlwM8JnahGZQFXA+ade0b5xibVPr9w0SdFjhH+Ee7xmm2KmSzzuaQSRoX4ZVXP4l uj4lEHCTOlwwnAPwX8m15LLcfAHbHDiRQIH07nMQHPimKxn5DiLkuwFvKLLg7ijeg4OZ HTeJmMil5AdrjihWm7nKEe3lDLi7x0TC2gXeYqBcyNtdhHfWMfJhjsC5eQUtCcE6ssbF ETXQ== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCVOGv08mX2wXqgyN0clOK9CEvKf9ZV3hF0wVZKpcdCZ7CQNA/LqKpQOoq4CJ3X3lVrPyhneDuM=@isar-build.org X-Gm-Message-State: AOJu0Yz3ISYSVKrcLFb9b5yizSDc35FBMs4O9GZ9Lyy7vxYxyTJTTwCx fv2lAH8GGj1VrHGc8dWZSjxfBx/KnfBw/do0bhx8zvP9lIMGBHZ3 X-Google-Smtp-Source: AGHT+IGOln9h4LiS7GZcpiCW+j6q0/N2XVFQ4WsC54eX7gOHD+hoj5sasgbsNdtRbqa28CsD8Ksygg== X-Received: by 2002:a17:90b:c11:b0:2c9:df1c:4a58 with SMTP id 98e67ed59e1d1-2e1e626c389mr2415527a91.23.1728030556943; Fri, 04 Oct 2024 01:29:16 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:90b:4c07:b0:2e0:8b1c:34eb with SMTP id 98e67ed59e1d1-2e1b35f716cls455615a91.0.-pod-prod-09-us; Fri, 04 Oct 2024 01:29:15 -0700 (PDT) X-Received: by 2002:a17:90b:4a51:b0:2c9:9658:d704 with SMTP id 98e67ed59e1d1-2e1e6390fbamr1845085a91.40.1728030555487; Fri, 04 Oct 2024 01:29:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728030555; cv=none; d=google.com; s=arc-20240605; b=W9UwmsN/BAAUiBivAREZeIQYE8cHT8E6erlkj1LPLx7kNMj5WGxX+TqIvHJHkqgdp5 bQvZHqPPkghf/YIstgkHzWv56w+3pLAQ6YBUm64gejTW5HQhXpc4welbzI7EJ/5HHkDe OLd1u3p/9lBgTl+dXVoXis7ZuUhoRCkAul48+Ac3skP+g6LJWaiO3jeApsfjEPyghgqr 7ambSv46fpQB6XGEi70SGZD1eJlDWZga5dv0M01QmjR2vPe58Cjs1NRa2yQP2wlfKAOy Mst6sGleAvY7Ak9vlzbfdBKLkCjaGCXsc0xxGUCVCLbwoph9a2qznfm3VZXhopVzH1Ix lBbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from; bh=AZqW3SRuKNrX6GaZSH8rmN+EXZgRs6evQKzfXc4ZXu0=; fh=7tclEdh7YbwSQowgJ6LNq720O7H5HTEaqj22NJWRE2E=; b=jQ2+YnkplZOb4cJrFjl23JZ2iTdANaqFQov3GUTxc2nvmnh1Qs9fn7xG583ykmSVHc 4CSX1T842Dqr7E05t4f/R+ZFlCxnsE0/1ugP6RXGeLP1gxsXcNE5rK098repKhnbVsBt 4QGQjJOdZZDiaXXBourCpw1L+fV8/mpG+5HmefeKoIVGMzp9qR6zrjsEZaOAugC29fcM nbiMgmpEuHqsSYN4k7d4MWRif8ymbEhPW8psXdxAElaPa1Y9Thuk/ZKZz7YOsxUdNtWD nADgaxvLAcfIXM31o0NXhHvmJYbIV6sHj2bN6IMCc0xdVngEyG/GKqhqggYAu6s3pd0v Oedw==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id 98e67ed59e1d1-2e1e7ed3337si112932a91.1.2024.10.04.01.29.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 04 Oct 2024 01:29:15 -0700 (PDT) Received-SPF: pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Received: from home.promwad.com (44-208-124-178-static.mgts.by [178.124.208.44] (may be forged)) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 4948TCp3029723 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 4 Oct 2024 10:29:12 +0200 From: Uladzimir Bely To: isar-users@googlegroups.com Subject: [PATCH v2] Fix linux-starfive build under sid Date: Fri, 4 Oct 2024 11:17:56 +0300 Message-ID: <20241004082906.29224-1-ubely@ilbers.de> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-Spam-Status: No, score=-4.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,RCVD_IN_RP_CERTIFIED,RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-Original-Sender: ubely@ilbers.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= The patch is taken from the linux kernel upstream >= 6.8. Signed-off-by: Uladzimir Bely --- ...oc-arguments-order-in-btrfs_ioctl_se.patch | 43 +++++++++++++++++++ .../linux/linux-starfive_6.6-visionfive2.bb | 1 + 2 files changed, 44 insertions(+) create mode 100644 meta-isar/recipes-kernel/linux/files/0001-btrfs-fix-kvcalloc-arguments-order-in-btrfs_ioctl_se.patch Changes since v1 (Fix linux build under sid and trixie): - Since we don't build linux-mainline/linux-phy kernels for trixie/sid apply kernel patch only for linux-starfive_6.6-visionfive2 target. I additionally checked [1] for existing branches and can conclude: - recent 6.6-based branch "JH7110_VisionFive2_upstream" is still affected and requires the patch - recent "starfive-tech/visionfive" is 6.10-based already includes the fix, but using it leads to different build errors. Also, I'm not sure if it properly supports "VisionFive2" board. So, for now, the simplest way to fix build error we have in CI is to just apply upstream patch. [1] https://github.com/starfive-tech/linux diff --git a/meta-isar/recipes-kernel/linux/files/0001-btrfs-fix-kvcalloc-arguments-order-in-btrfs_ioctl_se.patch b/meta-isar/recipes-kernel/linux/files/0001-btrfs-fix-kvcalloc-arguments-order-in-btrfs_ioctl_se.patch new file mode 100644 index 00000000..afe09eab --- /dev/null +++ b/meta-isar/recipes-kernel/linux/files/0001-btrfs-fix-kvcalloc-arguments-order-in-btrfs_ioctl_se.patch @@ -0,0 +1,43 @@ +From 6ff09b6b8c2fb6b3edda4ffaa173153a40653067 Mon Sep 17 00:00:00 2001 +From: Dmitry Antipov +Date: Thu, 21 Dec 2023 11:47:45 +0300 +Subject: [PATCH] btrfs: fix kvcalloc() arguments order in btrfs_ioctl_send() + +When compiling with gcc version 14.0.0 20231220 (experimental) +and W=1, I've noticed the following warning: + +fs/btrfs/send.c: In function 'btrfs_ioctl_send': +fs/btrfs/send.c:8208:44: warning: 'kvcalloc' sizes specified with 'sizeof' +in the earlier argument and not in the later argument [-Wcalloc-transposed-args] + 8208 | sctx->clone_roots = kvcalloc(sizeof(*sctx->clone_roots), + | ^ + +Since 'n' and 'size' arguments of 'kvcalloc()' are multiplied to +calculate the final size, their actual order doesn't affect the result +and so this is not a bug. But it's still worth to fix it. + +Signed-off-by: Dmitry Antipov +Reviewed-by: David Sterba +Signed-off-by: David Sterba +--- + fs/btrfs/send.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c +index 4e36550618e5..2d7519a6ce72 100644 +--- a/fs/btrfs/send.c ++++ b/fs/btrfs/send.c +@@ -8205,8 +8205,8 @@ long btrfs_ioctl_send(struct inode *inode, struct btrfs_ioctl_send_args *arg) + goto out; + } + +- sctx->clone_roots = kvcalloc(sizeof(*sctx->clone_roots), +- arg->clone_sources_count + 1, ++ sctx->clone_roots = kvcalloc(arg->clone_sources_count + 1, ++ sizeof(*sctx->clone_roots), + GFP_KERNEL); + if (!sctx->clone_roots) { + ret = -ENOMEM; +-- +2.45.2 + diff --git a/meta-isar/recipes-kernel/linux/linux-starfive_6.6-visionfive2.bb b/meta-isar/recipes-kernel/linux/linux-starfive_6.6-visionfive2.bb index f4dd5c9a..a267241f 100644 --- a/meta-isar/recipes-kernel/linux/linux-starfive_6.6-visionfive2.bb +++ b/meta-isar/recipes-kernel/linux/linux-starfive_6.6-visionfive2.bb @@ -8,6 +8,7 @@ require recipes-kernel/linux/linux-custom.inc SRC_URI += " \ https://github.com/starfive-tech/linux/archive/${SRCREV}.tar.gz;downloadfilename=linux-starfive-${SRCREV}.tar.gz \ file://0001-riscv-efistub-Ensure-GP-relative-addressing-is-not-u.patch \ + file://0001-btrfs-fix-kvcalloc-arguments-order-in-btrfs_ioctl_se.patch \ file://starfive2_extra.cfg" SRCREV = "9fe004eaf1aa5b23bd5d03b4cfe9c3858bd884c4" SRC_URI[sha256sum] = "9eaf7659aa57e2c5b399b7b33076f1376ec43ef343680e0a57e0a2a9bef6c0ae"