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:	Wed, 6 May 2009 17:26:55 +0100 (BST)
From:	Hugh Dickins <hugh@...itas.com>
To:	Izik Eidus <ieidus@...hat.com>
cc:	Rik van Riel <riel@...hat.com>, akpm@...ux-foundation.org,
	linux-kernel@...r.kernel.org, aarcange@...hat.com,
	chrisw@...hat.com, alan@...rguk.ukuu.org.uk, device@...ana.org,
	linux-mm@...ck.org, nickpiggin@...oo.com.au
Subject: Re: [PATCH 3/6] ksm: change the KSM_REMOVE_MEMORY_REGION ioctl.

On Wed, 6 May 2009, Izik Eidus wrote:
> 
> We can first start with this ioctl interface, later when we add swapping to
> the pages, we can have madvice, and still (probably easily) support the ioctls
> by just calling from inside ksm the madvice functions for that specific
> address)
> 
> I want to see ksm use madvice, but i believe it require some more changes to
> mm/*.c, so it probably better to start with merging it when it doesnt touch
> alot of stuff outisde ksm.c, and then to add swapping and after that add
> madvice support (when the pages are swappable, everyone can use it)
> 
> What you think about that?

I think it's the wrong order to follow.

The /dev/ksm interface is fine for your use while it's out of tree,
but we want to get the user interface right when bringing it into
mainline.  I recall Chris being very clear on that too.

Changing from /dev/ksm to madvise() is not a lot of work, it's mainly
a matter of deleting code, and tidying up interfaces which would need
more work anyway (I haven't commented on your curious -EPERMs yet!).

It doesn't involve whether you've enabled swapping or not - let's
forget the CAP_IPC_LOCK idea, and delegate that issue to limitation
via sysfs, along with the ability to limit wild overuse of the feature
- permissions on a sysfs node or something else?

It does nudge towards making some decisions which need to be made
anyway - that tends to be what a correct interface forces upon you.
Like the issue of whether to go on covering unmapped areas or not -
though possibly we could put off that decision, if it's doc'ed
for now.

And if it only covers mapped areas, then there will need to be a
VM_flag for it, mainly so mm can call into ksm.c when it's unmapped;
but I don't see it sinking hooks deeply into mm/*.c.

Hugh
--
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