Received: by 10.223.164.202 with SMTP id h10csp26419wrb; Tue, 14 Nov 2017 16:48:02 -0800 (PST) X-Google-Smtp-Source: AGs4zMYJX9MsnNIai/lUb3sNHVxS0Bg+413muGGpj5mQSpqxIyqmqeB8d/4/k8LZm/aEJGVeBb1q X-Received: by 10.98.35.149 with SMTP id q21mr9596592pfj.31.1510706882822; Tue, 14 Nov 2017 16:48:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510706882; cv=none; d=google.com; s=arc-20160816; b=EA5bGvhxgafdmk61f/4bxE4MeRVXY7X0auj+N62RUmo+i9ppP7IE3zSPBzkl1AYmZn rog4+eFa+qhhIW6HSjRZqbEtNpsfY4kfC+9g3EaCXeD23ocYBZaRi/HrLKgd84bjCigI gJCmWlxiyyN851Cr/pZwMGQUnkepkhqEahl2qh69A0O9xKJfYKEQr3nSVk1JfkLDUMcH v2hMl2I7D0srURnbRvKly2hoLIvtFUZcoruvwp1IA1fGTbxiTXRyPCitNcPjcC4G7TEV NoFmqsRKCiTEzIWKQRgBq5ECLT/Zc6Of8C6OnVCXlcE6CbScgIQVO3aAGQR1juPvYhxS mCBg== 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=WMUL6lwNxqTCMwY2FU1dZoIwrh8EZMPqlsDyXeZc2LY=; b=WE8PCXqocRWsOHmw7GbrXuKXJF2CtYoBawI8ue/Dop3SbCMFogSyIP31Z6apGF/tql sFDh/XzgoJmjZQ3xIaLXC/Y3U9acatARbHD7jn1+xMMILLBXNfvxjVQ7ZkWbQbfMwTSU bxWzabjnMPzYGMM1nyoUkWfQ8BE082ul+dq3wvsj1iulwM1qfNd+hNrEWKVLR+OfHZwW zyl5HrDbR+IKO/X8wtkcyVzL4qW4Q9mJ9kEp5fxKHlOsK04i2fcakZbMnrxJnhpqjOeC 5cwxdmJFwMlegt7kpFvoY4ZBA6D+LgSoWVMciXn7ehErXtFLqn6zkrF6A3n/memVPUBl GCSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=LFFMlGkU; dkim=fail header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=ct2Br71O; 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 u18si18376414pfk.328.2017.11.14.16.47.50; Tue, 14 Nov 2017 16:48:02 -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=LFFMlGkU; dkim=fail header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=ct2Br71O; 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 S1756292AbdKNWXh (ORCPT + 87 others); Tue, 14 Nov 2017 17:23:37 -0500 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:57484 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751233AbdKNWX2 (ORCPT ); Tue, 14 Nov 2017 17:23:28 -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 vAEMLrPl003399; Tue, 14 Nov 2017 14:22:57 -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=WMUL6lwNxqTCMwY2FU1dZoIwrh8EZMPqlsDyXeZc2LY=; b=LFFMlGkUSuCIyRjkVeuYCXHNPDE5zIbHYLj9jf/KUqTAg4zXIdd7GeIKXYzvu0qK2xrj tIDn1U8JDawA6r4uVT0ttB1cRn4RGr+/95syeyRyFYk8nMTQyVFensQT7T8513mEKLQL zihaXOkemqXieAjiIGH2DB/dKR4KvzKYlEA= Received: from mail.thefacebook.com ([199.201.64.23]) by mx0b-00082601.pphosted.com with ESMTP id 2e85cc0xfg-3 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 14 Nov 2017 14:22:56 -0800 Received: from NAM03-DM3-obe.outbound.protection.outlook.com (192.168.54.28) by o365-in.thefacebook.com (192.168.16.17) with Microsoft SMTP Server (TLS) id 14.3.361.1; Tue, 14 Nov 2017 14:22:52 -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=WMUL6lwNxqTCMwY2FU1dZoIwrh8EZMPqlsDyXeZc2LY=; b=ct2Br71OAwG/CghN9jJi2Uv2oVlc8VYxMnn3d1x+rR3Bu8PBbnWqDEDAQo1PKZOBYSnwB+Zpq3/OfLi2vFNs7kDuQAlBqMUpu7Kww2mA1B/7XCVICfXG7qqB1O0Rdq+9MtC9ak6fo7Zgt5pPGzKE7lKKEosPvefXQJswJHDZB7w= Received: from skotch-loaner.DHCP.thefacebook.com (2620:10d:c090:200::6:8c67) by DM5PR15MB1834.namprd15.prod.outlook.com (10.174.247.11) 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:22:49 +0000 Subject: Re: [PATCH][v2] uprobes/x86: emulate push insns for uprobe on x86 To: Oleg Nesterov CC: , , , , , , , References: <20171110172546.3185266-1-yhs@fb.com> <20171113125956.GA11516@redhat.com> <6fdd9773-a0d0-7598-35d4-959bb3701d1b@fb.com> <20171114153424.GA17667@redhat.com> From: Yonghong Song Message-ID: Date: Tue, 14 Nov 2017 14:22:46 -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: <20171114153424.GA17667@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: MWHPR21CA0026.namprd21.prod.outlook.com (10.175.142.140) To DM5PR15MB1834.namprd15.prod.outlook.com (10.174.247.11) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2c60e15a-052a-4417-74e7-08d52bae3dd8 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603258);SRVR:DM5PR15MB1834; X-Microsoft-Exchange-Diagnostics: 1;DM5PR15MB1834;3:lU+fDQ3XgX5Ey7T+eGqE8Lm9ZxWVPqvEGLDPAkHvSRFqM0P2RcNfl3EgDOQhXyzIZj+CKrvWGIBQjRmIa080BKZ5WwWizMb+0ccKifQ6S31Sl5GznsGfefJPFc5qZIuBaYxsfAMWZsK3L1ijmAycC41TZFvlEcXbh+Bomb1kRVNGlazAyzDqG1XOBAhvwtBEG5n1wcdEOX5gqk/LImzzrqz7o2sFWRbdj2KZEpip6omqtyHRrdI1n7SuQQZTTMbz;25:ZLsel5hoW2EqwCBZZt0fih0Ihzneco5TO0Rtr84wchR+oKwRbTnQf4xJ+BuyBUBuEPX3enrTtOBUrgT7aXlwfmYFyhalVGP8pYAt2fGm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QsIJPBo5IzNQEKdijV7/gKmSizgZnE4yo9T9DqLNq9wTe7PP70UURrp0qXDsAeqoEW76bWCbc8VlVGN/akgJmRaWzFCWVEgpTkLwkFLkLspaubloni8d6bp92Hj+J6pfm7kweSOigcf7XGMT8u12vR+BbT26kwuFrfwkZOusZUYmRn9z4bTMiH8peIBSAycfWzEGZupMriLYSfiBSfoeWwpMPMlErJjb2WfBpJGtWUd4+L2uttYh+Qn5zNTQX7X6sXZuHAgNXPQ== 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)(5005006)(8121501046)(100000703101)(100105400095)(93006095)(93001095)(3231022)(10201501046)(3002001)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123562025)(20161123560025)(20161123558100)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:DM5PR15MB1834;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DM5PR15MB1834; X-Forefront-PRVS: 04916EA04C X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6009001)(346002)(376002)(199003)(24454002)(189002)(86362001)(230700001)(97736004)(50466002)(65806001)(6116002)(65956001)(64126003)(6506006)(6486002)(47776003)(36756003)(478600001)(189998001)(67846002)(31696002)(58126008)(2906002)(23676003)(229853002)(316002)(25786009)(93886005)(76176999)(50986999)(65826007)(68736007)(53546010)(54356999)(5660300001)(7736002)(6666003)(2950100002)(83506002)(101416001)(305945005)(4326008)(53936002)(6246003)(6512007)(6916009)(81166006)(8676002)(31686004)(8936002)(105586002)(106356001)(81156014)(33646002)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR15MB1834;H:skotch-loaner.DHCP.thefacebook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; Received-SPF: None (protection.outlook.com: fb.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTVQUjE1TUIxODM0OzIzOm1VQXdJQXhjMnF6SEhjKzNlWnRxMmtuQzFV?= =?utf-8?B?d0FhaTNUNVZyTHNVTTNzRmN1VUpBbkk4d3QxbmhpNXkzTjBwVjRBd3UrR0J4?= =?utf-8?B?SG9keFJ4cWZ1eXI0Q0MzNjVtY21FTml3eGRoVzVmL2FUeHRVSXY1MUhGOE85?= =?utf-8?B?TitYSGpkY1V2cVRVcHRTeUlwaFV0cWhXaG5td2R0RHpOMTlwcFhGVHVtakEw?= =?utf-8?B?MUJkMElwQUc3ZmR4YXF2SVpwQU9LdGpFL2Z5YWxabFo0cVllUno4dkZha1oz?= =?utf-8?B?amhFWG1Kb0FJOExGSGc4QktLZ2Z3SkxVekZvZy8wbDZPd3VremdUODVOTVJQ?= =?utf-8?B?OTBIQnRlRFUwM0pGdHB4c29abnMxZnU0UkVZdnM2L29ORnZrZkxpTTZlY0ZY?= =?utf-8?B?emZ2T0g0VUwvdFJMTlhlYXBoTTlzeTB6NWxPYmdzc3dKSXZGbm1KbzBoTFdi?= =?utf-8?B?YnUza242YU94c1kvV0g1MGZOSWRnTzN1T3hTSE1FWmhOQ1ZrNVZHc1lsRGVh?= =?utf-8?B?akdXbFc2aldZTFRkWmM1Ky93SnBwbzJOV1ppMzFwK0FpVmZBbUVJODkvNlk4?= =?utf-8?B?dDgxb0hOU1FIV2xweG5iNGd5Ukh2V3dWaWVabGM4V0h4QVk2Mm91NWRyNXJP?= =?utf-8?B?b0loTFZ3SjFDZFhrTnpsKy9hUy9xa0oweUM3ZWtKWUxoR1lXeFc5ZXZCczhC?= =?utf-8?B?cE42YkdONVhGWHl1aWZwdTRsR1JkNGZuMno4OExBR21rZmEyNjFhSjZLRXEz?= =?utf-8?B?UH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yaoxDhK SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DM5PR15MB1834;20:pak4j1ptUpVlzqMhS10n80TCIXsUpm1tJDQsftLgxttDo/FxkmzWVeRpTI2hV5YXrSSO60IlXpudtJ3RE1/NWJ3ZmQagA5DKrJW4x1so8W2sn0i+Pg6IZhQSYiKPHWXO3gvm+BqBEPW5U8jpms0Yv8LCwIs7L6a3aG8dkJnUbiU= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Nov 2017 22:22:49.5161 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2c60e15a-052a-4417-74e7-08d52bae3dd8 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR15MB1834 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 7:34 AM, Oleg Nesterov wrote: > On 11/13, Yonghong Song wrote: >> >> On 11/13/17 4:59 AM, Oleg Nesterov wrote: >>>> + switch (opc1) { >>>> + case 0x50: >>>> + reg_offset = offsetof(struct pt_regs, r8); >>>> + break; >>>> + case 0x51: >>>> + reg_offset = offsetof(struct pt_regs, r9); >>>> + break; >>>> + case 0x52: >>>> + reg_offset = offsetof(struct pt_regs, r10); >>>> + break; >>>> + case 0x53: >>>> + reg_offset = offsetof(struct pt_regs, r11); >>>> + break; >>>> + case 0x54: >>>> + reg_offset = offsetof(struct pt_regs, r12); >>>> + break; >>>> + case 0x55: >>>> + reg_offset = offsetof(struct pt_regs, r13); >>>> + break; >>>> + case 0x56: >>>> + reg_offset = offsetof(struct pt_regs, r14); >>>> + break; >>>> + case 0x57: >>>> + reg_offset = offsetof(struct pt_regs, r15); >>>> + break; >>>> + } >>>> +#else >>>> + return -ENOSYS; >>>> +#endif >>> >>> OK, but shouldn't we also return ENOSYS if CONFIG_X86_64=y but the probed task is 32bit? >> >> Just tested with a 32bit app on x86 box and segfaults. > > Hmm. How did you verify this? On a x86_32 box, I compiled the test case with static libraries (including static libc). And I then run this binary on x86_64 with uprobe enabled. You will need to install glibc-static package to make it work. > > Your v3 doesn't look right and it seems you misunderstood me... > >> Yes, we would need to >> return ENOSYS if the app is 32bit on 64bit system. > > Only if insn->length == 2. "push bp" and other valid 32bit push'es should be > emulated correctly or your patch is wrong. Confused... > >>> Or in this case uprobe_init_insn(x86_64 => false) should fail and push_setup_xol_ops() >>> won't be called? > > So it doesn't fail? > > Oleg. > From 1584083318380377235@xxx Tue Nov 14 22:46:15 +0000 2017 X-GM-THRID: 1583700940287669077 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread