From: Roland McGrath <roland@redhat.com> To: Jeff Dike <jdike@addtoit.com> Cc: linux-kernel@vger.kernel.org, user-mode-linux-devel@lists.sourceforge.net Subject: Re: [PATCH] UML utrace support, step 1 Date: Wed, 21 Feb 2007 03:12:28 -0800 (PST) [thread overview] Message-ID: <20070221111228.9CEA21800E4@magilla.sf.frob.com> (raw) In-Reply-To: Jeff Dike's message of Tuesday, 20 February 2007 16:21:19 -0500 <20070220212119.GA8090@ccure.user-mode-linux.org> > Below is the first step in your Fix-Your-Broken-Arch-HOWTO for UML. Great! Thanks for tackling this. > Do you want incremental patches as I go along, or replacement ones? The way I've organized my patch series is with the arch support split up along with the separate infrastructure patches in the series. That is, just asm/tracehook.h with no utrace_regset stuff in the first patch so that the kernel builds with only utrace-tracehook.patch; then the regset stuff but no arch_ptrace et al in another patch so that it builds with utrace-regset.patch but without the later patches; then arch_ptrace et al in the final arch patch. Your patch is mostly just the first of these (utrace-tracehook-um), but includes utrace_regset and arch_ptrace stubs that won't compile without the later infrastructure patches applied. If you want to divide things up this way, then I'd like just to see a replacement utrace-tracehook-um.patch followed by utrace-regset-um.patch and utrace-ptrace-compat-um.patch, replacing each one whole as needed until it's merged into my trees, and then I can take incremental changes after that. If you don't want to bother with dividing things so it compiles in between patches in the series, then just one big replacement patch is fine. > +const struct utrace_regset_view utrace_um_native = { > + .name = "um", This name wants to be the subarch name--it's usually the $ARCH or UTS_MACHINE, i.e. the canonical arch name (i386 not i686, but ppc64 or ppc, not powerpc). In fact, I'm sure you really want to define the utrace_regset_view structs separately somewhere in arch/um/sys-$SUBARCH. On biarch platforms you'll need more than one, as the native biarch platforms have. (But that is all part of the second step that isn't really tackled in this patch.) > +#define ARCH_HAS_SINGLE_STEP (1) Note you'll eventually want to define the block-step macro and functions depending on subarch. (ia64 supports it, and x86 one day will.) > +extern const struct utrace_regset_view utrace_um_native; > +static inline const struct utrace_regset_view * > +utrace_native_view(struct task_struct *tsk) > +{ > + return &utrace_um_native; > +} You probably just want an extern decl for utrace_native_view here, since what it really does with depend on the subarch. > BTW, UML runs on the utrace in -mm (i.e. utrace on the host), which it > didn't with several Fedora kernels. Oh, really? That's good, but are you sure? Have you tried a CONFIG_PREEMPT=y host? I reproduced a failure with the current code recently after Alexey Dobriyan reported the problem. But I didn't get anywhere debugging it and got busy with other work. I could use some help tracking down what ptrace does differently that broke UML, if it does indeed still come up. I have plenty of experience debugging ptrace and users of it, but I don't know much of anything about UML's usage pattern and got quickly lost in its code trying to tell what it expected to happen. Thanks, Roland
WARNING: multiple messages have this Message-ID (diff)
From: Roland McGrath <roland@redhat.com> To: Jeff Dike <jdike@addtoit.com> Cc: linux-kernel@vger.kernel.org, user-mode-linux-devel@lists.sourceforge.net Subject: Re: [uml-devel] [PATCH] UML utrace support, step 1 Date: Wed, 21 Feb 2007 03:12:28 -0800 (PST) [thread overview] Message-ID: <20070221111228.9CEA21800E4@magilla.sf.frob.com> (raw) In-Reply-To: Jeff Dike's message of Tuesday, 20 February 2007 16:21:19 -0500 <20070220212119.GA8090@ccure.user-mode-linux.org> > Below is the first step in your Fix-Your-Broken-Arch-HOWTO for UML. Great! Thanks for tackling this. > Do you want incremental patches as I go along, or replacement ones? The way I've organized my patch series is with the arch support split up along with the separate infrastructure patches in the series. That is, just asm/tracehook.h with no utrace_regset stuff in the first patch so that the kernel builds with only utrace-tracehook.patch; then the regset stuff but no arch_ptrace et al in another patch so that it builds with utrace-regset.patch but without the later patches; then arch_ptrace et al in the final arch patch. Your patch is mostly just the first of these (utrace-tracehook-um), but includes utrace_regset and arch_ptrace stubs that won't compile without the later infrastructure patches applied. If you want to divide things up this way, then I'd like just to see a replacement utrace-tracehook-um.patch followed by utrace-regset-um.patch and utrace-ptrace-compat-um.patch, replacing each one whole as needed until it's merged into my trees, and then I can take incremental changes after that. If you don't want to bother with dividing things so it compiles in between patches in the series, then just one big replacement patch is fine. > +const struct utrace_regset_view utrace_um_native = { > + .name = "um", This name wants to be the subarch name--it's usually the $ARCH or UTS_MACHINE, i.e. the canonical arch name (i386 not i686, but ppc64 or ppc, not powerpc). In fact, I'm sure you really want to define the utrace_regset_view structs separately somewhere in arch/um/sys-$SUBARCH. On biarch platforms you'll need more than one, as the native biarch platforms have. (But that is all part of the second step that isn't really tackled in this patch.) > +#define ARCH_HAS_SINGLE_STEP (1) Note you'll eventually want to define the block-step macro and functions depending on subarch. (ia64 supports it, and x86 one day will.) > +extern const struct utrace_regset_view utrace_um_native; > +static inline const struct utrace_regset_view * > +utrace_native_view(struct task_struct *tsk) > +{ > + return &utrace_um_native; > +} You probably just want an extern decl for utrace_native_view here, since what it really does with depend on the subarch. > BTW, UML runs on the utrace in -mm (i.e. utrace on the host), which it > didn't with several Fedora kernels. Oh, really? That's good, but are you sure? Have you tried a CONFIG_PREEMPT=y host? I reproduced a failure with the current code recently after Alexey Dobriyan reported the problem. But I didn't get anywhere debugging it and got busy with other work. I could use some help tracking down what ptrace does differently that broke UML, if it does indeed still come up. I have plenty of experience debugging ptrace and users of it, but I don't know much of anything about UML's usage pattern and got quickly lost in its code trying to tell what it expected to happen. Thanks, Roland ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
next prev parent reply other threads:[~2007-02-21 11:12 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-02-20 21:21 [PATCH] UML utrace support, step 1 Jeff Dike 2007-02-20 21:21 ` [uml-devel] " Jeff Dike 2007-02-21 11:12 ` Roland McGrath [this message] 2007-02-21 11:12 ` Roland McGrath 2007-02-21 18:18 ` Jeff Dike 2007-02-21 18:18 ` [uml-devel] " Jeff Dike 2007-02-23 3:19 ` Roland McGrath 2007-02-23 3:19 ` [uml-devel] " Roland McGrath 2007-02-23 15:50 ` Jeff Dike 2007-02-23 15:50 ` [uml-devel] " Jeff Dike 2007-03-05 19:21 ` Jeff Dike 2007-03-05 19:21 ` [uml-devel] " Jeff Dike 2007-03-07 8:01 ` Roland McGrath 2007-03-07 8:01 ` [uml-devel] " Roland McGrath 2007-03-16 16:25 ` Jeff Dike 2007-03-16 16:25 ` [uml-devel] " Jeff Dike 2007-03-16 23:20 ` Roland McGrath 2007-03-16 23:20 ` [uml-devel] " Roland McGrath
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=20070221111228.9CEA21800E4@magilla.sf.frob.com \ --to=roland@redhat.com \ --cc=jdike@addtoit.com \ --cc=linux-kernel@vger.kernel.org \ --cc=user-mode-linux-devel@lists.sourceforge.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: linkBe 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.