From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932297AbcHOXGy (ORCPT ); Mon, 15 Aug 2016 19:06:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45764 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753109AbcHOXGx (ORCPT ); Mon, 15 Aug 2016 19:06:53 -0400 Date: Mon, 15 Aug 2016 16:43:37 -0500 From: Josh Poimboeuf To: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Andy Lutomirski , Linus Torvalds , Steven Rostedt , Brian Gerst , Kees Cook , Peter Zijlstra , Frederic Weisbecker , Byungchul Park , Nilay Vaish Subject: Re: [PATCH v3 35/51] x86/unwind: add new unwind interface and implementations Message-ID: <20160815214337.any2puuds5y2int5@treble> References: <7a0c1ff566a12ab453c4e52ca4a6e5b3f7431406.1471011425.git.jpoimboe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <7a0c1ff566a12ab453c4e52ca4a6e5b3f7431406.1471011425.git.jpoimboe@redhat.com> User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Mon, 15 Aug 2016 23:06:52 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 12, 2016 at 09:28:54AM -0500, Josh Poimboeuf wrote: > + /* > + * The caller can optionally provide a stack pointer directly > + * (sp) or indirectly (regs->sp), which indicates which stack > + * frame to start unwinding at. Skip ahead until we reach it. > + */ > + while (!unwind_done(state) && > + (!on_stack(&state->stack_info, first_sp, sizeof(*first_sp) || > + state->bp < first_sp))) > + unwind_next_frame(state); Ack, the parentheses got messed up with a last minute formatting change and gcc didn't catch it. This should actually be: while (!unwind_done(state) && (!on_stack(&state->stack_info, first_sp, sizeof(*first_sp)) || state->bp < first_sp)) unwind_next_frame(state); -- Josh