diff --git a/kernel.spec b/kernel.spec index 79be57bf3..843f9f55f 100644 --- a/kernel.spec +++ b/kernel.spec @@ -51,7 +51,7 @@ Summary: The Linux kernel # For non-released -rc kernels, this will be prepended with "0.", so # for example a 3 here will become 0.3 # -%global baserelease 2 +%global baserelease 3 %global fedora_build %{baserelease} # base_sublevel is the kernel version we're starting with and patching @@ -1899,6 +1899,9 @@ fi # and build. %changelog +* Mon Aug 08 2011 Josh Boyer +- Bring in utrace fixes davej applied to f15. (rhbz 728379) + * Fri Aug 05 2011 Josh Boyer - Adjust Makefile munging for new 3.x numbering scheme diff --git a/utrace.patch b/utrace.patch index 55d0b3c1b..f5515e3ed 100644 --- a/utrace.patch +++ b/utrace.patch @@ -1,41 +1,42 @@ -From davej Thu Jun 30 20:27:03 2011 +From davej Sun Aug 7 15:19:08 2011 Return-Path: oleg@redhat.com Received: from mail.corp.redhat.com [10.5.5.51] by gelk with IMAP (fetchmail-6.3.20) - for (single-drop); Thu, 30 Jun 2011 20:27:03 -0400 (EDT) -Received: from zmta03.collab.prod.int.phx2.redhat.com (LHLO - zmta03.collab.prod.int.phx2.redhat.com) (10.5.5.33) by - mail04.corp.redhat.com with LMTP; Thu, 30 Jun 2011 20:23:00 -0400 (EDT) + for (single-drop); Sun, 07 Aug 2011 15:19:08 -0400 (EDT) +Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO + zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by + mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:17:59 -0400 (EDT) Received: from localhost (localhost.localdomain [127.0.0.1]) - by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 10DAED812A; - Thu, 30 Jun 2011 20:23:00 -0400 (EDT) -Received: from zmta03.collab.prod.int.phx2.redhat.com ([127.0.0.1]) - by localhost (zmta03.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024) - with ESMTP id fiwBBweCuo8A; Thu, 30 Jun 2011 20:22:59 -0400 (EDT) -Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) - by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id E7CA2D810F; - Thu, 30 Jun 2011 20:22:59 -0400 (EDT) + by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id F09A8A5D58; + Sun, 7 Aug 2011 15:17:58 -0400 (EDT) +Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1]) + by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id 6mY7uBb0+l7B; Sun, 7 Aug 2011 15:17:58 -0400 (EDT) +Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) + by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id D1DFE9C7FA; + Sun, 7 Aug 2011 15:17:58 -0400 (EDT) Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232]) - by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p610MpCP015143; - Thu, 30 Jun 2011 20:22:52 -0400 + by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p77JHtc4027719; + Sun, 7 Aug 2011 15:17:56 -0400 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500 - oleg@redhat.com; Fri, 1 Jul 2011 02:20:59 +0200 (CEST) -Date: Fri, 1 Jul 2011 02:20:57 +0200 + oleg@redhat.com; Sun, 7 Aug 2011 21:15:19 +0200 (CEST) +Date: Sun, 7 Aug 2011 21:15:17 +0200 From: Oleg Nesterov To: "Frank Ch. Eigler" , Kyle McMartin , Dave Jones , Josh Stone , Matthew Garrett , David Smith -Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com -Subject: [PATCH 01/19] utrace core -Message-ID: <20110701002057.GA25776@redhat.com> +Cc: kernel@lists.fedoraproject.org +Subject: [PATCH 01/22] utrace core +Message-ID: <20110807191517.GA14365@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline +In-Reply-To: <20110807191434.GA13184@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) -X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 +X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Status: RO -Content-Length: 148213 -Lines: 4119 +Content-Length: 148212 +Lines: 4118 From: Roland McGrath @@ -4156,8 +4157,7 @@ index 0000000..f332d65 -- 1.5.5.1 - -From davej Thu Jun 30 20:27:04 2011 +From davej Sun Aug 7 15:19:09 2011 Return-Path: oleg@redhat.com X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gelk.kernelslacker.org @@ -4166,40 +4166,41 @@ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.2 Received: from mail.corp.redhat.com [10.5.5.51] by gelk with IMAP (fetchmail-6.3.20) - for (single-drop); Thu, 30 Jun 2011 20:27:04 -0400 (EDT) + for (single-drop); Sun, 07 Aug 2011 15:19:09 -0400 (EDT) Received: from zmta03.collab.prod.int.phx2.redhat.com (LHLO zmta03.collab.prod.int.phx2.redhat.com) (10.5.5.33) by - mail04.corp.redhat.com with LMTP; Thu, 30 Jun 2011 20:23:03 -0400 (EDT) + mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:01 -0400 (EDT) Received: from localhost (localhost.localdomain [127.0.0.1]) - by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 2259ED812A; - Thu, 30 Jun 2011 20:23:03 -0400 (EDT) + by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id A1FB8D89A7; + Sun, 7 Aug 2011 15:18:01 -0400 (EDT) Received: from zmta03.collab.prod.int.phx2.redhat.com ([127.0.0.1]) by localhost (zmta03.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024) - with ESMTP id Ex9fFDzwy1Zb; Thu, 30 Jun 2011 20:23:03 -0400 (EDT) -Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) - by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 0EF28D810F; - Thu, 30 Jun 2011 20:23:03 -0400 (EDT) + with ESMTP id JtiDMxvrW-Di; Sun, 7 Aug 2011 15:18:01 -0400 (EDT) +Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) + by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 7F0E6D8988; + Sun, 7 Aug 2011 15:18:01 -0400 (EDT) Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232]) - by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p610Mt6X021086; - Thu, 30 Jun 2011 20:22:56 -0400 + by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p77JHxlJ027726; + Sun, 7 Aug 2011 15:17:59 -0400 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500 - oleg@redhat.com; Fri, 1 Jul 2011 02:21:03 +0200 (CEST) -Date: Fri, 1 Jul 2011 02:21:01 +0200 + oleg@redhat.com; Sun, 7 Aug 2011 21:15:23 +0200 (CEST) +Date: Sun, 7 Aug 2011 21:15:21 +0200 From: Oleg Nesterov To: "Frank Ch. Eigler" , Kyle McMartin , Dave Jones , Josh Stone , Matthew Garrett , David Smith -Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com -Subject: [PATCH 02/19] utrace: remove jobctl bits -Message-ID: <20110701002101.GA25779@redhat.com> +Cc: kernel@lists.fedoraproject.org +Subject: [PATCH 02/22] utrace: remove jobctl bits +Message-ID: <20110807191521.GA14373@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline +In-Reply-To: <20110807191434.GA13184@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) -X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 +X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Status: RO -Content-Length: 1890 -Lines: 56 +Content-Length: 1889 +Lines: 55 - change utrace_get_signal() to check GROUP_STOP_PENDING instead of signal->group_stop_count. With the recent changes group_stop_count @@ -4257,8 +4258,7 @@ index f332d65..6e7fafb 100644 -- 1.5.5.1 - -From davej Thu Jun 30 20:27:05 2011 +From davej Sun Aug 7 15:19:10 2011 Return-Path: oleg@redhat.com X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gelk.kernelslacker.org @@ -4267,40 +4267,41 @@ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.2 Received: from mail.corp.redhat.com [10.5.5.51] by gelk with IMAP (fetchmail-6.3.20) - for (single-drop); Thu, 30 Jun 2011 20:27:05 -0400 (EDT) + for (single-drop); Sun, 07 Aug 2011 15:19:10 -0400 (EDT) Received: from zmta03.collab.prod.int.phx2.redhat.com (LHLO zmta03.collab.prod.int.phx2.redhat.com) (10.5.5.33) by - mail04.corp.redhat.com with LMTP; Thu, 30 Jun 2011 20:23:06 -0400 (EDT) + mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:04 -0400 (EDT) Received: from localhost (localhost.localdomain [127.0.0.1]) - by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 6B38AD812A; - Thu, 30 Jun 2011 20:23:06 -0400 (EDT) + by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 473EDD89A7; + Sun, 7 Aug 2011 15:18:04 -0400 (EDT) Received: from zmta03.collab.prod.int.phx2.redhat.com ([127.0.0.1]) by localhost (zmta03.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024) - with ESMTP id f4153Z6E7KGl; Thu, 30 Jun 2011 20:23:06 -0400 (EDT) -Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) - by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 55D4AD810F; - Thu, 30 Jun 2011 20:23:06 -0400 (EDT) + with ESMTP id uA3eVmUnKFQu; Sun, 7 Aug 2011 15:18:04 -0400 (EDT) +Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) + by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 29079D8988; + Sun, 7 Aug 2011 15:18:04 -0400 (EDT) Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232]) - by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p610Mwi2015168; - Thu, 30 Jun 2011 20:22:59 -0400 + by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p77JI1LH027738; + Sun, 7 Aug 2011 15:18:02 -0400 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500 - oleg@redhat.com; Fri, 1 Jul 2011 02:21:06 +0200 (CEST) -Date: Fri, 1 Jul 2011 02:21:04 +0200 + oleg@redhat.com; Sun, 7 Aug 2011 21:15:25 +0200 (CEST) +Date: Sun, 7 Aug 2011 21:15:23 +0200 From: Oleg Nesterov To: "Frank Ch. Eigler" , Kyle McMartin , Dave Jones , Josh Stone , Matthew Garrett , David Smith -Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com -Subject: [PATCH 03/19] ptrace: take ->siglock around s/TRACED/RUNNING/ -Message-ID: <20110701002104.GA25787@redhat.com> +Cc: kernel@lists.fedoraproject.org +Subject: [PATCH 03/22] ptrace: take ->siglock around s/TRACED/RUNNING/ +Message-ID: <20110807191523.GA14376@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline +In-Reply-To: <20110807191434.GA13184@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) -X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 +X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Status: RO -Content-Length: 1624 -Lines: 56 +Content-Length: 1623 +Lines: 55 change ptrace_resume() and ptrace_stop() to take ->siglock around changing task->state from TRACED to RUNNING. @@ -4358,8 +4359,7 @@ index ff76786..2138cee 100644 -- 1.5.5.1 - -From davej Thu Jun 30 20:27:06 2011 +From davej Sun Aug 7 15:19:11 2011 Return-Path: oleg@redhat.com X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gelk.kernelslacker.org @@ -4368,40 +4368,41 @@ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.2 Received: from mail.corp.redhat.com [10.5.5.51] by gelk with IMAP (fetchmail-6.3.20) - for (single-drop); Thu, 30 Jun 2011 20:27:06 -0400 (EDT) -Received: from zmta03.collab.prod.int.phx2.redhat.com (LHLO - zmta03.collab.prod.int.phx2.redhat.com) (10.5.5.33) by - mail04.corp.redhat.com with LMTP; Thu, 30 Jun 2011 20:23:09 -0400 (EDT) + for (single-drop); Sun, 07 Aug 2011 15:19:11 -0400 (EDT) +Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO + zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by + mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:06 -0400 (EDT) Received: from localhost (localhost.localdomain [127.0.0.1]) - by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id E1AB7D812A; - Thu, 30 Jun 2011 20:23:09 -0400 (EDT) -Received: from zmta03.collab.prod.int.phx2.redhat.com ([127.0.0.1]) - by localhost (zmta03.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024) - with ESMTP id QhOnA49nS3Vp; Thu, 30 Jun 2011 20:23:09 -0400 (EDT) -Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) - by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id C5E15D810F; - Thu, 30 Jun 2011 20:23:09 -0400 (EDT) + by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id D76B6A5D58; + Sun, 7 Aug 2011 15:18:06 -0400 (EDT) +Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1]) + by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id xyKeY-zzvTgR; Sun, 7 Aug 2011 15:18:06 -0400 (EDT) +Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) + by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id BB0E49C7FA; + Sun, 7 Aug 2011 15:18:06 -0400 (EDT) Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232]) - by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p610N2Kd007635; - Thu, 30 Jun 2011 20:23:02 -0400 + by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p77JI4PF028668; + Sun, 7 Aug 2011 15:18:05 -0400 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500 - oleg@redhat.com; Fri, 1 Jul 2011 02:21:10 +0200 (CEST) -Date: Fri, 1 Jul 2011 02:21:07 +0200 + oleg@redhat.com; Sun, 7 Aug 2011 21:15:28 +0200 (CEST) +Date: Sun, 7 Aug 2011 21:15:26 +0200 From: Oleg Nesterov To: "Frank Ch. Eigler" , Kyle McMartin , Dave Jones , Josh Stone , Matthew Garrett , David Smith -Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com -Subject: [PATCH 04/19] introduce wake_up_quiescent() -Message-ID: <20110701002107.GA25790@redhat.com> +Cc: kernel@lists.fedoraproject.org +Subject: [PATCH 04/22] introduce wake_up_quiescent() +Message-ID: <20110807191526.GA14383@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline +In-Reply-To: <20110807191434.GA13184@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) -X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 +X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 Status: RO -Content-Length: 3104 -Lines: 93 +Content-Length: 3103 +Lines: 92 No functional changes. Add the new helper, wake_up_quiescent(task, state), which simply returns wake_up_state(task, state). Change all callers which @@ -4496,8 +4497,7 @@ index 6e7fafb..d7c547c 100644 -- 1.5.5.1 - -From davej Thu Jun 30 20:27:07 2011 +From davej Sun Aug 7 15:19:13 2011 Return-Path: oleg@redhat.com X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gelk.kernelslacker.org @@ -4506,40 +4506,41 @@ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.2 Received: from mail.corp.redhat.com [10.5.5.51] by gelk with IMAP (fetchmail-6.3.20) - for (single-drop); Thu, 30 Jun 2011 20:27:07 -0400 (EDT) + for (single-drop); Sun, 07 Aug 2011 15:19:13 -0400 (EDT) Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by - mail04.corp.redhat.com with LMTP; Thu, 30 Jun 2011 20:23:13 -0400 (EDT) + mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:09 -0400 (EDT) Received: from localhost (localhost.localdomain [127.0.0.1]) - by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 2CF811287F3; - Thu, 30 Jun 2011 20:23:13 -0400 (EDT) + by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id C8DCF1322A2; + Sun, 7 Aug 2011 15:18:09 -0400 (EDT) Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1]) by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024) - with ESMTP id dNPA3WxO-7pp; Thu, 30 Jun 2011 20:23:13 -0400 (EDT) + with ESMTP id ZQXZL5xrzV21; Sun, 7 Aug 2011 15:18:09 -0400 (EDT) Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) - by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 154D61287DD; - Thu, 30 Jun 2011 20:23:13 -0400 (EDT) + by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id B3D6D128FDA; + Sun, 7 Aug 2011 15:18:09 -0400 (EDT) Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232]) - by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p610N5nY021107; - Thu, 30 Jun 2011 20:23:06 -0400 + by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p77JI7P5029847; + Sun, 7 Aug 2011 15:18:07 -0400 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500 - oleg@redhat.com; Fri, 1 Jul 2011 02:21:13 +0200 (CEST) -Date: Fri, 1 Jul 2011 02:21:11 +0200 + oleg@redhat.com; Sun, 7 Aug 2011 21:15:31 +0200 (CEST) +Date: Sun, 7 Aug 2011 21:15:28 +0200 From: Oleg Nesterov To: "Frank Ch. Eigler" , Kyle McMartin , Dave Jones , Josh Stone , Matthew Garrett , David Smith -Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com -Subject: [PATCH 05/19] introduce ptrace_signal_wake_up() -Message-ID: <20110701002111.GA25797@redhat.com> +Cc: kernel@lists.fedoraproject.org +Subject: [PATCH 05/22] introduce ptrace_signal_wake_up() +Message-ID: <20110807191528.GA14386@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline +In-Reply-To: <20110807191434.GA13184@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 Status: RO -Content-Length: 1975 -Lines: 68 +Content-Length: 1974 +Lines: 67 Add the new helper, ptrace_signal_wake_up(), change ptrace.c to use it instead of signal_wake_up(). @@ -4609,8 +4610,7 @@ index 26ae214..0b2aba5 100644 -- 1.5.5.1 - -From davej Thu Jun 30 20:27:08 2011 +From davej Sun Aug 7 15:19:14 2011 Return-Path: oleg@redhat.com X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gelk.kernelslacker.org @@ -4619,41 +4619,42 @@ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.2 Received: from mail.corp.redhat.com [10.5.5.51] by gelk with IMAP (fetchmail-6.3.20) - for (single-drop); Thu, 30 Jun 2011 20:27:08 -0400 (EDT) + for (single-drop); Sun, 07 Aug 2011 15:19:14 -0400 (EDT) Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by - mail04.corp.redhat.com with LMTP; Thu, 30 Jun 2011 20:23:16 -0400 (EDT) + mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:12 -0400 (EDT) Received: from localhost (localhost.localdomain [127.0.0.1]) - by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 6FB379C0CB; - Thu, 30 Jun 2011 20:23:16 -0400 (EDT) + by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 72BBDA5D58; + Sun, 7 Aug 2011 15:18:12 -0400 (EDT) Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1]) by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024) - with ESMTP id IYB64KKErOyI; Thu, 30 Jun 2011 20:23:16 -0400 (EDT) + with ESMTP id k8I1SMuU0ydh; Sun, 7 Aug 2011 15:18:12 -0400 (EDT) Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) - by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 597119C0C5; - Thu, 30 Jun 2011 20:23:16 -0400 (EDT) + by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 5DFAB9C7FA; + Sun, 7 Aug 2011 15:18:12 -0400 (EDT) Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232]) - by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p610N8bE032569; - Thu, 30 Jun 2011 20:23:09 -0400 + by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p77JIAjF028676; + Sun, 7 Aug 2011 15:18:10 -0400 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500 - oleg@redhat.com; Fri, 1 Jul 2011 02:21:16 +0200 (CEST) -Date: Fri, 1 Jul 2011 02:21:14 +0200 + oleg@redhat.com; Sun, 7 Aug 2011 21:15:34 +0200 (CEST) +Date: Sun, 7 Aug 2011 21:15:31 +0200 From: Oleg Nesterov To: "Frank Ch. Eigler" , Kyle McMartin , Dave Jones , Josh Stone , Matthew Garrett , David Smith -Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com -Subject: [PATCH 06/19] wait_task_inactive: treat task->state and +Cc: kernel@lists.fedoraproject.org +Subject: [PATCH 06/22] wait_task_inactive: treat task->state and match_state as bitmasks -Message-ID: <20110701002114.GA25804@redhat.com> +Message-ID: <20110807191531.GA14393@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline +In-Reply-To: <20110807191434.GA13184@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 Status: RO -Content-Length: 1558 -Lines: 39 +Content-Length: 1557 +Lines: 38 Change wait_task_inactive() to check "state & match_state" instead of "state == match_state". This should not make any difference, but this @@ -4694,8 +4695,7 @@ index 3f2e502..ade7997 100644 -- 1.5.5.1 - -From davej Thu Jun 30 20:27:09 2011 +From davej Sun Aug 7 15:19:15 2011 Return-Path: oleg@redhat.com X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gelk.kernelslacker.org @@ -4704,40 +4704,41 @@ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.2 Received: from mail.corp.redhat.com [10.5.5.51] by gelk with IMAP (fetchmail-6.3.20) - for (single-drop); Thu, 30 Jun 2011 20:27:09 -0400 (EDT) -Received: from zmta03.collab.prod.int.phx2.redhat.com (LHLO - zmta03.collab.prod.int.phx2.redhat.com) (10.5.5.33) by - mail04.corp.redhat.com with LMTP; Thu, 30 Jun 2011 20:23:19 -0400 (EDT) + for (single-drop); Sun, 07 Aug 2011 15:19:15 -0400 (EDT) +Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO + zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by + mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:15 -0400 (EDT) Received: from localhost (localhost.localdomain [127.0.0.1]) - by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id A6BD4D810F; - Thu, 30 Jun 2011 20:23:19 -0400 (EDT) -Received: from zmta03.collab.prod.int.phx2.redhat.com ([127.0.0.1]) - by localhost (zmta03.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024) - with ESMTP id 2ovLSk6W1SGg; Thu, 30 Jun 2011 20:23:19 -0400 (EDT) -Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) - by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 8DBABD812A; - Thu, 30 Jun 2011 20:23:19 -0400 (EDT) + by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 1FD1B1322A2; + Sun, 7 Aug 2011 15:18:15 -0400 (EDT) +Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1]) + by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id gfct30463vGS; Sun, 7 Aug 2011 15:18:15 -0400 (EDT) +Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) + by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 01C04128FDA; + Sun, 7 Aug 2011 15:18:15 -0400 (EDT) Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232]) - by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p610NCUq026299; - Thu, 30 Jun 2011 20:23:12 -0400 + by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p77JICKL027777; + Sun, 7 Aug 2011 15:18:13 -0400 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500 - oleg@redhat.com; Fri, 1 Jul 2011 02:21:19 +0200 (CEST) -Date: Fri, 1 Jul 2011 02:21:17 +0200 + oleg@redhat.com; Sun, 7 Aug 2011 21:15:36 +0200 (CEST) +Date: Sun, 7 Aug 2011 21:15:34 +0200 From: Oleg Nesterov To: "Frank Ch. Eigler" , Kyle McMartin , Dave Jones , Josh Stone , Matthew Garrett , David Smith -Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com -Subject: [PATCH 07/19] introduce TASK_UTRACED state -Message-ID: <20110701002117.GA25807@redhat.com> +Cc: kernel@lists.fedoraproject.org +Subject: [PATCH 07/22] introduce TASK_UTRACED state +Message-ID: <20110807191534.GA14396@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline +In-Reply-To: <20110807191434.GA13184@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) -X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 +X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Status: RO -Content-Length: 2913 -Lines: 84 +Content-Length: 2912 +Lines: 83 Introduce TASK_UTRACED state, will be used by utrace instead of TASK_TRACED. @@ -4823,8 +4824,7 @@ index b87de83..7a0008c 100644 -- 1.5.5.1 - -From davej Thu Jun 30 20:27:10 2011 +From davej Sun Aug 7 15:19:17 2011 Return-Path: oleg@redhat.com X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gelk.kernelslacker.org @@ -4833,40 +4833,41 @@ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.2 Received: from mail.corp.redhat.com [10.5.5.51] by gelk with IMAP (fetchmail-6.3.20) - for (single-drop); Thu, 30 Jun 2011 20:27:10 -0400 (EDT) -Received: from zmta03.collab.prod.int.phx2.redhat.com (LHLO - zmta03.collab.prod.int.phx2.redhat.com) (10.5.5.33) by - mail04.corp.redhat.com with LMTP; Thu, 30 Jun 2011 20:23:23 -0400 (EDT) + for (single-drop); Sun, 07 Aug 2011 15:19:17 -0400 (EDT) +Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO + zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by + mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:17 -0400 (EDT) Received: from localhost (localhost.localdomain [127.0.0.1]) - by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 1A66AD812A; - Thu, 30 Jun 2011 20:23:23 -0400 (EDT) -Received: from zmta03.collab.prod.int.phx2.redhat.com ([127.0.0.1]) - by localhost (zmta03.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024) - with ESMTP id fctUcQ+-lYpk; Thu, 30 Jun 2011 20:23:23 -0400 (EDT) -Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) - by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id F2D35D810F; - Thu, 30 Jun 2011 20:23:22 -0400 (EDT) + by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id B634FA5D5A; + Sun, 7 Aug 2011 15:18:17 -0400 (EDT) +Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1]) + by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id 3vEyYZtZ8hD5; Sun, 7 Aug 2011 15:18:17 -0400 (EDT) +Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) + by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 9921A9C7FA; + Sun, 7 Aug 2011 15:18:17 -0400 (EDT) Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232]) - by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p610NF1u015200; - Thu, 30 Jun 2011 20:23:15 -0400 + by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p77JIFH8028686; + Sun, 7 Aug 2011 15:18:16 -0400 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500 - oleg@redhat.com; Fri, 1 Jul 2011 02:21:23 +0200 (CEST) -Date: Fri, 1 Jul 2011 02:21:20 +0200 + oleg@redhat.com; Sun, 7 Aug 2011 21:15:39 +0200 (CEST) +Date: Sun, 7 Aug 2011 21:15:37 +0200 From: Oleg Nesterov To: "Frank Ch. Eigler" , Kyle McMartin , Dave Jones , Josh Stone , Matthew Garrett , David Smith -Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com -Subject: [PATCH 08/19] utrace: use TASK_UTRACED instead of TASK_TRACED -Message-ID: <20110701002120.GA25814@redhat.com> +Cc: kernel@lists.fedoraproject.org +Subject: [PATCH 08/22] utrace: use TASK_UTRACED instead of TASK_TRACED +Message-ID: <20110807191537.GA14403@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline +In-Reply-To: <20110807191434.GA13184@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) -X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 +X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 Status: RO -Content-Length: 4316 -Lines: 130 +Content-Length: 4315 +Lines: 129 Change utrace.c to use TASK_UTRACED instead of TASK_TRACED. @@ -4998,8 +4999,7 @@ index d7c547c..be98607 100644 -- 1.5.5.1 - -From davej Thu Jun 30 20:27:12 2011 +From davej Sun Aug 7 15:19:19 2011 Return-Path: oleg@redhat.com X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gelk.kernelslacker.org @@ -5008,41 +5008,42 @@ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.2 Received: from mail.corp.redhat.com [10.5.5.51] by gelk with IMAP (fetchmail-6.3.20) - for (single-drop); Thu, 30 Jun 2011 20:27:12 -0400 (EDT) -Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO - zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by - mail04.corp.redhat.com with LMTP; Thu, 30 Jun 2011 20:23:26 -0400 (EDT) + for (single-drop); Sun, 07 Aug 2011 15:19:19 -0400 (EDT) +Received: from zmta03.collab.prod.int.phx2.redhat.com (LHLO + zmta03.collab.prod.int.phx2.redhat.com) (10.5.5.33) by + mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:24 -0400 (EDT) Received: from localhost (localhost.localdomain [127.0.0.1]) - by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 289969C0C5; - Thu, 30 Jun 2011 20:23:26 -0400 (EDT) -Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1]) - by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024) - with ESMTP id q99JSaVz2X1O; Thu, 30 Jun 2011 20:23:26 -0400 (EDT) -Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) - by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 143F89C0C3; - Thu, 30 Jun 2011 20:23:26 -0400 (EDT) + by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 53AC0D89A9; + Sun, 7 Aug 2011 15:18:20 -0400 (EDT) +Received: from zmta03.collab.prod.int.phx2.redhat.com ([127.0.0.1]) + by localhost (zmta03.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id CGhyA84rXAKN; Sun, 7 Aug 2011 15:18:20 -0400 (EDT) +Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) + by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 36B2CD8988; + Sun, 7 Aug 2011 15:18:20 -0400 (EDT) Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232]) - by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p610NI9T021133; - Thu, 30 Jun 2011 20:23:19 -0400 + by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p77JIIFB028696; + Sun, 7 Aug 2011 15:18:18 -0400 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500 - oleg@redhat.com; Fri, 1 Jul 2011 02:21:26 +0200 (CEST) -Date: Fri, 1 Jul 2011 02:21:24 +0200 + oleg@redhat.com; Sun, 7 Aug 2011 21:15:41 +0200 (CEST) +Date: Sun, 7 Aug 2011 21:15:39 +0200 From: Oleg Nesterov To: "Frank Ch. Eigler" , Kyle McMartin , Dave Jones , Josh Stone , Matthew Garrett , David Smith -Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com -Subject: [PATCH 09/19] tracehooks: kill tracehook_finish_jctl(), add +Cc: kernel@lists.fedoraproject.org +Subject: [PATCH 09/22] tracehooks: kill tracehook_finish_jctl(), add tracehook_finish_stop() -Message-ID: <20110701002124.GA25817@redhat.com> +Message-ID: <20110807191539.GA14406@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline +In-Reply-To: <20110807191434.GA13184@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) -X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 +X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 Status: RO -Content-Length: 2782 -Lines: 86 +Content-Length: 2781 +Lines: 85 tracehook_finish_jctl() is needed to avoid the races with SIGKILL which wakes up UTRACED task, and thus it should be called every time @@ -5130,8 +5131,7 @@ index be98607..daa96b9 100644 -- 1.5.5.1 - -From davej Thu Jun 30 20:27:13 2011 +From davej Sun Aug 7 15:19:18 2011 Return-Path: oleg@redhat.com X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gelk.kernelslacker.org @@ -5140,40 +5140,41 @@ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.2 Received: from mail.corp.redhat.com [10.5.5.51] by gelk with IMAP (fetchmail-6.3.20) - for (single-drop); Thu, 30 Jun 2011 20:27:13 -0400 (EDT) -Received: from zmta03.collab.prod.int.phx2.redhat.com (LHLO - zmta03.collab.prod.int.phx2.redhat.com) (10.5.5.33) by - mail04.corp.redhat.com with LMTP; Thu, 30 Jun 2011 20:23:29 -0400 (EDT) + for (single-drop); Sun, 07 Aug 2011 15:19:18 -0400 (EDT) +Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO + zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by + mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:22 -0400 (EDT) Received: from localhost (localhost.localdomain [127.0.0.1]) - by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id A748FD813B; - Thu, 30 Jun 2011 20:23:29 -0400 (EDT) -Received: from zmta03.collab.prod.int.phx2.redhat.com ([127.0.0.1]) - by localhost (zmta03.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024) - with ESMTP id EwbxGxAU7ASi; Thu, 30 Jun 2011 20:23:29 -0400 (EDT) -Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) - by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 72761D810F; - Thu, 30 Jun 2011 20:23:29 -0400 (EDT) + by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id DD6839C7FA; + Sun, 7 Aug 2011 15:18:22 -0400 (EDT) +Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1]) + by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id hZs6VyadcD7K; Sun, 7 Aug 2011 15:18:22 -0400 (EDT) +Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) + by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id C7B129C7DE; + Sun, 7 Aug 2011 15:18:22 -0400 (EDT) Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232]) - by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p610NMAW015213; - Thu, 30 Jun 2011 20:23:22 -0400 + by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p77JIKMe020605; + Sun, 7 Aug 2011 15:18:21 -0400 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500 - oleg@redhat.com; Fri, 1 Jul 2011 02:21:29 +0200 (CEST) -Date: Fri, 1 Jul 2011 02:21:27 +0200 + oleg@redhat.com; Sun, 7 Aug 2011 21:15:44 +0200 (CEST) +Date: Sun, 7 Aug 2011 21:15:42 +0200 From: Oleg Nesterov To: "Frank Ch. Eigler" , Kyle McMartin , Dave Jones , Josh Stone , Matthew Garrett , David Smith -Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com -Subject: [PATCH 10/19] teach wake_up_quiescent() to do "selective" wake_up -Message-ID: <20110701002127.GA25824@redhat.com> +Cc: kernel@lists.fedoraproject.org +Subject: [PATCH 10/22] teach wake_up_quiescent() to do "selective" wake_up +Message-ID: <20110807191542.GA14409@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline +In-Reply-To: <20110807191434.GA13184@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) -X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 +X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 Status: RO -Content-Length: 1335 -Lines: 46 +Content-Length: 1334 +Lines: 45 Both utrace and ptrace can want the same thread to be quiescent, in this case its state is TASK_TRACED | TASK_UTRACED. And this also means that @@ -5221,8 +5222,7 @@ index a7979ad..57552e6 100644 -- 1.5.5.1 - -From davej Thu Jun 30 20:27:14 2011 +From davej Sun Aug 7 15:19:20 2011 Return-Path: oleg@redhat.com X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gelk.kernelslacker.org @@ -5231,41 +5231,42 @@ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.2 Received: from mail.corp.redhat.com [10.5.5.51] by gelk with IMAP (fetchmail-6.3.20) - for (single-drop); Thu, 30 Jun 2011 20:27:14 -0400 (EDT) -Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO - zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by - mail04.corp.redhat.com with LMTP; Thu, 30 Jun 2011 20:23:32 -0400 (EDT) + for (single-drop); Sun, 07 Aug 2011 15:19:20 -0400 (EDT) +Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO + zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by + mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:25 -0400 (EDT) Received: from localhost (localhost.localdomain [127.0.0.1]) - by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id C94CF9C0C5; - Thu, 30 Jun 2011 20:23:32 -0400 (EDT) -Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1]) - by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024) - with ESMTP id 9R-z4gQXQITf; Thu, 30 Jun 2011 20:23:32 -0400 (EDT) + by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 7C2991322AA; + Sun, 7 Aug 2011 15:18:25 -0400 (EDT) +Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1]) + by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id rHOxOwY4bOdr; Sun, 7 Aug 2011 15:18:25 -0400 (EDT) Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) - by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id B55759C0C3; - Thu, 30 Jun 2011 20:23:32 -0400 (EDT) + by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 67ABD128FDA; + Sun, 7 Aug 2011 15:18:25 -0400 (EDT) Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232]) - by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p610NPe5021144; - Thu, 30 Jun 2011 20:23:25 -0400 + by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p77JINVP029911; + Sun, 7 Aug 2011 15:18:23 -0400 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500 - oleg@redhat.com; Fri, 1 Jul 2011 02:21:33 +0200 (CEST) -Date: Fri, 1 Jul 2011 02:21:30 +0200 + oleg@redhat.com; Sun, 7 Aug 2011 21:15:47 +0200 (CEST) +Date: Sun, 7 Aug 2011 21:15:45 +0200 From: Oleg Nesterov To: "Frank Ch. Eigler" , Kyle McMartin , Dave Jones , Josh Stone , Matthew Garrett , David Smith -Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com -Subject: [PATCH 11/19] ptrace_stop: do not assume the task is running after +Cc: kernel@lists.fedoraproject.org +Subject: [PATCH 11/22] ptrace_stop: do not assume the task is running after wake_up_quiescent() -Message-ID: <20110701002130.GA25827@redhat.com> +Message-ID: <20110807191545.GA14416@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline +In-Reply-To: <20110807191434.GA13184@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 Status: RO -Content-Length: 962 -Lines: 31 +Content-Length: 961 +Lines: 30 If ptrace_stop() sets TASK_TRACED and then detects we should not stop, it can race with utrace_do_stop() which can see TASK_TRACED and add @@ -5298,8 +5299,7 @@ index 57552e6..89e691d 100644 -- 1.5.5.1 - -From davej Thu Jun 30 20:27:17 2011 +From davej Sun Aug 7 15:19:21 2011 Return-Path: oleg@redhat.com X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gelk.kernelslacker.org @@ -5308,41 +5308,42 @@ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.2 Received: from mail.corp.redhat.com [10.5.5.51] by gelk with IMAP (fetchmail-6.3.20) - for (single-drop); Thu, 30 Jun 2011 20:27:17 -0400 (EDT) + for (single-drop); Sun, 07 Aug 2011 15:19:21 -0400 (EDT) Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by - mail04.corp.redhat.com with LMTP; Thu, 30 Jun 2011 20:23:36 -0400 (EDT) + mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:28 -0400 (EDT) Received: from localhost (localhost.localdomain [127.0.0.1]) - by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 4390F1287F3; - Thu, 30 Jun 2011 20:23:36 -0400 (EDT) + by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 1B4B91322AE; + Sun, 7 Aug 2011 15:18:28 -0400 (EDT) Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1]) by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024) - with ESMTP id v5mzxCjpefBI; Thu, 30 Jun 2011 20:23:36 -0400 (EDT) -Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) - by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 283B21287DD; - Thu, 30 Jun 2011 20:23:36 -0400 (EDT) + with ESMTP id q5tv0cJeZqLD; Sun, 7 Aug 2011 15:18:28 -0400 (EDT) +Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) + by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 071461322A9; + Sun, 7 Aug 2011 15:18:28 -0400 (EDT) Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232]) - by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p610NSc9032626; - Thu, 30 Jun 2011 20:23:29 -0400 + by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p77JIPFB020635; + Sun, 7 Aug 2011 15:18:26 -0400 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500 - oleg@redhat.com; Fri, 1 Jul 2011 02:21:36 +0200 (CEST) -Date: Fri, 1 Jul 2011 02:21:34 +0200 + oleg@redhat.com; Sun, 7 Aug 2011 21:15:49 +0200 (CEST) +Date: Sun, 7 Aug 2011 21:15:47 +0200 From: Oleg Nesterov To: "Frank Ch. Eigler" , Kyle McMartin , Dave Jones , Josh Stone , Matthew Garrett , David Smith -Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com -Subject: [PATCH 12/19] get_signal_to_deliver: restructure utrace/ptrace +Cc: kernel@lists.fedoraproject.org +Subject: [PATCH 12/22] get_signal_to_deliver: restructure utrace/ptrace signal reporting -Message-ID: <20110701002134.GA25834@redhat.com> +Message-ID: <20110807191547.GA14419@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline +In-Reply-To: <20110807191434.GA13184@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) -X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 +X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 Status: RO -Content-Length: 2012 -Lines: 73 +Content-Length: 2011 +Lines: 72 get_signal_to_deliver() assumes that either tracehook_get_signal() does nothing (without CONFIG_UTRACE), or it also reports the signal to ptrace @@ -5417,8 +5418,7 @@ index 89e691d..d0e0c67 100644 -- 1.5.5.1 - -From davej Thu Jun 30 20:27:18 2011 +From davej Sun Aug 7 15:19:22 2011 Return-Path: oleg@redhat.com X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gelk.kernelslacker.org @@ -5427,40 +5427,41 @@ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.2 Received: from mail.corp.redhat.com [10.5.5.51] by gelk with IMAP (fetchmail-6.3.20) - for (single-drop); Thu, 30 Jun 2011 20:27:18 -0400 (EDT) -Received: from zmta03.collab.prod.int.phx2.redhat.com (LHLO - zmta03.collab.prod.int.phx2.redhat.com) (10.5.5.33) by - mail04.corp.redhat.com with LMTP; Thu, 30 Jun 2011 20:23:39 -0400 (EDT) + for (single-drop); Sun, 07 Aug 2011 15:19:22 -0400 (EDT) +Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO + zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by + mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:30 -0400 (EDT) Received: from localhost (localhost.localdomain [127.0.0.1]) - by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 74BDFD813B; - Thu, 30 Jun 2011 20:23:39 -0400 (EDT) -Received: from zmta03.collab.prod.int.phx2.redhat.com ([127.0.0.1]) - by localhost (zmta03.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024) - with ESMTP id tAGkG+GCPdeN; Thu, 30 Jun 2011 20:23:39 -0400 (EDT) -Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) - by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 5B728D812A; - Thu, 30 Jun 2011 20:23:39 -0400 (EDT) + by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id BFD8F1322A2; + Sun, 7 Aug 2011 15:18:30 -0400 (EDT) +Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1]) + by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id JczS8HsLYY6X; Sun, 7 Aug 2011 15:18:30 -0400 (EDT) +Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) + by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id A8F91128FDA; + Sun, 7 Aug 2011 15:18:30 -0400 (EDT) Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232]) - by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p610NWY1032629; - Thu, 30 Jun 2011 20:23:32 -0400 + by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p77JIS1m029940; + Sun, 7 Aug 2011 15:18:29 -0400 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500 - oleg@redhat.com; Fri, 1 Jul 2011 02:21:39 +0200 (CEST) -Date: Fri, 1 Jul 2011 02:21:37 +0200 + oleg@redhat.com; Sun, 7 Aug 2011 21:15:52 +0200 (CEST) +Date: Sun, 7 Aug 2011 21:15:50 +0200 From: Oleg Nesterov To: "Frank Ch. Eigler" , Kyle McMartin , Dave Jones , Josh Stone , Matthew Garrett , David Smith -Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com -Subject: [PATCH 13/19] introduce ptrace_set_syscall_trace() -Message-ID: <20110701002137.GA25837@redhat.com> +Cc: kernel@lists.fedoraproject.org +Subject: [PATCH 13/22] introduce ptrace_set_syscall_trace() +Message-ID: <20110807191550.GA14426@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline +In-Reply-To: <20110807191434.GA13184@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) -X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 +X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 Status: RO -Content-Length: 1581 -Lines: 52 +Content-Length: 1580 +Lines: 51 No functional changes. Add the new helper, ptrace_set_syscall_trace(), which should be used to set/clear TIF_SYSCALL_TRACE in ptrace code. @@ -5514,8 +5515,7 @@ index 0b2aba5..b6fd922 100644 -- 1.5.5.1 - -From davej Thu Jun 30 20:27:20 2011 +From davej Sun Aug 7 15:19:23 2011 Return-Path: oleg@redhat.com X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gelk.kernelslacker.org @@ -5524,40 +5524,41 @@ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.2 Received: from mail.corp.redhat.com [10.5.5.51] by gelk with IMAP (fetchmail-6.3.20) - for (single-drop); Thu, 30 Jun 2011 20:27:20 -0400 (EDT) + for (single-drop); Sun, 07 Aug 2011 15:19:23 -0400 (EDT) Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by - mail04.corp.redhat.com with LMTP; Thu, 30 Jun 2011 20:23:42 -0400 (EDT) + mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:33 -0400 (EDT) Received: from localhost (localhost.localdomain [127.0.0.1]) - by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id CFC3F9C0C5; - Thu, 30 Jun 2011 20:23:42 -0400 (EDT) + by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 585699C7DE; + Sun, 7 Aug 2011 15:18:33 -0400 (EDT) Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1]) by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024) - with ESMTP id vS4KlM5ek+bt; Thu, 30 Jun 2011 20:23:42 -0400 (EDT) -Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) - by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id B28CA9C0C3; - Thu, 30 Jun 2011 20:23:42 -0400 (EDT) + with ESMTP id Zp+5oAzhYq2W; Sun, 7 Aug 2011 15:18:33 -0400 (EDT) +Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) + by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 44532909E4; + Sun, 7 Aug 2011 15:18:33 -0400 (EDT) Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232]) - by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p610NZvo015255; - Thu, 30 Jun 2011 20:23:35 -0400 + by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p77JIV6n020657; + Sun, 7 Aug 2011 15:18:31 -0400 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500 - oleg@redhat.com; Fri, 1 Jul 2011 02:21:43 +0200 (CEST) -Date: Fri, 1 Jul 2011 02:21:40 +0200 + oleg@redhat.com; Sun, 7 Aug 2011 21:15:54 +0200 (CEST) +Date: Sun, 7 Aug 2011 21:15:52 +0200 From: Oleg Nesterov To: "Frank Ch. Eigler" , Kyle McMartin , Dave Jones , Josh Stone , Matthew Garrett , David Smith -Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com -Subject: [PATCH 14/19] introduce PT_SYSCALL_TRACE flag -Message-ID: <20110701002140.GA25844@redhat.com> +Cc: kernel@lists.fedoraproject.org +Subject: [PATCH 14/22] introduce PT_SYSCALL_TRACE flag +Message-ID: <20110807191552.GA14429@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline +In-Reply-To: <20110807191434.GA13184@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) -X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 +X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 Status: RO -Content-Length: 2236 -Lines: 73 +Content-Length: 2235 +Lines: 72 Currently tracehooks assume that if the ptraced task has TIF_SYSCALL_TRACE set, the tracee should report the syscall. @@ -5632,8 +5633,7 @@ index b6fd922..0825a01 100644 -- 1.5.5.1 - -From davej Thu Jun 30 20:27:21 2011 +From davej Sun Aug 7 15:19:24 2011 Return-Path: oleg@redhat.com X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gelk.kernelslacker.org @@ -5642,41 +5642,42 @@ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.2 Received: from mail.corp.redhat.com [10.5.5.51] by gelk with IMAP (fetchmail-6.3.20) - for (single-drop); Thu, 30 Jun 2011 20:27:21 -0400 (EDT) + for (single-drop); Sun, 07 Aug 2011 15:19:24 -0400 (EDT) Received: from zmta03.collab.prod.int.phx2.redhat.com (LHLO zmta03.collab.prod.int.phx2.redhat.com) (10.5.5.33) by - mail04.corp.redhat.com with LMTP; Thu, 30 Jun 2011 20:23:46 -0400 (EDT) + mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:35 -0400 (EDT) Received: from localhost (localhost.localdomain [127.0.0.1]) - by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 35A70D812A; - Thu, 30 Jun 2011 20:23:46 -0400 (EDT) + by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id F0377D89A9; + Sun, 7 Aug 2011 15:18:35 -0400 (EDT) Received: from zmta03.collab.prod.int.phx2.redhat.com ([127.0.0.1]) by localhost (zmta03.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024) - with ESMTP id L06hkGLA8FQs; Thu, 30 Jun 2011 20:23:46 -0400 (EDT) -Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) - by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 21C2BD810F; - Thu, 30 Jun 2011 20:23:46 -0400 (EDT) + with ESMTP id cBLqfABIHZ6h; Sun, 7 Aug 2011 15:18:35 -0400 (EDT) +Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) + by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id DC799D8988; + Sun, 7 Aug 2011 15:18:35 -0400 (EDT) Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232]) - by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p610Nc7k007721; - Thu, 30 Jun 2011 20:23:39 -0400 + by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p77JIXU3007727; + Sun, 7 Aug 2011 15:18:34 -0400 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500 - oleg@redhat.com; Fri, 1 Jul 2011 02:21:46 +0200 (CEST) -Date: Fri, 1 Jul 2011 02:21:44 +0200 + oleg@redhat.com; Sun, 7 Aug 2011 21:15:57 +0200 (CEST) +Date: Sun, 7 Aug 2011 21:15:55 +0200 From: Oleg Nesterov To: "Frank Ch. Eigler" , Kyle McMartin , Dave Jones , Josh Stone , Matthew Garrett , David Smith -Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com -Subject: [PATCH 15/19] utrace: don't clear TIF_SYSCALL_TRACE if it is +Cc: kernel@lists.fedoraproject.org +Subject: [PATCH 15/22] utrace: don't clear TIF_SYSCALL_TRACE if it is needed by ptrace -Message-ID: <20110701002144.GA25847@redhat.com> +Message-ID: <20110807191555.GA14436@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline +In-Reply-To: <20110807191434.GA13184@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) -X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 +X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Status: RO -Content-Length: 797 -Lines: 24 +Content-Length: 796 +Lines: 23 TIF_SYSCALL_TRACE should be cleared only if both ptrace and utrace do not want it, change utrace_reset() to check PT_SYSCALL_TRACE before @@ -5702,8 +5703,7 @@ index daa96b9..a824ac3 100644 -- 1.5.5.1 - -From davej Thu Jun 30 20:27:22 2011 +From davej Sun Aug 7 15:19:25 2011 Return-Path: oleg@redhat.com X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gelk.kernelslacker.org @@ -5712,40 +5712,41 @@ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.2 Received: from mail.corp.redhat.com [10.5.5.51] by gelk with IMAP (fetchmail-6.3.20) - for (single-drop); Thu, 30 Jun 2011 20:27:22 -0400 (EDT) + for (single-drop); Sun, 07 Aug 2011 15:19:25 -0400 (EDT) Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by - mail04.corp.redhat.com with LMTP; Thu, 30 Jun 2011 20:23:49 -0400 (EDT) + mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:38 -0400 (EDT) Received: from localhost (localhost.localdomain [127.0.0.1]) - by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 72E0C9C0C3; - Thu, 30 Jun 2011 20:23:49 -0400 (EDT) + by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id A6B3C9C7DE; + Sun, 7 Aug 2011 15:18:38 -0400 (EDT) Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1]) by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024) - with ESMTP id o3ezwgloxuCS; Thu, 30 Jun 2011 20:23:49 -0400 (EDT) -Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) - by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 5DD6A9C0C5; - Thu, 30 Jun 2011 20:23:49 -0400 (EDT) + with ESMTP id ln+MaW5alQl7; Sun, 7 Aug 2011 15:18:38 -0400 (EDT) +Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) + by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 8A6D2909E4; + Sun, 7 Aug 2011 15:18:38 -0400 (EDT) Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232]) - by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p610NglX026379; - Thu, 30 Jun 2011 20:23:42 -0400 + by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p77JIaYf007737; + Sun, 7 Aug 2011 15:18:36 -0400 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500 - oleg@redhat.com; Fri, 1 Jul 2011 02:21:49 +0200 (CEST) -Date: Fri, 1 Jul 2011 02:21:47 +0200 + oleg@redhat.com; Sun, 7 Aug 2011 21:16:00 +0200 (CEST) +Date: Sun, 7 Aug 2011 21:15:58 +0200 From: Oleg Nesterov To: "Frank Ch. Eigler" , Kyle McMartin , Dave Jones , Josh Stone , Matthew Garrett , David Smith -Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com -Subject: [PATCH 16/19] introduce task_utrace_lock/task_utrace_unlock -Message-ID: <20110701002147.GA25854@redhat.com> +Cc: kernel@lists.fedoraproject.org +Subject: [PATCH 16/22] introduce task_utrace_lock/task_utrace_unlock +Message-ID: <20110807191558.GA14440@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline +In-Reply-To: <20110807191434.GA13184@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) -X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 +X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Status: RO -Content-Length: 2190 -Lines: 81 +Content-Length: 2189 +Lines: 80 - Add task_utrace_lock(task). It simply takes task->utrace->lock if this task was ever utraced. Otherwise it takes task_lock(), this @@ -5828,8 +5829,7 @@ index a824ac3..508c13c 100644 -- 1.5.5.1 - -From davej Thu Jun 30 20:27:24 2011 +From davej Sun Aug 7 15:19:27 2011 Return-Path: oleg@redhat.com X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gelk.kernelslacker.org @@ -5838,41 +5838,42 @@ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.2 Received: from mail.corp.redhat.com [10.5.5.51] by gelk with IMAP (fetchmail-6.3.20) - for (single-drop); Thu, 30 Jun 2011 20:27:24 -0400 (EDT) -Received: from zmta03.collab.prod.int.phx2.redhat.com (LHLO - zmta03.collab.prod.int.phx2.redhat.com) (10.5.5.33) by - mail04.corp.redhat.com with LMTP; Thu, 30 Jun 2011 20:23:52 -0400 (EDT) + for (single-drop); Sun, 07 Aug 2011 15:19:27 -0400 (EDT) +Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO + zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by + mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:41 -0400 (EDT) Received: from localhost (localhost.localdomain [127.0.0.1]) - by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id DB8D8D812A; - Thu, 30 Jun 2011 20:23:52 -0400 (EDT) -Received: from zmta03.collab.prod.int.phx2.redhat.com ([127.0.0.1]) - by localhost (zmta03.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024) - with ESMTP id 74TDLZXBCl6s; Thu, 30 Jun 2011 20:23:52 -0400 (EDT) -Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) - by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id C6776D810F; - Thu, 30 Jun 2011 20:23:52 -0400 (EDT) + by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 41B111322A2; + Sun, 7 Aug 2011 15:18:41 -0400 (EDT) +Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1]) + by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id ypKNrfgt9t+i; Sun, 7 Aug 2011 15:18:41 -0400 (EDT) +Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) + by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 2D805128FDA; + Sun, 7 Aug 2011 15:18:41 -0400 (EDT) Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232]) - by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p610NjAl015271; - Thu, 30 Jun 2011 20:23:45 -0400 + by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p77JIdnm028810; + Sun, 7 Aug 2011 15:18:39 -0400 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500 - oleg@redhat.com; Fri, 1 Jul 2011 02:21:53 +0200 (CEST) -Date: Fri, 1 Jul 2011 02:21:50 +0200 + oleg@redhat.com; Sun, 7 Aug 2011 21:16:02 +0200 (CEST) +Date: Sun, 7 Aug 2011 21:16:00 +0200 From: Oleg Nesterov To: "Frank Ch. Eigler" , Kyle McMartin , Dave Jones , Josh Stone , Matthew Garrett , David Smith -Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com -Subject: [PATCH 17/19] teach ptrace_set_syscall_trace() to play well with +Cc: kernel@lists.fedoraproject.org +Subject: [PATCH 17/22] teach ptrace_set_syscall_trace() to play well with utrace -Message-ID: <20110701002150.GA25861@redhat.com> +Message-ID: <20110807191600.GA14443@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline +In-Reply-To: <20110807191434.GA13184@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) -X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 +X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 Status: RO -Content-Length: 1513 -Lines: 49 +Content-Length: 1512 +Lines: 48 1. ptrace_set_syscall_trace(true)->set_tsk_thread_flag(TIF_SYSCALL_TRACE) can race with utrace_control()->utrace_reset() path which can miss @@ -5923,8 +5924,7 @@ index 0825a01..209ea2d 100644 -- 1.5.5.1 - -From davej Thu Jun 30 20:27:24 2011 +From davej Sun Aug 7 15:19:27 2011 Return-Path: oleg@redhat.com X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gelk.kernelslacker.org @@ -5933,40 +5933,41 @@ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.2 Received: from mail.corp.redhat.com [10.5.5.51] by gelk with IMAP (fetchmail-6.3.20) - for (single-drop); Thu, 30 Jun 2011 20:27:24 -0400 (EDT) -Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO - zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by - mail04.corp.redhat.com with LMTP; Thu, 30 Jun 2011 20:23:56 -0400 (EDT) + for (single-drop); Sun, 07 Aug 2011 15:19:27 -0400 (EDT) +Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO + zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by + mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:43 -0400 (EDT) Received: from localhost (localhost.localdomain [127.0.0.1]) - by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 6CD231287F3; - Thu, 30 Jun 2011 20:23:56 -0400 (EDT) -Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1]) - by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024) - with ESMTP id XX9YNcTcP1Ny; Thu, 30 Jun 2011 20:23:56 -0400 (EDT) -Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) - by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 504BF1287DD; - Thu, 30 Jun 2011 20:23:56 -0400 (EDT) + by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id E37B59C7DE; + Sun, 7 Aug 2011 15:18:43 -0400 (EDT) +Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1]) + by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id NRVgSzxr7avy; Sun, 7 Aug 2011 15:18:43 -0400 (EDT) +Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) + by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id C6D6E909E4; + Sun, 7 Aug 2011 15:18:43 -0400 (EDT) Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232]) - by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p610NmjB032686; - Thu, 30 Jun 2011 20:23:49 -0400 + by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p77JIfAM007754; + Sun, 7 Aug 2011 15:18:42 -0400 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500 - oleg@redhat.com; Fri, 1 Jul 2011 02:21:56 +0200 (CEST) -Date: Fri, 1 Jul 2011 02:21:54 +0200 + oleg@redhat.com; Sun, 7 Aug 2011 21:16:05 +0200 (CEST) +Date: Sun, 7 Aug 2011 21:16:03 +0200 From: Oleg Nesterov To: "Frank Ch. Eigler" , Kyle McMartin , Dave Jones , Josh Stone , Matthew Garrett , David Smith -Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com -Subject: [PATCH 18/19] introduce PT_SINGLE_STEP and PT_SINGLE_BLOCK -Message-ID: <20110701002154.GA25864@redhat.com> +Cc: kernel@lists.fedoraproject.org +Subject: [PATCH 18/22] introduce PT_SINGLE_STEP and PT_SINGLE_BLOCK +Message-ID: <20110807191603.GA14450@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline +In-Reply-To: <20110807191434.GA13184@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) -X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 +X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Status: RO -Content-Length: 3725 -Lines: 108 +Content-Length: 3724 +Lines: 107 Add the new internal ptrace flags, PT_SINGLE_STEP and PT_SINGLE_BLOCK. @@ -6076,8 +6077,7 @@ index 209ea2d..44908d0 100644 -- 1.5.5.1 - -From davej Thu Jun 30 20:27:26 2011 +From davej Sun Aug 7 15:19:29 2011 Return-Path: oleg@redhat.com X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gelk.kernelslacker.org @@ -6086,58 +6086,92 @@ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.2 Received: from mail.corp.redhat.com [10.5.5.51] by gelk with IMAP (fetchmail-6.3.20) - for (single-drop); Thu, 30 Jun 2011 20:27:26 -0400 (EDT) -Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO - zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by - mail04.corp.redhat.com with LMTP; Thu, 30 Jun 2011 20:23:59 -0400 (EDT) + for (single-drop); Sun, 07 Aug 2011 15:19:29 -0400 (EDT) +Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO + zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by + mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:46 -0400 (EDT) Received: from localhost (localhost.localdomain [127.0.0.1]) - by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 8FF6B9C0C5; - Thu, 30 Jun 2011 20:23:59 -0400 (EDT) -Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1]) - by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024) - with ESMTP id pNFtYrppMjXf; Thu, 30 Jun 2011 20:23:59 -0400 (EDT) -Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) - by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 7C2B89C0C3; - Thu, 30 Jun 2011 20:23:59 -0400 (EDT) + by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 810E31322A2; + Sun, 7 Aug 2011 15:18:46 -0400 (EDT) +Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1]) + by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id ptiIThWTq2a6; Sun, 7 Aug 2011 15:18:46 -0400 (EDT) +Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) + by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 6B665128FDA; + Sun, 7 Aug 2011 15:18:46 -0400 (EDT) Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232]) - by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p610Nqpd026408; - Thu, 30 Jun 2011 20:23:52 -0400 + by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p77JIiI8007757; + Sun, 7 Aug 2011 15:18:44 -0400 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500 - oleg@redhat.com; Fri, 1 Jul 2011 02:21:59 +0200 (CEST) -Date: Fri, 1 Jul 2011 02:21:57 +0200 + oleg@redhat.com; Sun, 7 Aug 2011 21:16:08 +0200 (CEST) +Date: Sun, 7 Aug 2011 21:16:06 +0200 From: Oleg Nesterov To: "Frank Ch. Eigler" , Kyle McMartin , Dave Jones , Josh Stone , Matthew Garrett , David Smith -Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com -Subject: [PATCH 19/19] utrace: consult PT_SINGLE_STEP/PT_SINGLE_BLOCK - before user_disable_single_step() -Message-ID: <20110701002157.GA25871@redhat.com> +Cc: kernel@lists.fedoraproject.org +Subject: [PATCH 19/22] utrace: finish_resume_report: don't do + user_xxx_step() if ptrace_wants_step() +Message-ID: <20110807191606.GA14453@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline +In-Reply-To: <20110807191434.GA13184@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) -X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 +X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Status: RO -Content-Length: 1150 -Lines: 41 +Content-Length: 2740 +Lines: 83 -- do not do user_enable_block_step() if PT_SINGLE_STEP is set, in this - case ptrace has already called user_enable_single_step() +finish_resume_report() should not enable/disable the stepping if +ptrace_wants_step() == T. If ptrace wants block_step while utrace +wants single_step we could "promote" the stepping, but I do not +think this really makes sense. -- do not do user_disable_single_step() if PT_*_STEP is set, ptrace needs - the stepping - -Unless the tracee is killed this can't race with ptrace, this is called -by the tracee itself. +Unless the tracee is killed this can't race with ptrace, this is +called by the tracee itself. If it is killed we do not care. Signed-off-by: Oleg Nesterov --- - kernel/utrace.c | 6 ++++-- - 1 files changed, 4 insertions(+), 2 deletions(-) + include/linux/tracehook.h | 8 ++++---- + kernel/utrace.c | 9 ++++++--- + 2 files changed, 10 insertions(+), 7 deletions(-) +diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h +index 06edb52..5612d2d 100644 +--- a/include/linux/tracehook.h ++++ b/include/linux/tracehook.h +@@ -121,8 +121,8 @@ static inline __must_check int tracehook_report_syscall_entry( + return 0; + } + +-#define ptrace_wants_step() \ +- (current->ptrace & (PT_SINGLE_STEP | PT_SINGLE_BLOCK)) ++#define ptrace_wants_step(task) \ ++ ((task)->ptrace & (PT_SINGLE_STEP | PT_SINGLE_BLOCK)) + + /** + * tracehook_report_syscall_exit - task has just finished a system call +@@ -146,7 +146,7 @@ static inline void tracehook_report_syscall_exit(struct pt_regs *regs, int step) + if (task_utrace_flags(current) & UTRACE_EVENT(SYSCALL_EXIT)) + utrace_report_syscall_exit(regs); + +- if (step && ptrace_wants_step()) { ++ if (step && ptrace_wants_step(current)) { + siginfo_t info; + user_single_step_siginfo(current, regs, &info); + force_sig_info(SIGTRAP, &info, current); +@@ -439,7 +439,7 @@ static inline void tracehook_signal_handler(int sig, siginfo_t *info, + { + if (task_utrace_flags(current)) + utrace_signal_handler(current, stepping); +- if (stepping && ptrace_wants_step()) ++ if (stepping && ptrace_wants_step(current)) + ptrace_notify(SIGTRAP); + } + diff --git a/kernel/utrace.c b/kernel/utrace.c -index 508c13c..d6607cb 100644 +index 508c13c..fbabb81 100644 --- a/kernel/utrace.c +++ b/kernel/utrace.c @@ -1828,7 +1828,8 @@ static void finish_resume_report(struct task_struct *task, @@ -6145,17 +6179,27 @@ index 508c13c..d6607cb 100644 case UTRACE_BLOCKSTEP: if (likely(arch_has_block_step())) { - user_enable_block_step(task); -+ if (!(current->ptrace & PT_SINGLE_STEP)) ++ if (!ptrace_wants_step(task)) + user_enable_block_step(task); break; } -@@ -1856,7 +1857,8 @@ static void finish_resume_report(struct task_struct *task, +@@ -1841,7 +1842,8 @@ static void finish_resume_report(struct task_struct *task, + + case UTRACE_SINGLESTEP: + if (likely(arch_has_single_step())) { +- user_enable_single_step(task); ++ if (!ptrace_wants_step(task)) ++ user_enable_single_step(task); + } else { + /* + * This means some callback is to blame for failing +@@ -1856,7 +1858,8 @@ static void finish_resume_report(struct task_struct *task, case UTRACE_REPORT: case UTRACE_RESUME: default: - user_disable_single_step(task); -+ if (!(current->ptrace & (PT_SINGLE_STEP | PT_SINGLE_BLOCK))) ++ if (!ptrace_wants_step(task)) + user_disable_single_step(task); break; } @@ -6163,4 +6207,267 @@ index 508c13c..d6607cb 100644 -- 1.5.5.1 +From davej Sun Aug 7 15:19:30 2011 +Return-Path: oleg@redhat.com +X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on + gelk.kernelslacker.org +X-Spam-Level: +X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD, + UNPARSEABLE_RELAY autolearn=ham version=3.3.2 +Received: from mail.corp.redhat.com [10.5.5.51] + by gelk with IMAP (fetchmail-6.3.20) + for (single-drop); Sun, 07 Aug 2011 15:19:30 -0400 (EDT) +Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO + zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by + mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:49 -0400 (EDT) +Received: from localhost (localhost.localdomain [127.0.0.1]) + by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 1C4A79C7DE; + Sun, 7 Aug 2011 15:18:49 -0400 (EDT) +Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1]) + by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id GxHOzMqYQY8N; Sun, 7 Aug 2011 15:18:49 -0400 (EDT) +Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) + by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 066D2909E4; + Sun, 7 Aug 2011 15:18:49 -0400 (EDT) +Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232]) + by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p77JIkkD030034; + Sun, 7 Aug 2011 15:18:47 -0400 +Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500 + oleg@redhat.com; Sun, 7 Aug 2011 21:16:10 +0200 (CEST) +Date: Sun, 7 Aug 2011 21:16:08 +0200 +From: Oleg Nesterov +To: "Frank Ch. Eigler" , Kyle McMartin , + Dave Jones , Josh Stone , + Matthew Garrett , David Smith +Cc: kernel@lists.fedoraproject.org +Subject: [PATCH 20/22] ptrace: shift user_*_step() from ptrace_resume() to + ptrace_stop() +Message-ID: <20110807191608.GA14460@redhat.com> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline +In-Reply-To: <20110807191434.GA13184@redhat.com> +User-Agent: Mutt/1.5.18 (2008-05-17) +X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 +Status: RO +Content-Length: 2384 +Lines: 70 + +1. ptrace_resume() plays with the stopped task which can be also + task_is_utraced(). In this case user_enable_xxx_step() can race + with utrace_reset()->user_disable_single_step(). + + We could change utrace_reset() to check ptrace_wants_step() and + add the task_utrace_lock + unlock barrier after ptrace_resume() + sets PT_SINGLE_STEP. + + But it is better to reassign enable/desable from the tracer to + the tracee, it can check its PT_SINGLE_ bits after wakeup. This + also makes sense because enable_step(task) can be faster if + task == current. + +2. ptrace can do user_disable_single_step() while utrace needs the + stepping. + + Set TIF_NOTIFY_RESUME after user_disable_single_step() to ensure + the tracee can't return to the user-space without utrace_resume(). + Any correct engine which wants the stepping should reassert it. + +Signed-off-by: Oleg Nesterov +--- + kernel/ptrace.c | 4 ---- + kernel/signal.c | 12 ++++++++++++ + 2 files changed, 12 insertions(+), 4 deletions(-) + +diff --git a/kernel/ptrace.c b/kernel/ptrace.c +index 44908d0..d37b30d 100644 +--- a/kernel/ptrace.c ++++ b/kernel/ptrace.c +@@ -580,14 +580,10 @@ static int ptrace_resume(struct task_struct *child, long request, + if (unlikely(!arch_has_block_step())) + return -EIO; + child->ptrace |= PT_SINGLE_BLOCK; +- user_enable_block_step(child); + } else if (is_singlestep(request) || is_sysemu_singlestep(request)) { + if (unlikely(!arch_has_single_step())) + return -EIO; + child->ptrace |= PT_SINGLE_STEP; +- user_enable_single_step(child); +- } else { +- user_disable_single_step(child); + } + + child->exit_code = data; +diff --git a/kernel/signal.c b/kernel/signal.c +index d0e0c67..bc40bd7 100644 +--- a/kernel/signal.c ++++ b/kernel/signal.c +@@ -1840,6 +1840,18 @@ static void ptrace_stop(int exit_code, int why, int clear_code, siginfo_t *info) + } + + tracehook_finish_stop(); ++ ++ if (current->ptrace & PT_SINGLE_BLOCK) ++ user_enable_block_step(current); ++ else if (current->ptrace & PT_SINGLE_STEP) ++ user_enable_single_step(current); ++ else { ++ user_disable_single_step(current); ++ /* if utrace needs the stepping it should reassert */ ++ if (task_utrace_flags(current)) ++ set_thread_flag(TIF_NOTIFY_RESUME); ++ } ++ + /* + * While in TASK_TRACED, we were considered "frozen enough". + * Now that we woke up, it's crucial if we're supposed to be +-- +1.5.5.1 + +From davej Sun Aug 7 15:19:31 2011 +Return-Path: oleg@redhat.com +X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on + gelk.kernelslacker.org +X-Spam-Level: +X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD, + UNPARSEABLE_RELAY autolearn=ham version=3.3.2 +Received: from mail.corp.redhat.com [10.5.5.51] + by gelk with IMAP (fetchmail-6.3.20) + for (single-drop); Sun, 07 Aug 2011 15:19:31 -0400 (EDT) +Received: from zmta03.collab.prod.int.phx2.redhat.com (LHLO + zmta03.collab.prod.int.phx2.redhat.com) (10.5.5.33) by + mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:51 -0400 (EDT) +Received: from localhost (localhost.localdomain [127.0.0.1]) + by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id AD8D0D89A9; + Sun, 7 Aug 2011 15:18:51 -0400 (EDT) +Received: from zmta03.collab.prod.int.phx2.redhat.com ([127.0.0.1]) + by localhost (zmta03.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id LHAT6DyOymTI; Sun, 7 Aug 2011 15:18:51 -0400 (EDT) +Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) + by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 99798D8988; + Sun, 7 Aug 2011 15:18:51 -0400 (EDT) +Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232]) + by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p77JIn3U030041; + Sun, 7 Aug 2011 15:18:50 -0400 +Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500 + oleg@redhat.com; Sun, 7 Aug 2011 21:16:13 +0200 (CEST) +Date: Sun, 7 Aug 2011 21:16:11 +0200 +From: Oleg Nesterov +To: "Frank Ch. Eigler" , Kyle McMartin , + Dave Jones , Josh Stone , + Matthew Garrett , David Smith +Cc: kernel@lists.fedoraproject.org +Subject: [PATCH 21/22] ptrace_disable: no need to disable stepping +Message-ID: <20110807191611.GA14463@redhat.com> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline +In-Reply-To: <20110807191434.GA13184@redhat.com> +User-Agent: Mutt/1.5.18 (2008-05-17) +X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 +Status: RO +Content-Length: 944 +Lines: 28 + +ptrace_disable() is called when the tracee is quiescent and we +are going to untrace. This means we are going to clear ->ptrace +and wake up the tracee. Now that ptrace_stop() checks PT_ bits +and does user_disable_single_step() we can remove this code from +ptrace_disable(), it is unneeded and not utrace-friendly. + +TODO: change !x86 code. + +Signed-off-by: Oleg Nesterov +--- + arch/x86/kernel/ptrace.c | 2 -- + 1 files changed, 0 insertions(+), 2 deletions(-) + +diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c +index 7ab475f..f1cdc7d 100644 +--- a/arch/x86/kernel/ptrace.c ++++ b/arch/x86/kernel/ptrace.c +@@ -807,8 +807,6 @@ static int ioperm_get(struct task_struct *target, + */ + void ptrace_disable(struct task_struct *child) + { +- child->ptrace &= ~(PT_SINGLE_STEP | PT_SINGLE_BLOCK); +- user_disable_single_step(child); + #ifdef TIF_SYSCALL_EMU + clear_tsk_thread_flag(child, TIF_SYSCALL_EMU); + #endif +-- +1.5.5.1 + +From davej Sun Aug 7 15:19:32 2011 +Return-Path: oleg@redhat.com +X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on + gelk.kernelslacker.org +X-Spam-Level: +X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD, + UNPARSEABLE_RELAY autolearn=ham version=3.3.2 +Received: from mail.corp.redhat.com [10.5.5.51] + by gelk with IMAP (fetchmail-6.3.20) + for (single-drop); Sun, 07 Aug 2011 15:19:32 -0400 (EDT) +Received: from zmta03.collab.prod.int.phx2.redhat.com (LHLO + zmta03.collab.prod.int.phx2.redhat.com) (10.5.5.33) by + mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:54 -0400 (EDT) +Received: from localhost (localhost.localdomain [127.0.0.1]) + by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 57405D89A9; + Sun, 7 Aug 2011 15:18:54 -0400 (EDT) +Received: from zmta03.collab.prod.int.phx2.redhat.com ([127.0.0.1]) + by localhost (zmta03.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id XgEdPuPz9LNX; Sun, 7 Aug 2011 15:18:54 -0400 (EDT) +Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) + by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 42E6BD8988; + Sun, 7 Aug 2011 15:18:54 -0400 (EDT) +Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232]) + by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p77JIqEO027919; + Sun, 7 Aug 2011 15:18:52 -0400 +Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500 + oleg@redhat.com; Sun, 7 Aug 2011 21:16:15 +0200 (CEST) +Date: Sun, 7 Aug 2011 21:16:13 +0200 +From: Oleg Nesterov +To: "Frank Ch. Eigler" , Kyle McMartin , + Dave Jones , Josh Stone , + Matthew Garrett , David Smith +Cc: kernel@lists.fedoraproject.org +Subject: [PATCH 22/22] ptrace_report_syscall: check TIF_SYSCALL_EMU +Message-ID: <20110807191613.GA14470@redhat.com> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline +In-Reply-To: <20110807191434.GA13184@redhat.com> +User-Agent: Mutt/1.5.18 (2008-05-17) +X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 +Status: RO +Content-Length: 862 +Lines: 27 + +4d16a64 "introduce PT_SYSCALL_TRACE flag" breaks PTRACE_SYSEMU +which doesn't set PT_SYSCALL_TRACE. + +Change ptrace_report_syscall() to check TIF_SYSCALL_EMU as well. +This can't conflict with utrace, this flag can only be set by +ptrace. + +Signed-off-by: Oleg Nesterov +--- + include/linux/tracehook.h | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h +index 5612d2d..ac833de 100644 +--- a/include/linux/tracehook.h ++++ b/include/linux/tracehook.h +@@ -76,7 +76,7 @@ static inline void ptrace_report_syscall(struct pt_regs *regs) + { + int ptrace = task_ptrace(current); + +- if (!(ptrace & PT_SYSCALL_TRACE)) ++ if (!(ptrace & PT_SYSCALL_TRACE) && !test_thread_flag(TIF_SYSCALL_EMU)) + return; + + ptrace_notify(SIGTRAP | ((ptrace & PT_TRACESYSGOOD) ? 0x80 : 0)); +-- +1.5.5.1