From nobody Thu May 16 05:19:45 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.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=1573575593; cv=none; d=zoho.com; s=zohoarc; b=eSmACLFEDaWyMJdwYv2NsyplbaJbmf+L0mo5PX5QVsaf62gED8RNOxA6YBL71B7iOzz8aF5mvG8ic3njMuPQ2Xyiu8/iSj6HO5Rx10Ae474DpGT2DO7E8PMx4CLTuxnM3Pgj8sxuHhHeZ03t8G8Jsc0gx9+prYAzE/xy44E2WtY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573575593; h=Content-Type: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=LjNhvO+PriR811N1gFi7xyHUHcjS6UE79Mh8tpSESYU=; b=XwBns4fT9BCuWnl54s0Oluu3HQWb6i7gqbLitBzRHN2vPSrY8ou+vzFRrKcLkSY9Yz9guaH1SmtAu3q12SziFyKRLNl7yZnNSSwiOXxZonXGik84TIueXr4344Wz90k0xFbCIyyk+Lny5n4uuH6gd7jFtTY/ilNsCr61ca3p1ws= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.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 1573575593184676.0513417865104; Tue, 12 Nov 2019 08:19:53 -0800 (PST) Received: from localhost ([::1]:37316 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iUYtU-0007Jm-20 for importer@patchew.org; Tue, 12 Nov 2019 11:19:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52161) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iUYr7-0004tp-Q7 for qemu-devel@nongnu.org; Tue, 12 Nov 2019 11:17:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iUYr6-0007t6-UM for qemu-devel@nongnu.org; Tue, 12 Nov 2019 11:17:25 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:50793) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iUYr6-0007rl-LQ for qemu-devel@nongnu.org; Tue, 12 Nov 2019 11:17:24 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MILnm-1iisiE3z9g-00ELwK; Tue, 12 Nov 2019 17:16:59 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 1/2] linux-user: fix missing break Date: Tue, 12 Nov 2019 17:16:53 +0100 Message-Id: <20191112161654.2253-2-laurent@vivier.eu> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191112161654.2253-1-laurent@vivier.eu> References: <20191112161654.2253-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:4q1ZiXUm1NNxEphIptLzxsFCP5oKPyBKAyhrjBdSzsQbJQQJjqa yYgGBkzRkI4rffCarwnM/rbXeZ/DWcXHqqfzc2gPsdtiPS/SZLn2OSPI4XtN8xFRN8jTaVY GqJHJLiujCs/JTP2HFm5SiR757aVoE0/1HriLCScr8Bx8oRjK6zkqyJqO0zgTyJST+pIdbk K1vuBZTGT3V4ONpWGoePg== X-UI-Out-Filterresults: notjunk:1;V03:K0:X/8ttX9xq2A=:I/aF08mj3XklnJGxcbX/OZ vvR+Ni5NUnWhbksGh92qblu0yzUs8jy6izEiUywm5p+7F8oe6l0b78nEd+a46ikcciPOCQDHY iPitZEqOIXtTMadSZPCsNdlYQYMLBrFasf6yvEM1jofR0iRGHOALd0reGkA0FkZuVm5CMKNgn nwaw2g5Mbw0r9AUAPLen7kgyXhBjggc8G5FondcOZpiOaqdH0YUOHZRcB/pTe0UMAu/6HN6H/ qLnMf2n36yr39DhU19OxcE5zPojzTJij4MD19M6cPP7HeGBbw4LuGH52oaAmemrPPwMPzrECw nhC/qllNI8qWbGxMbByghqbP9DjOml+pvkIviLdr9i32xe+ScrIoJCEcM7ap1KQw9v34Xgu3P wDWW3PfoTstCRgbFR/g10Yqv/KCsfIkh22u9iXnYlXEJRQUEgiv4Uflm+D9ErT1k+AaC1/RVD F0v2r9a7PRu53WBDWOIMnWNaY+sLxPQa5AiPIPTtLD+OQD7DBmI5UhJugw6zFEzWWcZ8DaZgu lRqHAmsiyJgaJ692sxNwlbOPMSTbeH+y/VQsCDd5Kvm5ImZ7PazZfgNRW28LWFbOoFFjQ3+4a 6Nc/BsCEBBgZKn8va0N0kOnwwqLHha+lmvDv6FiHDsAEAkEZ2S8QZJJ4+Vv08tlkEBJwNJ9hu KGHUIYT/8jOw5QjBH0PEs2HUSfu5iLCLzlBlvxsEsv2gWBoeKF/y4QKSyJCY1DZuAUNrxJR/H YC2BG/JpqHnnnCib325MsLN4i1GVDwRM0TFF1lndXfd/+fQ3YFnwULFWZkEWk++H+Z7fZyCzq 6mBrat8W5fdMV4+HDmzopFc96KT54KWkPsszaB33edrwjVdaFty9dQ4CbG4wNiYelZhHo8HPm 0+lb95MeTVKbJBpjI39gGnSyZ/i1wXACHS8a/Jz6Q= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.17.10 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: Josh Kunz , Riku Voipio , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Reported by Coverity (CID 1407221) Fixes: a2d866827bd8 ("linux-user: Support for NETLINK socket options") cc: Josh Kunz Signed-off-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20191112105055.32269-1-laurent@vivier.eu> --- linux-user/syscall.c | 1 + 1 file changed, 1 insertion(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index ab9d933e53af..4e97bcf1e5a9 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -2632,6 +2632,7 @@ static abi_long do_getsockopt(int sockfd, int level, = int optname, default: goto unimplemented; } + break; #endif /* SOL_NETLINK */ default: unimplemented: --=20 2.21.0 From nobody Thu May 16 05:19:45 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.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=1573575535; cv=none; d=zoho.com; s=zohoarc; b=RoUdDAVOqxZalsTKkuluTx5BrSyImzXJDvBlXozdDyUEV6a3/eKQiABa/BdMKk/fsnwRry6eqEnV0P2E2UsBNZaf1tObZTrXXTE/a29oitiJCUzWLgULIdigg9oXiZgYd1BqehIssPStyXZpgyhkGv5WuqRv2FHUcpGXT45EgCM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573575535; 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=Dnja81cm4jh1lS6ca/mHui42H5Uwq6J7JjU2Vxms82U=; b=c4/n2c7ya+kTjrh+JbT+e6LE/rkcfVagTDpgV0YkoUqTXiEPox5YBXiBFXPQDtlCdunxfyJgXfI4IMKig6FW6EmOmjdP6lABRHeZrEYFI7PwHKRFPAx2hL6ZYJ6claicpvF/bEsZEqgrhXcCURlYdiSFEj0LqXvh1X0ORFJLyPI= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.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 1573575535365580.9762137024596; Tue, 12 Nov 2019 08:18:55 -0800 (PST) Received: from localhost ([::1]:37308 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iUYsY-000656-3X for importer@patchew.org; Tue, 12 Nov 2019 11:18:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52130) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iUYr3-0004oX-1w for qemu-devel@nongnu.org; Tue, 12 Nov 2019 11:17:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iUYr1-0007oF-Tf for qemu-devel@nongnu.org; Tue, 12 Nov 2019 11:17:20 -0500 Received: from mout.kundenserver.de ([212.227.17.24]:55769) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iUYqy-0007iq-07 for qemu-devel@nongnu.org; Tue, 12 Nov 2019 11:17:17 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MfZ9C-1hxOol22yO-00fy48; Tue, 12 Nov 2019 17:16:59 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 2/2] linux-user: remove host stime() syscall Date: Tue, 12 Nov 2019 17:16:54 +0100 Message-Id: <20191112161654.2253-3-laurent@vivier.eu> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191112161654.2253-1-laurent@vivier.eu> References: <20191112161654.2253-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:zAlir39psUJGY/PKb1Os7sQIO9usNnJ82WbHPpVdxmU4zixrPL5 uB0hsRgoYLSaGaLyZMRXqN1Z/HrL1QVENlXEcqQ10Od+I78K+bzN8GkzH/H6uTJaRuhWK8P oOIBJgWg5XpBBEvm1HFRAQC3sXx53Oso9Y7mRNRjSZd9W4yiUWm8K3LSuhu2rjbz2QfUcwk Ss2P06f3ZpJXnuvFxHidA== X-UI-Out-Filterresults: notjunk:1;V03:K0:AgWAZBIztvs=:Iq/eRFx5pl7QZxrFRIPOEN TkdeKaaGcWXwuDw6eABnpaON/tb+eSJJ2VJD+DoMWx8ykxwGbFnMF3nsS34IPJXLjlIpgWTBx 0c2EfDvTsi+hgUDy7hBKRLVN5K4dic+RwcY9CFki9I9IAdiNBvXOBjMeWjkruZvzRtEPYCa4z JpveDM6oCTTsHUPpyDdUHE1BUClBg9AYZOx1bTHdoAF2Wdqdlle0IL8LijASxW5jAtXjBAuPD 2L1aZhRiLFZb9Q42BmZfPh18iDNXslI/CaChDhB2dFyKXPN9+acqnomXqcL/yqKL9PDNaHNMu 5suWD0/Z2nwu1oEHtMk5llMx0TXXF6JfTFmrGVIWFJXGqra0us+wPT4TzRd73sIWCfts86XN7 JXlzW0HECPsJanJd5oUJ5gwdciUGr6JgO6lVjjszyYuCvxehAVanxfK7wyzkRoSW6eiIiJjxf US1u3cr6tg+DGYqSuhTq2D7JojfQZ+SCU+WkCbwvINm06mBrmdEGj/BRm8QZagMWxqjZ6m3f6 IdYyqMo3GG3SqsB+Cny4j6R4vkO90Wds7MclZdoETnGlRWWVWtfY/eiaumuLmDEtOlFqE0L27 bYjCYb6R9cXGXAiPxw339LGAVistev6MryYkF/C3BO0xk2erejileUOYFuJvkL5Lm+DZ6hb+I NPqD4xG1SMrXsQXmesABwJQX+3WV9oBTkdUJZ0HL5tAoGGGLWijki1P9JvpMLn2/TDimbXnlH lBz+GH3fDzMhNL9ckCsanImTlBVuoXkOlxA2xnXYEK+10BpTJtAGMwzJ3aBxRKM9zGkUCZdJZ LE5cwX9rmdicpclMfyz/ajCEJAygVRo/6WdYXzf8XbfHe6BKHFOwxG76E5cLCeEK7ats+HdTu 9gvpDnMW0unka0ZZoGow== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.17.24 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: Peter Maydell , Riku Voipio , Laurent Vivier , Cole Robinson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" stime() has been withdrawn from glibc (12cbde1dae6f "Use clock_settime to implement stime; withdraw stime.") Implement the target stime() syscall using host clock_settime(CLOCK_REALTIME, ...) as it is done internally in glibc. Tested qemu-ppc/x86_64 with: #include #include int main(void) { time_t t; int ret; /* date -u -d"2019-11-12T15:11:00" "+%s" */ t =3D 1573571460; ret =3D stime(&t); printf("ret %d\n", ret); return 0; } # date; ./stime; date Tue Nov 12 14:18:32 UTC 2019 ret 0 Tue Nov 12 15:11:00 UTC 2019 Buglink: https://bugs.launchpad.net/qemu/+bug/1852115 Reported-by: Cole Robinson Signed-off-by: Laurent Vivier Reviewed-by: Peter Maydell Message-Id: <20191112142556.6335-1-laurent@vivier.eu> --- linux-user/syscall.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 4e97bcf1e5a9..ce399a55f0db 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -7764,10 +7764,12 @@ static abi_long do_syscall1(void *cpu_env, int num,= abi_long arg1, #ifdef TARGET_NR_stime /* not on alpha */ case TARGET_NR_stime: { - time_t host_time; - if (get_user_sal(host_time, arg1)) + struct timespec ts; + ts.tv_nsec =3D 0; + if (get_user_sal(ts.tv_sec, arg1)) { return -TARGET_EFAULT; - return get_errno(stime(&host_time)); + } + return get_errno(clock_settime(CLOCK_REALTIME, &ts)); } #endif #ifdef TARGET_NR_alarm /* not on alpha */ --=20 2.21.0