[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] target/i386: Remove dead assignment to ss in do_interrupt64(
From: |
Peter Maydell |
Subject: |
Re: [PATCH] target/i386: Remove dead assignment to ss in do_interrupt64() |
Date: |
Mon, 29 Jul 2024 17:02:34 +0100 |
On Tue, 23 Jul 2024 at 17:25, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> Coverity points out that in do_interrupt64() in the "to inner
> privilege" codepath we set "ss = 0", but because we also set
> "new_stack = 1" there, later in the function we will always override
> that value of ss with "ss = 0 | dpl".
>
> Remove the unnecessary initialization of ss, which allows us to
> reduce the scope of the variable to only where it is used. Borrow a
> comment from helper_lcall_protected() that explains what "0 | dpl"
> means here.
>
> Resolves: Coverity CID 1527395
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
I'll take this via target-arm.next since I'm doing a pullreq
anyway, unless you'd prefer otherwise.
thanks
-- PMM