From nobody Thu May 16 07:20:18 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=1689685424; cv=none; d=zohomail.com; s=zohoarc; b=LI5ZwXTSBMhzN+d+UvLukqoA3e0oqYLBAVTSPB6oAFnqHgFPgxCIEiw73MBrYT5tBxtI+1Aoi2c4g+egTFksFuZYhhvLT3eV8xW3JxpedB+RNTNl2Giy+21W19EL8jaOKi0X/5Ynfclmo6i7Q4roCCKs0XxW7gh0TBaykLtYaWA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1689685424; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=ixXY9hpmzkYQbn+pkOZMs7RFJD+PtCStLusueWMjyAU=; b=A38Ua3SdEa4YONR7SnaGE9WPBM0aXbsocorok/0U4tuOKAeuu+u2TrfsyIB3CPpb2aW+2ky1PDzlAFUj7Dat+Fexq6xGdlaiI4FnImi6KmpIbkxyumJFovoTeQDQGDSGDjxYRx+nQfovQApHctiuFT6fwA8/ModzF1PAsMe2Dsw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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 1689685424056811.5813967139749; Tue, 18 Jul 2023 06:03:44 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qLkMH-0006Sz-7s; Tue, 18 Jul 2023 09:03:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qLkMF-0006Sj-KB for qemu-devel@nongnu.org; Tue, 18 Jul 2023 09:03:15 -0400 Received: from bonnix2.bonnix.it ([37.247.49.194]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qLkMD-00039F-FG for qemu-devel@nongnu.org; Tue, 18 Jul 2023 09:03:15 -0400 Received: from [10.0.0.152] (unknown [82.84.102.14]) by bonnix2.bonnix.it (Postfix) with ESMTPSA id 978C4ADC30 for ; Tue, 18 Jul 2023 15:03:10 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 bonnix2.bonnix.it 978C4ADC30 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bonslack.org; s=20220805; t=1689685390; bh=ixXY9hpmzkYQbn+pkOZMs7RFJD+PtCStLusueWMjyAU=; h=Date:To:From:Subject; b=g942uVgfOJn8n3eOaahrA3u7nBvNke1u/h4iNtqx3uXovq+iCXfjhwkmXufXI5gFt T8lLdRBO5pdNXtQECaYJyJ1qxtRU/Do1lLdWajoFSO8q9v4YyjAp+4r8yNlAXCfDpg zrbhfrG5GnfP/zyEBughSA/DSW/38wW+3scxGt7Q= Message-ID: <750c569e-a922-d3bb-1f97-1698960d5b05@bonslack.org> Date: Tue, 18 Jul 2023 15:03:10 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Content-Language: it, en-GB To: qemu-devel@nongnu.org From: Luca Bonissi Subject: Wrong unpacked structure for epoll_event on qemu-or1k (openrisc user-space) Content-Transfer-Encoding: quoted-printable 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: pass client-ip=37.247.49.194; envelope-from=qemu@bonslack.org; helo=bonnix2.bonnix.it X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @bonslack.org) X-ZM-MESSAGEID: 1689685429907100001 Content-Type: text/plain; charset="utf-8"; format="flowed" The or1k epoll_event structure - unlike other architectures - is packed,=20 so we need to define it as packed in qemu-user, otherwise it leads to=20 infinite loop due to missing file descriptor in the returned data: --- qemu-20230327/linux-user/syscall_defs.h.orig 2023-03-27=20 15:41:42.000000000 +0200 +++ qemu-20230327/linux-user/syscall_defs.h 2023-06-30=20 17:29:39.034322213 +0200 @@ -2714,7 +2709,7 @@ #define FUTEX_CMD_MASK ~(FUTEX_PRIVATE_FLAG |=20 FUTEX_CLOCK_REALTIME) #ifdef CONFIG_EPOLL -#if defined(TARGET_X86_64) +#if defined(TARGET_X86_64) || defined(TARGET_OPENRISC) #define TARGET_EPOLL_PACKED QEMU_PACKED #else #define TARGET_EPOLL_PACKED