Received: by 10.223.164.202 with SMTP id h10csp2268662wrb; Mon, 27 Nov 2017 14:34:26 -0800 (PST) X-Google-Smtp-Source: AGs4zMa/ZkAw6bknOmDoHG2Gyld7C8DkJ8gxSkw8uxk6SZcOtleDxzQGn7oi4PuquUibPKdwaTX/ X-Received: by 10.84.240.193 with SMTP id l1mr9611877plt.240.1511822066639; Mon, 27 Nov 2017 14:34:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511822066; cv=none; d=google.com; s=arc-20160816; b=rf6p3U/d21AoJFNwjg0p1E8tMiR/xBzu8jVCXI1ynJP/hjDx7qBBqnkcCJqwxPc3gM gMZd2YcK/Xx7fExjBblppThxi7MXyj6qc6PNxd+kZcfe4EFbnuJE1bsIoACjpEydAGmM PC/uge5193WokII7ku/cQ8iRkBH758e7DQYSUkv6d4CFTv4G9OoRukTO7eEZqeLUSx2d ukY0sSUXoeXVJdr6tuePtM9h8spO7bb00Q5L2V9Y2LXy5Qlp6W/27gn9+cMkwxMj02Nv cEWH86mIIcxaUqFuUl4qOfNFTXw+V0Alm+Vhu31bXfJHAjzqok4KFK7ebNSRGN6YwF8T rK9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=zPQ/91w7tv9aN4lzUIZX4eTqvFpS805l0PJGj0L/yx0=; b=aS6uNIHnLBkGyT0zH+BObUcO0KvIKC5AwoZ0+cRBR/u9JX7hX5UOhdglvjbddHTY5m tFCPkHY1QDE3S8Nxr+PrjK7GEn1J7F48TWoJwBNW/ScQno9AOMJg1LWFV7OUa11dq51I O/2zXUmYSoXAErwwxKJD3YlX/fhw5x7T9pEtKuLmsB1Ab8K8tp+HcP/Own96CkR4s5Yt MZstO53cpVb89XIBijlwl8Ka2gcVzpnueXExDCMxkJTYe9G3+cF0FIz4f3m+hcC7sEIX WAqnZIGV89gSevSzKj1DD3R013zKEcoxgoOU1Ktq7o2naU3mDZvqeFF+IHxw4WUByAT4 Uetw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z21si23358415plo.214.2017.11.27.14.34.14; Mon, 27 Nov 2017 14:34:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752380AbdK0Wcz (ORCPT + 78 others); Mon, 27 Nov 2017 17:32:55 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:42578 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751690AbdK0Wcx (ORCPT ); Mon, 27 Nov 2017 17:32:53 -0500 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id vARMVU4c029029 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 27 Nov 2017 22:31:30 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id vARMVTon026656 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 27 Nov 2017 22:31:29 GMT Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id vARMVPGY016576; Mon, 27 Nov 2017 22:31:25 GMT Received: from t440 (/58.166.67.31) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 27 Nov 2017 14:31:25 -0800 Date: Tue, 28 Nov 2017 09:31:18 +1100 (AEDT) From: James Morris X-X-Sender: james.l.morris@localhost To: David Miller cc: torvalds@linux-foundation.org, tixxdz@gmail.com, keescook@chromium.org, luto@kernel.org, akpm@linux-foundation.org, mcgrof@kernel.org, ben.hutchings@codethink.co.uk, solar@openwall.com, serge@hallyn.com, jeyu@kernel.org, rusty@rustcorp.com.au, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, kernel-hardening@lists.openwall.com, corbet@lwn.net, mingo@kernel.org, netdev@vger.kernel.org, peterz@infradead.org Subject: Re: [PATCH v5 next 0/5] Improve Module autoloading infrastructure In-Reply-To: <20171128.041426.801732093971324601.davem@davemloft.net> Message-ID: References: <1511803118-2552-1-git-send-email-tixxdz@gmail.com> <20171128.041426.801732093971324601.davem@davemloft.net> User-Agent: Alpine 2.20 (LFD 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 28 Nov 2017, David Miller wrote: > From: Linus Torvalds > Date: Mon, 27 Nov 2017 10:41:30 -0800 > > > What are the real life use-cases for normal users having modules > > auto-load? > > User opens SCTP socket, SCTP protocol module loads. > > People build test cases via namespaces, and in that namespaces normal > users can setup virtual tunnel devices themselves, and those configure > operations can bring the tunnel module in. What about implementing a white list of modules which are able to be loaded by unprivileged users? Then, Linus' solution would look something like: va_start(args, fmt); ret = vsnprintf(module_name, MODULE_NAME_LEN, fmt, args); va_end(args); if (WARN_ON_ONCE(!capable(CAP_SYS_MODULE) || !capable(CAP_SYS_ADMIN) || !capable(CAP_NET_ADMIN) || !unprivileged_autoload(module_name))) return -EPERM; -- James Morris From 1585256456081596936@xxx Mon Nov 27 21:32:47 +0000 2017 X-GM-THRID: 1585240558529359461 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread