From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751441Ab1LaHvK (ORCPT ); Sat, 31 Dec 2011 02:51:10 -0500 Received: from mail-ee0-f46.google.com ([74.125.83.46]:38038 "EHLO mail-ee0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751181Ab1LaHvI (ORCPT ); Sat, 31 Dec 2011 02:51:08 -0500 Date: Sat, 31 Dec 2011 11:51:02 +0400 From: Cyrill Gorcunov To: KOSAKI Motohiro Cc: Herbert Xu , Tejun Heo , linux-kernel@vger.kernel.org, Pavel Emelyanov , Glauber Costa , Andi Kleen , Matt Helsley , Pekka Enberg , Eric Dumazet , Vasiliy Kulikov , Andrew Morton , Alexey Dobriyan , "David S. Miller" Subject: Re: [patch 1/4] Add routine for generating an ID for kernel pointer Message-ID: <20111231075102.GQ4806@moon> References: <20111228170116.GQ17712@google.com> <20111228171419.GA19321@moon> <20111229142438.GI4460@moon> <20111229161414.GC3516@google.com> <20111229162453.GC4806@moon> <20111230002309.GA11508@gondor.apana.org.au> <20111230073655.GE4806@moon> <4EFE1FA4.3090207@gmail.com> <20111230204836.GP4806@moon> <4EFE4E89.6000607@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4EFE4E89.6000607@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 30, 2011 at 06:51:37PM -0500, KOSAKI Motohiro wrote: ... > > > >Guys, this become more and more complex, finally I fear someone > >propose to do ideal hashing run-time ;) Maybe we can step back and > >live with root-only and plain pointers here? I'm not sure who else > >might need such facility except us, and if once there will be a candidate > >-- we could take a look on hashing again and provide safe hashes there. No? > > But recently kernel security fashion are, we don't expose a kernel > pointer at all even though the file is root only. I'm not sure how > much effective such fashion. but you seems run opposite way. > > I doubt user land can implement good comparison way. Why you gave up > Andrew's sys_are_these_files_the_same() idea? > Because of speed, as Pavel mentioned | | With this the complexity of determining sharing for N files scattered across | several tasks would be N^2, since we'll have to compare each file to each file. | | On the other hand having just N IDs at hands would allow us to use more | efficient algorithms resulting in e.g. N*log(N) complexity. | Cyrill