From: Pavel Machek <pavel@suse.cz>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Chris Wright <chrisw@redhat.com>, Izik Eidus <ieidus@redhat.com>,
akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, kvm@vger.kernel.org, aarcange@redhat.com,
avi@redhat.com, dlaor@redhat.com, kamezawa.hiroyu@jp.fujitsu.com,
cl@linux-foundation.org, corbet@lwn.net
Subject: Re: [PATCH 3/4] add ksm kernel shared memory driver.
Date: Wed, 3 Dec 2008 15:33:08 +0100 [thread overview]
Message-ID: <20081203143307.GA2068@ucw.cz> (raw)
In-Reply-To: <20081202221029.513e8774@lxorguk.ukuu.org.uk>
On Tue 2008-12-02 22:10:29, Alan Cox wrote:
> On Tue, 2 Dec 2008 13:24:11 -0800
> Chris Wright <chrisw@redhat.com> wrote:
>
> > * Alan Cox (alan@lxorguk.ukuu.org.uk) wrote:
> > > On Tue, 2 Dec 2008 10:07:24 -0800
> > > Chris Wright <chrisw@redhat.com> wrote:
> > > > * Alan Cox (alan@lxorguk.ukuu.org.uk) wrote:
> > > > > > + r = !memcmp(old_digest, sha1_item->sha1val, SHA1_DIGEST_SIZE);
> > > > > > + mutex_unlock(&sha1_lock);
> > > > > > + if (r) {
> > > > > > + char *old_addr, *new_addr;
> > > > > > + old_addr = kmap_atomic(oldpage, KM_USER0);
> > > > > > + new_addr = kmap_atomic(newpage, KM_USER1);
> > > > > > + r = !memcmp(old_addr+PAGEHASH_LEN, new_addr+PAGEHASH_LEN,
> > > > > > + PAGE_SIZE-PAGEHASH_LEN);
> > > > >
> > > > > NAK - this isn't guaranteed to be robust so you could end up merging
> > > > > different pages one provided by a malicious attacker.
> > > >
> > > > I presume you're referring to the digest comparison. While there's
> > > > theoretical concern of hash collision, it's mitigated by hmac(sha1)
> > > > so the attacker can't brute force for known collisions.
> > >
> > > Using current known techniques. A random collision is just as bad news.
> >
> > And, just to clarify, your concern would extend to any digest based
> > comparison? Or are you specifically concerned about sha1?
>
> Taken off list
Hmmm, list would like to know :-).
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2008-12-03 14:33 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-17 2:20 [PATCH 0/4] ksm - dynamic page sharing driver for linux v2 Izik Eidus
2008-11-17 2:20 ` [PATCH 1/4] Rmap: Add page_wrprotect() function Izik Eidus
2008-11-17 2:20 ` [PATCH 2/4] Add replace_page(): change the page pte is pointing to Izik Eidus
2008-11-17 2:20 ` [PATCH 3/4] add ksm kernel shared memory driver Izik Eidus
2008-11-17 2:20 ` [PATCH 4/4] MMU_NOTIFIRES: add set_pte_at_notify() Izik Eidus
2008-11-28 16:58 ` [PATCH 3/4] add ksm kernel shared memory driver Alan Cox
2008-12-02 18:07 ` Chris Wright
2008-12-02 18:13 ` Alan Cox
2008-12-02 21:24 ` Chris Wright
2008-12-02 21:37 ` Jonathan Corbet
2008-12-02 22:10 ` Alan Cox
2008-12-03 14:33 ` Pavel Machek [this message]
2008-12-04 9:48 ` Alan Cox
2008-11-20 7:44 ` [PATCH 0/4] ksm - dynamic page sharing driver for linux v2 Ryota OZAKI
2008-11-20 9:03 ` Izik Eidus
2008-11-20 9:13 ` Izik Eidus
2008-11-20 9:44 ` Ryota OZAKI
2008-11-28 12:57 ` Dmitri Monakhov
2008-11-28 13:51 ` Alan Cox
-- strict thread matches above, loose matches on Subject: below --
2008-11-11 13:21 [PATCH 0/4] ksm - dynamic page sharing driver for linux Izik Eidus
2008-11-11 13:21 ` [PATCH 1/4] rmap: add page_wrprotect() function, Izik Eidus, Izik Eidus
2008-11-11 13:21 ` [PATCH 2/4] Add replace_page(), change the mapping of pte from one page into another Izik Eidus, Izik Eidus
2008-11-11 13:21 ` [PATCH 3/4] add ksm kernel shared memory driver Izik Eidus, Izik Eidus
2008-11-11 20:38 ` Andrew Morton
2008-11-11 22:03 ` Andrea Arcangeli
2008-11-11 22:03 ` Jonathan Corbet
2008-11-11 22:17 ` Izik Eidus
2008-11-11 22:25 ` Jonathan Corbet
2008-11-11 22:31 ` Izik Eidus
2008-11-11 22:30 ` Jonathan Corbet
2008-11-11 22:38 ` Izik Eidus
2008-11-11 23:02 ` Izik Eidus
2008-11-11 23:03 ` Andrea Arcangeli
2008-11-11 22:49 ` Avi Kivity
2008-11-11 22:40 ` Valdis.Kletnieks
2008-11-13 6:13 ` Eric Rannaud
2008-11-11 22:43 ` Avi Kivity
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=20081203143307.GA2068@ucw.cz \
--to=pavel@suse.cz \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=avi@redhat.com \
--cc=chrisw@redhat.com \
--cc=cl@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=dlaor@redhat.com \
--cc=ieidus@redhat.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/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;
as well as URLs for NNTP newsgroup(s).