From: Andrew Jones <ajones@ventanamicro.com>
To: kvm-riscv@lists.infradead.org
Subject: [PATCH v2 2/5] riscv: Use SYM_*() assembly macros instead of deprecated ones
Date: Wed, 25 Oct 2023 08:50:33 +0200 [thread overview]
Message-ID: <20231025-d21b7077ff99828bef7cfaa8@orel> (raw)
In-Reply-To: <da308888-0e47-4ca4-b318-8f089421dc0b@rivosinc.com>
On Tue, Oct 24, 2023 at 08:03:52PM +0200, Cl?ment L?ger wrote:
>
>
> On 24/10/2023 17:23, Andrew Jones wrote:
> > On Tue, Oct 24, 2023 at 03:26:52PM +0200, Cl?ment L?ger wrote:
> > ...
> >> diff --git a/arch/riscv/lib/uaccess.S b/arch/riscv/lib/uaccess.S
> >> index 09b47ebacf2e..3ab438f30d13 100644
> >> --- a/arch/riscv/lib/uaccess.S
> >> +++ b/arch/riscv/lib/uaccess.S
> >> @@ -10,8 +10,7 @@
> >> _asm_extable 100b, \lbl
> >> .endm
> >>
> >> -ENTRY(__asm_copy_to_user)
> >> -ENTRY(__asm_copy_from_user)
> >> +SYM_FUNC_START(__asm_copy_to_user)
> >>
> >> /* Enable access to user memory */
> >> li t6, SR_SUM
> >> @@ -181,13 +180,13 @@ ENTRY(__asm_copy_from_user)
> >> csrc CSR_STATUS, t6
> >> sub a0, t5, a0
> >> ret
> >> -ENDPROC(__asm_copy_to_user)
> >> -ENDPROC(__asm_copy_from_user)
> >> +SYM_FUNC_END(__asm_copy_to_user)
> >> EXPORT_SYMBOL(__asm_copy_to_user)
> >> +SYM_FUNC_ALIAS(__asm_copy_from_user, __asm_copy_to_user)
> >> EXPORT_SYMBOL(__asm_copy_from_user)
> >
> > I didn't see any comment about the sharing of debug info among both the
> > from and to functions. Assuming it isn't confusing in some way, then
>
> Hi Andrew,
>
> I did some testing with gdb and it seems to correctly assume that
> __asm_copy_to_user maps to __asm_copy_from_user for debugging. The basic
> tests that I did (breakpoints, disasm, etc) seems to show no sign of
> problems for debugging. Were you thinking about other things specifically ?
Mostly just backtrace symbols, but I suppose we can live with it, since
it wouldn't be the only weird thing in a backtrace.
Thanks,
drew
WARNING: multiple messages have this Message-ID (diff)
From: Andrew Jones <ajones@ventanamicro.com>
To: "Clément Léger" <cleger@rivosinc.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Anup Patel <anup@brainfault.org>,
Atish Patra <atishp@atishpatra.org>,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
kvm@vger.kernel.org, kvm-riscv@lists.infradead.org
Subject: Re: [PATCH v2 2/5] riscv: Use SYM_*() assembly macros instead of deprecated ones
Date: Wed, 25 Oct 2023 08:50:33 +0200 [thread overview]
Message-ID: <20231025-d21b7077ff99828bef7cfaa8@orel> (raw)
In-Reply-To: <da308888-0e47-4ca4-b318-8f089421dc0b@rivosinc.com>
On Tue, Oct 24, 2023 at 08:03:52PM +0200, Clément Léger wrote:
>
>
> On 24/10/2023 17:23, Andrew Jones wrote:
> > On Tue, Oct 24, 2023 at 03:26:52PM +0200, Clément Léger wrote:
> > ...
> >> diff --git a/arch/riscv/lib/uaccess.S b/arch/riscv/lib/uaccess.S
> >> index 09b47ebacf2e..3ab438f30d13 100644
> >> --- a/arch/riscv/lib/uaccess.S
> >> +++ b/arch/riscv/lib/uaccess.S
> >> @@ -10,8 +10,7 @@
> >> _asm_extable 100b, \lbl
> >> .endm
> >>
> >> -ENTRY(__asm_copy_to_user)
> >> -ENTRY(__asm_copy_from_user)
> >> +SYM_FUNC_START(__asm_copy_to_user)
> >>
> >> /* Enable access to user memory */
> >> li t6, SR_SUM
> >> @@ -181,13 +180,13 @@ ENTRY(__asm_copy_from_user)
> >> csrc CSR_STATUS, t6
> >> sub a0, t5, a0
> >> ret
> >> -ENDPROC(__asm_copy_to_user)
> >> -ENDPROC(__asm_copy_from_user)
> >> +SYM_FUNC_END(__asm_copy_to_user)
> >> EXPORT_SYMBOL(__asm_copy_to_user)
> >> +SYM_FUNC_ALIAS(__asm_copy_from_user, __asm_copy_to_user)
> >> EXPORT_SYMBOL(__asm_copy_from_user)
> >
> > I didn't see any comment about the sharing of debug info among both the
> > from and to functions. Assuming it isn't confusing in some way, then
>
> Hi Andrew,
>
> I did some testing with gdb and it seems to correctly assume that
> __asm_copy_to_user maps to __asm_copy_from_user for debugging. The basic
> tests that I did (breakpoints, disasm, etc) seems to show no sign of
> problems for debugging. Were you thinking about other things specifically ?
Mostly just backtrace symbols, but I suppose we can live with it, since
it wouldn't be the only weird thing in a backtrace.
Thanks,
drew
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
WARNING: multiple messages have this Message-ID (diff)
From: Andrew Jones <ajones@ventanamicro.com>
To: "Clément Léger" <cleger@rivosinc.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Anup Patel <anup@brainfault.org>,
Atish Patra <atishp@atishpatra.org>,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
kvm@vger.kernel.org, kvm-riscv@lists.infradead.org
Subject: Re: [PATCH v2 2/5] riscv: Use SYM_*() assembly macros instead of deprecated ones
Date: Wed, 25 Oct 2023 08:50:33 +0200 [thread overview]
Message-ID: <20231025-d21b7077ff99828bef7cfaa8@orel> (raw)
In-Reply-To: <da308888-0e47-4ca4-b318-8f089421dc0b@rivosinc.com>
On Tue, Oct 24, 2023 at 08:03:52PM +0200, Clément Léger wrote:
>
>
> On 24/10/2023 17:23, Andrew Jones wrote:
> > On Tue, Oct 24, 2023 at 03:26:52PM +0200, Clément Léger wrote:
> > ...
> >> diff --git a/arch/riscv/lib/uaccess.S b/arch/riscv/lib/uaccess.S
> >> index 09b47ebacf2e..3ab438f30d13 100644
> >> --- a/arch/riscv/lib/uaccess.S
> >> +++ b/arch/riscv/lib/uaccess.S
> >> @@ -10,8 +10,7 @@
> >> _asm_extable 100b, \lbl
> >> .endm
> >>
> >> -ENTRY(__asm_copy_to_user)
> >> -ENTRY(__asm_copy_from_user)
> >> +SYM_FUNC_START(__asm_copy_to_user)
> >>
> >> /* Enable access to user memory */
> >> li t6, SR_SUM
> >> @@ -181,13 +180,13 @@ ENTRY(__asm_copy_from_user)
> >> csrc CSR_STATUS, t6
> >> sub a0, t5, a0
> >> ret
> >> -ENDPROC(__asm_copy_to_user)
> >> -ENDPROC(__asm_copy_from_user)
> >> +SYM_FUNC_END(__asm_copy_to_user)
> >> EXPORT_SYMBOL(__asm_copy_to_user)
> >> +SYM_FUNC_ALIAS(__asm_copy_from_user, __asm_copy_to_user)
> >> EXPORT_SYMBOL(__asm_copy_from_user)
> >
> > I didn't see any comment about the sharing of debug info among both the
> > from and to functions. Assuming it isn't confusing in some way, then
>
> Hi Andrew,
>
> I did some testing with gdb and it seems to correctly assume that
> __asm_copy_to_user maps to __asm_copy_from_user for debugging. The basic
> tests that I did (breakpoints, disasm, etc) seems to show no sign of
> problems for debugging. Were you thinking about other things specifically ?
Mostly just backtrace symbols, but I suppose we can live with it, since
it wouldn't be the only weird thing in a backtrace.
Thanks,
drew
next prev parent reply other threads:[~2023-10-25 6:50 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-24 13:26 [PATCH v2 0/5] riscv: cleanup assembly usage of ENTRY()/END() and use local labels Clément Léger
2023-10-24 13:26 ` Clément Léger
2023-10-24 13:26 ` Clément Léger
2023-10-24 13:26 ` [PATCH v2 1/5] riscv: use ".L" local labels in assembly when applicable Clément Léger
2023-10-24 13:26 ` Clément Léger
2023-10-24 13:26 ` Clément Léger
2023-10-24 13:26 ` [PATCH v2 2/5] riscv: Use SYM_*() assembly macros instead of deprecated ones Clément Léger
2023-10-24 13:26 ` Clément Léger
2023-10-24 13:26 ` Clément Léger
2023-10-24 15:23 ` Andrew Jones
2023-10-24 15:23 ` Andrew Jones
2023-10-24 15:23 ` Andrew Jones
2023-10-24 18:03 ` Clément Léger
2023-10-24 18:03 ` Clément Léger
2023-10-24 18:03 ` Clément Léger
2023-10-25 6:50 ` Andrew Jones [this message]
2023-10-25 6:50 ` Andrew Jones
2023-10-25 6:50 ` Andrew Jones
2023-10-26 7:53 ` Clément Léger
2023-10-26 7:53 ` Clément Léger
2023-10-26 7:53 ` Clément Léger
2023-10-24 13:26 ` [PATCH v2 3/5] riscv: kernel: Use correct SYM_DATA_*() macro for data Clément Léger
2023-10-24 13:26 ` Clément Léger
2023-10-24 13:26 ` Clément Léger
2023-10-24 13:26 ` [PATCH v2 4/5] riscv: kvm: Use SYM_*() assembly macros instead of deprecated ones Clément Léger
2023-10-24 13:26 ` Clément Léger
2023-10-24 13:26 ` Clément Léger
2023-11-06 17:47 ` Palmer Dabbelt
2023-11-06 17:47 ` Palmer Dabbelt
2023-11-06 17:47 ` Palmer Dabbelt
2023-12-13 6:16 ` Anup Patel
2023-12-13 6:16 ` Anup Patel
2023-12-13 6:16 ` Anup Patel
2023-10-24 13:26 ` [PATCH v2 5/5] riscv: kvm: use ".L" local labels in assembly when applicable Clément Léger
2023-10-24 13:26 ` Clément Léger
2023-10-24 13:26 ` Clément Léger
2023-11-06 17:47 ` Palmer Dabbelt
2023-11-06 17:47 ` Palmer Dabbelt
2023-11-06 17:47 ` Palmer Dabbelt
2023-12-13 6:16 ` Anup Patel
2023-12-13 6:16 ` Anup Patel
2023-12-13 6:16 ` Anup Patel
2023-11-07 6:50 ` [PATCH v2 0/5] riscv: cleanup assembly usage of ENTRY()/END() and use local labels patchwork-bot+linux-riscv
2023-11-07 6:50 ` patchwork-bot+linux-riscv
2023-11-07 6:50 ` patchwork-bot+linux-riscv
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231025-d21b7077ff99828bef7cfaa8@orel \
--to=ajones@ventanamicro.com \
--cc=kvm-riscv@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.