lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 28 Jul 2009 09:14:40 -0700
From:	Roland Dreier <rdreier@...co.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	linux-kernel@...r.kernel.org, jsquyres@...co.com,
	rostedt@...dmis.org
Subject: Re: [PATCH v2] ummunotify: Userspace support for MMU notifications


 > > +config UMMUNOTIFY
 > > +       tristate "Userspace MMU notifications"
 > > +       select MMU_NOTIFIER

 > Does `select' dtrt here if UMMUNOTIFY=m?  I never trust it...

Yes, it appears to when I test... and all the other users (KVM, SGI_GRU)
of MMU_NOTIFIER are tristates that select it, so in practice it seems to
work as well.

 > <searches in vain for ummunotify.txt>
 > 
 > Oh well :(
 > 
 > A little test app would be nice - I assume you have one.  We could toss
 > in in the tree as a how-to-use example, and people could perhaps turn
 > it into a regression test - perhaps the LTP people would take it.

I'll write up a bit of doc and stick it in Documentation/ummunotify.txt,
and create samples/ummunotify/ as well for the next iteration.

 > > +			if (test_bit(UMMUNOTIFY_FLAG_HINT, &reg->flags)) {
 > > +				clear_bit(UMMUNOTIFY_FLAG_HINT, &reg->flags);
 > > +			} else {
 > > +				set_bit(UMMUNOTIFY_FLAG_HINT, &reg->flags);

 > It's a shame that change_bit() didn't return the old (or new) value.

Heh, I didn't know about change_bit().  <looks> ... seems like
test_and_change_bit() is exactly what would fit here.  Will update.

 > The overall userspace interface seems a bit klunky, but I can't really
 > suggest anything better.  Netlink delivery?

I took a quick look at netlink but discarded the idea when I saw that
netlink sockets don't support mmap() ... seems that plumbing in mmap
support (to handle the kernel exported generation count) is probably
more trouble than it's worth, and I'm not sure that all the netlink
encapsulation is that much of a win here anyway.  I'd prefer to proceed
with the "virtual character device" interface -- another option would be
sys_ummunotify_create and sys_ummunotify_ctl but I can't really imagine
this being worth another couple syscalls.

 - R.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ