Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp739165pxk; Thu, 17 Sep 2020 15:07:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0M2lYpOu5xZNpIFw+Mvkw27c18odoBlEmuq8Yvq1AC1BZD0ICSNMiXhvSPdgumLuaDGA9 X-Received: by 2002:a17:906:2552:: with SMTP id j18mr32249866ejb.476.1600380433019; Thu, 17 Sep 2020 15:07:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600380433; cv=none; d=google.com; s=arc-20160816; b=TBJj1DeLquRT6Zq6VL1eORvYA6hR2/6AXq2ZokwVkXPL7f7VMAMPdzwNETkEHfjiU7 jJJnv2ataZw3Y5S5JNjbNMDCZa1BrEPCqXwIrhsixW+GUS7ob6IDz1F4Jm/aLZ7PeHDz nx2AmOOrIbzCWR2YD3Toy8w7/ywZN5btQEBJ0vs/MSdgU6nV4obosTcx58h/sGrHN8Jt O4KG6TD5amgZvEu74tShIq5HaH37uhSrSN/RhQKDOHHK44x3DzbefoTIWi5nliFeKHPH 64/X5P850/iSVyGrhAUK2GBUP052v7vI0JKpJHi6DaThpRQZoinePY4Qpre+zcwW1tr6 bANw== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=RVejrFx8lqGVUKgRhIUmNAugSkLKO3AWaoC/1SxxcL0=; b=MH6XuqrPfzCsJnaoMYPv4V38DCEe1T6vg4QNyh6jZpKoVniRWcu1n+XaunykDooyMt BCjAmBwL02rGCK0aXIC14tVB8nkvamJnbUwwBfa8eIwI47VcCkTZxt69L9xvx9/gC0Kq e7+4wF53jP+t8Qs4kIgxx+/Tj4PTdl1TLAp51XlFsPES2GrqIjp4ovEyaUApfLpDEske HsfillqxMoTtKF0h1r1DNnlSWNIDbcUPEMI9+NpctVsLrXnfOT1FWeqhbKM6u8CR9NhF ctlU7lMnQaiu0g7CSDZgt8T3a3dmnLr6yTR89kojcEHWLJc4757pK/suxkT5BkAUkWYp 4VEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=gZfnTVPq; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ox9si878158ejb.97.2020.09.17.15.06.48; Thu, 17 Sep 2020 15:07:13 -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=@chromium.org header.s=google header.b=gZfnTVPq; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726037AbgIQWFZ (ORCPT + 99 others); Thu, 17 Sep 2020 18:05:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725886AbgIQWFX (ORCPT ); Thu, 17 Sep 2020 18:05:23 -0400 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F499C06174A for ; Thu, 17 Sep 2020 15:05:21 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id x123so2094979pfc.7 for ; Thu, 17 Sep 2020 15:05:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=RVejrFx8lqGVUKgRhIUmNAugSkLKO3AWaoC/1SxxcL0=; b=gZfnTVPqJkwyJQbCSxJtksOl0Wp3oPCryqhhzYqmD6nXS59iDI+KLW4Fe8f0f8zL3n /elUdPuoSqhgtEl2zfjQjTb/kbloI1vZr9vae5Jthw3imZMzfP9Eia8WaXmx3/Q3AM39 b9Swp7NuoP77Vi0xXufmukO6fA00nsfebrOJI= 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; bh=RVejrFx8lqGVUKgRhIUmNAugSkLKO3AWaoC/1SxxcL0=; b=mbdTzxz6w/X15Z3JIF51elo5fAXS5hZGVwq4hyPUDSWuNYBlPZBc8jhvfuJQ+3mS+T aQCNklWgdhym0ZosSYIxQpYU3MykvXWWz5TsfXDmUogVXkpPMXJ9bOICfCV9fU7xWXVb 0XSZqCv3/5STkDCXhqw5IUV4ACgAfUX3rgMPrTNVwqECZ9F+2vMh8/6kPT+DJWKXKROj d5EopHgX7dmO9kJbyjKs6x6AFHc7/5STHfMCZclEfXjRtfIPjhOuGCX3cOVjtn2cfqYP x38qKvx2sl795allgSHlCf/fqGJ23/mj7q99I2j1/J3tZOaYzeyYWZDuzZi3cnd60CQ0 4QKw== X-Gm-Message-State: AOAM5326MgHsTvK+4DH7wTYLZfzeMbW5BrXCyCgopa0+Ud55hhpYUw85 ciPpyRalDmJ+Si0PGcwVM0+IPkbAi5loZj+m X-Received: by 2002:a63:1e0c:: with SMTP id e12mr6153286pge.346.1600380320847; Thu, 17 Sep 2020 15:05:20 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id i9sm611190pfq.53.2020.09.17.15.05.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Sep 2020 15:05:19 -0700 (PDT) Date: Thu, 17 Sep 2020 15:05:18 -0700 From: Kees Cook To: John Wood Cc: Jann Horn , kernel-hardening@lists.openwall.com, 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: <202009171504.841FA53@keescook> References: <20200910202107.3799376-1-keescook@chromium.org> <20200910202107.3799376-2-keescook@chromium.org> <202009101615.8566BA3967@keescook> <20200917175146.GB3637@ubuntu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200917175146.GB3637@ubuntu> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 17, 2020 at 08:40:06PM +0200, John Wood wrote: > 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. I don't feel too strongly, but I think having the CONFIG roughly match the directory name, roughly match the function prefixes should be best. Maybe call the directory and function prefix "brute"? -- Kees Cook