Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932211AbeAJFXb (ORCPT + 1 other); Wed, 10 Jan 2018 00:23:31 -0500 Received: from mail-he1eur01on0122.outbound.protection.outlook.com ([104.47.0.122]:64971 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932078AbeAJFXa (ORCPT ); Wed, 10 Jan 2018 00:23:30 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=avagin@virtuozzo.com; Date: Tue, 9 Jan 2018 21:23:06 -0800 From: Andrei Vagin To: Dave Hansen , Andi Kleen Cc: Andi Kleen , "Woodhouse, David" , Paul Turner , LKML , Linus Torvalds , Greg Kroah-Hartman , Tim Chen , tglx@linutronix.de, Kees Cook , Rik van Riel , Peter Zijlstra , Andy Lutomirski , Jiri Kosina , gnomes@lxorguk.ukuu.org.uk, x86@kernel.org Subject: Re: [v7, 05/11] x86/retpoline/entry: Convert entry assembler indirect jumps Message-ID: <20180110052306.GA19620@outlook.office365.com> References: <1515508997-6154-6-git-send-email-dwmw@amazon.co.uk> <20180110035407.GA16912@outlook.office365.com> <20180110043010.GJ6718@tassilo.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) X-Originating-IP: [73.140.212.29] X-ClientProxiedBy: MWHPR20CA0011.namprd20.prod.outlook.com (2603:10b6:300:13d::21) To VI1PR08MB0751.eurprd08.prod.outlook.com (2a01:111:e400:5a04::13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2283506a-ea6a-4fda-e32f-08d557ea46fe X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020);SRVR:VI1PR08MB0751; X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB0751;3:WjmnYr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36i77pTkKTxcfNnzTd/edFAnw4Al/wam2+2pgrgOQTT3jb65WqcW/N8oDSQVUzc4ATQ2oCQqLGEfvVZODUSKHoxLgO9DwsPlPTBLWnjc9S+fQZA6Byr7z11CcPXn96DsZK9x1FjBU7QTdsDaqLu3afSozRMjz7WtLjwjDxg1KzV08gjOkO3A2TbiKCIovYpraU1MKmogXEJpHOwJe9A3scyofZWsfdwVnp1wKFQO8hz1z0sODG3bB3G0=;4:XdNqF7gqWHeR3HCHiFlqoeA0E5yJw597HTheNOFNXZS08s5N3cLwmsX/3VTNOlyc/z/uHyf0xjzvNkwbcdimjnBRpSyv2wg16461HrvnBTrwryT3COM6KShczP3ZJtLjRIGtg11/EclmFYenwLS3HUb6iuB/oEh7uH6cgz0OHhDVXr+nAD8QApWChBXhuaFukVSKGBvbKo+hFGmOo+YIfkJYYb9oGTZgoWOltm261Nf8RHNNcPqVvrRAV13tibTXLw3kSYiPZnJcSIBgt/rMDA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040470)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231023)(944501119)(3002001)(10201501046)(6041268)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(6072148)(201708071742011);SRVR:VI1PR08MB0751;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:VI1PR08MB0751; X-Forefront-PRVS: 0548586081 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(396003)(39850400004)(376002)(366004)(346002)(39380400002)(189003)(199004)(24454002)(8676002)(7696005)(6506007)(7736002)(81156014)(305945005)(47776003)(386003)(69596002)(66066001)(54906003)(1076002)(110136005)(53546011)(316002)(68736007)(81166006)(53416004)(3846002)(52116002)(478600001)(8936002)(6116002)(16586007)(76176011)(23686003)(55016002)(50466002)(229853002)(93886005)(53936002)(6246003)(2906002)(97736004)(25786009)(7416002)(86362001)(83506002)(105586002)(16526018)(33656002)(106356001)(9686003)(6666003)(2950100002)(58126008)(5660300001)(4326008)(18370500001);DIR:OUT;SFP:1102;SCL:1;SRVR:VI1PR08MB0751;H:outlook.office365.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?koi8-r?Q?1;VI1PR08MB0751;23:lhRSX6AZ5O6YYwxKBSsFaUlDEcCptMtu8batRE9SgTG?= =?koi8-r?Q?nilgbVHHm+xCtNH56cq41lJzDgjWM0YzQzqKLDwsSQI6kn1bxPLGyb2L1HyH0g?= =?koi8-r?Q?won9+9XqtrY8oB42V7lyT7KrlJB4LmxvqfPqpLsTLNj4PyXEhZT1irugIyz0VG?= =?koi8-r?Q?8s52C4WZhUFI0Gl0Y1Dof2vGTV+jcwdcVQJbEK3BM1fEy5K5rnAoYCUjK6wamj?= =?koi8-r?Q?BsK/usKuNDM3ByFTYa8hB5cWNKM9qQnkJEFuITcgDguYxaNV6GPSWoQpwVuNY9?= =?koi8-r?Q?baTAj34GNhRdGHP3Czb7J8GkzB5AhS9CBemV9El3yODCQ5R1D6HK3EkhXwzAaj?= =?koi8-r?Q?E/8T3hkXFy7kArRe8AGrS4g2cz7KM8FzdJ7lw2NvwYQZvpO7tWNFVK/UEP32T2?= =?koi8-r?Q?NJjJrhro2K39LX4Gz53xgIxke9o2SgLDCno+N2HUiKvNqf97ltP4Jaf4pnMGjO?= =?koi8-r?Q?avblU6158XiLbzxjuywF8V5V8EJIwRjPivl/QEDyNUu3jFyrNOEODj2ZB2Lk+O?= =?koi8-r?Q?/ExmVW0cDItAMSQZFGBIxBvjUcLbUuFurqAA2GDcOm5028cPC1hsuf+3ZZgyKY?= =?koi8-r?Q?NQFi4dtXdO9uwNsTF47XL8+D+OVxHESIPj8enap8dY0Z6ORjbGr8VpkyKYmH2c?= =?koi8-r?Q?Pep05Mq+Nl9ccPu2QfO9BaHQKL2paTOsO5GP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pwq2XOeICAA5n69JRIOyulHKgE0lKYLR/ge7rDV0z8CXHybRsDNBrrFdTO+kJrH9/1qReE/hxpOjPArzi3oDbMyfPQAgRL5FER+ABrQo0=;5:ghuxHb75nvzuabvpicCQGxBrMHF0z4TIWcy/g6SDYvbTtggCgZtlaETokvl+QycXkDsHzIADvHUT5eauyExQbQm/jVbmYo+3cxRBhpAWzH8ZfwUMpxRoRz+hlTFiKbXPkt9p97qQxJJ2AOvNrsuCSpYMnWw8WLd/7gJlyBEcld4=;24:mbyGwwCccb72ewDLhoKk0rs4O7GzbIys3kvZIcB6/HdShQ7/JrF1PgiWSpwCDxYyro+Tct9JqkCRAsGKlKxkIOT3cUrmwhjY194Jv49GBcE=;7:dPCZLpcXGyB+kYAYkOpHvUPqGZ0IqWtMXpDlKAZRLQExa4ZzjKfjFReDvFX0KxRpx6WefQiA/5EnJ7Pu96Vt7L3xQ+cj6M7U1XXO3xOIKhZoaQrUxjFXrVAFjAvuIcBdXV3Z4lItaLYX6qkGpL8bydAX/8reavCA0MNlOUQ51vQrSTMhqYCQqWvIUUSWTK22UxjbXIPKmN1QlnVw2KxR+H9Gr+u6IkrW+GM+vjB4Skf5h4yeH+asPUlqoI7oJEXr SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB0751;20:bhU5lrwkqnSx/U1nFF54IPJyi+Tq9m4cFmD81Ev9h5anSzwi7A+0ORl8O7uBgtDnl4eylj24MWaSBdcMhA/Tk7Mcze1SjFSgMywYH6riEKdS0W5WWyjEuY1Hjl4OsOCJJ0uhTg9ewo4Y7p7H1es3zB0+FVuQElMv1MF+RqrBtZ8= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jan 2018 05:23:18.3958 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2283506a-ea6a-4fda-e32f-08d557ea46fe X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB0751 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Tue, Jan 09, 2018 at 08:39:21PM -0800, Dave Hansen wrote: > On 01/09/2018 08:30 PM, Andi Kleen wrote: > > On Tue, Jan 09, 2018 at 07:54:08PM -0800, Andrei Vagin wrote: > >> > >> In my test environment, the kernel with this patch crashes. > > > > I posted a patch for this. > > It's called: > > [PATCH v3 2/3] x86/retpoline: Use better sequences for NOSPEC_CALL/JMP > > right, Andi? This patch fixed the problem. Thanks! > > BTW, that's a fun oops. It looks like it's call'ing (or jumping) to an > address that's used by cpu_entry_area->exception_stacks[1].