Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932433AbdHWRel (ORCPT ); Wed, 23 Aug 2017 13:34:41 -0400 Received: from mail-qk0-f193.google.com ([209.85.220.193]:38372 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932216AbdHWRek (ORCPT ); Wed, 23 Aug 2017 13:34:40 -0400 MIME-Version: 1.0 In-Reply-To: <39192236-BD33-47C1-AB14-F2FE2FF74566@amacapital.net> References: <20170822175115.k3tdjlkltua7lkiu@treble> <20170823152059.aix2zb24xsndfntq@treble> <39192236-BD33-47C1-AB14-F2FE2FF74566@amacapital.net> From: oliver yang Date: Thu, 24 Aug 2017 01:34:39 +0800 Message-ID: Subject: Re: [PATCH] x86/nmi/64: avoid passing user space rsp of pt_regs to nmi handler To: Andy Lutomirski Cc: Josh Poimboeuf , yang oliver , "tglx@linutronix.de" , "mingo@redhat.com" , "hpa@zytor.com" , "luto@kernel.org" , "x86@kernel.org" , "rostedt@goodmis.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 656 Lines: 14 2017-08-24 0:51 GMT+08:00 Andy Lutomirski : > To avoid further wasting time solving this wrong: NAK. pt_regs is the actual interrupted state, not some oddly sanitized version thereof. NMI isn't even the only way you can have a weird pt_regs like this. > > It seems that some older kernels contain bugs where they incorrectly assume that regs->rsp is a valid pointer. Why don't you write a patch for *that * and send it to lkml, us, and stable@vger.kernel.org. Got it. Thanks for clear answer. I agree that pt_regs users should handle it, if the pt_regs reflects the actual interrupted status. -- ------------------ Oliver Yang