From: Blaisorblade <blaisorblade@yahoo.it>
To: Jeff Dike <jdike@addtoit.com>
Cc: linux-kernel@vger.kernel.org,
user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] [PATCH 8/8] uml: avoid "CONFIG_NR_CPUS undeclared" bogus error messages
Date: Fri, 20 Jan 2006 00:41:08 +0100 [thread overview]
Message-ID: <200601200041.14590.blaisorblade@yahoo.it> (raw)
In-Reply-To: <20060119194356.GA8670@ccure.user-mode-linux.org>
On Thursday 19 January 2006 20:43, Jeff Dike wrote:
> On Thu, Jan 19, 2006 at 04:01:28PM +0100, Blaisorblade wrote:
> > Gerd Knorr in his tty patch, instead, used forward declarations, like:
> >
> > struct task_struct;
> >
> > what about that?
> I don't think so. At least when you use void *, you are using a type
> that's not incorrect. In userspace code, those task_structs start
> referring to host task_structs, which is definitely very wrong.
Possibly yes, but as long as we don't dereference the pointer (and in a
prototype you're not going to do that) there's no problem.
Using a type makes the code clearer, and it doesn't hide any warning GCC may
give (behaving well is left to us only).
In fact, btw (before I forget) we have currently the wrong errno used in
sys-i386/ldt.c. Just wrote the fix (it's adding a silly os_ptrace_ldt). Going
to compile and send.
> > Those functions probably should be moved anyway because they're
> > useless there
> Yeah.
> Jeff
--
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade
___________________________________
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB
http://mail.yahoo.it
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
WARNING: multiple messages have this Message-ID (diff)
From: Blaisorblade <blaisorblade@yahoo.it>
To: Jeff Dike <jdike@addtoit.com>
Cc: linux-kernel@vger.kernel.org,
user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] [PATCH 8/8] uml: avoid "CONFIG_NR_CPUS undeclared" bogus error messages
Date: Fri, 20 Jan 2006 00:41:08 +0100 [thread overview]
Message-ID: <200601200041.14590.blaisorblade@yahoo.it> (raw)
In-Reply-To: <20060119194356.GA8670@ccure.user-mode-linux.org>
On Thursday 19 January 2006 20:43, Jeff Dike wrote:
> On Thu, Jan 19, 2006 at 04:01:28PM +0100, Blaisorblade wrote:
> > Gerd Knorr in his tty patch, instead, used forward declarations, like:
> >
> > struct task_struct;
> >
> > what about that?
> I don't think so. At least when you use void *, you are using a type
> that's not incorrect. In userspace code, those task_structs start
> referring to host task_structs, which is definitely very wrong.
Possibly yes, but as long as we don't dereference the pointer (and in a
prototype you're not going to do that) there's no problem.
Using a type makes the code clearer, and it doesn't hide any warning GCC may
give (behaving well is left to us only).
In fact, btw (before I forget) we have currently the wrong errno used in
sys-i386/ldt.c. Just wrote the fix (it's adding a silly os_ptrace_ldt). Going
to compile and send.
> > Those functions probably should be moved anyway because they're
> > useless there
> Yeah.
> Jeff
--
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade
___________________________________
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB
http://mail.yahoo.it
next prev parent reply other threads:[~2006-01-19 23:41 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-18 23:51 [uml-devel] [PATCH 0/8] Other UML batch Paolo 'Blaisorblade' Giarrusso
2006-01-18 23:51 ` Paolo 'Blaisorblade' Giarrusso
2006-01-18 23:54 ` [uml-devel] [PATCH 1/8] uml: typo fixup Paolo 'Blaisorblade' Giarrusso
2006-01-18 23:54 ` Paolo 'Blaisorblade' Giarrusso
2006-01-18 23:55 ` [uml-devel] [PATCH 2/8] uml: comments about libc-conflict guards Paolo 'Blaisorblade' Giarrusso
2006-01-18 23:55 ` Paolo 'Blaisorblade' Giarrusso
2006-01-18 23:55 ` [uml-devel] [PATCH 3/8] uml: fix hugest stack users Paolo 'Blaisorblade' Giarrusso
2006-01-18 23:55 ` Paolo 'Blaisorblade' Giarrusso
2006-01-18 23:55 ` [uml-devel] [PATCH 4/8] uml: fix "apples/bananas" typo Paolo 'Blaisorblade' Giarrusso
2006-01-18 23:55 ` Paolo 'Blaisorblade' Giarrusso
2006-01-18 23:55 ` [uml-devel] [PATCH 5/8] uml: TT - SYSCALL_DEBUG - fix buglet introduced in cleanup Paolo 'Blaisorblade' Giarrusso
2006-01-18 23:55 ` Paolo 'Blaisorblade' Giarrusso
2006-01-18 23:55 ` [uml-devel] [PATCH 6/8] uml: skas0-hold-own-ldt fixups for x86-64 Paolo 'Blaisorblade' Giarrusso
2006-01-18 23:55 ` Paolo 'Blaisorblade' Giarrusso
2006-01-18 23:55 ` [uml-devel] [PATCH 7/8] uml: some harmless sparse warning fixes Paolo 'Blaisorblade' Giarrusso
2006-01-18 23:55 ` Paolo 'Blaisorblade' Giarrusso
2006-01-18 23:55 ` [uml-devel] [PATCH 8/8] uml: avoid "CONFIG_NR_CPUS undeclared" bogus error messages Paolo 'Blaisorblade' Giarrusso
2006-01-18 23:55 ` Paolo 'Blaisorblade' Giarrusso
2006-01-19 4:21 ` [uml-devel] " Jeff Dike
2006-01-19 4:21 ` Jeff Dike
2006-01-19 15:01 ` Blaisorblade
2006-01-19 15:01 ` Blaisorblade
2006-01-19 19:43 ` Jeff Dike
2006-01-19 19:43 ` Jeff Dike
2006-01-19 23:41 ` Blaisorblade [this message]
2006-01-19 23:41 ` Blaisorblade
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=200601200041.14590.blaisorblade@yahoo.it \
--to=blaisorblade@yahoo.it \
--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: 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.