From mboxrd@z Thu Jan 1 00:00:00 1970 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:25 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-pj1-f59.google.com (mail-pj1-f59.google.com [209.85.216.59]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4948TN5t029733 (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-f59.google.com with SMTP id 98e67ed59e1d1-2db470aa646sf1772126a91.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=Ti8QUr3PR4umZ+Ep9VAuLhPEDDBE6uvyjjNCBcfz/zB0kWp5yC8Sh6ZQwpXPC0ouKf dbvMbAW23zu7MvdJQYpqAdF0Os3CdIY0aMBs5eHwkybUBRMlKqc97U5VIIHl1tul48+F l75Vi/Dj7S5kCtHBlKroN2GasTwkgWWH5KxJ60ZftK7LK7FguZmT9+2Ts3YZMte4HUAA 9BECiji7f6eSNILfaGpONC+njXi3FUs+7DCJE49HO5WTScZXPjt2lv5UCwIOcfCzYJn8 IYf4F2eO1ESr4vPkWIM4UPjidxyOH75NziZzNWVCYszCbe4I3PVsqPKO5a9yvRsdcz0W 3UAg== 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=f1OYg7MLGUcr/D2RZHYwO0gIvoveTGvuePvjn4KJHPw=; b=kGFq8eeAY1vDgneFXQqGF/FoRlIdP5Z8Xcp+N/kABTxhDxAtnHYMNJvAnc5Sd6eQ0z rOCBHYess7VdvtckFOONIem2bYt1bx/1rDnKdbBgpMgO4hYSw09bTLtnWquUYvzqrD8f N2rPJ18nRhhgZxKVCC0mVVLvw1pbplEtMlv3Ycj/4qt6mFo2itVruf4EsuQ5HNyNztTA bnrVutD/PmFLPnZqRbIha9QEQEDo73gGCe2JMJMLQQLfu/cG9n4nHlCeDKGytFiUohhz 0mmo5ZB1eSK2U1UaQnCAMTcKFmjhr0dcZucIoHh98XKYkSM/FGjXm+HxjJIolOYEUVRL RmKw==; darn=ilbers.de 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=ilbers.de; 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=emJ3EGmRZBIV25Pqetexg/qUQ0V7FAfmheJg6a2W+ybdKW8dF6BrTVlNtstgN1M9HU 4XG46bw7jaVoxPnm0ukMmavt0v5HMfAQMV4nfnCxEUYgaLm0gnn31mKd46gd4maAEx+0 yf3TTwsfIFjOHX5aYc06skqPn+4ZwMjVE7pwTOpAjw7RorE8f/tp7C1eyx+/NoGF1VVQ 8bV4Nmih2yrchVqr8EIJm7mRINBYLrJurt+2APt3/weTeR6RHPvYxpa/k8DQ6peqAkJy WImKMjd+mZeUqOqHrqNgMd3lyL/RzA4yoZdyGdcOlKsn/sBXYeGq/70qZGgopHpAzZvL 5TtQ== 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=UjaPM1YEnJLEedg8MUaCTkgvPwLaEk6aJtOFmD48Kf1FrzvilXIkkJD61mMxkITbjw u6jUp611qVvv9ewZ/1F6gYuocebGmGm4nXI3VusdD30VVYZq60cZTGYD0P0el4bCNf6u 3tetypCwFGul9Wcl6sj9CBu5EoXqouFxWgCWrmwfIm/56H58BoTCfJ0N7xQVVGUs4ekr S4Alp725k9Vd0nITX079IoxBEdPCHPwAu7f0vmhMPR/7RgkHc6XHR5CQxmuaCAh6FYmW nH52v5a22UQJMOB3A0SfyOtcD1Jfal6SHCPhAp81gz0Xb9pG4D/1+CsBnLkLX914nbKA w8fw== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCU0eH67mR4U5HBfIfRStSyI0uEcVVlEtRfj8cKk5/zxIyq/yxwk+fIKUqXZzMwxl8VuhlD3@ilbers.de X-Gm-Message-State: AOJu0YzUvB90euBJfNxGquDNINEM++Rx8XXp/P641hJFYIeTzd8bx+LN fuYrGmvVy6F1jiKwr2aH4JJjXdMoAfXfwcLtGyLXxTlExMDRlXBV 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 Content-Type: text/plain; charset="UTF-8" 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-TUID: Bpq63DphHIKV 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" -- 2.45.2 -- You received this message because you are subscribed to the Google Groups "isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/20241004082906.29224-1-ubely%40ilbers.de.