Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751882AbdIUWBX (ORCPT ); Thu, 21 Sep 2017 18:01:23 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:33376 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751707AbdIUWBV (ORCPT ); Thu, 21 Sep 2017 18:01:21 -0400 Subject: Re: [PATCH -tip v3 0/7] kprobes/x86: Preempt related enhancements To: Masami Hiramatsu , Ingo Molnar , References: <150581509713.32348.1905525476438163954.stgit@devbox> CC: , Steven Rostedt , , Peter Zijlstra , Ananth N Mavinakayanahalli , Thomas Gleixner , "H . Peter Anvin" , "Paul E . McKenney" , Alexei Starovoitov From: Alexei Starovoitov Message-ID: <099fb3cf-b439-4a5d-b8c2-de691a32ed06@fb.com> Date: Thu, 21 Sep 2017 15:00:35 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <150581509713.32348.1905525476438163954.stgit@devbox> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [2620:10d:c090:180::1:9b42] X-ClientProxiedBy: MWHPR18CA0047.namprd18.prod.outlook.com (2603:10b6:320:31::33) To DM3PR15MB0969.namprd15.prod.outlook.com (2603:10b6:0:10::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 84eff89e-1252-49a4-4aeb-08d5013c32bf X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:DM3PR15MB0969; X-Microsoft-Exchange-Diagnostics: 1;DM3PR15MB0969;3:pIzM6ZHU44SI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NOdyMdtI8K1pYyIk2Zbssf2MBpe+jeq3MnfXL1O3gFZzvMpo3opozqQUSIFMXmHLA0fdHE+F9WodQ0VrQRdRZX8q7zLy7GlArlTnryDs/eMvvaYymEzez9JY/YrQ7YoSuSpn9hzYXul3XiVKEpAswuHfesyD3H0r/JQg3Y/6FBiBw5yxM69xBlwhTGADwGi6e+DfFwn0jZS2rzcQEzrjNALapW+rPmXKGNkB3yXHj92RjWlR2Pz8HxFBEhP2jf6VZIKHizjs0qG33xnljeHoCyjdHNZ3o4QNIaJvQWa0H/CwXCUwI7muMVA97wzM/zVNf1Cka9CV70WcyWXf9Tm+EK1t;4:z/VmYrSozpdgMnFQ6FHSTvKoEKolgxqyV4EqPF0PRMWvAa8XBF7ABYR0W+P+Sigqxvlt3PtWoOUpmD+kpBCaS95NeSrmUj7bdq+wJRbH1jPe1rTKcF6xg669aPJJwmSPiIEYzqE73pfg6/eW64ymOUrzsTcDk9ye0r1jIG+meQkp+Hx+HS6+5xirPukGLGgPMz2sgMOsEihb3SE4xUIW3VVxz1FG5Sky1kAqw/2kexGVpIMTsBX/I9XW+rVablvm X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(93006095)(93001095)(100000703101)(100105400095)(3002001)(10201501046)(6041248)(20161123564025)(20161123562025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:DM3PR15MB0969;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DM3PR15MB0969; X-Forefront-PRVS: 04371797A5 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6009001)(346002)(376002)(24454002)(377454003)(189002)(199003)(6116002)(305945005)(101416001)(6666003)(966005)(7416002)(106356001)(47776003)(33646002)(31686004)(65956001)(478600001)(65806001)(4326008)(1706002)(81156014)(7736002)(230700001)(81166006)(25786009)(5660300001)(8936002)(50986999)(65826007)(54356999)(105586002)(8676002)(64126003)(83506001)(50466002)(316002)(68736007)(76176999)(110136005)(2906002)(189998001)(58126008)(36756003)(53546010)(97736004)(229853002)(54906003)(86362001)(2950100002)(31696002)(53936002)(6246003)(23676002)(6486002)(6306002)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:DM3PR15MB0969;H:[IPv6:2620:10d:c081:1130::11e7];FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTNQUjE1TUIwOTY5OzIzOlB4bGdFTWJoZW5NdXJYcS9rY2lQdEJYTGFZ?= =?utf-8?B?M1Zvd0lOdUdGa1JwQzRhck16UnArWXQ2TEo0YXhOQW1wcnZua05yQ2dhSjRw?= =?utf-8?B?QmNXNVZVQ2ZTdjUySUtSSzRqWE8vZjR6dW54TDZLcDVTandQaWxmQWhvWitK?= =?utf-8?B?dlVNeG5YL0x3bmFBaGhlMDFJU2h1Vlo1ZG9ocmhteDRuUTA2UTVrM1kvN1J0?= =?utf-8?B?S2xBQXpGMGEwVVVFYXJITHZOQWJCMHFVUkNOOE5HRGRuZDczUGJlRENjaGNs?= =?utf-8?B?dkluMlFuTXh3bCtiRjRXZi9FeWJIbWE5MENGWkV3N0JodXoxTmxHYlVZYlZR?= =?utf-8?B?d0xxRFVNM3RmRXhHYW85OEoyUmh0SHZyOEx5OGhCNUhhcTJBUzh4c2dza0Qv?= =?utf-8?B?ckw1SE8xb1hJSzVDMkhhSmdmZi84RDNnNWUveHNMbnJib3VZM0Z4Z0Q1dFp2?= =?utf-8?B?cGIzR3YzYlZUQ2lIOWxuZWMzSldjVTZZTnEvSXhFYVlCUEw5YTVo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50HzDQ0p2yaM/9eyvQqhrmikogIpdtT4dkhxJCIiltv1PJ01h1tZjk=;7:p+fZlVKCelKuOD6zSDd17rHMRreXx4n3Cu2T8xscZ5AALibas3HKI/J91umrCpnGjke98/0waTgyD4VXtUeVtrMW8S/nPdNuzDkx2kKV8DrsDeeh9XuyzHtz2nETmFuyzd4Bg/BZXD3EFS0z3D81xqXrRn6rk3GrSW72guolAkwILvgnkQJT5xXlX7ROFY3/hYU5kamuOhDW367a3Vs4/0Yxhsx+VKZtlfdrr6Fi7zI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DM3PR15MB0969;20:ig/yrWpew34rt4n1yzrtvDwageiDD3tAgUCIkuBSQ4aZ3Z93SNqih8dIhJFQE0s2g3L4eZQc9FcZZKIwWz9/zFVdZ717l3vmhyF+Jmg5kqGLie3bnmIpqst5eDFHCSjZJlcaGAIo6jHT39vo7nN5pxVrdtoqpUnAN2ACgBFEgtY= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Sep 2017 22:00:39.1511 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR15MB0969 X-OriginatorOrg: fb.com X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-09-21_06:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1408 Lines: 36 On 9/19/17 2:58 AM, Masami Hiramatsu wrote: > Hi, > > Here is the 3rd version of the series to improve preempt > related behavior in kprobes/x86. This actually includes > many enhancements/fixes from the 2nd version, which is > > https://lkml.org/lkml/2017/9/11/482 > > With the previous patch, lkp-bot reported that an issue > ( https://lkml.org/lkml/2017/9/14/3 ) and I couldn't > reproduce it. However, I found a suspicious bug and fixed > it ([2/7]). > > Also, while I was checking the correct condition for > *probe handlers in Documentation/kprobes.txt, I also > found that current implementations for ftrace-based kprobe > and optprobe were mis-reading the document. >>From the document, handlers must be run with preempt- > disabled, but interrupt disabling is not guaranteed. > So in the middle of this series, patches ([4/7],[5/7], > [6/7]) adding preempt-disabling and removing irq-disabling. > > And at last, I placed the original patch (Enable optprobe > with CONFIG_PREEMPT). > > The others are just for making sure this fix works well. > - [1/7] is just adding preemptible checker in kprobe > smake tests so that we can easily find mistake. > - [3/7] is adding an assert if user tries to change > execution path in optprobe, which is obviously > prohibited in the document (there also be how to > avoid it.) all patches look great to me. Acked-by: Alexei Starovoitov