Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp606507pxb; Wed, 15 Sep 2021 09:04:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdS8ktu/b+xa3Ax69uBi5oGbTLWT+DYA2imXt6SgoiNGPYL5kpA4/DZfAP+MpFarRly59T X-Received: by 2002:a05:6e02:551:: with SMTP id i17mr576624ils.281.1631721856406; Wed, 15 Sep 2021 09:04:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631721856; cv=none; d=google.com; s=arc-20160816; b=UedyEgd6frEgLM+vgjo27ng4KznodpfbFZ6XUMv7Tei45Nzk5a7e6HHtMf3WFP1E6W dxoKp5S/dZFGNaYWRiCOg5e77N/+8CkiLONMD+yrEqrJG76FP1C9n4X+PgaHwSujR33D a4ERqjjG02LZo5YUcfvaBWdhj2ATUJQl1cxJlATOHfTP+HY1Ue9yKMp8GHZENC9wD/Sa iYRsrQAK5q9DkLyeY2Uh/HTWB8JNh+jt+NsyAjJEnpYTD7zLhbrthUvD6Im4LI2cK5lr Q5zFuTNWw9npk2+TkZ7PbAIWmt8wQJuS9rVgm+A+DknH6bGyal6tn5Dh8/pCQScgtJR8 hsFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=v7T1iryJpsUuREo0Y54H9VulVLtxyEKsZpLlmN22rKQ=; b=f0DpLExpJP4VRUhLQikd1N96yziNm2onVg+lDJ479NVlV+QHGMD4mwwXsJwXSVhOcx sfG4ibi2GvHZUXFXOYYVt34l8cYy8E7pTeyX76Elv0pVvQUXFcKlbuAQpmV2asnSMzVT U7q94ri2BHXwIUuSYqX6RaYbmp84je7djAvjAq7NoByFz+bTU7tEqOlX6k2iYpxzDz9Y sAz2qLNemDX9dKbUJhElBIJ27Fyvg2/EehcHTXtM9iUmasoHZQWzqzTuBazOrBeFrdw2 UfUd7iwCoofZRjSjtSX0tXY48FKhm6TZlZcscB80ivuy7q5uWcI4u2V5NGxqUyOLX1h6 qC0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YFbjuuDZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i62si277613iof.83.2021.09.15.09.04.02; Wed, 15 Sep 2021 09:04:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YFbjuuDZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234550AbhIOQEL (ORCPT + 99 others); Wed, 15 Sep 2021 12:04:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:44938 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234166AbhIOQEL (ORCPT ); Wed, 15 Sep 2021 12:04:11 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8657E61164; Wed, 15 Sep 2021 16:02:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631721772; bh=nXQtiMGXJl/dD6TL+0pz2oTfvK+RhAwsJyp3+nnyKUw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YFbjuuDZdBHSNOsM3hmiyKaqZnCKMmTg7hfcRhdqXDKkIc40cbHEQUdQsozyV7uUE FhTTFDY4SV6CziAlzQgLgslQ9IfSo0aSCp9QJsuhj0Zcmn/VvMGyWxkkfwxNHhZzIN UMporgguShPQCkhbYarZJLXMJOsn8oWB2P2gnF5k= Date: Wed, 15 Sep 2021 18:02:49 +0200 From: Greg KH To: Thomas =?iso-8859-1?Q?Wei=DFschuh?= Cc: linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, Luis Chamberlain , Jessica Yu Subject: Re: [RFC] Expose request_module via syscall Message-ID: References: <705fde50-37a6-49ed-b9c2-c9107cd88189@t-8ch.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <705fde50-37a6-49ed-b9c2-c9107cd88189@t-8ch.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 15, 2021 at 05:49:34PM +0200, Thomas Wei?schuh wrote: > Hi, > > I would like to propose a new syscall that exposes the functionality of > request_module() to userspace. > > Propsed signature: request_module(char *module_name, char **args, int flags); > Where args and flags have to be NULL and 0 for the time being. > > Rationale: > > We are using nested, privileged containers which are loading kernel modules. > Currently we have to always pass around the contents of /lib/modules from the > root namespace which contains the modules. > (Also the containers need to have userspace components for moduleloading > installed) > > The syscall would remove the need for this bookkeeping work. So you want any container to have the ability to "bust through" the containers and load a module from the "root" of the system? That feels dangerous, why not just allow a mount of /lib/modules into the containers that you want to be able to load a module? Why are modules somehow "special" here, they are just a resource that has to be allowed (or not) to be accessed by a container like anything else on a filesystem. thanks, greg k-h