From patchwork Wed May 31 13:08:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 100754 Delivered-To: patch@linaro.org Received: by 10.182.202.35 with SMTP id kf3csp295953obc; Wed, 31 May 2017 06:15:28 -0700 (PDT) X-Received: by 10.55.191.67 with SMTP id p64mr26856831qkf.149.1496236528400; Wed, 31 May 2017 06:15:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496236528; cv=none; d=google.com; s=arc-20160816; b=q654Xvdioo4maoGuuIzEJhWHKf6ZI3llcuo48YvMmf4FSrh7ndP9gAFfTLii4dq7RY c5usmfObuFCeUdl0bW07ZNoY8VCBLMusJ1bs2O13qxAFy7Q5eFMsYBTZeuN4OgqkoGNC 7Rz8gf/j8EF3T/GmgSYps/ksW5Cj8yDSMbtnIkZqj+PwoOCUdjDHIStIZwhU+tCtir1g 3MxRy9yb8bnPImnb3rxPdVdcMn77/PBRjs6sEYHFQMQip7qoTn5G/3NUi6ntLjkpDxjU 8qpiKqR7PfaucGWHVKngHFdmyjWfFp9wXCVkHXWR62EbdNRkcZls3s8WCfnlNBF8ASr6 iXTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=1sqJrBDYbuJa0uualACoBSo1gpEb7VBM+FM+6yBoJ7I=; b=FTNSsLwp2CC3WT0MMjjgI3UYYWy0VvelJu7v3gnU13sQCIsIldQayGZYy0bhcMi6/a ra2l5VzxSiq7vzcWeDFacwmIW1yxwIR5/9Ju6Ej+i+UQpwy+w8hyDgMXw351/l5gnAvc UISiutR87y2ZZR8LIUPgUWkHHhHGglY2pdTOnoMwUfp2goeNhsHc8+jXFkMtwwYRVAo5 0NjLLvrBFJVoRd12FwHV7VAov66FdmABs8Rs3yIjzu7KEi5F/6EW9eRbtBaGiqMv5KWU SXWtS1H4OKLCIQOLGBOatPVDUniBuUWwz6ybS8ooT+iTy5RB/xAvv4QriiWj1dG4QbfT oUtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id r2si16357281qtc.37.2017.05.31.06.15.27 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 31 May 2017 06:15:28 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:59349 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dG3TB-0004g3-PY for patch@linaro.org; Wed, 31 May 2017 09:15:25 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36780) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dG3Mj-0007Yh-Ep for qemu-devel@nongnu.org; Wed, 31 May 2017 09:08:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dG3Mh-0003eE-2D for qemu-devel@nongnu.org; Wed, 31 May 2017 09:08:45 -0400 Received: from mail-lf0-x235.google.com ([2a00:1450:4010:c07::235]:33162) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dG3Mg-0003e2-Rb for qemu-devel@nongnu.org; Wed, 31 May 2017 09:08:43 -0400 Received: by mail-lf0-x235.google.com with SMTP id m18so8645909lfj.0 for ; Wed, 31 May 2017 06:08:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1sqJrBDYbuJa0uualACoBSo1gpEb7VBM+FM+6yBoJ7I=; b=VAKi4G4Q2hsSQ0zDIngohXLI4Fh+bsqL+IssmX24u1o8eyK9UEvi3eBwZ1IB3Tjmii XPwcFPnui+zG41/tCY+KXYGJlkLH34+RG559bSHqqdqAZAUuQ0TxxPhYHZdZkltG9BMK MaMQzNBzlZyWm/oyoowEduewYInplAKTlRibo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1sqJrBDYbuJa0uualACoBSo1gpEb7VBM+FM+6yBoJ7I=; b=m7OER2nKa+cp3H5THfmoDaScY7yPGKpyU10/uLAGSWDrziJsM9A3lyWJcm2ptlUWzM odwgJ4v5VhFsVBbbigm10KkD886RoRzMj5Z6fOXlkdmn+DFKA7mau/EYuPlWtOnIY3iP vnCPOQtTeh9BaJ5w2omqae2KCAJzgEr3NKtsaQcmaVtBay1uvuwHynoD+RLnK3/aDGaO i+ZG3VwFWZApw478ZY3qlX03qFPLexW80BM3rM9U8MgJSe1muNc7aX/J0Tpv21IrLANR T0lF8JInhBaNSuX1XT09ZnLZtbNbC9jw321bvBgscYnni39JJqJsioJEs9EedOueTNlz eZCg== X-Gm-Message-State: AODbwcDeSIzWmIiGU2Ri3rIj8s6d5IMfKJo0Ss9RSSINlH9qUc/YEhSb miPGhtIwcGAhGzXyQfMkZQ== X-Received: by 10.46.76.18 with SMTP id z18mr8359227lja.9.1496236121293; Wed, 31 May 2017 06:08:41 -0700 (PDT) Received: from localhost.localdomain (91-157-170-157.elisa-laajakaista.fi. [91.157.170.157]) by smtp.gmail.com with ESMTPSA id o101sm3741766lfg.3.2017.05.31.06.08.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 May 2017 06:08:40 -0700 (PDT) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Wed, 31 May 2017 16:08:19 +0300 Message-Id: <65424cc45696768442c684c1202d21b7f73f1156.1496234766.git.riku.voipio@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::235 Subject: [Qemu-devel] [PULL 07/15] linux-user: add strace for getuid(), gettid(), getppid(), geteuid() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, =?utf-8?b?TWlsb8WhIFN0b2phbm92acSH?= , stefanha@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Miloš Stojanović Improve strace support for syscalls getuid(), gettid(), getppid() and geteuid(). Since these system calls don't have arguments, "%s()" is added in the corresponding strace.list entry so that no arguments are printed. getuid: Prior to this commit, typical strace output used to look like this: 4894 getuid(4894,0,0,274886293296,-3689348814741910323,4832615904) = 1000 After this commit, it looks like this: 4894 getuid() = 1000 gettid: Prior to this commit, typical strace output used to look like this: 8307 gettid(0,0,64,0,4832630528,4832615840) = 8307 After this commit, it looks like this: 8307 gettid() = 8307 getppid: Prior to this commit, typical strace output used to look like this: 20588 getppid(20588,64,0,4832630528,4832615888,0) = 20625 After this commit, it looks like this: 20588 getppid() = 20625 geteuid: Prior to this commit, typical strace output used to look like this: 20588 geteuid(64,0,0,4832615888,0,-9151031864016699136) = 1000 After this commit, it looks like this: 20588 geteuid() = 1000 Signed-off-by: Miloš Stojanović Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Riku Voipio --- linux-user/strace.list | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.11.0 diff --git a/linux-user/strace.list b/linux-user/strace.list index 3b1282ec1a..6e33788a17 100644 --- a/linux-user/strace.list +++ b/linux-user/strace.list @@ -290,7 +290,7 @@ { TARGET_NR_getegid32, "getegid32" , NULL, NULL, NULL }, #endif #ifdef TARGET_NR_geteuid -{ TARGET_NR_geteuid, "geteuid" , NULL, NULL, NULL }, +{ TARGET_NR_geteuid, "geteuid" , "%s()", NULL, NULL }, #endif #ifdef TARGET_NR_geteuid32 { TARGET_NR_geteuid32, "geteuid32" , NULL, NULL, NULL }, @@ -338,7 +338,7 @@ { TARGET_NR_getpmsg, "getpmsg" , NULL, NULL, NULL }, #endif #ifdef TARGET_NR_getppid -{ TARGET_NR_getppid, "getppid" , NULL, NULL, NULL }, +{ TARGET_NR_getppid, "getppid" , "%s()", NULL, NULL }, #endif #ifdef TARGET_NR_getpriority { TARGET_NR_getpriority, "getpriority", "%s(%#x,%#x)", NULL, NULL }, @@ -381,13 +381,13 @@ NULL, NULL }, #endif #ifdef TARGET_NR_gettid -{ TARGET_NR_gettid, "gettid" , NULL, NULL, NULL }, +{ TARGET_NR_gettid, "gettid" , "%s()", NULL, NULL }, #endif #ifdef TARGET_NR_gettimeofday { TARGET_NR_gettimeofday, "gettimeofday" , NULL, NULL, NULL }, #endif #ifdef TARGET_NR_getuid -{ TARGET_NR_getuid, "getuid" , NULL, NULL, NULL }, +{ TARGET_NR_getuid, "getuid" , "%s()", NULL, NULL }, #endif #ifdef TARGET_NR_getuid32 { TARGET_NR_getuid32, "getuid32" , NULL, NULL, NULL },