linux-um archives
 help / color / mirror / Atom feed
From: BlaisorBlade <blaisorblade_spam@yahoo.it>
To: user-mode-linux-devel@lists.sourceforge.net
Cc: Michael Richardson <mcr@sandelman.ottawa.on.ca>
Subject: Re: [uml-devel] core dumps and hostfs
Date: Sun, 17 Oct 2004 15:34:58 +0200	[thread overview]
Message-ID: <200410171534.58416.blaisorblade_spam@yahoo.it> (raw)
In-Reply-To: <8066.1097696719@marajade.sandelman.ottawa.on.ca>

On Wednesday 13 October 2004 21:45, Michael Richardson wrote:
> I have a problem with core dumps under UML.
> It seems that they don't work on hostfs. My guess is that there is
> something in hostfs that doesn't return the right answer.
>
> fs/exec.c, do_coredump(long signr, struct pt_regs * regs) has the
> following code:
>
> 	file = filp_open(corename, O_CREAT | 2 | O_NOFOLLOW, 0600);
> 	if (IS_ERR(file))
> 		goto fail;
> 	inode = file->f_dentry->d_inode;
> %	if (inode->i_nlink > 1)
> %		goto close_fail;	/* multiple links - don't dump */
> 	if (d_unhashed(file->f_dentry))
> 		goto close_fail;
>
> 	if (!S_ISREG(inode->i_mode))
> 		goto close_fail;
> 	if (!file->f_op)
> 		goto close_fail;
> 	if (!file->f_op->write)
> 		goto close_fail;
> 	if (do_truncate(file->f_dentry, 0) != 0)
> 		goto close_fail;
>
> 	retval = binfmt->core_dump(signr, regs, file);
>
> Note that since the file gets created, I looked carefully at what
> happens, and finally I noticed that the file has multiple hard links!
>
> As such that would cause the test at (%) to fail. Look below to
> EXPERIMENT.
>
> Does this make any sense to anyone?
> I did not have this problem with 2.4.19-47.
I think this will not appear with UML versions until 2.4.24-1um included. In 
fact, I'm going to release (don't know when) some 2.4 patches without all the 
hostfs changes, to make it more stable. I'm not seeing, for now, where does 
this come from, but I do not expect the "rewritten" hostfs to work (nor does 
Jeff, for now).

Thanks for the plenty of details, I'll use them later, when debugging this.
-- 
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

  reply	other threads:[~2004-10-18 15:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-13 19:45 [uml-devel] core dumps and hostfs Michael Richardson
2004-10-17 13:34 ` BlaisorBlade [this message]
2004-10-18 16:25   ` Michael Richardson

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=200410171534.58416.blaisorblade_spam@yahoo.it \
    --to=blaisorblade_spam@yahoo.it \
    --cc=mcr@sandelman.ottawa.on.ca \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox