linux-um.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@sigma-star.at>
To: rrs@researchut.com
Cc: linux-um@lists.infradead.org
Subject: Re: UML fails to build on arch i386
Date: Fri, 15 Jun 2018 08:43:46 +0200	[thread overview]
Message-ID: <2534439.LyGaCr9OWm@blindfold> (raw)
In-Reply-To: <503aeaef9da5dbb58f2c1fb9793eb25cb5ce0bc9.camel@researchut.com>

Am Freitag, 15. Juni 2018, 08:35:02 CEST schrieb Ritesh Raj Sarraf:
> Hello Richard,
> 
> On Thu, 2018-06-14 at 20:41 +0200, Richard Weinberger wrote:
> > > 
> > > #ifdef __x86_64__
> > >    /* Access TLS data.  */
> > >    PTRACE_ARCH_PRCTL = 30,
> > > # define PT_ARCH_PRCTL PTRACE_ARCH_PRCTL
> > > #endif
> > > 
> > >    /* Continue and stop at the next syscall, it will not be
> > > executed.  */
> > >    PTRACE_SYSEMU = 31,
> > > #define PT_SYSEMU PTRACE_SYSEMU
> > 
> > Okay, PTRACE_SYSEMU seems to be part of an enum, that's why UML's
> > #ifndef does not
> > not protect the #define.
> > 
> > What libc is this?
> 
> This is glibc 2.27 from Debian.
> 
> rrs@priyasi:~$ dpkg -S /usr/include/x86_64-linux-gnu/sys/ptrace.h 
> libc6-dev:amd64: /usr/include/x86_64-linux-gnu/sys/ptrace.h
> 12:19 ♒♒♒   ☺ 😄    
> rrs@priyasi:~$ apt policy libc6-dev
> libc6-dev:
>   Installed: 2.27-3
>   Candidate: 2.27-3
>   Version table:
>  *** 2.27-3 900
>         900 http://deb.debian.org/debian testing/main amd64 Packages
>         500 http://deb.debian.org/debian unstable/main amd64 Packages
>         100 /var/lib/dpkg/status
> 12:19 ♒♒♒   ☺ 😄    

Okay, as expected, the ptrace SYSEMU request code is now an enum.
Changed by in glibc:
commit c48831d0eebf876d986919baf2d9240a79192837
Author: Dmitry V. Levin <ldv@altlinux.org>
Date:   Wed Dec 27 00:54:38 2017 +0000

    linux/x86: sync sys/ptrace.h with Linux 4.14 [BZ #22433]
    
    Clone generic linux/sys/ptrace.h, add the following x86-specific
    __ptrace_request constants: PTRACE_GET_THREAD_AREA,
    PTRACE_SET_THREAD_AREA, PTRACE_ARCH_PRCTL, PTRACE_SYSEMU,
    PTRACE_SYSEMU_SINGLESTEP, and PTRACE_SINGLEBLOCK.
    
    [BZ #22433]
    * sysdeps/unix/sysv/linux/x86/sys/ptrace.h: New file.

Does this change make UML build on your host?

diff --git a/arch/x86/um/shared/sysdep/ptrace_32.h b/arch/x86/um/shared/sysdep/ptrace_32.h
index b94a108de1dc..ae00d22bce02 100644
--- a/arch/x86/um/shared/sysdep/ptrace_32.h
+++ b/arch/x86/um/shared/sysdep/ptrace_32.h
@@ -10,20 +10,10 @@
 
 static inline void update_debugregs(int seq) {}
 
-/* syscall emulation path in ptrace */
-
-#ifndef PTRACE_SYSEMU
-#define PTRACE_SYSEMU 31
-#endif
-
 void set_using_sysemu(int value);
 int get_using_sysemu(void);
 extern int sysemu_supported;
 
-#ifndef PTRACE_SYSEMU_SINGLESTEP
-#define PTRACE_SYSEMU_SINGLESTEP 32
-#endif
-
 #define UPT_SYSCALL_ARG1(r) UPT_BX(r)
 #define UPT_SYSCALL_ARG2(r) UPT_CX(r)
 #define UPT_SYSCALL_ARG3(r) UPT_DX(r)

Thanks,
//richard

-- 
sigma star gmbh - Eduard-Bodem-Gasse 6 - 6020 Innsbruck - Austria
ATU66964118 - FN 374287y

_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um

  reply	other threads:[~2018-06-15  6:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-14  5:16 UML fails to build on arch i386 Ritesh Raj Sarraf
2018-06-14  8:58 ` Ritesh Raj Sarraf
2018-06-14 11:15   ` Richard Weinberger
2018-06-14 15:44     ` Ritesh Raj Sarraf
2018-06-14 18:41       ` Richard Weinberger
2018-06-15  6:35         ` Ritesh Raj Sarraf
2018-06-15  6:43           ` Richard Weinberger [this message]
2018-06-15 11:58             ` Ritesh Raj Sarraf

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=2534439.LyGaCr9OWm@blindfold \
    --to=richard@sigma-star.at \
    --cc=linux-um@lists.infradead.org \
    --cc=rrs@researchut.com \
    /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).