Received: by 10.223.185.116 with SMTP id b49csp274847wrg; Thu, 8 Mar 2018 17:22:10 -0800 (PST) X-Google-Smtp-Source: AG47ELskElw203L0Fb2arSjE2a24YOX1S+R7zHOh9lksFtzdhDvM9UYtTBlBv1icWKS7vKKNoAG/ X-Received: by 10.98.232.6 with SMTP id c6mr27969846pfi.242.1520558530019; Thu, 08 Mar 2018 17:22:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520558530; cv=none; d=google.com; s=arc-20160816; b=OPvycE+d44U3biYPkJaRLo3+Rhaya0FmYElbsSLU//vVtoSOnl/qtSfl6oANGRJPli lop2px4CfPNsuNbRhlvSSc5JUj/G/ScEZKLoSjSlO7AhmlOLj21nvJSGXAc6B2FeizDt 5jzjqT2rChD9ra94F0EUj4baxF2Ki5KEhiYGz5ounu7lBIx1LhqDOmG84sF8Zna1XVm2 iTknnKG0iZ0IkDa+xXXgpS1+jmDjmPDATH8x5myakM289hdAXlQFGkrISv67chJUA1+O RfAVxW6cXxXybY5v4eDDhQuL46Vsgx2dgwF5glQmzdNgK8WHai7WJrxt/n8eiBP7ahyq O3GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=L6bWXiye/2SCVaD2CRyhUCZVlbliXYTS69mfUe/eWh4=; b=CpqXEybg1i8wRfUdOmOR4c2zvoGglD0UkvhcCunsmfQtt7j+DIvAh0h8ofjw7ikhff Y/6znbpIGhJ6jpD5NCNyDHzdJPkU0xomrdWpTZqPR2xVXROj5f3/MT5qkVVstRd/McUk LFdbsF8EomMvWKE1Rj+dn2VlRcM1oKoOrCjY14F1b1DrVNTWGbNkVxDnJSw6n0hOrnNN wkTeAy3vTVlL9LNcV81SCrzckhO9ub5Wneue3C13O/95BwtkV+0q3WtDJcEmsz8qxJj5 cv2nd8oFVlbDk7N1uLw5wAz75108iw8Bjqe4pCUVWfEMYXGogYp/wN4VHzPNanrPPGpe IMIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=b6vgS/f6; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ba11-v6si12495419plb.167.2018.03.08.17.21.53; Thu, 08 Mar 2018 17:22:10 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=b6vgS/f6; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751588AbeCIBUy (ORCPT + 99 others); Thu, 8 Mar 2018 20:20:54 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:41644 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751173AbeCIBUw (ORCPT ); Thu, 8 Mar 2018 20:20:52 -0500 Received: by mail-pg0-f65.google.com with SMTP id s15so323237pgv.8; Thu, 08 Mar 2018 17:20:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=L6bWXiye/2SCVaD2CRyhUCZVlbliXYTS69mfUe/eWh4=; b=b6vgS/f6V8hBeYKbWGhQ9YtZ+Li2flQg4FfieYPp3DYLoG2BqjbA181zV0a/v/nRST LmsXdMya5w7ycZXrddsDoY6mjG+8DAXKCHtdblMT4BUrEV8zSnBZVvlZzNNg/iLUxLXx iyJWWKQ7iaSAiuSABGepoa/JOAQqLkFUNs1OdJ39OrKw3aMLItdmPES+unXj+cvFoLqr BuIlf9eHb7f/s22S+dkf5ejMHBliIT3jox+6qU/bU9+NgYvAOizfWYGWqiT9VeaXUH8u pvWUzub9usAGMhdEuaOKgtRr3TeiCs2og9MESjQdqLEZnrVXUwLiJdRKURj5mqAVwuj6 c1IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=L6bWXiye/2SCVaD2CRyhUCZVlbliXYTS69mfUe/eWh4=; b=AsBqzxEFJmY2Uxud4hNwJGB90ieSqg2l+1BLS7V4Ts6ixHur4S2eKsWIxaE1iOpBGR 4Wv4oLogd6+yKBYaWgTbI2SJZ18T8x9xC9TS1+oiHpV5qSxIpJmoUroaET7FrXzKwtYz yarYKwGBsmTsil21wlaY2Q9ZVNbqW+rO2JS8iZ9+onJXoRCRYpY/UrWe/YI/M6CaQCkR 2qQPzTxOT4iXF/nFF70JsuK+Ogp0PUT7vfB+KYlf+YlAi8ucAoTPXXWx+OhGD29q9bW0 /anBkUk9lU0h6eyk5VWVT06+XY08r5tDs2h9UCCfq+zc/1j0B2guvNkCkDCZenknWg90 fg2A== X-Gm-Message-State: APf1xPDNoWDVq6rPTb7xjkBvPkMeg8x8+HjG4jwonyuW14p8t9b7oP9V QBNi72pvDWgtfh+Xn2VvL6E= X-Received: by 10.98.245.18 with SMTP id n18mr27690337pfh.25.1520558451901; Thu, 08 Mar 2018 17:20:51 -0800 (PST) Received: from ast-mbp ([2620:10d:c090:180::1:6b21]) by smtp.gmail.com with ESMTPSA id s9sm38545112pfm.39.2018.03.08.17.20.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Mar 2018 17:20:50 -0800 (PST) Date: Thu, 8 Mar 2018 17:20:48 -0800 From: Alexei Starovoitov To: Andy Lutomirski Cc: Kees Cook , Alexei Starovoitov , Djalal Harouni , Al Viro , "David S. Miller" , Daniel Borkmann , Linus Torvalds , Greg KH , "Luis R. Rodriguez" , Network Development , LKML , kernel-team@fb.com, Linux API Subject: Re: [PATCH net-next] modules: allow modprobe load regular elf binaries Message-ID: <20180309012046.6kcivmzzkap3a4xc@ast-mbp> References: <20180306013457.1955486-1-ast@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 09, 2018 at 12:59:36AM +0000, Andy Lutomirski wrote: > > Alexei, can you give an example use case? I'm sure it's upthread > somewhere, but I'm having trouble finding it. at the time of iptable's setsockopt() the kernel will do err = request_module("bpfilter"); once. The rough POC code: https://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf.git/tree/net/ipv4/bpfilter/sockopt.c?h=ipt_bpf#n25 > Also, I just tested this concept a bit. Depmod invoked explicitly on > an ET_EXEC with a.ko extension gets mad, but depmod -a on a kernel > that has a "module" like that seems to work fine. Go figure. right. that's with the current patch. In v2 I require .modinfo section to make sure license is specified, but depmod still not very happy: $ depmod /lib/modules/`uname -r`/kernel/net/bpfilter/bpfilter.ko depmod: ERROR: Bad version passed /lib/modules/4.16.0-rc4-00799-g1716f0aa3039-dirty/kernel/net/bpfilter/bpfilter.ko I'm not sure it's worth to silence it, since as you noticed 'depmod -a' works.