From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF846C04A68 for ; Tue, 26 Jul 2022 14:34:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239157AbiGZOeS (ORCPT ); Tue, 26 Jul 2022 10:34:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238922AbiGZOeP (ORCPT ); Tue, 26 Jul 2022 10:34:15 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C28B12B195 for ; Tue, 26 Jul 2022 07:34:12 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5340A61650 for ; Tue, 26 Jul 2022 14:34:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9EF61C433C1; Tue, 26 Jul 2022 14:34:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658846051; bh=p2tvdR/m+sxzsLxs5/qItkjzVJ2I3yM1XR+mYnyc0Ug=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Hs411YusHafoixLqrOgQ8ZHvLCB304wjjhSD+OqtW2UZ6ekEV6fP6SoDMENpF13e1 Z8um+b+iJadQi6/xEdDV8LIiuvPt5ooPNH9j9UCo1TmU/rbMltHejT+UWgmsofeikE CVnSy5XhQ342WdJZW0pnVTOYWV6/gzWMm3pP3PjNM46ChyQ+JVjvTUC23v5/LcfnYa p3C1M2HeqUG3Te7u1Bqn5cs8SGVEFQQvyLrsGDCX8xqxAnSR39bqvknotpyymfO11w 6eZ+4wHjrqkzc7O+gmoRh8svTz1Gt7xvKgd5EZrZ+kfaBiSY2DkvGyxYlrtkzYNiEQ vge4MqDJq39WA== Date: Tue, 26 Jul 2022 15:34:03 +0100 From: Mark Brown To: Kalesh Singh Cc: maz@kernel.org, mark.rutland@arm.com, madvenka@linux.microsoft.com, tabba@google.com, oliver.upton@linux.dev, will@kernel.org, qperret@google.com, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, catalin.marinas@arm.com, andreyknvl@gmail.com, vincenzo.frascino@arm.com, mhiramat@kernel.org, ast@kernel.org, wangkefeng.wang@huawei.com, elver@google.com, keirf@google.com, yuzenghui@huawei.com, ardb@kernel.org, oupton@google.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, android-mm@google.com, kernel-team@android.com Subject: Re: [PATCH v6 04/17] arm64: stacktrace: Handle frame pointer from different address spaces Message-ID: References: <20220726073750.3219117-1-kaleshsingh@google.com> <20220726073750.3219117-5-kaleshsingh@google.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="EaZlof6ZidZOvm5w" Content-Disposition: inline In-Reply-To: <20220726073750.3219117-5-kaleshsingh@google.com> X-Cookie: All rights reserved. Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --EaZlof6ZidZOvm5w Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 26, 2022 at 12:37:37AM -0700, Kalesh Singh wrote: > The unwinder code is made reusable so that it can be used to > unwind various types of stacks. One usecase is unwinding the > nVHE hyp stack from the host (EL1) in non-protected mode. This > means that the unwinder must be able to translate HYP stack > addresses to kernel addresses. >=20 > Add a callback (stack_trace_translate_fp_fn) to allow specifying > the translation function. Reviewed-by: Mark Brown with or without one very minor thing: > static inline int unwind_next_common(struct unwind_state *state, > - struct stack_info *info) > + struct stack_info *info, > + stack_trace_translate_fp_fn translate_fp) > { > + unsigned long fp =3D state->fp, kern_fp =3D fp; As a coding style nit I don't love having multiple assignments on a single line especially as part of declarations. --EaZlof6ZidZOvm5w Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmLf+1oACgkQJNaLcl1U h9D6QggAgqsmZ8mydShiSjezLG0cke2LdLT+FUK0qBgaBpRGDl0V3nysu3AwZHDK x5J27veMMJPOhXrlIBGeexncpsAzerUu0gnqaCaSchCg3+nJ5icOwm3oseVBWNqU qkgBVFEKk1mSwMjn7NfgsfJl+hCxykg+E3UqycOPMskyx88qiAqjPXUYJ/3au3Gt gWu5Q2uNZ2TRdvPT5z0Cued1slb4+y+aPSZW/6KqYnrVARg+Tk6O1QDHYO+DakOU e2R7hexHSyrGA5gkg5nh2REeVAi46Lf1xTDYhO8JxdS2l6rwLswP2Dw/bUyYIyqv JCGy7XtA5k4RK05GlerYcRM8q5DnhQ== =YaN6 -----END PGP SIGNATURE----- --EaZlof6ZidZOvm5w-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by smtp.lore.kernel.org (Postfix) with ESMTP id 402ADC00140 for ; Tue, 26 Jul 2022 14:34:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 901994C5EE; Tue, 26 Jul 2022 10:34:17 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@kernel.org Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id beg6XHajjB8d; Tue, 26 Jul 2022 10:34:16 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 4BC804C6A3; Tue, 26 Jul 2022 10:34:16 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 926424C5F9 for ; Tue, 26 Jul 2022 10:34:15 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id a5EheeBnTe7J for ; Tue, 26 Jul 2022 10:34:14 -0400 (EDT) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 80A5E4C5EE for ; Tue, 26 Jul 2022 10:34:14 -0400 (EDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 2714AB81651; Tue, 26 Jul 2022 14:34:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9EF61C433C1; Tue, 26 Jul 2022 14:34:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658846051; bh=p2tvdR/m+sxzsLxs5/qItkjzVJ2I3yM1XR+mYnyc0Ug=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Hs411YusHafoixLqrOgQ8ZHvLCB304wjjhSD+OqtW2UZ6ekEV6fP6SoDMENpF13e1 Z8um+b+iJadQi6/xEdDV8LIiuvPt5ooPNH9j9UCo1TmU/rbMltHejT+UWgmsofeikE CVnSy5XhQ342WdJZW0pnVTOYWV6/gzWMm3pP3PjNM46ChyQ+JVjvTUC23v5/LcfnYa p3C1M2HeqUG3Te7u1Bqn5cs8SGVEFQQvyLrsGDCX8xqxAnSR39bqvknotpyymfO11w 6eZ+4wHjrqkzc7O+gmoRh8svTz1Gt7xvKgd5EZrZ+kfaBiSY2DkvGyxYlrtkzYNiEQ vge4MqDJq39WA== Date: Tue, 26 Jul 2022 15:34:03 +0100 From: Mark Brown To: Kalesh Singh Subject: Re: [PATCH v6 04/17] arm64: stacktrace: Handle frame pointer from different address spaces Message-ID: References: <20220726073750.3219117-1-kaleshsingh@google.com> <20220726073750.3219117-5-kaleshsingh@google.com> MIME-Version: 1.0 In-Reply-To: <20220726073750.3219117-5-kaleshsingh@google.com> X-Cookie: All rights reserved. Cc: wangkefeng.wang@huawei.com, catalin.marinas@arm.com, ast@kernel.org, vincenzo.frascino@arm.com, will@kernel.org, android-mm@google.com, maz@kernel.org, kvmarm@lists.cs.columbia.edu, madvenka@linux.microsoft.com, kernel-team@android.com, elver@google.com, linux-arm-kernel@lists.infradead.org, andreyknvl@gmail.com, linux-kernel@vger.kernel.org, mhiramat@kernel.org X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============2230859917778614560==" Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu --===============2230859917778614560== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="EaZlof6ZidZOvm5w" Content-Disposition: inline --EaZlof6ZidZOvm5w Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 26, 2022 at 12:37:37AM -0700, Kalesh Singh wrote: > The unwinder code is made reusable so that it can be used to > unwind various types of stacks. One usecase is unwinding the > nVHE hyp stack from the host (EL1) in non-protected mode. This > means that the unwinder must be able to translate HYP stack > addresses to kernel addresses. >=20 > Add a callback (stack_trace_translate_fp_fn) to allow specifying > the translation function. Reviewed-by: Mark Brown with or without one very minor thing: > static inline int unwind_next_common(struct unwind_state *state, > - struct stack_info *info) > + struct stack_info *info, > + stack_trace_translate_fp_fn translate_fp) > { > + unsigned long fp =3D state->fp, kern_fp =3D fp; As a coding style nit I don't love having multiple assignments on a single line especially as part of declarations. --EaZlof6ZidZOvm5w Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmLf+1oACgkQJNaLcl1U h9D6QggAgqsmZ8mydShiSjezLG0cke2LdLT+FUK0qBgaBpRGDl0V3nysu3AwZHDK x5J27veMMJPOhXrlIBGeexncpsAzerUu0gnqaCaSchCg3+nJ5icOwm3oseVBWNqU qkgBVFEKk1mSwMjn7NfgsfJl+hCxykg+E3UqycOPMskyx88qiAqjPXUYJ/3au3Gt gWu5Q2uNZ2TRdvPT5z0Cued1slb4+y+aPSZW/6KqYnrVARg+Tk6O1QDHYO+DakOU e2R7hexHSyrGA5gkg5nh2REeVAi46Lf1xTDYhO8JxdS2l6rwLswP2Dw/bUyYIyqv JCGy7XtA5k4RK05GlerYcRM8q5DnhQ== =YaN6 -----END PGP SIGNATURE----- --EaZlof6ZidZOvm5w-- --===============2230859917778614560== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm --===============2230859917778614560==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C70E7C00140 for ; Tue, 26 Jul 2022 14:35:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Qpp9b6oB+wPGPoIG3ougF9MkBeXntFdYMvcA07VnQtY=; b=BDANwSGQFhKY6DyDNHXMbm01lK M9ZR6cN2eKhCZZz2P2Eipd0Wpgu9y0X9mIWc1VUWWp8cc5MhVS+oukxmyZxQeiS08yvwD3+pZWxm4 OA939I1WvffJqdz/Izno66hZ5zKG1W13OA6dzqJELDvxm2C0feXjx/hVG2jnmkxFQEtZEdt9awZfN PZURDpW0YeAjAPeg8hnkU4nqWAiFkZ9JL1ln8vLPOtdFqFtOSHYm7OPYsETxXI0RmQICZfwmfuuqu O5pewALPVFRcCRHlYw/Sw/SvsSL607raM8ceaZxIlsErs3zLREJNWeRYMbpwUrEs+gltXXpqdc9x1 +TmK1zmw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oGLdb-000Fv9-02; Tue, 26 Jul 2022 14:34:19 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oGLdX-000FtR-E6 for linux-arm-kernel@lists.infradead.org; Tue, 26 Jul 2022 14:34:16 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 2714AB81651; Tue, 26 Jul 2022 14:34:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9EF61C433C1; Tue, 26 Jul 2022 14:34:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658846051; bh=p2tvdR/m+sxzsLxs5/qItkjzVJ2I3yM1XR+mYnyc0Ug=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Hs411YusHafoixLqrOgQ8ZHvLCB304wjjhSD+OqtW2UZ6ekEV6fP6SoDMENpF13e1 Z8um+b+iJadQi6/xEdDV8LIiuvPt5ooPNH9j9UCo1TmU/rbMltHejT+UWgmsofeikE CVnSy5XhQ342WdJZW0pnVTOYWV6/gzWMm3pP3PjNM46ChyQ+JVjvTUC23v5/LcfnYa p3C1M2HeqUG3Te7u1Bqn5cs8SGVEFQQvyLrsGDCX8xqxAnSR39bqvknotpyymfO11w 6eZ+4wHjrqkzc7O+gmoRh8svTz1Gt7xvKgd5EZrZ+kfaBiSY2DkvGyxYlrtkzYNiEQ vge4MqDJq39WA== Date: Tue, 26 Jul 2022 15:34:03 +0100 From: Mark Brown To: Kalesh Singh Cc: maz@kernel.org, mark.rutland@arm.com, madvenka@linux.microsoft.com, tabba@google.com, oliver.upton@linux.dev, will@kernel.org, qperret@google.com, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, catalin.marinas@arm.com, andreyknvl@gmail.com, vincenzo.frascino@arm.com, mhiramat@kernel.org, ast@kernel.org, wangkefeng.wang@huawei.com, elver@google.com, keirf@google.com, yuzenghui@huawei.com, ardb@kernel.org, oupton@google.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, android-mm@google.com, kernel-team@android.com Subject: Re: [PATCH v6 04/17] arm64: stacktrace: Handle frame pointer from different address spaces Message-ID: References: <20220726073750.3219117-1-kaleshsingh@google.com> <20220726073750.3219117-5-kaleshsingh@google.com> MIME-Version: 1.0 In-Reply-To: <20220726073750.3219117-5-kaleshsingh@google.com> X-Cookie: All rights reserved. X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220726_073415_642152_23F65E1A X-CRM114-Status: GOOD ( 16.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============3049049179996816116==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============3049049179996816116== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="EaZlof6ZidZOvm5w" Content-Disposition: inline --EaZlof6ZidZOvm5w Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 26, 2022 at 12:37:37AM -0700, Kalesh Singh wrote: > The unwinder code is made reusable so that it can be used to > unwind various types of stacks. One usecase is unwinding the > nVHE hyp stack from the host (EL1) in non-protected mode. This > means that the unwinder must be able to translate HYP stack > addresses to kernel addresses. >=20 > Add a callback (stack_trace_translate_fp_fn) to allow specifying > the translation function. Reviewed-by: Mark Brown with or without one very minor thing: > static inline int unwind_next_common(struct unwind_state *state, > - struct stack_info *info) > + struct stack_info *info, > + stack_trace_translate_fp_fn translate_fp) > { > + unsigned long fp =3D state->fp, kern_fp =3D fp; As a coding style nit I don't love having multiple assignments on a single line especially as part of declarations. --EaZlof6ZidZOvm5w Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmLf+1oACgkQJNaLcl1U h9D6QggAgqsmZ8mydShiSjezLG0cke2LdLT+FUK0qBgaBpRGDl0V3nysu3AwZHDK x5J27veMMJPOhXrlIBGeexncpsAzerUu0gnqaCaSchCg3+nJ5icOwm3oseVBWNqU qkgBVFEKk1mSwMjn7NfgsfJl+hCxykg+E3UqycOPMskyx88qiAqjPXUYJ/3au3Gt gWu5Q2uNZ2TRdvPT5z0Cued1slb4+y+aPSZW/6KqYnrVARg+Tk6O1QDHYO+DakOU e2R7hexHSyrGA5gkg5nh2REeVAi46Lf1xTDYhO8JxdS2l6rwLswP2Dw/bUyYIyqv JCGy7XtA5k4RK05GlerYcRM8q5DnhQ== =YaN6 -----END PGP SIGNATURE----- --EaZlof6ZidZOvm5w-- --===============3049049179996816116== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============3049049179996816116==--