From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752243AbdIBGbK (ORCPT ); Sat, 2 Sep 2017 02:31:10 -0400 Received: from mail-qk0-f196.google.com ([209.85.220.196]:36380 "EHLO mail-qk0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750980AbdIBGbG (ORCPT ); Sat, 2 Sep 2017 02:31:06 -0400 X-Google-Smtp-Source: ADKCNb7c0LJry9npwBH8cnq46lOYzCZWWewsuX2JjnpTuVIkg6GDQxJuFdubb4Q2ypuA5nRof+4e327qwzLNi4teUfE= MIME-Version: 1.0 In-Reply-To: References: <1495454226-10027-1-git-send-email-tixxdz@gmail.com> <1495454226-10027-2-git-send-email-tixxdz@gmail.com> From: Djalal Harouni Date: Sat, 2 Sep 2017 08:31:05 +0200 Message-ID: Subject: Re: [PATCH v4 next 1/3] modules:capabilities: allow __request_module() to take a capability argument To: Kees Cook Cc: "Serge E. Hallyn" , Rusty Russell , "David S . Miller" , Jessica Yu , LKML , Network Development , linux-security-module , "kernel-hardening@lists.openwall.com" , Andy Lutomirski , Andrew Morton , James Morris , Paul Moore , Stephen Smalley , Greg Kroah-Hartman , Tetsuo Handa , Ingo Molnar , Linux API , Dongsu Park , Casey Schaufler , Jonathan Corbet , Arnaldo Carvalho de Melo , Mauro Carvalho Chehab , Peter Zijlstra , Zendyani , "linux-doc@vger.kernel.org" , Al Viro , Ben Hutchings Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Kees, On Thu, Jun 1, 2017 at 9:10 PM, Kees Cook wrote: > On Thu, Jun 1, 2017 at 7:56 AM, Djalal Harouni wrote: ... > >> BTW Kees, also in next version I won't remove the >> capable(CAP_NET_ADMIN) check from [1] >> even if there is the new request_module_cap(), I would like it to be >> in a different patches, this way we go incremental >> and maybe it is better to merge what we have now ? and follow up >> later, and of course if other maintainers agree too! > > Yes, incremental. I would suggest first creating the API changes to > move a basic require_cap test into the LSM (which would drop the > open-coded capable() checks in the net code), and then add the > autoload logic in the following patches. That way the "infrastructure" > changes happen separately and do not change any behaviors, but moves > the caps test down where its wanted in the LSM, before then augmenting > the logic. > >> I just need a bit of free time to check again everything and will send >> a v5 with all requested changes. > > Great, thank you! > So sorry was busy these last months, I picked it again, will send v5 after the merge window. Kees I am looking on a way to integrate a test for it, we should use something like the example here [1] or maybe something else ? and which module to use ? I still did not sort this out, if anyone has some suggestions, thank you in advance! [1] http://openwall.com/lists/kernel-hardening/2017/05/22/7 -- tixxdz