From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753494AbdC0PYr (ORCPT ); Mon, 27 Mar 2017 11:24:47 -0400 Received: from mail.kernel.org ([198.145.29.136]:46090 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752607AbdC0PYm (ORCPT ); Mon, 27 Mar 2017 11:24:42 -0400 Date: Mon, 27 Mar 2017 11:24:33 -0400 From: Steven Rostedt To: Paul Menzel Cc: Josh Poimboeuf , Ingo Molnar , Len Brown , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, Borislav Petkov , "Rafael J. Wysocki" Subject: Re: [PATCH] ftrace/x86: fix x86-32 triple fault with graph tracing and suspend-to-ram Message-ID: <20170327112433.728ba8c1@gandalf.local.home> In-Reply-To: References: <6559f36c6c6cdc2552b0bccf31de967367aa790d.1489672478.git.jpoimboe@redhat.com> <20170324181254.gouyrbmppukrrbb6@treble> <20170324144114.16a37d47@gandalf.local.home> <5766300.HtmE7iLEgV@aspire.rjw.lan> <20170327140843.fx5y32rnc3mqiyke@treble> <20170327145441.aybim6rmc6nxelij@treble> X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 27 Mar 2017 17:01:53 +0200 Paul Menzel wrote: > > + /* > > + * When resuming from suspend-to-ram, this function can be indirectly > > + * called from early CPU startup code while the CPU is in real mode, > > + * which would fail miserably. Make sure the stack pointer is a > > + * virtual address. > > + * > > + * This check isn't as accurate as virt_addr_valid(), but it should be > > + * good enough for this purpose, and it's fast. > > + */ > > + if (unlikely((long)__builtin_frame_address(0) >= 0)) return; > > The coding style requires the `return;` to be on a separate line. Correct, and new versions of a patch should always start a new thread (unless it's a single update of a patch in a long patch series). Otherwise they get ignored. (hint hint) -- Steve > > > + > > if (unlikely(ftrace_graph_is_dead())) > > return; >