From nobody Mon Nov 17 12:05:12 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1603749979; cv=none; d=zohomail.com; s=zohoarc; b=mp3AvBTHbvPHyN/0/Nkez6gSeSVhN3id0ywagL+rzw8wQVSZU97Iqrym8Kf1jAT15KkExcSdaSKII2ro8RmcpHn7/5FkKMlkuniCJh+7pM/d93oL+7bNXiVZOdRSJsdiMdxppYmvswjxXb3umF3YlSem08MAbMJCQ8pSHYqG2d4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603749979; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=XsTASm9Zozj3tpypBJCO6xWhxc//uACi5ZeMF21dyFA=; b=Ka7VZgesnW5cgGvar3UPI3vx1kwMrxFofZDhvEXWpugczIzTiV6w58HxjFPa8D2WBJISFEvRgrM7/e8ke8W1Z54cFvpRj13jsTy3W2WaDW7mfGMdj6jjE2V/NXymK8K+1PbIv6lidinTV2K5lnYO2EeLMdOfut2OG9DYJQjztUM= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 160374997969548.315946142649295; Mon, 26 Oct 2020 15:06:19 -0700 (PDT) Received: from localhost ([::1]:39094 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kXAd7-0007JC-H4 for importer@patchew.org; Mon, 26 Oct 2020 18:06:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39160) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kXAah-0005aS-Ah for qemu-devel@nongnu.org; Mon, 26 Oct 2020 18:03:47 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:47085) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kXAaf-0005Ec-BU for qemu-devel@nongnu.org; Mon, 26 Oct 2020 18:03:46 -0400 Received: from localhost.localdomain ([82.252.139.38]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MWRmF-1kuX131Ofr-00XqGc; Mon, 26 Oct 2020 23:03:42 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 2/8] linux-user: Support f_flags in statfs64 when available. Date: Mon, 26 Oct 2020 23:03:33 +0100 Message-Id: <20201026220339.195790-3-laurent@vivier.eu> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201026220339.195790-1-laurent@vivier.eu> References: <20201026220339.195790-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:5f9zUHYgH9rAO/nYwfyBTWxSGUst/T65iCdLCEyBjdYTlTYPrgq q53xhrOfAAiuL1WWmSQnn8my315nOpjzJ65dOvsgYAlBOaV3TOkNY3LPwWgL6qrH3O3Dylg mzQvtBUHBuTQerf9utMZrBaprWuJ2ISV2k+we6Rjo70nWSoUqUzRhra+Rw4I4mLZcoggpvK oDydw39bF12bc/tOQmuZg== X-UI-Out-Filterresults: notjunk:1;V03:K0:Nco7D38+LM4=:bwo8vtBL2FEi1MP2Mpvbs0 CNm7yZcLni6Iuelpf62k8sKaxBzFGwWsm9k1AWByir5oZzs9MbEO3qHZ1ZkbbFo0Err/ZKlbU S1L54xJal8S6ErjMz39JXLseX+zNRvVVQkaCKCOo8NPZ4k6+FJzeH3g8RvPaSmwzyzALBtuYl dlZFq754qwz7BnYrwPs4TXvW61oQRDIFk6JEWz7rfMd+GlbczEUwIDJFNtYDYum+4FXnZM10N feeSKW4fFuSyu9nCANa9FyVe2YBJmgDbXg7KJNY2HIJRWBvc8emrLMg7+oJ0MVK23vrNBc5d9 I05wkOVAaFTbbQCxSktFdYPGPO47onFiPAoze2ONSQ7crxwUBCJTGISvFxkqghmnGawYbM+Dt KLCdzsI1ovnKKORctqKyR+wE22+HDZS2HGqlnUdh6oPfGsQGohEa8TNbQtLTl Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=212.227.126.131; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/26 18:03:44 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Frajo , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Frajo Same as d4247ec2d79ef2477cb886fa688706b068119736 but for statfs64 When running rpm within qemu-arm-dynamic this could cause rpm fail with an error like "installing package A needs B MB on the C filesystem" depending on what is in memory in f_flags. https://github.com/rpm-software-management/rpm/blob/af06db1d5558870f7fb8f5c= 502572c2d27af5c71/lib/transaction.c#L164 Signed-off-by: Franz-Josef Haider Reviewed-by: Laurent Vivier Message-Id: <2e405fe7-efab-dae5-93d6-02575773fd6e@jolla.com> Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 3e0f14f2e67f..cd520ae42e6d 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -9787,6 +9787,11 @@ static abi_long do_syscall1(void *cpu_env, int num, = abi_long arg1, __put_user(stfs.f_fsid.__val[1], &target_stfs->f_fsid.val[1]); __put_user(stfs.f_namelen, &target_stfs->f_namelen); __put_user(stfs.f_frsize, &target_stfs->f_frsize); +#ifdef _STATFS_F_FLAGS + __put_user(stfs.f_flags, &target_stfs->f_flags); +#else + __put_user(0, &target_stfs->f_flags); +#endif memset(target_stfs->f_spare, 0, sizeof(target_stfs->f_spare)); unlock_user_struct(target_stfs, arg3, 1); } --=20 2.26.2