Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758550AbbGHMM3 (ORCPT ); Wed, 8 Jul 2015 08:12:29 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:50168 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754871AbbGHMMW (ORCPT ); Wed, 8 Jul 2015 08:12:22 -0400 X-AuditID: cbfec7f4-f79c56d0000012ee-1d-559d13a2f07f Date: Wed, 08 Jul 2015 14:12:03 +0200 (CEST) From: Paul Osmialowski X-X-Sender: p.osmialowsk@AMDC1262.digital.local To: Lukasz Pawelczyk Cc: Paul Moore , James Morris , Casey Schaufler , "Serge E. Hallyn" , Kees Cook , Tetsuo Handa , Stephen Smalley , Neil Brown , Mark Rustad , Greg Kroah-Hartman , Daniel Mack , David Herrmann , Djalal Harouni , Shuah Khan , Al Viro , linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, Karol Lewandowski , Lukasz Skalski Subject: Re: [RFC 5/8] kdbus: use LSM hooks in kdbus code In-reply-to: <1436353775.2331.2.camel@samsung.com> Message-id: References: <1436351110-5902-1-git-send-email-p.osmialowsk@samsung.com> <1436351110-5902-6-git-send-email-p.osmialowsk@samsung.com> <1436353775.2331.2.camel@samsung.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-version: 1.0 Content-type: MULTIPART/MIXED; BOUNDARY="8323329-1448733694-1436357538=:12441" X-Brightmail-Tracker: H4sIAAAAAAAAA02Sa0iTURiAO9++m6vF52x2UhBcCiHlJbocLcL+xCHKIjQogpz2oZWbsqmk EpmXLk7U5o106+IwlmWWt9aszC1T0rxQaWZKWhaly0zLMsuaX4H/nnOe9znvn8OKpBcoN/aw Kp5XqxQxclpMtv1u6VlT5mII8+/P9EeD9TM0Svv1kUTGp64o3VhFo5w3e9DJLwYRatcqUbvu MoH0HScJVDN9hkZPLXoafc4eppHebqfRvYupJCrN+EShyZ4ZBtkajCLU2dXBoMKpzyS6+vM2 jTp/tVDBMlya2k3ikbx8Bvc07MN3KisIbLz7gcCNhusMNs08ZPDEyEsS1+YOMHj8/nMa59RW ANzcWEbjmrYUXFc8R+HJag9c/dZO7HbeL958iI85nMir/baEi6Nv1XZQcfmF4JhuQsukgqZc kAVYFnLr4FBvXBZw+ouusGuwis4CYlbKlQPYanotEg7vADxlH5oPSG41nHq83xHQXADsm7MB IfaDP2aGGAcv43zhdE8V6WhFXAENdQWjlEO4cIHQXG8nHezErYW91QPz9xIOQ1tdJSEsqwSw 3fRqXsi4NdD6e5YWhpzh9/zB+VjEhcChZ1oqD3AlC1TJAiVwIOyY7aUF3gEn31sJgT1hzYOG fzMYFpV3iwSWQdMLPRB4L7R0XyAuAbYCyPiEyDhNRJQywFejUGoSVFG+kbHKaiD8lCkzMD4K sgKOBfIlEnxAHyalFImaJKUVeP19Z/jmtS7gRqpiVbx8maTTyRAmlRxSJCXz6tiD6oQYXmMF 7iwpXy4xWMZDpVyUIp4/yvNxvPq/JVgnt1Swcpc1m2vj3VX9GaMuS835Y4naqvRNyudNK1RF Y9PJYvliizktJ1QX8K1bd+p0mOvs+LntRTtjt5qZ1v7zVu+pjWmNTZbgkJQrVOTYhkVHjpNe 4d4uN0YzPb7S39dnnLBpH2/VuvGDxSUPTDebI1Z55vapn5wNkvnc2JYm7ipOPygnNdGKAB+R WqP4A0Ui4+0xAwAA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 19019 Lines: 324 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1448733694-1436357538=:12441 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed You're right about it. To be fixed. Thanks for spotting this. On Wed, 8 Jul 2015, Lukasz Pawelczyk wrote: >> + ret = -EPERM; >> + goto exit_unref; >> + } > > Also, why aren't the error codes passed from LSM? LSM can return > anything, from EINVAL, to ENOMEM. Returning EPERM can be misleading. > --8323329-1448733694-1436357538=:12441 Content-Type: TEXT/x-diff; name=0005-kdbus-use-LSM-hooks-in-kdbus-code.patch Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename=0005-kdbus-use-LSM-hooks-in-kdbus-code.patch RnJvbSA5YzM3NjY3MzAyZjEwNGUwZjQxMmJhMjcyN2M0ZDNkZjgxZmI1OWRh IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQ0KRnJvbTogUGF1bCBPc21pYWxv d3NraSA8cC5vc21pYWxvd3NrQHNhbXN1bmcuY29tPg0KRGF0ZTogVHVlLCAy NiBNYXkgMjAxNSAxMjowMDozMyArMDIwMA0KU3ViamVjdDogW1JGQyA1Lzhd IGtkYnVzOiB1c2UgTFNNIGhvb2tzIGluIGtkYnVzIGNvZGUNCg0KT3JpZ2lu YXRlcyBmcm9tOg0KDQpodHRwczovL2dpdGh1Yi5jb20vbG1jdGwva2RidXMu Z2l0IChicmFuY2g6IGtkYnVzLWxzbS12NC5mb3Itc3lzdGVtZC12MjEyKQ0K Y29tbWl0OiBhYTA4ODU0ODlkMTliZTkyZmE0MWM2ZjBhNzFkZjI4NzYzMjI4 YTQwDQoNClNpZ25lZC1vZmYtYnk6IEthcm9sIExld2FuZG93c2tpIDxrLmxl d2FuZG93c2tAc2Ftc3VuZy5jb20+DQpTaWduZWQtb2ZmLWJ5OiBQYXVsIE9z bWlhbG93c2tpIDxwLm9zbWlhbG93c2tAc2Ftc3VuZy5jb20+DQotLS0NCiBp cGMva2RidXMvYnVzLmMgICAgICAgIHwgMTEgKysrKysrKysrKy0NCiBpcGMv a2RidXMvYnVzLmggICAgICAgIHwgIDUgKysrKysNCiBpcGMva2RidXMvY29u bmVjdGlvbi5jIHwgNDggKysrKysrKysrKysrKysrKysrKysrKysrKysrKysr KysrKysrKysrKysrKysrKysrDQogaXBjL2tkYnVzL2Nvbm5lY3Rpb24uaCB8 ICA2ICsrKysrKw0KIGlwYy9rZGJ1cy9k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E9fQ0xPRVhFQyk7DQotCQkJaWYgKG0uZmQgPCAwKSB7DQotCQkJCW0u ZmQgPSAtMTsNCisJCQlpZiAoc2VjdXJpdHlfZmlsZV9yZWNlaXZlKGQtPm1l bWZkLmZpbGUpKSB7DQogCQkJCWluY29tcGxldGVfZmRzID0gdHJ1ZTsNCiAJ CQl9IGVsc2Ugew0KLQkJCQlmZF9pbnN0YWxsKG0uZmQsDQotCQkJCQkgICBn ZXRfZmlsZShkLT5tZW1mZC5maWxlKSk7DQorCQkJCW0uZmQgPSBnZXRfdW51 c2VkX2ZkX2ZsYWdzKE9fQ0xPRVhFQyk7DQorCQkJCWlmIChtLmZkIDwgMCkg ew0KKwkJCQkJbS5mZCA9IC0xOw0KKwkJCQkJaW5jb21wbGV0ZV9mZHMgPSB0 cnVlOw0KKwkJCQl9IGVsc2Ugew0KKwkJCQkJZmRfaW5zdGFsbChtLmZkLA0K KwkJCQkJCWdldF9maWxlKGQtPm1lbWZkLmZpbGUpKTsNCisJCQkJfQ0KIAkJ CX0NCiAJCX0NCiANCi0tIA0KMS45LjENCg0K --8323329-1448733694-1436357538=:12441-- -- 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/