Received: by 10.223.185.116 with SMTP id b49csp278212wrg; Thu, 8 Mar 2018 17:27:09 -0800 (PST) X-Google-Smtp-Source: AG47ELuQcFXSV7b63d97y2KioPXxmFv2cb1suGc66OP5KyIqmqIhqPeqN52L2N4mclpNXO8BGuom X-Received: by 2002:a17:902:52a6:: with SMTP id a35-v6mr20401315pli.179.1520558829468; Thu, 08 Mar 2018 17:27:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520558829; cv=none; d=google.com; s=arc-20160816; b=01SLAsPWPZxU/vivNGD+qbBMnIaF60GN80/dgRwWj2IIrGIcNRly502fKDPp41Jabk jwgZeOgMXgZXOQw+qLS675tAvMqhYOx/HpvW4Z4wwtkwcdgJ8G9NTfeBZVv7NtqV4my3 Bfgme5+qTGY7r3DfPy0higESvLO4aWa6ONK+7+ouPfbg/vAzXCYRA6oDdct7UZvGkk3g SBfFIGJSezvG+if7UEF/EpwsLcDoi5P1pdTZHBk94fXjdsNIHO/fWttvHAFxg7MuBF+h UQB50g16TqLwQ92SS3h7b4K4jFye6YiTX5ZW9W33ToJozsEzowJ038TFS8PfY4UmgiKv X2KQ== 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=AbET+hS+CdKr0i/cRLG9AJlB6FwkoKz43j8CKjatnT8=; b=nbH8n5fsprzOhiiD5v+GPXK2PkoZ58nXHXbcK+fk/va+yPfg/qezGyR58SS0W9bxHq 65CLDwVqG1j2vct0/OHzO4w6HGfZtQmaoR5czFqJSiXGUWUvYcPnTlSB7hNd5Z827Wld drxkc2FqR+vJVkhY3RWHYY2zwtc+3Zip6/3Y063zsVElqaRAr+RBKBEjxSq2H964kuKV ffTTLJqtmrcWAqfkbfDnoPj3tzmFJkaqUCYPA0qDkdnUgvcWfAy2+4gGyW2vbCjLrHWl h1b7iAdF8Vh7Qe1zEppS53JziU/eCzHeL21slgOIvfBOlfFHwlKnuKFqp/K2cGSoO0/1 glmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OU7yfsVR; 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 71-v6si15562788plc.713.2018.03.08.17.26.54; Thu, 08 Mar 2018 17:27:09 -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=OU7yfsVR; 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 S1751946AbeCIBZi (ORCPT + 99 others); Thu, 8 Mar 2018 20:25:38 -0500 Received: from mail-pl0-f67.google.com ([209.85.160.67]:36936 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751212AbeCIBZg (ORCPT ); Thu, 8 Mar 2018 20:25:36 -0500 Received: by mail-pl0-f67.google.com with SMTP id w12-v6so4376339plp.4; Thu, 08 Mar 2018 17:25:36 -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=AbET+hS+CdKr0i/cRLG9AJlB6FwkoKz43j8CKjatnT8=; b=OU7yfsVRrsqECeZ0IHjcGsxVI6Y7F/Ss4ppSIJIYvovhN5W6oLHHyY3ki0n/o2CNSV mRIld0OnU7yqJ8AxTuutbF77lRm1bRwoIatDkQg6c1hw2IZwXDn/htQoaniaIdKL+6VK lBoTm5Fq3S1aOcIjI0Vjez9uDIvjia4n8XnxS7VlJtDnBJ9cmXuBCG2NK3Mb/ZLWyF4q GpiaBEK89WwXoWklAbDCx2x7U69Vx9m6cjVTru+kVT0nTuxVVaMytZRBQEEiizZlWSX0 df5s6k9L/BFYkzVESfwwWTDj5K71Xpk2WNZIIzkUXEs2wmSnJCsRUVG3rMTJTN2LQLO0 AFkA== 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=AbET+hS+CdKr0i/cRLG9AJlB6FwkoKz43j8CKjatnT8=; b=SPYmfxfMnMIdI+x2MpcFyL1DUWP9GGBklWbR3PADNIAP8VYi1G0xq/jn8F7Sast2b/ sIxqc5s8cj4HzCYy+c8tKa83+BQcrllDJ+WnxYG81+PNG6whgpxjpAllQRwyvSsvOutP DbrAAocX/wEluk1VORA+FfNPGHvtHjAuNHPBQSE8KUgH8MaiBvdKrqDYHCm789z5mPBd n/wNa1lpDbSdvt77NzeAnaJVZbcCWgshulansUWz8ic+zt/sANihvtpSTRnK0WEBk7w3 uWw1TEriSlJNs8L5IQG5lo+hRZql4YtEGSvjMfLCIVp2wmpLJNslXV15KK2GIkpS0BrI pP1Q== X-Gm-Message-State: AElRT7Hk14xB47IcLOm4Zw4NlyAkYp1vAeHgqdIv1qVEMzxqcewX/tMG 0eWNTLqIjioncmyDr7G7thk= X-Received: by 2002:a17:902:8d8b:: with SMTP id v11-v6mr21360930plo.33.1520558735659; Thu, 08 Mar 2018 17:25:35 -0800 (PST) Received: from ast-mbp ([2620:10d:c090:180::1:6b21]) by smtp.gmail.com with ESMTPSA id c67sm46086176pfl.106.2018.03.08.17.25.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Mar 2018 17:25:34 -0800 (PST) Date: Thu, 8 Mar 2018 17:25:32 -0800 From: Alexei Starovoitov To: Andy Lutomirski Cc: Alexei Starovoitov , 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: <20180309012530.rk2m5kmpab7eb5fe@ast-mbp> References: <20180306013457.1955486-1-ast@kernel.org> <357c330f-0165-b7a4-7ecc-4cd797e61e15@fb.com> 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 01:04:39AM +0000, Andy Lutomirski wrote: > On Fri, Mar 9, 2018 at 12:57 AM, Alexei Starovoitov wrote: > > On 3/8/18 4:24 PM, Kees Cook wrote: > >> > >> As Andy asked earlier, why not DYN too to catch PIE executables? Seems > >> like forcing the userspace helper to be non-PIE would defeat some of > >> the userspace defenses in use in most distros. > > > > > > because we don't add features without concrete users. > > I disagree here. If you're going to add a magic trick that triggers > an execve(), then I think you should either support *both* standard, > widely-used types of ELF programs or you should give a compelling use > case that works for ET_EXEC but not for ET_DYN. Keep in mind that > many distros have a very strong preference for ET_DYN. misunderstanding here is that this bpfiler.ko is part of _kernel build_. Kernel decides how it's build. Nothing to do with distros. Current Makefile is very dumb and it's built with HOSTCC: https://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf.git/tree/net/bpfilter/Makefile?h=ipt_bpf but it will be standalone with CC before final to make sure crosscompiling works.