From: Jeff Dike <jdike@addtoit.com>
To: Henrik Nordstrom <hno@marasystems.com>
Cc: Jeff Dike <jdike@addtoit.com>,
User-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] iptables-restore randomly crashes under UML
Date: Tue, 2 Dec 2003 11:42:57 -0500 [thread overview]
Message-ID: <20031202164257.GA24954@ccure.user-mode-linux.org> (raw)
In-Reply-To: <Pine.LNX.4.44.0312020123030.16352-200000@filer.marasystems.com>
On Tue, Dec 02, 2003 at 01:55:25AM +0100, Henrik Nordstrom wrote:
> vfree() calls flush_tlb_all(), but as this does not update the vm_seq
> number old the mapping is still there unless there is another page fault
> before the page is referenced again. Because of this there is a race if
> vmalloc() returns the same area that was last vmfree():d causing that area
> to temporarily refer to the old physical location until the next kernel
> page fault and quickly resulting in very odd results..
Sorry about the delay. I've been in Tokyo for the last week. I haven't
stared at the code yet, but your analysis looks reasonable.
> What I wonder is if this can be fixed without dropping the vm_seq
> optimization of tt kernel virtual memory updates. But from looking at the
> skas implementation I suppose dropping the vm_seq optimization is the
> correct way.. (skas does not have this optimization and should thus be
> safe from the issue)
Right, this is because of the kernel existing in multiple host address
spaces on the host in tt mode, and the kernel VM area needing to be kept
in sync between them.
> What was the design thought behind the vm_seq optimization? I understand
> the principle, but not the conditions when it can be safely deduced that
> the init_mm has not been updated since the last flush_kernel_vm_range().
The idea is to avoid unecessary mmapping and munmapping on context switches
if the kernel VM area hasn't changed since the process last ran.
> I still think the kernel vm pte mappings should be mirrored into the
> current process and flush_kernel_vm_range() changed to do incremental
> remaps where the kernel vm pte mappings of init_mm differs from the
> current process.
How?
> This applies to both tt and skas mode.
No, it doesn't. Those two are completely different in this case.
Jeff
-------------------------------------------------------
This SF.net email is sponsored by OSDN's Audience Survey.
Help shape OSDN's sites and tell us what you think. Take this
five minute survey and you could win a $250 Gift Certificate.
http://www.wrgsurveys.com/2003/osdntech03.php?site=8
_______________________________________________
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:[~2003-12-02 16:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-22 13:09 [uml-devel] iptables-restore randomly crashes under UML Henrik Nordstrom
2003-11-23 23:37 ` Henrik Nordstrom
2003-11-26 0:48 ` Adam Heath
2003-11-26 1:42 ` Henrik Nordstrom
2003-11-26 4:11 ` Henrik Nordstrom
2003-12-01 10:43 ` Henrik Nordstrom
2003-12-01 23:47 ` Henrik Nordstrom
2003-12-02 0:55 ` Henrik Nordstrom
2003-12-02 16:42 ` Jeff Dike [this message]
2003-12-02 16:49 ` Henrik Nordstrom
2003-12-02 18:58 ` Jeff Dike
2003-12-02 21:37 ` Henrik Nordstrom
2003-12-02 18:39 ` Henrik Nordstrom
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=20031202164257.GA24954@ccure.user-mode-linux.org \
--to=jdike@addtoit.com \
--cc=User-mode-linux-devel@lists.sourceforge.net \
--cc=hno@marasystems.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 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.