Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752514AbdHKHqh (ORCPT ); Fri, 11 Aug 2017 03:46:37 -0400 Received: from mail-ve1eur01on0042.outbound.protection.outlook.com ([104.47.1.42]:40770 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751521AbdHKHqd (ORCPT ); Fri, 11 Aug 2017 03:46:33 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yao.Qi@arm.com; Subject: Re: [PATCH 07/11] arm64: add basic pointer authentication support To: Mark Rutland , linux-arm-kernel@lists.infradead.org References: <1500480092-28480-1-git-send-email-mark.rutland@arm.com> <1500480092-28480-8-git-send-email-mark.rutland@arm.com> Cc: arnd@arndb.de, catalin.marinas@arm.com, christoffer.dall@linaro.org, Dave.Martin@arm.com, jiong.wang@arm.com, kvmarm@lists.cs.columbia.edu, linux-arch@vger.kernel.org, marc.zyngier@arm.com, suzuki.poulose@arm.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, kernel-hardening@lists.openwall.com From: Yao Qi Message-ID: <5a919df5-7f6d-2c6c-9c8e-e28fcebd4920@arm.com> Date: Fri, 11 Aug 2017 08:46:28 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <1500480092-28480-8-git-send-email-mark.rutland@arm.com> Content-Type: text/plain; charset=windows-1252; format=flowed X-Originating-IP: [217.140.96.140] X-ClientProxiedBy: DB6PR0301CA0051.eurprd03.prod.outlook.com (2603:10a6:4:54::19) To DB6PR0801MB1944.eurprd08.prod.outlook.com (2603:10a6:4:75::13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d65cbab9-e754-439a-fc61-08d4e08d149d X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(300000503095)(300135400095)(48565401081)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:DB6PR0801MB1944; X-Microsoft-Exchange-Diagnostics: 1;DB6PR0801MB1944;3:aylIFCbYY18FQ+j4SRkSGjj/POuaL+eiA7+jcB4pizd9Nle7avo2d1UPqG+l2EnHZSWN9OCJqodRDxYJq2MwlX8DA1HlWRxfZqhRFKkn/mC07jFP9EtL4Z1up2Kq+/G/Wq79I/WmqdleSwFwqtw0mRTjRu1aCcpjKLprJtsfEhZiyKIx4q6mXvWhIXYgsdE9KKPvY5ukn8XD3eoJZJr399e5rMyJhLOuUBotXhao16gOUiwIhPzpHfFazk2pvg8B;25:wIJq9+QqfzanK3eA3yGilplgPqxMQFZKDt4QysBqPSMttizkpsBPUXgkXSqeQK5qqeopMV+lkWZF8bFfH8mvmpsBNF8w/hSfyySl7D7FypalLqVS3YX0CSXa5atzf13fPWM7hGznOEUfNMT7br7UNSjyVKTofxBC8kOafFfkLXFKrukarRQgzNEuzsgSarOqO2HpnhDDAV8v+a5l9IVlazZ0PZteFAx5TY68e3sZVGOmAxIty5KuvcN2Uk45Ha8XyHMAbcqeuWKR3VdZCFc3I7JWC5PtO3Y/xxE9OJUxx4NZgH52U/qxOmp0r6BB/3dt6y00UXMVk3NSKxr4ZldF5w==;31:1bc7b6AT820tWLQe3Rr38ckNGQixLavjTDKCtn1h0jqHWPGRP54Ec/W4gHrOpGitfgmP2bVPxKAqDawck2aAyt6iV9C1+XaAVVnuP5x0gr3Wgg8YoVBH6qHEreLLwOLxXM3bbrBW1g/Bd4iykyabBA1CqnC8SQvFOxQDPgQvn2RVWUitgyawHSm94dn/tNjsuVBbu0EIm0fHi95bEMrJR5Kx3ELjVuxVp1pB7O3LF8s= X-MS-TrafficTypeDiagnostic: DB6PR0801MB1944: X-Microsoft-Exchange-Diagnostics: 1;DB6PR0801MB1944;20:2ayFppqDmMHyEvDspa3aEnNFeoePmczAZNkJ9F4a/QW5WhjIHRIbt0OFQM9SoSZlJC6iwlMybs1NkQ9TSPd6uHDP/pJBa9A9DuiMInhujzztwPfTkEJpSqJvP3lFiveAhzjDCyHgcI8QbiUdf+pXFr2Qrekh+Snzb2wi2l8wnVrqFQt8sfSw/1aExAFOKAcSsjXc8ZG7qrvzJ0VCm7ZLuYijfbMKQebS8ZlkJjnqUWIHxwhGiVR3+zdXL+M6xzJVF2UD64ivFZSN5MTKgc2Ma5SO2duihRTEbeGhKIlTiBWGim8TOxdUfuZ95yYJFoSBYbu/Jw62oshTTaIS0D0SVOZ4bRE4+28DdPlGbNOtZgxZGCdUlCOLXSiK/a/xX6/86IGitoiMcXhI12hZ/JuHHJsXiMDkTLxsirdQtsiTujV0Fx0xjZBgbc5X5bbRQf3HjGQb+d49ZutHrGCpYrRL+ihhYYxio3FIHNmSm8NaeZTEheNDxCNR4BREXm/+vdlv;4:2zZjsdEUtns+PGEN8f3+/O0oe6Z380IkGNUTZixxA35X7lxBS3xT6AqEubrAaRqSlyq75HFQ2XQM0+kBa/J3XEjFXDmL6RQ4ESi3b36S6cIOXKRKah85guWWonjIq6J9pCGYI6/+65Rp16OMtgmBehuTRxbxZeuxlP72pjJQMTy8ggco1cHhvFb2/eqyjQz48Lr/9VVhgU1b7UNFWbT7KQRSM+b+67pd/+QaD6PVDmEPXTgzCJytZLl8nwmWfGa6 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)(601004)(2401047)(5005006)(8121501046)(93006095)(93001095)(100000703101)(100105400095)(3002001)(10201501046)(6055026)(6041248)(20161123558100)(20161123555025)(20161123560025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:DB6PR0801MB1944;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DB6PR0801MB1944; X-Forefront-PRVS: 03965EFC76 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(7370300001)(4630300001)(6049001)(6009001)(39860400002)(40434004)(189002)(24454002)(199003)(50466002)(110136004)(8676002)(64126003)(97736004)(23746002)(31686004)(31696002)(6246003)(65826007)(83506001)(189998001)(86362001)(8746002)(3846002)(72206003)(2950100002)(33646002)(2906002)(478600001)(6116002)(229853002)(25786009)(305945005)(65806001)(53936002)(66066001)(65956001)(105586002)(76176999)(54356999)(106356001)(50986999)(4001350100001)(42186005)(101416001)(77096006)(53546010)(6486002)(5890100001)(36756003)(47776003)(81166006)(7736002)(81156014)(7350300001)(68736007)(5660300001)(4326008)(21314002);DIR:OUT;SFP:1101;SCL:1;SRVR:DB6PR0801MB1944;H:[10.2.206.21];FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;DB6PR0801MB1944;23:DAKM2mz/AqOskX0hNI0M4zXk2PvfHDazkrf?= =?Windows-1252?Q?TkOdmIqhZx4E95lYHJuv9vlPcGDYLrqsbmRif78CA1TBCftFRL8VMKFm?= =?Windows-1252?Q?cLG0rQoTDoAfbD3TP1GnaLHh/TK03Ox/qgbm6Jzv3eidHJZQqRjxi/YC?= =?Windows-1252?Q?IWRmBClsA/nxdqKdG1gCHUVO+Y6W49xrlClfnO+nvLfro4WiBItdlSHm?= =?Windows-1252?Q?6H8GCjos2I3t12SeaesIY/syG6HaxLcdj730bIqKMQKEWa4YOfVXmgRu?= =?Windows-1252?Q?XcNqc3uwBg/5IMw+bYr7NqgDS3K++uiztM3mKBhqkFgibko2i7uFtVgL?= =?Windows-1252?Q?Wk3kmq81tk1jujYuxt+Z61hM0T/5WmbO/sM5f2QpUXLOPlMml42ufpns?= =?Windows-1252?Q?NvXpRTWUdn1rLOh0slzkoF3yr3hsHscT4VFknwHsX6aXbgH00TgcrbYp?= =?Windows-1252?Q?ohJ1GsVhWOOPpU99e7pbcWxBRYEhpc7mosXiOuNYJ2axnKVG5vOTNEYz?= =?Windows-1252?Q?QyliONPZAkA5iKEtwAYSVhOVpjHImxvQm42IhQ/PHe+FFhFperTJKvOf?= =?Windows-1252?Q?DNYiupIikg0OXZ7uzjvoyebk/wz8MRpgM2nc9fHaJt/TLrwdFBr9KTvF?= =?Windows-1252?Q?dUk52DjNKUEdey+Ow8iMD2vl/Mt4daMR3iFeIjSHo+BOUipZqGkgAyAV?= =?Windows-1252?Q?V2ZEdxnoEbvC36JqiKFyUw56npguE11IVilV7m2GrmvCQB6EuEKBPxBJ?= =?Windows-1252?Q?rY6Rp7W1a7il2BS1Qubdu2xC8Pc2Jz9OnGYyb9ol9Bw1HK7s4hOJ/5rT?= =?Windows-1252?Q?cxV1XkjCMOxa8s2wZwuWVr5LIpWPoMfyKUVz+S1sxIhorwk7OiacXtPI?= =?Windows-1252?Q?vuZ5Qry06j/ZvGBVQqJe0sQXc8hUjXecfbV5GgNnRgMjMpBni99BahiF?= =?Windows-1252?Q?ftYbHPJfnvhZThTZv5jfDHSGh/EVPcQSIpqO6xKYC5IjWatPjwNwEHMm?= =?Windows-1252?Q?fL8VPQPZsZPn+BLFgPwCxc2sX8JhA0WhSmWsml2mJKYdx1KAtXny3uIi?= =?Windows-1252?Q?qay/HOVBk2/o7HjexWDvRETxa4cInrU5JYjpMTMlPArSBUUEBtrha8cC?= =?Windows-1252?Q?cgWeSpYxfIi5yVnzT0Knza8fsMobAnuNfuz1bZu9JJWvvsN7DHEB4hSn?= =?Windows-1252?Q?s97EIZK3F+lynN/Lio93Fo5E85HxXeQG7Y0LvJNz6IWt/hDUamBAjUMq?= =?Windows-1252?Q?ryKZ06Qtg91b1BaTHzG/+KlLoImglpIQ5q8KtLcRMj3qS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coq/ZiXnvxnG3jCrHgl5e3OWuTnQljXw53G09iDi7TQIMpnJ/RA7Gt45eUQd3syHkug/kd+OXmp1pd5uvTa7kbC9YmJGTwhrYlnFsA4fMFLAwTrmaE5HPKZ1oUvdNw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Aug 2017 07:46:30.3241 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB1944 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id v7B7kht5018451 Content-Length: 970 Lines: 20 Hi Mark, On 19/07/17 17:01, Mark Rutland wrote: > +#define HWCAP_APIA (1 << 16) Can you rename it to HWCAP_ARM64_APIA or HWCAP_ARM_APIA? When we use it in user space, at least in GDB, we usually do this, #ifndef HWCAP_APIA #define HWCAP_APIA (1 << 16) #endif However, the code use this macro can be compiled on !arm64 host. If HWCAP_APIA is defined on other !arm64 host and its value is not (1 << 16), the program "aarch64_hwcap & HWCAP_APIA ? XXX : XXX;" is wrong, and compiler doesn't complain. I notice that mips, mn10300, sparc, and s390 define their HWCAP this way, like HWCAP_SPARC_FLUSH, HWCAP_MIPS_R6, HWCAP_S390_DFP, etc. IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.