Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5543181ybl; Tue, 10 Dec 2019 07:42:16 -0800 (PST) X-Google-Smtp-Source: APXvYqyXtg/pwm1XcSb/WqKQxnX27hhHCFzN0wE6DRHh/SFqdocSckWyPY5ZErH4zub3/XctSuGt X-Received: by 2002:a54:4781:: with SMTP id o1mr4286993oic.117.1575992536468; Tue, 10 Dec 2019 07:42:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575992536; cv=none; d=google.com; s=arc-20160816; b=MmH8dV6AEBGvK7uOpFrK8Em1rx6/qGHUkJcFFva70HYh2FvnHYWguHxuMNDaP1JyAI HbLN8DcySj9O7vbT+0iUS6lACo2HRuxi0GuaoPlRnKTbXPW763y6KmqYh0Yl18LTv5/H BbteYXrbEjdJ/cvhvOiS88BlN+LQLhieS1kWNHi3zeTakREHMrNyb8H8t7nUrkZbYfL6 yB5s5QXZhqBDkV+Z1sKSvmfC7jQ26fV/lkXpeOtTzfOSZpAB5bpupVnGAcHAvxjjMR+R WH3L8RC5wfYYGa281fJNUGXsmTwxpHD9RCgJ6P6q+xuy0cB0XzrlBGBXow8xsS/lJCuc /vMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=5JQc668uazaMX0FKB0E4MukNmzADKMjvzVTkW0DNU48=; b=HvNVcJU75IyPNp99ee8HHil2XVIX0MA4o3qZuSvm5pRnpKYW2ApFWyGNqNAYCgUb39 ryfju9QUYyReUGIYaFyp4e7J39xzqH+nKViaD/mjyz76dU0FfHl0b/Ju0puemRCU3oY/ lS2ozswNtl4KVDRU7HyXFN8g+0CPAyegrY/OUe6bPxFj0vi0PPEbDsf8AgOMxN6c9tFL 4RiSkbNoTAzte9gcFtd+uXUO2qzdqwWLmmJavWsC/qdQVs7gkJWDswOdNVHZr7td5/de RZkVf53JtIm7rgZawbY2pvOEVEWpjBK8l63VhR9oMzLeLo1L2MW9+RGD9bkAlmTPG9Rt rQ+g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t142si2017126oih.242.2019.12.10.07.42.03; Tue, 10 Dec 2019 07:42:16 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727524AbfLJPkb (ORCPT + 99 others); Tue, 10 Dec 2019 10:40:31 -0500 Received: from mx2.suse.de ([195.135.220.15]:38018 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727178AbfLJPkb (ORCPT ); Tue, 10 Dec 2019 10:40:31 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id C9CEBAF24; Tue, 10 Dec 2019 15:40:29 +0000 (UTC) Subject: Re: [PATCH] x86-64/entry: add instruction suffix to SYSRET To: Andy Lutomirski Cc: Andy Lutomirski , the arch/x86 maintainers , lkml References: <08B92B44-CCA9-4B83-B9CC-F1601D44B73F@amacapital.net> From: Jan Beulich Message-ID: <0053f606-f4f7-3951-f40b-b7bd08703590@suse.com> Date: Tue, 10 Dec 2019 16:40:49 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 In-Reply-To: <08B92B44-CCA9-4B83-B9CC-F1601D44B73F@amacapital.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10.12.2019 16:29, Andy Lutomirski wrote: >> On Dec 10, 2019, at 2:48 AM, Jan Beulich wrote: >> >> Omitting suffixes from instructions in AT&T mode is bad practice when >> operand size cannot be determined by the assembler from register >> operands, and is likely going to be warned about by upstream gas in the >> future. Add the missing suffix here. >> >> Signed-off-by: Jan Beulich >> >> --- a/arch/x86/entry/entry_64.S >> +++ b/arch/x86/entry/entry_64.S >> @@ -1728,7 +1728,7 @@ END(nmi) >> SYM_CODE_START(ignore_sysret) >> UNWIND_HINT_EMPTY >> mov $-ENOSYS, %eax >> - sysret >> + sysretl > > Isn’t the default sysretq? sysretl looks more correct, but that suggests > that your changelog is wrong. No, this is different from ret, and more like iret and lret. > Is this code even reachable? Yes afaict, supported by the comment ahead of the symbol. syscall_init() puts its address into MSR_CSTAR when !IA32_EMULATION. Jan