Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754977AbYAHKhZ (ORCPT ); Tue, 8 Jan 2008 05:37:25 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753683AbYAHKgH (ORCPT ); Tue, 8 Jan 2008 05:36:07 -0500 Received: from ms1.nttdata.co.jp ([163.135.193.232]:40593 "EHLO ms1.nttdata.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753528AbYAHKgB (ORCPT ); Tue, 8 Jan 2008 05:36:01 -0500 X-Greylist: delayed 2759 seconds by postgrey-1.27 at vger.kernel.org; Tue, 08 Jan 2008 05:35:56 EST Message-Id: <20080108094957.201977944@nttdata.co.jp> References: <20080108094903.484613061@nttdata.co.jp> User-Agent: quilt/0.46-1 Date: Tue, 08 Jan 2008 18:49:06 +0900 From: Kentaro Takeda To: akpm@linux-foundation.org Cc: linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, Tetsuo Handa Subject: [TOMOYO #6 03/21] Add wrapper functions for VFS helper functions. X-OriginalArrivalTime: 08 Jan 2008 09:49:57.0303 (UTC) FILETIME=[D3CACC70:01C851DB] MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="boundary-1" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 8297 Lines: 115 --boundary-1 Content-Disposition: inline; filename="add-wrapper-functions-for-vfs-helper-functions.patch" Content-Type: application/octect-stream Content-Transfer-Encoding: base64 VGhpcyBwYXRjaCBhbGxvd3MgTFNNIGhvb2tzIHJlZmVyIHByZXZpb3VzbHkgYXNzb2NpYXRlZCAi c3RydWN0IHZmc21vdW50Ig0KcGFyYW1ldGVyIHNvIHRoYXQgdGhleSBjYW4gY2FsY3VsYXRlIHBh dGhuYW1lIG9mIGdpdmVuICJzdHJ1Y3QgZGVudHJ5Ii4NCg0KQXBwQXJtb3IncyBhcHByb2FjaCBp cyB0byBhZGQgInN0cnVjdCB2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orCXJldCA9IHZmc19ta2RpcihkaXIsIGRl bnRyeSwgbW9kZSk7DQorCXRhc2stPmxhc3RfdmZzbW91bnQgPSBwcmV2X21udDsNCisJbW50cHV0 KG1udCk7DQorCXJldHVybiByZXQ7DQorfQ0KKw0KK3N0YXRpYyBpbmxpbmUgaW50IHZmc19ta25v ZDIoc3RydWN0IGlub2RlICpkaXIsIHN0cnVjdCBkZW50cnkgKmRlbnRyeSwNCisJCQkgICAgIHN0 cnVjdCB2ZnNtb3VudCAqbW50LCBpbnQgbW9kZSwgZGV2X3QgZGV2KQ0KK3sNCisJaW50IHJldDsN CisJc3RydWN0IHRhc2tfc3RydWN0ICp0YXNrID0gY3VycmVudDsNCisJc3RydWN0IHZmc21vdW50 ICpwcmV2X21udCA9IHRhc2stPmxhc3RfdmZzbW91bnQ7DQorCXRhc2stPmxhc3RfdmZzbW91bnQg PSBtbnRnZXQobW50KTsNCisJcmV0ID0gdmZzX21rbm9kKGRpciwgZGVudHJ5LCBtb2RlLCBkZXYp Ow0KKwl0YXNrLT5sYXN0X3Zmc21vdW50ID0gcHJldl9tbnQ7DQorCW1udHB1dChtbnQpOw0KKwly ZXR1cm4gcmV0Ow0KK30NCisNCitzdGF0aWMgaW5saW5lIGludCB2ZnNfc3ltbGluazIoc3RydWN0 IGlub2RlICpkaXIsIHN0cnVjdCBkZW50cnkgKmRlbnRyeSwNCisJCQkgICAgICAgc3RydWN0IHZm c21vdW50ICptbnQsIGNvbnN0IGNoYXIgKm9sZG5hbWUsDQorCQkJICAgICAgIGludCBtb2RlKQ0K K3sNCisJaW50IHJldDsNCisJc3RydWN0IHRhc2tfc3RydWN0ICp0YXNrID0gY3VycmVudDsNCisJ c3RydWN0IHZmc21vdW50ICpwcmV2X21udCA9IHRhc2stPmxhc3RfdmZzbW91bnQ7DQorCXRhc2st Pmxhc3RfdmZzbW91bnQgPSBtbnRnZXQobW50KTsNCisJcmV0ID0gdmZzX3N5bWxpbmsoZGlyLCBk ZW50cnksIG9sZG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QgZGVudHJ5ICosIHN0cnVjdCB2ZnNtb3VudCAqLCBpbnQpOw0KQEAgLTE3MTgs NiArMTg0MywxOSBAQCBleHRlcm4gaW50IHBlcm1pc3Npb24oc3RydWN0IGlub2RlICosIGluDQog ZXh0ZXJuIGludCBnZW5lcmljX3Blcm1pc3Npb24oc3RydWN0IGlub2RlICosIGludCwNCiAJCWlu dCAoKmNoZWNrX2FjbCkoc3RydWN0IGlub2RlICosIGludCkpOw0KIA0KK3N0YXRpYyBpbmxpbmUg aW50IG5vdGlmeV9jaGFuZ2UyKHN0cnVjdCBkZW50cnkgKmRlbnRyeSwgc3RydWN0IHZmc21vdW50 ICptbnQsDQorCQkJCSBzdHJ1Y3QgaWF0dHIgKmF0dHIpDQorew0KKwlpbnQgcmV0Ow0KKwlzdHJ1 Y3QgdGFza19zdHJ1Y3QgKnRhc2sgPSBjdXJyZW50Ow0KKwlzdHJ1Y3QgdmZzbW91bnQgKnByZXZf bW50ID0gdGFzay0+bGFzdF92ZnNtb3VudDsNCisJdGFzay0+bGFzdF92ZnNtb3VudCA9IG1udGdl dChtbnQpOw0KKwlyZXQgPSBub3RpZnlfY2hhbmdlKGRlbnRyeSwgYXR0cik7DQorCXRhc2stPmxh c3RfdmZzbW91bnQgPSBwcmV2X21udDsNCisJbW50cHV0KG1udCk7DQorCXJldHVybiByZXQ7DQor fQ0KKw0KIGV4dGVybiBpbnQgZ2V0X3dyaXRlX2FjY2VzcyhzdHJ1Y3QgaW5vZGUgKik7DQogZXh0 ZXJuIGludCBkZW55X3dyaXRlX2FjY2VzcyhzdHJ1Y3QgZmlsZSAqKTsNCiBzdGF0aWMgaW5saW5l IHZvaWQgcHV0X3dyaXRlX2FjY2VzcyhzdHJ1Y3QgaW5vZGUgKiBpbm9kZSkNCg0KLS0gDQo= --boundary-1-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/