From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.5 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F10CC433E2 for ; Thu, 17 Sep 2020 18:41:17 +0000 (UTC) Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.kernel.org (Postfix) with SMTP id 5B6DC21D7B for ; Thu, 17 Sep 2020 18:41:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="e9t1Z/p/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5B6DC21D7B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gmx.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernel-hardening-return-19912-kernel-hardening=archiver.kernel.org@lists.openwall.com Received: (qmail 1134 invoked by uid 550); 17 Sep 2020 18:41:08 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Received: (qmail 1111 invoked from network); 17 Sep 2020 18:41:07 -0000 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 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-UI-Out-Filterresults: notjunk:1;V03:K0:F+CYmWgFS1M=:BsRffWDkQBmHd+tKnquYN/ 8GM8gVMJzJUHm1wLN6sXJNkaM1TtRt/1V5S2aDYLosqzA7/u+EEtothfBo8QFKI9FsOFNy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pU/1t1rzPsPSwXc5d jQWlqvI38Yv94/imXFKlXrwpMtvjpHh39fqQxvy1z7m85HSQrL5DuN01Fp0JhxQtXd/s24Dsq V81jzjHU6ZR+y6kUDixI7ItGZU/kNMJFd4Eerpw== Content-Transfer-Encoding: quoted-printable 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