From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 546113C2F; Thu, 26 Jun 2025 12:12:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=216.40.44.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750939929; cv=none; b=Nbqe8R4qi4fXnUvPusDkkkmLWSZ/W/wd5z145tO0YmhtoixK1wjrhDPV5CdEYeoCz8gRlf0J1IzYqeqoXKaDndbxcVjmJ0PPAo5LDVcwjxu5pGACHRryq0Ep2LAMmNpVyboja+u3zV7OGkhLPFZHYbmKGg+dC6lJJZSmI9eP/MU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750939929; c=relaxed/simple; bh=S0He3klNKgx264BDmuWA7zCXhYd94x/8cNR57vffdQ8=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=s4W+258R+7sNlUrwzUq/K06r5VjkL0BoYW9QGBAoL6v3nXwwR1mNGo4cWcLvZrod9zlnUvf7ZuePX9TzanAPQt223fQ5Oz6rT5ZOoh/V17xDLEbGc7/N+rTSH6Y8XM/1d9KdCJHmwM9ajLQPu29HM+DZwfUCuukSd3rjnxvHlzA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org; spf=pass smtp.mailfrom=goodmis.org; arc=none smtp.client-ip=216.40.44.14 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=goodmis.org Received: from omf01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 7FDF014019D; Thu, 26 Jun 2025 12:12:03 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: rostedt@goodmis.org) by omf01.hostedemail.com (Postfix) with ESMTPA id 644EA60011; Thu, 26 Jun 2025 12:11:59 +0000 (UTC) Date: Thu, 26 Jun 2025 08:12:20 -0400 From: Steven Rostedt To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, bpf@vger.kernel.org, x86@kernel.org, Masami Hiramatsu , Mathieu Desnoyers , Josh Poimboeuf , Peter Zijlstra , Jiri Olsa , Namhyung Kim , Thomas Gleixner , Andrii Nakryiko , Indu Bhagat , "Jose E. Marchesi" , Beau Belgrave , Jens Remus , Linus Torvalds , Andrew Morton , Jens Axboe Subject: Re: [PATCH v11 14/14] unwind_user/x86: Enable compat mode frame pointer unwinding on x86 Message-ID: <20250626081220.71ac3ab6@gandalf.local.home> In-Reply-To: References: <20250625225600.555017347@goodmis.org> <20250625225717.187191105@goodmis.org> X-Mailer: Claws Mail 3.20.0git84 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-trace-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Stat-Signature: gikz5ymk5gtkqfsbe7umaz6ygmti5hdb X-Rspamd-Server: rspamout03 X-Rspamd-Queue-Id: 644EA60011 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Session-ID: U2FsdGVkX1+3QBRxWW5QKTEc4mL8hVqCKcePDm/UYrE= X-HE-Tag: 1750939919-377805 X-HE-Meta: U2FsdGVkX193DTU0jxe+hcnGyWs5G+kMGoQ+BjeKhg3ibdZ049hEqDvRQOdn/n+fmBWDV3neU1YtovsnJY9UIDM79V7xzGvVJtumYGrQEg+adFQorFWXawPyyw3B/mNEHV3KCRcmPcY9vLYMwmCTehxc5/2TkYsltq60/bTRMNGrv4NQmlpYZ4ABC1PXa8tOK3/gnOlmIk8FrG5cTLKrHzOlDuvzEZLJGM925d+wWkY/GVGYRiB7e5o8gYHrLRm9k9f0B6jgLLCbxRjdt5wJxwielPiYeWaLP4L6E6T8yUR13Ghfk3qo9hc/zFIX8Kb2XKNcE1edOxfznjnsGrRTIfaU/9vkn29TvihmPMU5NZPexAoxv/6DKmTgkb8+fOfNp9qsaF2yTsH3g4v/xZnVjQ== On Thu, 26 Jun 2025 10:33:05 +0200 Ingo Molnar wrote: > * Steven Rostedt wrote: > > > diff --git a/arch/x86/include/asm/unwind_user_types.h b/arch/x86/include/asm/unwind_user_types.h > > new file mode 100644 > > index 000000000000..d7074dc5f0ce > > --- /dev/null > > +++ b/arch/x86/include/asm/unwind_user_types.h > > @@ -0,0 +1,17 @@ > > +/* SPDX-License-Identifier: GPL-2.0 */ > > +#ifndef _ASM_UNWIND_USER_TYPES_H > > +#define _ASM_UNWIND_USER_TYPES_H > > This is not the standard x86 header guard pattern ... Should it be: #ifndef _ASM_X86_UNWIND_USER_TYPES_H ? > > > + > > +#ifdef CONFIG_IA32_EMULATION > > + > > +struct arch_unwind_user_state { > > + unsigned long ss_base; > > + unsigned long cs_base; > > +}; > > +#define arch_unwind_user_state arch_unwind_user_state > > Ran out of newlines? ;-) I believe Josh purposely kept the #define and the structure together without a newline as one defines itself to be used in the generic code. Do you prefer them to be separated by a newline? > > > +/* > > + * If an architecture needs to initialize the state for a specific > > + * reason, for example, it may need to do something different > > + * in compat mode, it can define arch_unwind_user_init to a > > + * function that will perform this initialization. > > Please use 'func()' when referring to functions in comments. You mean to use "arch_unwind_user_init()"? > > > +/* > > + * If an architecture requires some more updates to the state between > > + * stack frames, it can define arch_unwind_user_next to a function > > + * that will update the state between reading stack frames during > > + * the user space stack walk. > > Ditto. And this to have arch_unwind_user_next()? I'll update. Thanks for the review. -- Steve