Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp627742pxk; Thu, 17 Sep 2020 11:43:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxuGDIFHJPCnZyop9nIs3+g5GKCsO6v6V8Qkvz/K11oJDAHvF58bR9XbOQT7WCPQ9iAMahf X-Received: by 2002:a17:906:b097:: with SMTP id x23mr31070098ejy.21.1600368185211; Thu, 17 Sep 2020 11:43:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600368185; cv=none; d=google.com; s=arc-20160816; b=NSGQvVsQWeZLyCCU5WF4nfBsIH7ALPx1fEQAFxS68Ygm1awNXNog/8d0UegckTqUI1 Azb/X/f9CIsM9buHSwELYtFci5vRY3UXwsWk25/9XnM6333qVx38NA37D8uyXa7IV0z7 sNMJwjQtnKDVf5teev30Clw1VPmWlOtIb+Btu0FqrYL5flCyxH8QW4qVF9X99+8H7oK8 1BF4SxpjSSo2IauSGev38Pg1CHng+UREJ2uaKlmtqxNK+foovyjU0Op8FeNXAnaK28mZ QlkSNY8WkEdnHylkEqGtBGIb78Mo46WBvxEEbvSSoWhftxrs37EnThk6bE+XjPTWv6Vm f6Mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=BRdBi8tyWSSBlZlNElbNceqPAwHOKi8mD3NCQpuwrXk=; b=OWtPy95Z2t4Z8qPGOCv7zzhtuTf/T9veAlZ4nqRCHaACxzhDEtKFAZwWPorww/a00L vIr/sszuZGuI3vdFrK3tqUtOPtDqO9MVGy0TOsYBmuV7JNzYDW3bazb9NfaeixIV0BzZ XOmvgfW33Gmywk/mAV2lPnuffLg0L1zQIDsl463CAC+0ZOiitcZd81LpOO1+HV9EthUQ QE3ybKqd14xaD6v8lHlJtsJsgnBYmW7p4N5iDdwmfZ1sizqJt2zSN59aU5yTpCU6XHxD sTwiW0ycKenPTkN0rnvJcVqzL+jsXQfkPDJJIPH00ev1fRk/Qtpje54nOBxcpRlioLco N/Sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b="e9t1Z/p/"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l6si557940ejg.212.2020.09.17.11.42.40; Thu, 17 Sep 2020 11:43:05 -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=@gmx.net header.s=badeba3b8450 header.b="e9t1Z/p/"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726476AbgIQSlg (ORCPT + 99 others); Thu, 17 Sep 2020 14:41:36 -0400 Received: from mout.gmx.net ([212.227.17.22]:49501 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726379AbgIQSld (ORCPT ); Thu, 17 Sep 2020 14:41:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1600368012; bh=BJaSI38+zQjgcLqD+dMdPDjGZYHwT/xid39c3EhZ514=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:References:In-Reply-To; b=e9t1Z/p/aOHSebcLMutxKwgppPMe/c4ATNfVeaagoYuVRoFaa2lcxDVvXkzWR76hB YofRiSl0Oz66n/3Ox6RXXKJl0zCEVor4IEaBtxU8K7RZNYnhgrVIaB3LpC3/tCCxMV KpFqJTeep7knJ//m+d/o4g/0m+imNEeAr2az4VAk= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from ubuntu ([79.150.73.70]) by mail.gmx.com (mrgmx105 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MqJmF-1kmnc722Vv-00nPxK; Thu, 17 Sep 2020 20:40:12 +0200 Date: Thu, 17 Sep 2020 20:40:06 +0200 From: John Wood To: Kees Cook Cc: Jann Horn , kernel-hardening@lists.openwall.com, John Wood , Matthew Wilcox , Jonathan Corbet , Alexander Viro , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Luis Chamberlain , Iurii Zaikin , James Morris , "Serge E. Hallyn" , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-security-module@vger.kernel.org Subject: Re: [RFC PATCH 1/6] security/fbfam: Add a Kconfig to enable the fbfam feature Message-ID: <20200917175146.GB3637@ubuntu> References: <20200910202107.3799376-1-keescook@chromium.org> <20200910202107.3799376-2-keescook@chromium.org> <202009101615.8566BA3967@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202009101615.8566BA3967@keescook> X-Provags-ID: V03:K1:hfSrV/JuouzV96KqzDpTM0p1F5fgksRQkQ6glwDqKnplLy7aA51 LEXmlmjhZhsKwcw5j0kbmt75CSucf6iASudyPU5ybTSp6TwgdsHyhmEvzYWejOaYtXBaxA/ PnRKC9PzHtt0+UFq1WxYfr9s9ZeCojzAxzMMqSLlO3HjvJvoExAeNrCrqI6qFldyYkuwPt5 pa5DJIH2/13k0Vpfy5WPw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:F+CYmWgFS1M=:BsRffWDkQBmHd+tKnquYN/ 8GM8gVMJzJUHm1wLN6sXJNkaM1TtRt/1V5S2aDYLosqzA7/u+EEtothfBo8QFKI9FsOFNyOFy H4gOTJ0PF86fTmrXj6o7Tz1Z6U8o7uI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rwpMtvjpHh39fqQxvy1z7m85HSQrL5DuN01Fp0JhxQtXd/s24Dsq V81jzjHU6ZR+y6kUDixI7ItGZU/kNMJFd4Eerpw== Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Thu, Sep 10, 2020 at 04:18:08PM -0700, Kees Cook wrote: > On Thu, Sep 10, 2020 at 01:21:02PM -0700, Kees Cook wrote: > > From: John Wood > > > > Add a menu entry under "Security options" to enable the "Fork brute > > force attack mitigation" feature. > > > > Signed-off-by: John Wood > > --- > > security/Kconfig | 1 + > > security/fbfam/Kconfig | 10 ++++++++++ > > 2 files changed, 11 insertions(+) > > create mode 100644 security/fbfam/Kconfig > > > > diff --git a/security/Kconfig b/security/Kconfig > > index 7561f6f99f1d..00a90e25b8d5 100644 > > --- a/security/Kconfig > > +++ b/security/Kconfig > > @@ -290,6 +290,7 @@ config LSM > > If unsure, leave this as the default. > > > > source "security/Kconfig.hardening" > > +source "security/fbfam/Kconfig" > > Given the layout you've chosen and the interface you've got, I think > this should just be treated like a regular LSM. Yes, throughout the review it seems the most appropiate is treat this feature as a regular LSM. Thanks. > > > > endmenu > > > > diff --git a/security/fbfam/Kconfig b/security/fbfam/Kconfig > > new file mode 100644 > > index 000000000000..bbe7f6aad369 > > --- /dev/null > > +++ b/security/fbfam/Kconfig > > @@ -0,0 +1,10 @@ > > +# SPDX-License-Identifier: GPL-2.0 > > +config FBFAM > > To jump on the bikeshed: how about just calling this > FORK_BRUTE_FORCE_DETECTION or FORK_BRUTE, and the directory could be > "brute", etc. "fbfam" doesn't tell anyone anything. Understood. But how about use the fbfam abbreviation in the code? Like as function name prefix, struct name prefix, ... It would be better to use a more descriptive name in this scenario? It is not clear to me. > -- > Kees Cook Thanks, John Wood