Received: by 10.192.165.148 with SMTP id m20csp673799imm; Wed, 2 May 2018 07:03:13 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpQrxyze4XQlOVIh84l++WFYBZBHb37RgtIpG0vm8Fdg5M2BB4nPO/a2Fa3I1xUmjL1lwaJ X-Received: by 10.98.153.15 with SMTP id d15mr19513444pfe.115.1525269793594; Wed, 02 May 2018 07:03:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525269793; cv=none; d=google.com; s=arc-20160816; b=EnOEapIxS6/JOoQaAfsvPfE7TFMfm/m34bb68vs0IHxLgA8ycuQsiLdMAySle8L0Ow 4IhkE5PD4hkab+p6RYlVjx+SEaJ9Qpz6FpwmkWXkoHmb78i8eGmLNXS/hHUYuXE+Ya7m LL8KNQxiDqxUKiInJzOCH+5e6IXYeKtYwXwJ1n5CLkeAnZFfBeQv5IWnnWRi6y/JU3dR U3/1LaCQ/7WC1KY1VVRJhhDZhvjOHrtU0nH8mkEnsDFfaHjJdT0DebnUXBHlDsU3hNAC YclaTw+jXWp80kCC/FrKN8zyKKznD6/g26ttzfa60tLPRMszWG03uADnjQqlmcm+RQKf jOoA== 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:references:cc :to:from:subject:dkim-signature:dkim-signature :arc-authentication-results; bh=7o3fzW1zh+0n5wdFjclHtYzWdgmM/9s8Jm/JlcPQG0E=; b=ycnKeF0YKv+EGkyDQXQy4rR3/wgVELsSiV9jpgPJho0fJzWA64+8KPg5K2UN/HZVQo d5qa8Benw85gZwLPeHKsCcvLuasc38swqSAeobctsp9GbtVBiWx2DTkxy35cLKVauZvg 9XUEdbJu4/Wme3snRvGUd8pqq3IrumGFOJRWW5j7FK1D+t6REun1Dzei3MNA0HI5x8QI ewCIjYp+3b3KRCK9QY2QgiB+lMbdFfMLfRlAjrjxkqVo+GWmrBCW1aV3wzgcS/k/xcGN 8U56kGtGTSFQWtDsCX3VJOzHrCtxxhqnoAFJTQKM+XWDZAmBUBrzoXwkFcegJqXU9zuy qjKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=gdlWIWoH; dkim=fail header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=aw8sndKy; 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 a21si11168620pfo.31.2018.05.02.07.02.58; Wed, 02 May 2018 07:03:13 -0700 (PDT) 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=gdlWIWoH; dkim=fail header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=aw8sndKy; 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 S1751538AbeEBOCY (ORCPT + 99 others); Wed, 2 May 2018 10:02:24 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:32774 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750954AbeEBOCW (ORCPT ); Wed, 2 May 2018 10:02:22 -0400 Received: from pps.filterd (m0109334.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w42Dvfc2010042; Wed, 2 May 2018 07:01:39 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=subject : from : to : cc : references : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=facebook; bh=7o3fzW1zh+0n5wdFjclHtYzWdgmM/9s8Jm/JlcPQG0E=; b=gdlWIWoHXVg2rS1GJ7C+9k5trzCL/gmSFlIipAwPvPTbFugdmm7LWJ62upRKGPYdbpXp qW6fk2jFgC5JBWzgqIRzJh/k5Xd8cDCGEYqcHEzIHdi4FXzImuhLw+MrHDWi+KYOLxSY qApfFFbWkCcuP0MG6wU4Ab7B3aeF2L8tPMs= Received: from mail.thefacebook.com ([199.201.64.23]) by mx0a-00082601.pphosted.com with ESMTP id 2hqbxn8cj4-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 02 May 2018 07:01:38 -0700 Received: from NAM01-BY2-obe.outbound.protection.outlook.com (192.168.54.28) by o365-in.thefacebook.com (192.168.16.23) with Microsoft SMTP Server (TLS) id 14.3.361.1; Wed, 2 May 2018 07:01:37 -0700 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=7o3fzW1zh+0n5wdFjclHtYzWdgmM/9s8Jm/JlcPQG0E=; b=aw8sndKyWxby9JOeSfJgr/4wTKgAJhnFyRdo+FrhArohjh/JQZATmgEPP5aWQh4U4CrX8PpSdrubb2b+y4Ub9N9ms2bE8lEOJINsLzLMu2XFnLLZoMGmJRq1Upo8C5u+wOhvR9QkvrAb4XnSOMnZfFtNe/SbZz2fKcV2qXwYm5U= Received: from macbook-pro-52.attlocal.net.dhcp.thefacebook.com (2620:10d:c090:180::1:661b) by CO2PR15MB0075.namprd15.prod.outlook.com (2a01:111:e400:5068::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.696.18; Wed, 2 May 2018 14:01:31 +0000 Subject: Re: [PATCH v2] x86/cpufeature: guard asm_volatile_goto usage with NO_BPF_WORKAROUND From: Yonghong Song To: Peter Zijlstra CC: , , , , , References: <20180415042738.1788215-1-yhs@fb.com> <20180420081936.GD4064@hirez.programming.kicks-ass.net> <20180423105209.GX4064@hirez.programming.kicks-ass.net> <3a6e6348-fb23-c2f9-5bd8-928b056b4722@fb.com> <8bf96497-2fc3-8d11-1c40-cb027eae44a6@fb.com> Message-ID: <0bcea2d8-c088-f8f5-ae76-4ce5f974e291@fb.com> Date: Wed, 2 May 2018 07:01:18 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <8bf96497-2fc3-8d11-1c40-cb027eae44a6@fb.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [2620:10d:c090:180::1:661b] X-ClientProxiedBy: DM5PR13CA0053.namprd13.prod.outlook.com (2603:10b6:3:117::15) To CO2PR15MB0075.namprd15.prod.outlook.com (2a01:111:e400:5068::25) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(2017052603328)(7153060)(7193020);SRVR:CO2PR15MB0075; X-Microsoft-Exchange-Diagnostics: 1;CO2PR15MB0075;3:fvXTqELvntDpBPesuBmmTux00jMwjrKrlJwuwEuN/dTwVUsIZsEPSYaW+BARbyJrOdPzy7TL7OIYhv7YvZ7Tho/P01obCbMg4yfxDDvu04/FhCsNYTEviZP+6soaLzVaAt68LOgZJk+oiL7+pbqW7kvJjZIaN4AF0+lGlOvGmG35MbML/aWSqyEl/W661goJ0Z/iKrHDz5Ak83JqrtQonXeaYiQDzEv50gDurFxduVIhpjtjL9HnIKmKXP0O29+8;25:fxnbCf1UwloQJXjPXvs4RKoFFO0I1I6R3FHsux4jspd/U3PS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siatuxw75d6B2BVArz501wfduf3Fuc6uEgWJwVuW6tiA;4:YAN0Rnk3NPqCd7qRIOiXrgyr1Xru7UrJAhmAEaAEGs+TiuGgLOImVLf3WL8XisVHGahlNYHjKKxzzU6DLlcQoym1PfV1K1RhtdqjA1FWcOSrEiFOVBs6/5LfIIQ0DmMAIAFLP/2nePI2OZ3kCK9PKH0DqcJcZDZKlomyRZSeqO2yoRxNlzCg7vbQgkhkqySwfHA4FBkkfEZ2OeGQLQzUbMzNBNJTOcv8Ayb1B/8NMKaO66WI6rVLQREfhz2AYW6Mk1BzWNwwnSdVI+j6mV6l1g== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231254)(11241501184)(944501410)(52105095)(10201501046)(3002001)(93006095)(93001095)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(20161123562045)(6072148)(201708071742011);SRVR:CO2PR15MB0075;BCL:0;PCL:0;RULEID:;SRVR:CO2PR15MB0075; X-Forefront-PRVS: 06607E485E X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(396003)(39380400002)(366004)(376002)(346002)(39860400002)(199004)(189003)(53546011)(31696002)(64126003)(7736002)(2870700001)(6116002)(50466002)(8676002)(6916009)(67846002)(386003)(8936002)(86362001)(105586002)(6506007)(6246003)(476003)(65826007)(305945005)(2616005)(478600001)(106356001)(6666003)(23676004)(52396003)(486006)(52146003)(93886005)(6512007)(53936002)(52116002)(2486003)(76176011)(2906002)(68736007)(6486002)(229853002)(446003)(25786009)(58126008)(31686004)(65806001)(81156014)(65956001)(36756003)(11346002)(97736004)(47776003)(5660300001)(16526019)(316002)(46003)(4326008)(81166006)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:CO2PR15MB0075;H:macbook-pro-52.attlocal.net.dhcp.thefacebook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: fb.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDTzJQUjE1TUIwMDc1OzIzOnJyZ2VrazU1RnlsTWR1eUVYU2hVR000MGpS?= =?utf-8?B?OVBld3VBTnhFS2YvQnhtNElVcjVzQ0dlYW5GWE40RUl3Ti8wMlgzSWU5WHV3?= =?utf-8?B?YnJZVzlMLzJueHF5L0tCREZOd1RSMDVCZHhhSDlDMWFSOUsrdkJTNW5xSGNK?= =?utf-8?B?eGpKRmJqVEtuZUZSV0ZKakxTVzRPS1htblgwZGM2aTc4N0FDMURlVlpSQnVS?= =?utf-8?B?bUhoVTdVV25HK3BYNDBrblV0OE92SFpvek9UNEtXdTlaTGJ3RXJ1c29PTFY2?= =?utf-8?B?TjA1ZDFIcXlvTTJKM1g5cWl4RWlTSDZiNXRrajJqelRzSnRCalpBMUN2Rzda?= =?utf-8?B?T1ptTnRwckZpdXplOEJMKzNyNWtlRkVPTGRMZDJNOURUaVBqR2tvNzgwUUwr?= =?utf-8?B?R3o5eEIwajVzakhGT3BhaC8zYlQwZXFqbVhzUGxZTnR0WGtOYjRBSGZ4ZVJP?= =?utf-8?B?Q3RlNnM0QVBHQjk5YVpKMXdXUkFORzA1d1I4QjlIcXF3d2ZRRFFFcjBYeHJr?= =?utf-8?B?d1kzS1hkVWM1aURyNWhER2hLdUJLU3BtVTB2aXAvMENqUzI4WkNpdGxkclNG?= =?utf-8?B?a2R2amxtUHhGZHFtN2JxeFlMbTdweVp1Rk5ERzg4VzhzbEJCbTBqNWlZSU5G?= =?utf-8?B?dzdPMURyUlQ4UmF4dGR1OTlPVVo0NGUraEs0ZDNLTjkrS3NDYzg4WEltcXYw?= =?utf-8?B?ME9tRW81Y2NCY1JxVGE2SkdLejVuek45L2J6ODlMdi9DYkgya0NlOWNSTWxJ?= =?utf-8?B?b0lwVWJ4MkFaUEdRK280Mm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zaaJWId6+Ffo8bJoECXonNpmkyt/wcO24klmCedVk56jLu5XeQ=;24:48GM/DkxqIGU8V5E5chcblPKw/RJu91msIn6q6aNV5OP4IBB9++mK8aM4JvCohxwOB/WBr+M0sE2zJ2htE+BHLEAsM45BWHeUNY8ciuM9lE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;CO2PR15MB0075;7:uj2nzGUcmAYrXBcRud5MFVvUJTcosHogfX8hyMfJAWY8tYUE66wlEH8iBkxa7QgOUjeTiRRgmETSJbQ1c7DXHSoDYRiqt+FlHkOC/3xXkl68fyH52EH+z6J3uYnJyCSqVS655+eBenqabyBD9L0L4ldz4McsJ9NPaXZ8/+7I9OeK8Z7mK5PRs4EegSCxoyHO8rhcycK8yGZd5nmipn0G5EZTOcIWBe4dLCWD/v6Q0LDQj/AkWjmSAnS+cieJJiYw;20:AvEw/V3YlhRHO2Hds7voFgbOkTRUlBy7YeHSaUvN4Dw4z7Nlsyg0uK8B6bHAbTdsYL6tEESMOi8zh31gni0nSChZkOuB8KAB3DEc5UEJ7Ku9YeMfzjhew8MQZ56MddJ3lBolAXRI15zRXoCM//tI7vbUUsLIIt/WEtDsyFpFtbk= X-MS-Office365-Filtering-Correlation-Id: a045ef54-38bd-49e4-03e9-08d5b035361b X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 May 2018 14:01:31.6850 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a045ef54-38bd-49e4-03e9-08d5b035361b X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR15MB0075 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-05-02_05:,, 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 Hi, Peter, Ping again. Did you get chances to think about this issue again? Thanks! Yonghong On 4/27/18 9:34 AM, Yonghong Song wrote: > Hi, Peter, > > Just wanted to ping again so that you did not miss the email below. > Please let me know your opinion. > > Thanks! > > Yonghong > > > On 4/23/18 9:50 AM, Yonghong Song wrote: >> Hi, Peter, >> >> Please see comments below. >> >> On 4/23/18 3:52 AM, Peter Zijlstra wrote: >>> On Fri, Apr 20, 2018 at 11:06:03AM -0700, Yonghong Song wrote: >>>> On 4/20/18 1:19 AM, Peter Zijlstra wrote: >>> >>>>> Hurm, so adding __BPF__ for BPF compiles isn't an option? It seems >>>>> to me >>>>> having a CPP flag to identify BPF compile context might be useful in >>>>> general. >>>> >>>> With "clang -target bpf", we already have __BPF__ defined. >>>> For tracing, esp. ptrace.h is included, "clang -target >>>> " where >>>> "-target " can be omitted, is typically used. >>> >>>> The reason is the native architecture header files typically >>>> include a lot of various asm related stuff where "-target bpf" cannot >>>> really handle. We relay on native clang to flush out all these >>>> asm constructs and only bpf program needed stuff survives >>>> reach to backend compiler. >>> >>> So because 'clang -target bpf' is 'broken', you do a work-around using >> >> 'clang -target bpf' is 'broken' in this case because the x86 arch has >> a lot of inline asm's in the header file where bpf target cannot handle. >> For most networking related bpf programs where `asm` is rarely involved, >> `clang -target bpf` works fine most of time. >> >>> 'clang -target '. But because that doesn't set __BPF__ you >> >> `clang -target ` should work, regardless of whether __BPF__ >> macro is setup or not. The reason it doesn't work now is due to its >> lacking asm-goto support. So to use `clang -target ` is not >> really a workaround for `target bpf`. It by itself should work. >> >>> want to add NO_BPF_WORKAROUND to the kernel instead of adding __BPF__ to >>> your build rules to better mimick -target bpf, which you should be >>> using. >>> >>> How is that sane? Why not use 'clang -target -D__BPF__' >> >> To workaround the asm-goto issue, the suggested macro __BPF__ can be >> added to user space and kernel. But note that `clang -target >> ` will not define the macro __BPF__, so this requires >> user space change. >> >> Also, to make sure people understand that this is a WORKAROUND for >> asm-goto issue and is not a lasting thing we want to support. I have >> the following change for cpufeature.h: >> >> diff --git a/arch/x86/include/asm/cpufeature.h >> b/arch/x86/include/asm/cpufeature.h >> index b27da9602a6d..c832118defa1 100644 >> --- a/arch/x86/include/asm/cpufeature.h >> +++ b/arch/x86/include/asm/cpufeature.h >> @@ -140,6 +140,7 @@ extern void clear_cpu_cap(struct cpuinfo_x86 *c, >> unsigned int bit); >> >>   #define setup_force_cpu_bug(bit) setup_force_cpu_cap(bit) >> >> +#ifndef __BPF_WORKAROUND__ >>   /* >>    * Static testing of CPU features.  Used the same as boot_cpu_has(). >>    * These will statically patch the target code for additional >> @@ -195,6 +196,9 @@ static __always_inline __pure bool >> _static_cpu_has(u16 bit) >>                  boot_cpu_has(bit) :                             \ >>                  _static_cpu_has(bit)                            \ >>   ) >> +#else >> +#define static_cpu_has(bit)            boot_cpu_has(bit) >> +#endif >> >>   #define cpu_has_bug(c, bit)            cpu_has(c, (bit)) >>   #define set_cpu_bug(c, bit)            set_cpu_cap(c, (bit)) >> diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile >> index 4d6a6edd4bf6..b229e5090e4a 100644 >> >> As mentioned above, user space needs to add this new macro definition. >> Specifically for kernel/samples/bpf: >> diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile >> index 4d6a6edd4bf6..b229e5090e4a 100644 >> --- a/samples/bpf/Makefile >> +++ b/samples/bpf/Makefile >> @@ -255,7 +255,7 @@ $(obj)/tracex5_kern.o: $(obj)/syscall_nrs.h >>   $(obj)/%.o: $(src)/%.c >>          $(CLANG) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(EXTRA_CFLAGS) >> -I$(obj) \ >>                  -I$(srctree)/tools/testing/selftests/bpf/ \ >> -               -D__KERNEL__ -Wno-unused-value -Wno-pointer-sign \ >> +               -D__KERNEL__ -D__BPF_WORKAROUND__ -Wno-unused-value >> -Wno-pointer-sign \ >>                  -D__TARGET_ARCH_$(ARCH) >> -Wno-compare-distinct-pointer-types \ >>                  -Wno-gnu-variable-sized-type-not-at-end \ >>                  -Wno-address-of-packed-member >> -Wno-tautological-compare \ >> >> Please let me know whether this approach is okay to you or not, >> whether the name __BPF_WORKAROUND__ is better than __BPF__ or not, or >> we could use the earlier approach which does not require user space >> change. >> >> Thanks!