Received: by 10.223.164.202 with SMTP id h10csp253580wrb; Tue, 14 Nov 2017 14:46:15 -0800 (PST) X-Google-Smtp-Source: AGs4zMYVexOY/H/HJRa6UhdIbEPcS37ap+CkGZRUNRLmQy6UImZVqCCMG+hdMoU2CLgRaGTCvDWu X-Received: by 10.99.121.140 with SMTP id u134mr13246871pgc.16.1510699575352; Tue, 14 Nov 2017 14:46:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510699575; cv=none; d=google.com; s=arc-20160816; b=yoRgV27FZZXxUsEmbi/n7Ynu/mpqmzf3A0wvUQR8n/FMfO0hSNReKoxfC+DM5TE4R3 ba2gT4jpu2GNcXRl05Z+cli5DWrvobAZ3yF0blXIN7JfdQhVeNta9qSnmrTe8xR8bufB k2O0htbct3fvfUyJbB3dPRMZoDncL+EtWvvVR+xVPBTSu6wQv2d/BgdaMESKP+/Lhd/Q 39bZqEherub6W1ow9ImtZtZU/Czk8/QTkLc2znJKpfjNaWv+AzbNygaUNUbkCmB60LqY Igox5zqPd5lmlyM394gvpJzCsW1YBGrb1r63WIYvm8PQ237XUzIPjye76B0qmceRCOsc 5uiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:dkim-signature :arc-authentication-results; bh=TmYJiJd/fZhDWxYHvyzh3v3AYcO2LjFQvkstBIKO+1Q=; b=xKVlseqq0vN8oeFq6o8FeHmBfp5wZmYoHH9F16eL4CTReeBvjMswN8rEbKtmrbhnQL QHSaWxE3XCjg1yyI8fjTanOUBa8X4t3DzRl79TqfMA4FvYiYXbtOuESrO3pW9aSNAHtP KG1CAwH49la0TmPGrj1xhioyi4aDcCKboA9iP6JA+JLyA0pVSvOsbwBRMEqWOpvyhwCQ J3qnirDezIzz7GjHBkhpdz8IFb6FnNDscOjxqmS0E8T40Ft6AzM4QUWy2kuEPE7TwEu3 QT3IwWDtOOuwQfoOoNIwp7poHzfxrBBUuJA3h9TeN4YsB4VSzWooOuMM93mUJWV6hXsA 9NrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=WgbVZVgU; dkim=fail header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=AioIyac/; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m3si16681718pgd.193.2017.11.14.14.46.02; Tue, 14 Nov 2017 14:46:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=WgbVZVgU; dkim=fail header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=AioIyac/; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756878AbdKNWoT (ORCPT + 87 others); Tue, 14 Nov 2017 17:44:19 -0500 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:33856 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751233AbdKNWoM (ORCPT ); Tue, 14 Nov 2017 17:44:12 -0500 Received: from pps.filterd (m0001255.ppops.net [127.0.0.1]) by mx0b-00082601.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vAEMfWaa019703; Tue, 14 Nov 2017 14:43:41 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=facebook; bh=TmYJiJd/fZhDWxYHvyzh3v3AYcO2LjFQvkstBIKO+1Q=; b=WgbVZVgUxNDkxT0kMCbqQJeuih4FAeGLHJX7LNYF7awzeiWWuFxM4wFFeRVAR0z3LAaw xKRupMEBFrWOVNPZqQVFdQbgPX1UfIS5q3WVhlzigud9qf0wz6HSABW0LOHfje8ECEIG 66jiKBjA2PYP4oIn9WJYXiQJel2ysIk7/Ts= Received: from mail.thefacebook.com ([199.201.64.23]) by mx0b-00082601.pphosted.com with ESMTP id 2e85cc1084-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 14 Nov 2017 14:43:41 -0800 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (192.168.54.28) by o365-in.thefacebook.com (192.168.16.16) with Microsoft SMTP Server (TLS) id 14.3.361.1; Tue, 14 Nov 2017 14:43:39 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.onmicrosoft.com; s=selector1-fb-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=TmYJiJd/fZhDWxYHvyzh3v3AYcO2LjFQvkstBIKO+1Q=; b=AioIyac/PW2M8X96tqepeuRSZt1ypgpw3rfWY9ZT2Mv9sKY/afcOD9Zv2ZHZs3LcoB/8ytyZz86dXvHxxzRv66h1ATFEpHrP0T8neVIr9YjYZsICsEVxtomf8RuMAZXREVUCkgvgDtnOl8JJCtRa0/UNT/Hf4MdIc2mfCknUeqs= Received: from skotch-loaner.DHCP.thefacebook.com (2620:10d:c090:200::6:8c67) by CY4PR15MB1831.namprd15.prod.outlook.com (10.174.54.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.218.12; Tue, 14 Nov 2017 22:43:36 +0000 Subject: Re: [PATCH][v3] uprobes/x86: emulate push insns for uprobe on x86 To: Oleg Nesterov CC: , , , , , , , References: <20171113221139.1516536-1-yhs@fb.com> <20171114155124.GB17667@redhat.com> <20171114160304.GA19323@redhat.com> From: Yonghong Song Message-ID: <946788b4-e57b-c7c2-9ba8-3c6fe87c4af8@fb.com> Date: Tue, 14 Nov 2017 14:43:32 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171114160304.GA19323@redhat.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [2620:10d:c090:200::6:8c67] X-ClientProxiedBy: BN6PR16CA0025.namprd16.prod.outlook.com (10.172.26.11) To CY4PR15MB1831.namprd15.prod.outlook.com (10.174.54.16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c8799e05-7cc1-40ba-ee6a-08d52bb12569 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603199);SRVR:CY4PR15MB1831; X-Microsoft-Exchange-Diagnostics: 1;CY4PR15MB1831;3:F/ZQGqQ8WB9bPGZqdOjzCtW544WmkgTs4Pgs0FzldqEkY/WjMPB1krAJp0uQC5B+hbYdVBiEQ/RvahW7PmV1c+YOA9NA96KmUM7WLlrHQ0ptD0oQOEj3fkYYntw3HRO1EnT9pR2glc43V1yRWdu9PGOCqNJZCj4OC3eZA6oEcNYUpBEFP4gN3UmrV3OwGoyPm9su3OYCVrS8+BcDfU0WECbsjZOM6IBEmOpouimYRgCVQTHo+dGtiASDHyb+g77j;25:Mq56G/9T+f3Od+PLWaaE9+L7oTvVLWOJCsoDVc4XKoMzf1AdmyNejNIu5DXnFTTG1JLHQR3E7SCnCUz6oHCblVlz0ylq454WokhZUyz7xW74+8oQxqThjwAPp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yaSMek/9bxSIinMFj9oqgNPRF+h0xiTz2h66/cyhCpSsxPZM5HCbXCZbGBgsLUHTzO0BNwLhYh5eynpKisynTPWJw0W520EaA4m3Zsak1J795c8AACNBG02G7U3QJcZb5M4C84+0dBo/1/KgaX+tkJvDHWnsT9xulL91yVf6ChK8eSqg3YUQvoP424ecu2spcDnfezcCMtbpGc2ThYDAJkSrQY6Yuw28ZNdzUCHzKax6DsrA5EYLwtmNSyv07w== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(11241501159)(6040450)(2401047)(8121501046)(5005006)(3231022)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(3002001)(6041248)(20161123562025)(20161123558100)(20161123555025)(20161123564025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY4PR15MB1831;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY4PR15MB1831; X-Forefront-PRVS: 04916EA04C X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6009001)(346002)(376002)(24454002)(189002)(199003)(81166006)(76176999)(54356999)(229853002)(7736002)(230700001)(6512007)(305945005)(5660300001)(36756003)(97736004)(478600001)(6486002)(6116002)(50986999)(31686004)(65826007)(189998001)(81156014)(101416001)(65806001)(8676002)(65956001)(25786009)(47776003)(6506006)(50466002)(6916009)(67846002)(106356001)(23676003)(53936002)(105586002)(83506002)(2950100002)(6666003)(6246003)(316002)(53546010)(68736007)(8936002)(33646002)(2906002)(4326008)(64126003)(31696002)(86362001)(58126008)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:CY4PR15MB1831;H:skotch-loaner.DHCP.thefacebook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; Received-SPF: None (protection.outlook.com: fb.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTRQUjE1TUIxODMxOzIzOldzWG12d0VoTmRoMStPbUJ4RTk4WWt0ZWV5?= =?utf-8?B?L2Z0TFJ0ZU5qcENoZkV4RTRuV0FaWlg0NXRwaFBjZ1U4UlB3K2VRSmVTb21W?= =?utf-8?B?amNDOGxaVDZXZE55UmgrS1FOK1JSSmhGQkpEOEM5bHdla2ZVNWRyV1dLeENn?= =?utf-8?B?bGUwMXRpTmZLbWJRWGJic3J6MVRZVVdEV1kvbndUbmJKQ2lIdzZ4ZjZ0ZzlH?= =?utf-8?B?WUsrWkVsY1lwUGtJemhpcGxKK2xmV0dLMC81Vm5IdTExTjNGRVczY3dLOE9W?= =?utf-8?B?WXFLNjFJaHNPQkt0S1RpUmJvQXlScnEzNWdQZjZhUHc1Si9VeHFUaFNRNmp1?= =?utf-8?B?enR6NEoyd0ZpS3pLaEp1dGM2eG1BNUhTZ0JUTzhZUUNnNjNrMkQyK0lyaEVh?= =?utf-8?B?b09TelB2L2FsVEVpMXgySk5pVlZRWHNhTnBTYU9mZUtCQ0JlVjJqMzA0SGlR?= =?utf-8?B?RCtGS1BUbFhtMUlHMHdzbzIyeTRzdzJKZmk0S3puK3VSeU5OdzlIYUNISGVD?= =?utf-8?B?T3ZVUlh1ZjZkaXRDRW1hejFaRVBwSDNUay9zbWRLcmJlUXRaK3o4OXE1NGQw?= =?utf-8?B?VzBhMnZLK1U1amJ0eWRHQXRPTWNRdDBUdlZucUtuOHAvNG5XUTVYS0lZakkr?= =?utf-8?B?eGpqWElTYTZMTjI4L3BBRjNyc2wxUW53bm1xMkVuc2N2bVpiNDhmUjE5MG5B?= =?utf-8?B?alNtb3U0QU5oYk04WWVoZEttU0NrdENxaU9ucGlqSGoybi9RSnN0YWZhUHVl?= =?utf-8?B?aU40REhCUFgzM1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15MB1831;20:ptAwzElOgBQXufj46TTxDIACf6baQgMngbf9CpyFnQlgtymhUM0iVNhcqsu0VvCZ0DNvBYBJ5iY1kM6zlewjNgrYSct/yCGAIZG/trASNx8QIRbdSdXDXYavSWu5WeDNlzF67KMTd/vcQYaX+mE2aGA+ghzgcFBwF6jmqtOh5cw= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Nov 2017 22:43:36.3604 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c8799e05-7cc1-40ba-ee6a-08d52bb12569 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR15MB1831 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-11-14_12:,, signatures=0 X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/14/17 8:03 AM, Oleg Nesterov wrote: > On 11/14, Oleg Nesterov wrote: >> >>> +#ifdef CONFIG_X86_64 >>> + if (test_thread_flag(TIF_ADDR32)) >>> + return -ENOSYS; >>> +#endif >> >> No, this doesn't look right, see my previous email. You should do this >> check in the "if (insn->length == 2)" branch below, "push bp" should be >> emulated correctly. >> >> And test_thread_flag(TIF_ADDR32) is not right too. The caller is not >> necessarily the probed task. See is_64bit_mm(mm) in arch_uprobe_analyze_insn(). >> >> And again... please check if uprobe_init_insn() fails or not in this case >> (32bit task does, say, "push r8"). If it fails, your V2 should be fine. >> >> >> To remind, uprobes && 32-bit is broken, let me quote my another email: >> >> The 3rd bug means that you simply can't uprobe a 32bit task on a 64bit >> system, the in_compat_syscall() logic in get_unmapped_area() looks very >> wrong although I need to re-check. > > Yes, > >> I didn't have time for this problem so far. But emulation should work, so >> you can hopefully test your patch. > > Ah, no, sizeof_long() is broken by the same reason, so you can't test it... Right. I hacked the emulate_push_stack (original name: push_ret_address) with sizeof_long = 4, and 32bit binary uprobe works fine on x86_64 platform then... But that will involve a bigger change to propogate the is_64bit_mm() along the call graph. > > OK, I'll try to do something tomorrow, then we will see what can we do > with your patch... Thanks for reviewing! I will wait for your further comments/direction before next step. > > But it would be nice if you can check what uprobe_init_insn() does in this > case, see above. As mentioned in my previous email, for 32bit application, compiler won't generate "push %r8" as "%r8" is only available on x86_64 platform. For 32bit app, I see "push %bp" etc which does not have rex_prefix. They cannot be emulated right now due to emulate_push_stack needs change. > > Oleg. > From 1584082874834841603@xxx Tue Nov 14 22:39:12 +0000 2017 X-GM-THRID: 1583700940287669077 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread