qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: "Marek Dolata - mkdolata@us.ibm.com" <mkdolata@us.ibm.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Cc: Eduardo Habkost <ehabkost@redhat.com>,
	"qemu-trivial@nongnu.org" <qemu-trivial@nongnu.org>,
	Doug Gale <doug16k@gmail.com>,
	Markus Armbruster <armbru@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [PATCH V3] target/i386: Fix handling of k_gs_base register in 32-bit mode in gdbstub
Date: Sat, 28 Dec 2019 17:57:58 +0100	[thread overview]
Message-ID: <b44c1837-037d-24f4-3ff0-6a36e3fea1e0@redhat.com> (raw)
In-Reply-To: <2cf601fe9f2d4447ba4eec653df634ee@us.ibm.com>

On 12/28/19 12:37 AM, Marek Dolata - mkdolata@us.ibm.com wrote:
> Fixes: corrects clobbering of registers appearing after k_gs_base
> 
> Buglink: https://bugs.launchpad.net/qemu/+bug/1857640
> 
> Signed-off-by: Marek Dolata <mkdolata@us.ibm.com 
> <mailto:mkdolata@us.ibm.com>>
> 
> ---
> 
> target/i386/gdbstub.c | 4 ++--
> 
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/target/i386/gdbstub.c b/target/i386/gdbstub.c
> 
> index aef25b70f1..572ead641c 100644
> 
> --- a/target/i386/gdbstub.c
> 
> +++ b/target/i386/gdbstub.c
> 
> @@ -350,15 +350,15 @@ int x86_cpu_gdb_write_register(CPUState *cs, 
> uint8_t *mem_buf, int n)
> 
>               env->segs[R_GS].base = ldl_p(mem_buf);
> 
>               return 4;
> 
> -#ifdef TARGET_X86_64
> 
>           case IDX_SEG_REGS + 8:
> 
> +#ifdef TARGET_X86_64
> 
>               if (env->hflags & HF_CS64_MASK) {
> 
>                   env->kernelgsbase = ldq_p(mem_buf);
> 
>                   return 8;
> 
>               }
> 
>               env->kernelgsbase = ldl_p(mem_buf);
> 
> -            return 4;
> 
> #endif
> 
> +            return 4;
> 
>           case IDX_FP_REGS + 8:
> 
>               cpu_set_fpuc(env, ldl_p(mem_buf));
> 
> -- 
> 
> 2.24.1
> 

Still:

$ pwclient git-am 11311411
Applying patch #11311411 using "git am"
Description: [V3] target/i386: Fix handling of k_gs_base register in 
32-bit mode in gdbstub
Applying: target/i386: Fix handling of k_gs_base register in 32-bit mode 
in gdbstub
error: corrupt patch at line 25
Patch failed at 0001 target/i386: Fix handling of k_gs_base register in 
32-bit mode in gdbstub
hint: Use 'git am --show-current-patch' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
'git am' failed with exit status 128

I thought this could be due to this recent git change:
https://github.com/git/git/commit/5983ddc1652
and would suggest to try with:

$ git config sendemail.transferEncoding 8bit

but you use git 2.24 and this got introduced in 2.25, so I'm not sure 
what's wrong. You could still try, in case this helps...



      reply	other threads:[~2019-12-28 16:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-27 23:37 [PATCH V3] target/i386: Fix handling of k_gs_base register in 32-bit mode in gdbstub Marek Dolata - mkdolata@us.ibm.com
2019-12-28 16:57 ` Philippe Mathieu-Daudé [this message]

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=b44c1837-037d-24f4-3ff0-6a36e3fea1e0@redhat.com \
    --to=philmd@redhat.com \
    --cc=armbru@redhat.com \
    --cc=doug16k@gmail.com \
    --cc=ehabkost@redhat.com \
    --cc=mkdolata@us.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=rth@twiddle.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).