From nobody Fri May 3 00:10:10 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; dkim=fail; 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=1567923467; cv=none; d=zoho.com; s=zohoarc; b=hum9vJcTHfxlWxDgitThW9uHQLDGSoF9XDUhc1FTXLIWklnXUz0YYn0vOq4jDHrgMUg2F6ASad+r1H8yezsNCTaYrhbuew6kh/qBOr8gFmAjguInWSUYvuzrPZU/6hEHi9kxLAMNJSBLepAv9826inoSpZesr1wIlAr8Dx3hfsk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567923467; 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:ARC-Authentication-Results; bh=jxeBooAWNeNgyEWlgkktgHzYTcy+BTe+I6i003sho70=; b=Z0Pr+QfF4izrQ5s3BS340qSbTuakf13/dB2Swk5dKdHpuSuq6OSB1gHHiXIGniY0ZNGoAHDWw8i2p+d78alKkHKZRIxL9SPcy0P0tMGv3BUNDeRD9ynaw4IqdSsjDDVj3v++q8pY0M4cOOIwyhFSY7akup0vG8+7i3aaBCawTRQ= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; 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 1567923467232590.5812344216838; Sat, 7 Sep 2019 23:17:47 -0700 (PDT) Received: from localhost ([::1]:47162 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i6qW6-0004Pw-19 for importer@patchew.org; Sun, 08 Sep 2019 02:17:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41775) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i6qUH-0002mT-AP for qemu-devel@nongnu.org; Sun, 08 Sep 2019 02:15:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i6qUG-0002P3-3u for qemu-devel@nongnu.org; Sun, 08 Sep 2019 02:15:49 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:32885) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i6qUF-0002Oi-UB for qemu-devel@nongnu.org; Sun, 08 Sep 2019 02:15:48 -0400 Received: by mail-wr1-x441.google.com with SMTP id u16so10442976wrr.0 for ; Sat, 07 Sep 2019 23:15:47 -0700 (PDT) Received: from localhost.localdomain (251.red-88-10-102.dynamicip.rima-tde.net. [88.10.102.251]) by smtp.gmail.com with ESMTPSA id g201sm15616552wmg.34.2019.09.07.23.15.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Sep 2019 23:15:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jxeBooAWNeNgyEWlgkktgHzYTcy+BTe+I6i003sho70=; b=U+TK8iaWtCyd3zYeMuRNoa+2FJH1sD5X/2yJeblvT74fE13ks92RW1QrBJLwhJGeB9 VGJFXZyaO14+LFi8HjXxkuIbDoIYOeY1LCEdIFHYmDWoe9+IZ02oZmH/6N8zgh5FyXjD cLpI0aCwV5EUfLhdWe2ANb+ZsZJpXc+hGhQbWjHfBSlCq5F4jAKiuYPRHZufSBkREr8n hMj52QWkST3xHd7Oyc1VVnTUolM2MryHo6WNLZYBqVitBGkNGUPwlp9PtFdQH71nagNB hd8YEhm7dbBTEro+MJPpHFw/1ZQ/SBlQ0I8siCEd7OFL4r/+9+WGseJ8hIQujfXzCBQq 5Ihw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=jxeBooAWNeNgyEWlgkktgHzYTcy+BTe+I6i003sho70=; b=Ce2UYwJIe+or40Wb4akYAkOC1/SQUsm1P/03YEUQLDZ7WiUmineeysSotNEqwnnhWF nN2O8DCUN9I6IeQ6s0YN2pJ/cgllejxsKd4w8RfQCxbDcxg38lMGUkGr60UJlJMfleNx ddtElyKWkxTW5xM8x0kXX7bjMCWtglIj3vNYNwq9IuFL3XVWJoRhPIP4T5ixdj7pez78 ptUgcGjsn06/Av7cNHeWuo3b7Dcz2GiWNlkoQWkD/Sqt//WRlcB/rIg1K9q8tpjTD6G0 IJh20HXdLaux+aenRoSG8gsiE3QIDruihLW+Rb/+DDB6QJ8AQSkQy65Lyl7wIJAhKtAu MAfA== X-Gm-Message-State: APjAAAVoAAPeYDBZsELt/QGCZ3ts5XXYc9FPB9/i2WHCz+MS04yZU0ik Z90uLqXTxQV3Gd+rzDcMA5NLR2Uc X-Google-Smtp-Source: APXvYqyoNZWZfmh/XCJ3O3/KcjCJK03yT5XP5WsDVz3pYSe/J/oFEy/Ww4nw1/sTVdlRcz5fxr0p4Q== X-Received: by 2002:a5d:4107:: with SMTP id l7mr8920884wrp.303.1567923346730; Sat, 07 Sep 2019 23:15:46 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Date: Sun, 8 Sep 2019 08:15:36 +0200 Message-Id: <20190908061543.25136-2-f4bug@amsat.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190908061543.25136-1-f4bug@amsat.org> References: <20190908061543.25136-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::441 Subject: [Qemu-devel] [PATCH v6 1/8] linux-user/strace: Display invalid pointer in print_timeval() 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: =?UTF-8?q?Guido=20G=C3=BCnther?= , Riku Voipio , Laurent Vivier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Suggested-by: Laurent Vivier Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- linux-user/strace.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index c80e93b5db..f326c357a2 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -1243,8 +1243,10 @@ print_timeval(abi_ulong tv_addr, int last) struct target_timeval *tv; =20 tv =3D lock_user(VERIFY_READ, tv_addr, sizeof(*tv), 1); - if (!tv) + if (!tv) { + print_pointer(tv_addr, last); return; + } gemu_log("{" TARGET_ABI_FMT_ld "," TARGET_ABI_FMT_ld "}%s", tswapal(tv->tv_sec), tswapal(tv->tv_usec), get_comma(last)); unlock_user(tv, tv_addr, 0); --=20 2.20.1 From nobody Fri May 3 00:10:10 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; dkim=fail; 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=1567923472; cv=none; d=zoho.com; s=zohoarc; b=EdtXPGDpTJc5mC4gkOA4SQm/vi5d64OH3qYx384Wfua7DvywKTYUx3C7KmqJH3gx+V7E1KFIscOjwHPwGzYP6DpVnlTQz7a3pvTBAPHlKHK8FmBgbpvW4UHKYxk1eTMEs3tIaEyC/cGm92PZFdY+OmPsiRJJPDUQE3IAE9mcufk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567923472; 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:ARC-Authentication-Results; bh=gvbw57hiwlFryOdHGOwYOwKt/bEEEiHivu3sJ0Hxopw=; b=jyy2ncvvfyTX1IMqH3PnlMvEveWCrwgG4J1Osja62E0L2fe+9nWydi8OkWqnIVLfM2fDvZoQMgT4wIzRfpJrdBkPxQgnZawW4I73ziguM1nbVa/fsravLPs0Z66n29KT03pyqCHFSrPjT1/T7U6HJSJskpU82id4oZhhRMlyjZc= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; 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 156792347265393.10720998422664; Sat, 7 Sep 2019 23:17:52 -0700 (PDT) Received: from localhost ([::1]:47164 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i6qW9-0004U7-0V for importer@patchew.org; Sun, 08 Sep 2019 02:17:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41793) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i6qUI-0002me-FQ for qemu-devel@nongnu.org; Sun, 08 Sep 2019 02:15:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i6qUH-0002Qy-At for qemu-devel@nongnu.org; Sun, 08 Sep 2019 02:15:50 -0400 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:50388) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i6qUH-0002Pa-2o for qemu-devel@nongnu.org; Sun, 08 Sep 2019 02:15:49 -0400 Received: by mail-wm1-x341.google.com with SMTP id c10so10339902wmc.0 for ; Sat, 07 Sep 2019 23:15:49 -0700 (PDT) Received: from localhost.localdomain (251.red-88-10-102.dynamicip.rima-tde.net. [88.10.102.251]) by smtp.gmail.com with ESMTPSA id g201sm15616552wmg.34.2019.09.07.23.15.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Sep 2019 23:15:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gvbw57hiwlFryOdHGOwYOwKt/bEEEiHivu3sJ0Hxopw=; b=FsKg+Hhfk9Acx5bx98OBBJNNKmF5Vm3lcggSlwFvXm26IYYe2ttQsjfSGhkdPyKOw2 s9l4o9w9dK+QlEP09XQRqefcEKjH2ENTPFKeOoX007GPYebD80oylE2ld9F+n3HEqoGR wstANu+y/Ya225zBa7EKQGevNAxiLwqvu4lZf8Xx89rhOM28/3R/wMXSpnM+s57ybpB4 zAoizS93dp6rcz4L6nVyu9l3vKkEWhiO+64iYeh6JFhFDZoO2zyEy7T3YobDR5c0QGh1 G+p5GRyGFz29SQ+UKcbXqcRsPmmsW1jBrxHZP6Ts0/7R5dF0Il12ujE8zH8OsT2obZnk w5LA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=gvbw57hiwlFryOdHGOwYOwKt/bEEEiHivu3sJ0Hxopw=; b=VVejevvL6Tk2VWySy9y0ngX2lGrfe4LrEixNJ9BHFgeeFj9ukfV7bB8jrYtKZTLJ2S 4wlBBpQynAtEpqR7SXvGAHydf54tgJyY7wD2IudkWK5j629ugh4MfmWYGOse/JctNau+ AMx+nUTw/K/m/2KUXbU2wWvGAUZ81jSJe8zckNZAJTU2psRKvad2fRukQQh1X2cb+xYs UpORFjbj3dWIMcJRsjMmmrNnDKnuyV4gipdchkpJpA/hxl6nCnROTqtmrCRWzo5XygNW EVcNdxc/toxNZdtCturrVIVOvSD6rZGTc5T6OFk55gHprD0lGyK2KNxbz1rgOIZE7mHl Bmzg== X-Gm-Message-State: APjAAAXkBmIk29F3xnd1HfEUWL3uJqhhLcnKYjjpVyNjf++XnMOQZ2Xj OHx7pINonFnsiUFkONvSWC/r1SLb X-Google-Smtp-Source: APXvYqy9wzWhZeehhEligxEhK7Ml+4Clhbz4jXngT3R6rU2xvllg8oUog1skvYeC/SoKnMolPjZ2Ag== X-Received: by 2002:a1c:7407:: with SMTP id p7mr14634968wmc.31.1567923347848; Sat, 07 Sep 2019 23:15:47 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Date: Sun, 8 Sep 2019 08:15:37 +0200 Message-Id: <20190908061543.25136-3-f4bug@amsat.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190908061543.25136-1-f4bug@amsat.org> References: <20190908061543.25136-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::341 Subject: [Qemu-devel] [PATCH v6 2/8] linux-user/strace: Add print_timezone() 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: =?UTF-8?q?Guido=20G=C3=BCnther?= , Riku Voipio , Laurent Vivier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Suggested-by: Laurent Vivier Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- checkpatch error: ERROR: storage class should be at the beginning of the declaration --- linux-user/strace.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/linux-user/strace.c b/linux-user/strace.c index f326c357a2..5ee9d62c25 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -63,6 +63,7 @@ UNUSED static void print_string(abi_long, int); UNUSED static void print_buf(abi_long addr, abi_long len, int last); UNUSED static void print_raw_param(const char *, abi_long, int); UNUSED static void print_timeval(abi_ulong, int); +UNUSED static void print_timezone(abi_ulong, int); UNUSED static void print_number(abi_long, int); UNUSED static void print_signal(abi_ulong, int); UNUSED static void print_sockaddr(abi_ulong addr, abi_long addrlen); @@ -1254,6 +1255,26 @@ print_timeval(abi_ulong tv_addr, int last) gemu_log("NULL%s", get_comma(last)); } =20 +static void +print_timezone(abi_ulong tz_addr, int last) +{ + if (tz_addr) { + struct target_timezone *tz; + + tz =3D lock_user(VERIFY_READ, tz_addr, sizeof(*tz), 1); + if (!tz) { + print_pointer(tz_addr, last); + return; + } + gemu_log("{" TARGET_ABI_FMT_ld "," TARGET_ABI_FMT_ld "}%s", + tswapal(tz->tz_minuteswest), tswapal(tz->tz_dsttime), + get_comma(last)); + unlock_user(tz, tz_addr, 0); + } else { + gemu_log("NULL%s", get_comma(last)); + } +} + #undef UNUSED =20 #ifdef TARGET_NR_accept --=20 2.20.1 From nobody Fri May 3 00:10:10 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; dkim=fail; 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=1567923471; cv=none; d=zoho.com; s=zohoarc; b=Omv7UqONxKINDXhmAdgvjCENz0GwOoQOMaUKjSL+b+pxbZdBZzVVb1LJrvVho7MyITNf+fwW39ga/9RrzYm8NH9JAworVzRXf5cQ+eTZurinRwl9e0EznvwylaWyj4VPgZJoGZpT0q3UD7QtGiU7xQ4w3cPJQT34QO6BPs4ze+E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567923471; 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:ARC-Authentication-Results; bh=ROk+o+HMT2cJouWNGOdWm5hzjL4fVvXqBE3i+COSN4Q=; b=M5pmEjj/vEbkvNVJAYd/Ic1L51aSB5IwqSI9hEFoIBHRUIQBvTctzhGbtayH4kErMolnInyRa5U/orEWFPqlcn6FxksHW1h8BPSTWkrKF74PY/VqLip2OP/zFmwXJrOj8h1VcrABilzWNg38Y+ZQvN5eE6SVejxlXIJeZuq4Gdg= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; 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 1567923471075633.1124391000941; Sat, 7 Sep 2019 23:17:51 -0700 (PDT) Received: from localhost ([::1]:47166 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i6qWA-0004WU-CI for importer@patchew.org; Sun, 08 Sep 2019 02:17:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41809) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i6qUJ-0002mg-GL for qemu-devel@nongnu.org; Sun, 08 Sep 2019 02:15:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i6qUI-0002Rc-8T for qemu-devel@nongnu.org; Sun, 08 Sep 2019 02:15:51 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:35481) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i6qUI-0002RB-0y for qemu-devel@nongnu.org; Sun, 08 Sep 2019 02:15:50 -0400 Received: by mail-wr1-x434.google.com with SMTP id g7so10456731wrx.2 for ; Sat, 07 Sep 2019 23:15:49 -0700 (PDT) Received: from localhost.localdomain (251.red-88-10-102.dynamicip.rima-tde.net. [88.10.102.251]) by smtp.gmail.com with ESMTPSA id g201sm15616552wmg.34.2019.09.07.23.15.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Sep 2019 23:15:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ROk+o+HMT2cJouWNGOdWm5hzjL4fVvXqBE3i+COSN4Q=; b=kMdtP91JJGuUnYjZ1/7dM+wJ+zyHn0D9Jc+ASUYtPTuUpnSH1rQpxy1TPsNU3jGrVT 751GuuNTiINALoCtBthrEylePpn0Icc67y9WJbGiyzKNBNEDBOIyO6dWqFRC1wspQzK+ C0m8iIZuVbJvF6ubKqkjT6DzmsB2+G+pVv796tbeHeh1CIFLqWIadtfTHgMuz7ZiZ2ii NIkwG750BjdnRGnAS9u2DZn1MnyoeoEPyCaZ4t8PaCvo1RuV1poNGGXyDi3le3fcTmyR /Rhxadw0WFdB0YSgy7M1F+742X4wnNjylSYoUxZy+LfMapGTtjh/01sfgQuepUTKKhPp Y2RA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=ROk+o+HMT2cJouWNGOdWm5hzjL4fVvXqBE3i+COSN4Q=; b=GJUkB8xDxg8d2mIwt7ciXjr+nbjW+X2b75qaigwNkTejn5bikCUXoZcwFzhWNoA6Go J8fnuox0Pdufx8GwL5uPuA8Z10omF0j6B3sT3aznNgSLIwf4ruPBAAm6IWh5M3pX45kY XoEu9B1kke4w9YPrHiAR2IRRCWN53EyDfZm8Ah9OlpoufFb53LkmnLdJuyuB09B24XL6 RVF4PL8kFQ4A/KI4bnfzuDgGUB3Y+oKm66TGw1SYjJ8an6RLb+Lwug7TzU4z8q6pJV7l Q2sUIOv4kfd1ajAPalYXwPH50aCbFEW4LdXeANhL9C5yEmIqtpblbkZNZtbdMn6SSaoi uCXA== X-Gm-Message-State: APjAAAXhBudoR4N8O5q/rIsIaUTTQ3RKspXyf+kOlBd9JgfanCGH9yrI 1ApjHMFRdGhWGLgNKUWDi3JdDF8z X-Google-Smtp-Source: APXvYqyKwf9yNjn4CCdaKuNXsaFzZYUqMW/mMRrI0YIkv9ISAFFbPikqZgHZc7U1A5E6CiW/rgmydQ== X-Received: by 2002:adf:e603:: with SMTP id p3mr13362404wrm.102.1567923348898; Sat, 07 Sep 2019 23:15:48 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Date: Sun, 8 Sep 2019 08:15:38 +0200 Message-Id: <20190908061543.25136-4-f4bug@amsat.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190908061543.25136-1-f4bug@amsat.org> References: <20190908061543.25136-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::434 Subject: [Qemu-devel] [PATCH v6 3/8] linux-user/strace: Improve settimeofday() 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: =?UTF-8?q?Guido=20G=C3=BCnther?= , Riku Voipio , Laurent Vivier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Signed-off-by: Philippe Mathieu-Daud=C3=A9 Tested-By: Guido G=C3=BCnther Reviewed-by: Laurent Vivier --- linux-user/strace.c | 13 +++++++++++++ linux-user/strace.list | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index 5ee9d62c25..dcf843b360 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -1584,6 +1584,19 @@ print_futimesat(const struct syscallname *name, } #endif =20 +#ifdef TARGET_NR_settimeofday +static void +print_settimeofday(const struct syscallname *name, + abi_long arg0, abi_long arg1, abi_long arg2, + abi_long arg3, abi_long arg4, abi_long arg5) +{ + print_syscall_prologue(name); + print_timeval(arg0, 0); + print_timezone(arg1, 1); + print_syscall_epilogue(name); +} +#endif + #ifdef TARGET_NR_link static void print_link(const struct syscallname *name, diff --git a/linux-user/strace.list b/linux-user/strace.list index 63a946642d..1ff9168369 100644 --- a/linux-user/strace.list +++ b/linux-user/strace.list @@ -1345,7 +1345,7 @@ { TARGET_NR_set_tid_address, "set_tid_address" , NULL, NULL, NULL }, #endif #ifdef TARGET_NR_settimeofday -{ TARGET_NR_settimeofday, "settimeofday" , NULL, NULL, NULL }, +{ TARGET_NR_settimeofday, "settimeofday" , NULL, print_settimeofday, NULL = }, #endif #ifdef TARGET_NR_setuid { TARGET_NR_setuid, "setuid" , NULL, NULL, NULL }, --=20 2.20.1 From nobody Fri May 3 00:10:10 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; dkim=fail; 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=1567923513; cv=none; d=zoho.com; s=zohoarc; b=f7/PztazrXCWpeOZe5iQe566/qf58OBFvmihjZ9GaSq7YPdC1FNJez8JUBQgcSy4QZQgeqRlPa17+2AtSzrgpxNMo1Brf5ioHgpYYSi0oesnrKYwhGCTSTfrXXs+zOJ6mvrbmM3WPMNpWJidhJ9bKHF1Tcg8Qm7hxmRRjmztqFc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567923513; 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:ARC-Authentication-Results; bh=KlFoUbPbPZiP4pvhxHBf1+0jcfgH410uCz6LOEH3SZs=; b=n1F8HK7CR7HiUELVPMoLvltM2XyA8hEYuI2/x69LLDUFQZDB08S4NT5Lp23UvoSGpdF65Be367t80Gn6OkejJVnLeSo574SszF8OVLXZ1ST8VIsk/BjIWFd3r6Rf04Grx+jiBxB38jU+jMzEL5MddmdAQB8WWrrHyrspxNb6E3A= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; 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 156792351370831.352864312398992; Sat, 7 Sep 2019 23:18:33 -0700 (PDT) Received: from localhost ([::1]:47168 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i6qWu-0005d6-9d for importer@patchew.org; Sun, 08 Sep 2019 02:18:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41821) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i6qUK-0002mw-Ai for qemu-devel@nongnu.org; Sun, 08 Sep 2019 02:15:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i6qUJ-0002S7-6Y for qemu-devel@nongnu.org; Sun, 08 Sep 2019 02:15:52 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:43262) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i6qUI-0002Rt-W9 for qemu-devel@nongnu.org; Sun, 08 Sep 2019 02:15:51 -0400 Received: by mail-wr1-x443.google.com with SMTP id q17so5683789wrx.10 for ; Sat, 07 Sep 2019 23:15:50 -0700 (PDT) Received: from localhost.localdomain (251.red-88-10-102.dynamicip.rima-tde.net. [88.10.102.251]) by smtp.gmail.com with ESMTPSA id g201sm15616552wmg.34.2019.09.07.23.15.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Sep 2019 23:15:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KlFoUbPbPZiP4pvhxHBf1+0jcfgH410uCz6LOEH3SZs=; b=I/Y0YaGMILHA8UZK4Cx19K1VKhwsD8BSDBaqYNyBlbLl5qVWfig5ItERbLSbN4MIoq +Pu+m/KgukqIuml1QGrY4cbJ+zvoTnbkMaDR9VXAMmhXuXQ3hbtlDD/OaJBnhAwjPvhO QotlZfvGpH0W1D99RU/nKevKTe29VsBmTslDqNW5l6cfl/yx+RW27024doFz7Zk0nC6p +m9ezyBy0ojOpTo1y/jQRc2EQsEeC6m7sJxPsIuqIwXHAsoAthU7pkDzZ5Gpwmrn3CG/ 6exSTM3cIe3BfR1YbbYlMywikfEW5KsNa0o295IgEezywHCCuZpvu50pcDSzCdewbIUO 0wNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=KlFoUbPbPZiP4pvhxHBf1+0jcfgH410uCz6LOEH3SZs=; b=V0cctJugNUY9dXv3dV8GHMt9l3yE+rUu8x7BXIB3fX5otSUOs6lQ3T1W5aUjVbc5Gg iOOPfyreKLWVXMqh6LszCNfKSMNXAz6KmqUSaGqABaYZwtgngRZDp91rhYF0QCvo8akB djyvL7coNqcApgFVWaV7fMbh1Deh1SZeYxKhLSGSHQlhk73Sce/ilQoEA+AGsvO7Dgz0 0+J0Wh+8M1xd4Vw/TbyS2nMI/9Ijoh+9FWO6MXU4PNZBbc8HasIq+JXN24I4gPKuILjj 6NTOqFZqzcpVbRCtHyzx1p5gVUdf0wXzcSNhDjwBXIvAy2mb4mcX7SJBf8M8iTQoEKhb KoeA== X-Gm-Message-State: APjAAAWpnmi8wTCm0yBxqvD56hI3XoExgIqlH2qAMczgVUBggAc0VKGo unSJUcFLHjiAAo/gevfs8Rgyk6X8 X-Google-Smtp-Source: APXvYqzJpiaaFMMWtYgRwiyozx79yQbkQBC5a/RaGFDlHJb8+HLiHlinx6rs3NocvZTqvukEmfAjxQ== X-Received: by 2002:adf:fe07:: with SMTP id n7mr13961871wrr.90.1567923349925; Sat, 07 Sep 2019 23:15:49 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Date: Sun, 8 Sep 2019 08:15:39 +0200 Message-Id: <20190908061543.25136-5-f4bug@amsat.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190908061543.25136-1-f4bug@amsat.org> References: <20190908061543.25136-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::443 Subject: [Qemu-devel] [PATCH v6 4/8] linux-user/syscall: Introduce target_sockaddr_nl 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: =?UTF-8?q?Guido=20G=C3=BCnther?= , Riku Voipio , Laurent Vivier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Signed-off-by: Philippe Mathieu-Daud=C3=A9 Tested-By: Guido G=C3=BCnther --- linux-user/syscall.c | 6 ++++-- linux-user/syscall_defs.h | 7 +++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 8b41a03901..5128312db5 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -1494,8 +1494,10 @@ static inline abi_long host_to_target_sockaddr(abi_u= long target_addr, sizeof(target_saddr->sa_family)) { target_saddr->sa_family =3D tswap16(addr->sa_family); } - if (addr->sa_family =3D=3D AF_NETLINK && len >=3D sizeof(struct sockad= dr_nl)) { - struct sockaddr_nl *target_nl =3D (struct sockaddr_nl *)target_sad= dr; + if (addr->sa_family =3D=3D AF_NETLINK && + len >=3D sizeof(struct target_sockaddr_nl)) { + struct target_sockaddr_nl *target_nl =3D + (struct target_sockaddr_nl *)target_saddr; target_nl->nl_pid =3D tswap32(target_nl->nl_pid); target_nl->nl_groups =3D tswap32(target_nl->nl_groups); } else if (addr->sa_family =3D=3D AF_PACKET) { diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 0662270300..fcedd0d0fb 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -153,6 +153,13 @@ struct target_sockaddr_un { uint8_t sun_path[108]; }; =20 +struct target_sockaddr_nl { + uint16_t nl_family; /* AF_NETLINK */ + uint16_t __pad; + uint32_t nl_pid; + uint32_t nl_groups; +}; + struct target_in_addr { uint32_t s_addr; /* big endian */ }; --=20 2.20.1 From nobody Fri May 3 00:10:10 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; dkim=fail; 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=1567923659; cv=none; d=zoho.com; s=zohoarc; b=ZTbFXjqWTkRqaT4tEu9nvqf/KgprZ9+IWcqRH78ojtEu7DQJnqs4TStAJ9LpoB2eu4LS3yD/diWX60VIgkRWx7dD9sBTAoEejpucyj73lL0n91b7sdW9PSG/QKM/L3mzq7bteckj9+bCuZhETw96yLbdssV3Rq4mYAkb/zgSiM4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567923659; 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:ARC-Authentication-Results; bh=zL+JGwTWbnruC6Rrb4bH9cT15d2BHUEa74MGadYA6l0=; b=Qn9g6cDCyUcW0DnFFOqLXsHOdWkUG9QFkLpkpBnCpwiOPu0/3e3lZZQr89fNAEaV+9SAAv58NQLmTT7W+R5cNaQZEssMZu/uStwmMArFgwpU2FONuA3U3ol7bFYxUcD/izket2Hx7V7BrFHfBBidAYn2Gk23tS8/AZf4H/AZDmY= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; 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 1567923659711297.4680719551952; Sat, 7 Sep 2019 23:20:59 -0700 (PDT) Received: from localhost ([::1]:47196 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i6qZG-0000NC-LW for importer@patchew.org; Sun, 08 Sep 2019 02:20:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41833) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i6qUL-0002of-Gl for qemu-devel@nongnu.org; Sun, 08 Sep 2019 02:15:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i6qUK-0002Sh-7r for qemu-devel@nongnu.org; Sun, 08 Sep 2019 02:15:53 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:34518) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i6qUK-0002SN-09 for qemu-devel@nongnu.org; Sun, 08 Sep 2019 02:15:52 -0400 Received: by mail-wr1-x441.google.com with SMTP id a11so629419wrx.1 for ; Sat, 07 Sep 2019 23:15:51 -0700 (PDT) Received: from localhost.localdomain (251.red-88-10-102.dynamicip.rima-tde.net. [88.10.102.251]) by smtp.gmail.com with ESMTPSA id g201sm15616552wmg.34.2019.09.07.23.15.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Sep 2019 23:15:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zL+JGwTWbnruC6Rrb4bH9cT15d2BHUEa74MGadYA6l0=; b=Qrd6Gd2VsZhA4NLFMDqfzB8H7aJ2M6O4ciHlD0UxvrgvsSSBel+BMWWbTfldetY5jr 6Yem9g+Fl0GlM2AsM60Qh+6BWsgrygoAiNiwp62UwSt6v3U6tZf/0KW7xIAFpF+uxqTL RIZ0yILzTzIa67xLboviBfKgTiKkgH2mDQMgeSZ/h5aCxtKSny5QIYMR7x0XADjwPAWL N7hHcedsettyw5M3VLIhuezowwtsTp3LMIoK4fnLjUxKI88qHZOsSQT9/80kjWWx0NHs RJJM3Sh0R56bnC3KKX47sl6yLlrQFkQeSL7z2VLP9pSNiAhf8z3k4t7KRPeWHSgLSUhy /8sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=zL+JGwTWbnruC6Rrb4bH9cT15d2BHUEa74MGadYA6l0=; b=lxJdFvnUuj48+Lh1xHohuvF+xd7a3qWjVKgv07VZuyVKYlA1aifwoJdEXbSYi2r216 VFIifejLUPER5R5EEzq2opiTsW9RIqOf7Stc9X2+ffqmW8FB77lXAGgzNQSP7j6GVe5z xiozU/HFF2/eT5WbU7Zg8BO8RZ8LJ2xYULUES/LEDhutd8LPAmrkM4LG85iqee1juay2 bVJecbM05REenhRD0J/17HCu68dCDzpWbMpmujP1ztB9FNEAA8c7NqoBmibMK7olC3Q/ TmfjBTdBDxqqxjwYAb++rkot9yTVYXLHurXIBvn8xLCOLjGbRtUGo4vRPBIfoAafq5rq qyFA== X-Gm-Message-State: APjAAAUM21Z27UZzt0qwkB3bjySJ8C4dqcC3hWjJLtesVCkCPPAPcQOD hjk/U3MLC8rA7WpY7yr9GK6IWJ3N X-Google-Smtp-Source: APXvYqwDv7Fvth0Vg2DcMGmyEFv0ilizpWnbpajZ58gX+Pe8F7B+WnrpSUBXQDbaaF/VMWoBOYUDAQ== X-Received: by 2002:adf:8b13:: with SMTP id n19mr10555160wra.203.1567923350938; Sat, 07 Sep 2019 23:15:50 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Date: Sun, 8 Sep 2019 08:15:40 +0200 Message-Id: <20190908061543.25136-6-f4bug@amsat.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190908061543.25136-1-f4bug@amsat.org> References: <20190908061543.25136-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::441 Subject: [Qemu-devel] [PATCH v6 5/8] linux-user/strace: Dump AF_NETLINK sockaddr content 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: =?UTF-8?q?Guido=20G=C3=BCnther?= , Riku Voipio , Laurent Vivier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Signed-off-by: Philippe Mathieu-Daud=C3=A9 Tested-By: Guido G=C3=BCnther --- linux-user/strace.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/linux-user/strace.c b/linux-user/strace.c index dcf843b360..77d7f6a97a 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include "qemu.h" =20 @@ -398,6 +399,12 @@ print_sockaddr(abi_ulong addr, abi_long addrlen) gemu_log("}"); break; } + case AF_NETLINK: { + struct target_sockaddr_nl *nl =3D (struct target_sockaddr_nl *= )sa; + gemu_log("{nl_family=3DAF_NETLINK,nl_pid=3D%u,nl_groups=3D%u}", + nl->nl_pid, nl->nl_groups); + break; + } default: gemu_log("{sa_family=3D%d, sa_data=3D{", sa->sa_family); for (i =3D 0; i < 13; i++) { @@ -424,6 +431,9 @@ print_socket_domain(int domain) case PF_INET: gemu_log("PF_INET"); break; + case PF_NETLINK: + gemu_log("PF_NETLINK"); + break; case PF_PACKET: gemu_log("PF_PACKET"); break; @@ -473,6 +483,33 @@ print_socket_protocol(int domain, int type, int protoc= ol) return; } =20 + if (domain =3D=3D PF_NETLINK) { + switch (protocol) { + case NETLINK_ROUTE: + gemu_log("NETLINK_ROUTE"); + break; + case NETLINK_AUDIT: + gemu_log("NETLINK_AUDIT"); + break; + case NETLINK_NETFILTER: + gemu_log("NETLINK_NETFILTER"); + break; + case NETLINK_KOBJECT_UEVENT: + gemu_log("NETLINK_KOBJECT_UEVENT"); + break; + case NETLINK_RDMA: + gemu_log("NETLINK_RDMA"); + break; + case NETLINK_CRYPTO: + gemu_log("NETLINK_CRYPTO"); + break; + default: + gemu_log("%d", protocol); + break; + } + return; + } + switch (protocol) { case IPPROTO_IP: gemu_log("IPPROTO_IP"); --=20 2.20.1 From nobody Fri May 3 00:10:10 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; dkim=fail; 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=1567923718; cv=none; d=zoho.com; s=zohoarc; b=WiQPbfaY4EG+yAjJuxrTNLCHhJNWPfMG0GVUwJGWqTjdTgfoKUuF7/vpUOxY2i2dBapoujuYfCoNWfV5w5l1Gdu6sSNmLPr6kSarZEvjNzHABD5I5VDarFy9GmTWXgDggtZgh54+suUZxwFG39yPLEgtReIga9Eft2zaASQcflg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567923718; 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:ARC-Authentication-Results; bh=zuGhKIpIYrZ0cZDnAjpPq44Q1ATbBUKEKB1AIlgvvW4=; b=BNw/feG7chxNitYkveM3Tdvp8oO+oX7gszyH6ka2wDru7rx7yIYq2qH1Hb//wgVdc26JUnR6hwQ7uEQMCaeHyHrz3K3Gbp6beHJSjMON1AksPCc90EEbo7jSqWzqPFnRfxuJZjKOL/KDWwfxVVX34dxtyHPGofIDWdabW38ObDo= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; 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 1567923718806573.9060434269287; Sat, 7 Sep 2019 23:21:58 -0700 (PDT) Received: from localhost ([::1]:47204 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i6qaD-0001Fh-Ha for importer@patchew.org; Sun, 08 Sep 2019 02:21:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41861) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i6qUN-0002rU-3m for qemu-devel@nongnu.org; Sun, 08 Sep 2019 02:15:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i6qUL-0002T7-AU for qemu-devel@nongnu.org; Sun, 08 Sep 2019 02:15:54 -0400 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:38656) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i6qUL-0002Ss-3X for qemu-devel@nongnu.org; Sun, 08 Sep 2019 02:15:53 -0400 Received: by mail-wm1-x341.google.com with SMTP id o184so11102080wme.3 for ; Sat, 07 Sep 2019 23:15:53 -0700 (PDT) Received: from localhost.localdomain (251.red-88-10-102.dynamicip.rima-tde.net. [88.10.102.251]) by smtp.gmail.com with ESMTPSA id g201sm15616552wmg.34.2019.09.07.23.15.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Sep 2019 23:15:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zuGhKIpIYrZ0cZDnAjpPq44Q1ATbBUKEKB1AIlgvvW4=; b=mj9+xCD3fvB2SOvhXklzxHHe97J+r8Fcee7YFnTHp6CiFDsH0QIJlC0iIV/rmsReRj oVe1azeaWxC+mMmotujE8FvGH+OcXudvd4TZXzXP+GhzoFSKG6o8eoDsx0EOdi2MDsDh zMNqQyGWbq6T7XKlpCknRSjmVucxDy79KjPXlWDOROm1ra+9jElcwaXjfRhf07bKseYm dU7pGQ6IlT+yaddavzTrZJGL64ycWaMeo6L3dhBzIw7RWZ/uhcBT5F8TFsfAjC2P5m6L T/XQIdzSCkpxMc9PPYh+SJ9xUBtM4kcOGVR71mhxr7amZ9OwST159krfsrBCb/nmoKL5 FAwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=zuGhKIpIYrZ0cZDnAjpPq44Q1ATbBUKEKB1AIlgvvW4=; b=L3i6DgvDaRDKQi860dr4aNFYO/gBRjg+S0cAWUk1qxS1ha/SRFo9TyTZnUvDGlqTlJ CnWpW1bB897skzRXGAC+KE0WuIR3lnCYAOUFdaJMskH9o6kzUcdx8w0zZcD6eH8LXVml Km3nBKnBGzcbv6vJj7DPJ0u7dZYchsWNz5VS3Ox0LWN3TZX+6VXUESA9ItRrbb3HsaG/ eRZ6lBHYjh10DGUsqc5Zj0LOaJA/maOzWfqZzUxfxd+SpNXjq0iWVX7Rg2KCnC5ZqLE1 9gnMevriFsGdv+g9mY+JH9xuDVWZH77VLNcv9USzPH6M4ZbvMgRevwYLs55XTz8Hf0bL Z/2g== X-Gm-Message-State: APjAAAWjO7QxqtnECeBOnzvwM8pvDdWmBeYtlyoK0G5PkQ0G6+QWBp1W HzOdp9NL/vi2xHPRHnyUVeA+cBdb X-Google-Smtp-Source: APXvYqzUfuIjJIMvJ2fY+Mo6DrZUj4cHCCQO+ntYkHusW8aEMINLIKGPQ+XQebMLt5LjwCpSS2BKAQ== X-Received: by 2002:a05:600c:2151:: with SMTP id v17mr14105555wml.69.1567923352040; Sat, 07 Sep 2019 23:15:52 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Date: Sun, 8 Sep 2019 08:15:41 +0200 Message-Id: <20190908061543.25136-7-f4bug@amsat.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190908061543.25136-1-f4bug@amsat.org> References: <20190908061543.25136-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::341 Subject: [Qemu-devel] [PATCH v6 6/8] linux-user/strace: Add print_sockfd() 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: =?UTF-8?q?Guido=20G=C3=BCnther?= , Riku Voipio , Laurent Vivier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Extract common print_sockfd() from various socket related syscalls. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- v6: use another ifdef TARGET_NR_socketcall --- linux-user/strace.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index 77d7f6a97a..8a1df12e67 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -1710,6 +1710,15 @@ print_socket(const struct syscallname *name, =20 #if defined(TARGET_NR_socketcall) =20 +static void print_sockfd(abi_long sockfd, int last) +{ + print_raw_param(TARGET_ABI_FMT_ld, sockfd, last); +} + +#endif + +#if defined(TARGET_NR_socketcall) + #define get_user_ualx(x, gaddr, idx) \ get_user_ual(x, (gaddr) + (idx) * sizeof(abi_long)) =20 @@ -1742,7 +1751,7 @@ static void do_print_sockaddr(const char *name, abi_l= ong arg1) get_user_ualx(addrlen, arg1, 2); =20 gemu_log("%s(", name); - print_raw_param(TARGET_ABI_FMT_ld, sockfd, 0); + print_sockfd(sockfd, 0); print_sockaddr(addr, addrlen); gemu_log(")"); } @@ -1755,7 +1764,7 @@ static void do_print_listen(const char *name, abi_lon= g arg1) get_user_ualx(backlog, arg1, 1); =20 gemu_log("%s(", name); - print_raw_param(TARGET_ABI_FMT_ld, sockfd, 0); + print_sockfd(sockfd, 0); print_raw_param(TARGET_ABI_FMT_ld, backlog, 1); gemu_log(")"); } @@ -1790,7 +1799,7 @@ static void do_print_sendrecv(const char *name, abi_l= ong arg1) get_user_ualx(flags, arg1, 3); =20 gemu_log("%s(", name); - print_raw_param(TARGET_ABI_FMT_ld, sockfd, 0); + print_sockfd(sockfd, 0); print_buf(msg, len, 0); print_raw_param(TARGET_ABI_FMT_ld, len, 0); print_flags(msg_flags, flags, 1); @@ -1809,7 +1818,7 @@ static void do_print_msgaddr(const char *name, abi_lo= ng arg1) get_user_ualx(addrlen, arg1, 5); =20 gemu_log("%s(", name); - print_raw_param(TARGET_ABI_FMT_ld, sockfd, 0); + print_sockfd(sockfd, 0); print_buf(msg, len, 0); print_raw_param(TARGET_ABI_FMT_ld, len, 0); print_flags(msg_flags, flags, 0); @@ -1825,7 +1834,7 @@ static void do_print_shutdown(const char *name, abi_l= ong arg1) get_user_ualx(how, arg1, 1); =20 gemu_log("shutdown("); - print_raw_param(TARGET_ABI_FMT_ld, sockfd, 0); + print_sockfd(sockfd, 0); switch (how) { case SHUT_RD: gemu_log("SHUT_RD"); @@ -1852,7 +1861,7 @@ static void do_print_msg(const char *name, abi_long a= rg1) get_user_ualx(flags, arg1, 2); =20 gemu_log("%s(", name); - print_raw_param(TARGET_ABI_FMT_ld, sockfd, 0); + print_sockfd(sockfd, 0); print_pointer(msg, 0); print_flags(msg_flags, flags, 1); gemu_log(")"); @@ -1869,7 +1878,7 @@ static void do_print_sockopt(const char *name, abi_lo= ng arg1) get_user_ualx(optlen, arg1, 4); =20 gemu_log("%s(", name); - print_raw_param(TARGET_ABI_FMT_ld, sockfd, 0); + print_sockfd(sockfd, 0); switch (level) { case SOL_TCP: gemu_log("SOL_TCP,"); --=20 2.20.1 From nobody Fri May 3 00:10:10 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; dkim=fail; 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=1567923588; cv=none; d=zoho.com; s=zohoarc; b=j00Xx64G/Mi6Q6nL9z6DCPvZgwtLqfbVPWD8qsN82xp6537gtcsvpYXaUUhBAaJKmx/kf4pBNXtrPbTco7QJBV3JdBQ5nGnUbxsnF+zSnShjqP4uYkgNWew5knFGMpVI8oiJsPxtpqR8HkacQkxKDF4ABP4DDYxsd2DHYttjkZc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567923588; 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:ARC-Authentication-Results; bh=BJIzbQfX7Qshpa375lFrVbD2cYPQAWdO4ETlc0n+5+0=; b=Kb4ayCczyPSxUYsmCeB47T3UY9l6ZnCVav8CnqrVbPFl6Vbl8+M/v0BOhHWBgrjMnABQ8LkbVmZ0R3DuFwJsx+ltB4TiomwM2xKHKRdXHz+tZFGgpRxvtXck90QMK1ZMGOt6V1arv0x4Yrbj3JMaawxh1/8UTLoBMQ3UaHzdvBU= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; 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 1567923588075299.32957392249796; Sat, 7 Sep 2019 23:19:48 -0700 (PDT) Received: from localhost ([::1]:47188 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i6qY6-0007N9-Vc for importer@patchew.org; Sun, 08 Sep 2019 02:19:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41866) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i6qUN-0002sJ-K2 for qemu-devel@nongnu.org; Sun, 08 Sep 2019 02:15:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i6qUM-0002Tx-ER for qemu-devel@nongnu.org; Sun, 08 Sep 2019 02:15:55 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:55295) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i6qUM-0002TM-7z for qemu-devel@nongnu.org; Sun, 08 Sep 2019 02:15:54 -0400 Received: by mail-wm1-x342.google.com with SMTP id k2so10292375wmj.4 for ; Sat, 07 Sep 2019 23:15:54 -0700 (PDT) Received: from localhost.localdomain (251.red-88-10-102.dynamicip.rima-tde.net. [88.10.102.251]) by smtp.gmail.com with ESMTPSA id g201sm15616552wmg.34.2019.09.07.23.15.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Sep 2019 23:15:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BJIzbQfX7Qshpa375lFrVbD2cYPQAWdO4ETlc0n+5+0=; b=FtCUmK4uBd9gRjhauIen6xjX+YtWczC/JCSn3g/lAKO9vuhnQKCJ0NHakFGQafw6Yj U2ITX2g3e1LrDjjrzT/zxZ5sKU+fPdp0DhhUtqWP3xOpMJA5jiz/Ao3XdRr/Rwj7oxIN j+jjf67c78eefIbdRpgZq1SqIuUrrVYVMrCuM0y6Lq9JzJubeJaX/GR8iHe0XmbaPYiK 1DiRw+hS1bJufwMbqn08u9c9Xl4xFGYY1COyRgpIYLeVZsKyCYByHWFJbEIf7MwSxWeX RgMbPYlLyMIYIw8ULb/HXZAsD4l74IEdQ4Q4cSCvY/Lj/CgssObBhl5X/nEsx2J35SLY 2upQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=BJIzbQfX7Qshpa375lFrVbD2cYPQAWdO4ETlc0n+5+0=; b=OPw0glMfnR3YMdvX2XgksozhALc929zO0yjkj+/3ODWR5cxT1BSbIEaxVPoL2A1r6R c6RXa7Ay1ltrCijIEKu+NgNfwc8W3vb+IUI9Y3sR6P0d66B9q/H0o17vXaRKdOOs1tki fxoBFI6Jyq1N/ieTe6OTHNydta+EUzD7oo0OHZ8YpOzoUULGMgTBGt3gxn6uZF6XukfC qehpnxBNweuiGjCQsqaGtn1r8J0Q4yIZt/xbarXHbkPROc1HQ1maqsicB+sxRKghxG3D q2Oqm9seE6yC0eXEgY/dPaWyYp5j+5Dm1wexG6sNW5lBErBd6Qq/qP+OTBGFgxNaHqgH k0iA== X-Gm-Message-State: APjAAAXT5qBbw4vot3LP7FBhL8AcPuAv3vE8ZJLBWCqmEgJTwXt+BBaw UYE0mlautN+u1OTyfcnEpQ0PXiKN X-Google-Smtp-Source: APXvYqyAoovqFgd7oHBx9w2nv031JAJ7SB6b3Qnk39jehDYpbalDVR7+FXX6WGRpnUspqf00qiujXg== X-Received: by 2002:a1c:a003:: with SMTP id j3mr13639825wme.42.1567923353102; Sat, 07 Sep 2019 23:15:53 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Date: Sun, 8 Sep 2019 08:15:42 +0200 Message-Id: <20190908061543.25136-8-f4bug@amsat.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190908061543.25136-1-f4bug@amsat.org> References: <20190908061543.25136-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::342 Subject: [Qemu-devel] [PATCH v6 7/8] linux-user/strace: Improve bind() output 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: =?UTF-8?q?Guido=20G=C3=BCnther?= , Riku Voipio , Laurent Vivier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Signed-off-by: Philippe Mathieu-Daud=C3=A9 Tested-By: Guido G=C3=BCnther --- v6: use TARGET_NR_socketcall || TARGET_NR_bind (lvivier) --- linux-user/strace.c | 15 ++++++++++++++- linux-user/strace.list | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index 8a1df12e67..a1e971ac8a 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -1708,7 +1708,7 @@ print_socket(const struct syscallname *name, =20 #endif =20 -#if defined(TARGET_NR_socketcall) +#if defined(TARGET_NR_socketcall) || defined(TARGET_NR_bind) =20 static void print_sockfd(abi_long sockfd, int last) { @@ -2055,6 +2055,19 @@ print_socketcall(const struct syscallname *name, } #endif =20 +#if defined(TARGET_NR_bind) +static void +print_bind(const struct syscallname *name, + abi_long arg0, abi_long arg1, abi_long arg2, + abi_long arg3, abi_long arg4, abi_long arg5) +{ + print_syscall_prologue(name); + print_sockfd(arg0, 0); + print_sockaddr(arg1, arg2, 1); + print_syscall_epilogue(name); +} +#endif + #if defined(TARGET_NR_stat) || defined(TARGET_NR_stat64) || \ defined(TARGET_NR_lstat) || defined(TARGET_NR_lstat64) static void diff --git a/linux-user/strace.list b/linux-user/strace.list index 1ff9168369..957aa720af 100644 --- a/linux-user/strace.list +++ b/linux-user/strace.list @@ -41,7 +41,7 @@ { TARGET_NR_bdflush, "bdflush" , NULL, NULL, NULL }, #endif #ifdef TARGET_NR_bind -{ TARGET_NR_bind, "bind" , NULL, NULL, NULL }, +{ TARGET_NR_bind, "bind" , NULL, print_bind, NULL }, #endif #ifdef TARGET_NR_bpf { TARGET_NR_bpf, "bpf" , NULL, NULL, NULL }, --=20 2.20.1 From nobody Fri May 3 00:10:10 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; dkim=fail; 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=1567923796; cv=none; d=zoho.com; s=zohoarc; b=SWyG0ogjYrpD/0TC0FVM6a9t1zKbplz+lD2hhRcK1FwT/KYglZowKq/tr2Vt6LprOoULpQaH96xNX/rVf5nzWFZTuVwMrCLKCuWvSHNH7sqfFyiTZLJUvo58q3J/srqkQH9d198lhQ9e5PxgczDpX5qm9FMfXV0OamL7hPJqh+c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567923796; 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:ARC-Authentication-Results; bh=8mg012TbrBH7IitXy+GojEIbhI2BLUInMejCjfV2448=; b=LG46n8GYTwhHmmi8Rh93gR6xt6jDXKgzah/DO7+UPE2G9YS4eqm/J2QYKuAhfQ2URCnfVjpFYaxpLD4kCIL+/MmO4PSW1KQlHWtm/v4IBsNZ9KPjZDIyOISFhEBb7T5vEmNPSOc8msLCa7OBtHJ3EeUM5E6q7C9ywEIRFnorsnI= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; 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 1567923796191141.70305470441087; Sat, 7 Sep 2019 23:23:16 -0700 (PDT) Received: from localhost ([::1]:47210 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i6qbM-0002AK-0u for importer@patchew.org; Sun, 08 Sep 2019 02:23:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41881) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i6qUP-0002uL-0i for qemu-devel@nongnu.org; Sun, 08 Sep 2019 02:15:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i6qUN-0002Uo-L0 for qemu-devel@nongnu.org; Sun, 08 Sep 2019 02:15:56 -0400 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:39833) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i6qUN-0002U5-Br for qemu-devel@nongnu.org; Sun, 08 Sep 2019 02:15:55 -0400 Received: by mail-wm1-x343.google.com with SMTP id q12so11125468wmj.4 for ; Sat, 07 Sep 2019 23:15:55 -0700 (PDT) Received: from localhost.localdomain (251.red-88-10-102.dynamicip.rima-tde.net. [88.10.102.251]) by smtp.gmail.com with ESMTPSA id g201sm15616552wmg.34.2019.09.07.23.15.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Sep 2019 23:15:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8mg012TbrBH7IitXy+GojEIbhI2BLUInMejCjfV2448=; b=s4p+9Lm3hwA6HUSfys6tJszvERkFrsdPkw2ttOEysl3xlZ3YYkSRid1l96IFwDnqM5 3qCiCvTYhi7NGjuNcQpRDlB80b8cAMFDDfSPcVAVOdWggW0MhuAXmbAZrnpq8qPo4rHi d8mnR5cq4BrcQ3MdJfXH9KIWVXTUVf44AyIsnoiLH6X3gmAoUOI1PNPOhcMxmQ1wLc2C nOv5fs01OyjoQPtRikIEr0Yw/lHazrXQS18sgsk/UrxpKxLY2aF/euNm9OKbC4mS6UiF HilIdeimHGuO59zDngPQdwa+YwMpdGZ0VaORrWdeU2chcy7r7fTZ8Iz46SXaoJ8RLxiJ Bpiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=8mg012TbrBH7IitXy+GojEIbhI2BLUInMejCjfV2448=; b=GWMYrhOy198V3ggn0631x5oz0J7j2wj47Eu7YFmdbKhY46VLH0zFlA5riyyzydXVYQ WS/Bu3LCLP9Llci+BudWSNPg0v72ALzMLcaS4BGJ8n7JoNEgdX4JM5uN9rp8xwmo01Ai d2wRPoDJ6yfg/BfdpEsNMgMYnsl4/5mR9ZpXXdmPxE7mDOZEfuTQgpxD6nmRNuv34vs2 AtWdoD7sqPKt8nECIvGhjneyrh1jId4cRgvtrTeE0HC2y8emRRQ+mC3goRvCllRXP2yq nKchE+XQSVSYFtygWDF7bH8yEsRN6JOQtJgNhORftdzZ7YFNvqZqEowx0xF96967OGA6 CkVQ== X-Gm-Message-State: APjAAAUEy6phm6Y0tObqkX9s1VCH1NcPm8vjIEriRNJ4UuS3A8SpGlrZ pCDy8+ezNud6nn3E9qwWDVRJlVsQ X-Google-Smtp-Source: APXvYqwVtAb/Z53K4q8Qmcg5QAhgZJUyZcjiXKhccz1EfVr73ilcj2fKz4USZ1sJ5bUUwvhoG12djA== X-Received: by 2002:a1c:7214:: with SMTP id n20mr12936695wmc.160.1567923354110; Sat, 07 Sep 2019 23:15:54 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Date: Sun, 8 Sep 2019 08:15:43 +0200 Message-Id: <20190908061543.25136-9-f4bug@amsat.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190908061543.25136-1-f4bug@amsat.org> References: <20190908061543.25136-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::343 Subject: [Qemu-devel] [PATCH v6 8/8] linux-user/strace: Let print_sockaddr() have a 'last' argument 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: =?UTF-8?q?Guido=20G=C3=BCnther?= , Riku Voipio , Laurent Vivier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) If the format is not the syscall last argument, a comma is append. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Laurent Vivier --- checkpatch error: ERROR: storage class should be at the beginning of the declaration --- linux-user/strace.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index a1e971ac8a..a297f59efd 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -67,7 +67,7 @@ UNUSED static void print_timeval(abi_ulong, int); UNUSED static void print_timezone(abi_ulong, int); UNUSED static void print_number(abi_long, int); UNUSED static void print_signal(abi_ulong, int); -UNUSED static void print_sockaddr(abi_ulong addr, abi_long addrlen); +UNUSED static void print_sockaddr(abi_ulong addr, abi_long addrlen, int); UNUSED static void print_socket_domain(int domain); UNUSED static void print_socket_type(int type); UNUSED static void print_socket_protocol(int domain, int type, int protoco= l); @@ -336,7 +336,7 @@ static void print_siginfo(const target_siginfo_t *tinfo) } =20 static void -print_sockaddr(abi_ulong addr, abi_long addrlen) +print_sockaddr(abi_ulong addr, abi_long addrlen, int last) { struct target_sockaddr *sa; int i; @@ -418,7 +418,7 @@ print_sockaddr(abi_ulong addr, abi_long addrlen) } else { print_raw_param("0x"TARGET_ABI_FMT_lx, addr, 0); } - gemu_log(", "TARGET_ABI_FMT_ld, addrlen); + gemu_log(", "TARGET_ABI_FMT_ld"%s", addrlen, get_comma(last)); } =20 static void @@ -1752,7 +1752,7 @@ static void do_print_sockaddr(const char *name, abi_l= ong arg1) =20 gemu_log("%s(", name); print_sockfd(sockfd, 0); - print_sockaddr(addr, addrlen); + print_sockaddr(addr, addrlen, 0); gemu_log(")"); } =20 @@ -1822,7 +1822,7 @@ static void do_print_msgaddr(const char *name, abi_lo= ng arg1) print_buf(msg, len, 0); print_raw_param(TARGET_ABI_FMT_ld, len, 0); print_flags(msg_flags, flags, 0); - print_sockaddr(addr, addrlen); + print_sockaddr(addr, addrlen, 0); gemu_log(")"); } =20 --=20 2.20.1