Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp363934pxx; Wed, 28 Oct 2020 06:46:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVHfv/jawR3//xjR6DRuvK/Oeds3hbrov9wZtub6nw5ICI0aLT2yLH7E1vsIg4yX4HfSjZ X-Received: by 2002:a50:8a02:: with SMTP id i2mr8106121edi.40.1603892817366; Wed, 28 Oct 2020 06:46:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603892817; cv=none; d=google.com; s=arc-20160816; b=b/Ohyp09SpLe2BJs+4juPIB8D8oogNZ0Rl+v/flw/ZgtrAunZ9qAQFOAIwtjg/db8i WrYPyD2+cYuRTwnaTPNcvuYlJSWl+VGz/S0So0tZjOWrQg3lGse1SDh0XbA/tmWyspqT gtMYOZLFx5JDj9fHfCS2W+bdEsyznnJG/JMmdYSYX9YHJNLei0lcQO2FAVf3ScwDgwbl hKqbOUm9xLpIkHYu4ynfHAIdIyNDc8EMWUcNEe4WIv6gqwKuYHnMykujW0a3jwBkONkH 4+nQjQYT41AsLh+5oTIFu+zElZdLIqMlnYs6jtDd1LqFBgtY+8gnY5AfM7vFu1Hy/evU lCTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=fHBOxQ4ds2L5zAe+IuVRpnyZ/0NNh1Z4K/iPh0DplL0=; b=APAS/epBJzruV3+cs9Bc0OnbEXlSaTnkS9iPok5AKhJHxuAiWfhheKsdLIhjwxDiRf kVXyLGYgiqAMGJJ9g3ZBuUW4GrzZb3S07pNYHaffgc64NLRZ3xGmEQB5qYowYyPkC3/I 0hW6etRJTxQKBbwVFgJ1RH2NpSldoByFzzwzZL1rYm1HuOCRdZGqDd9DeiixjlPhxMEP IyQxOPQ9dWGaRMSzlzRqS3BqmHcuighy3Qam5hvPlw3ZNKmbeZPXwvgUnG0RlgoRPjcP cvIyXjDNdNJ0OuweVqh8MvXUNHAh8y2B9tOshGq6wyy7S3bHcBnuTafileRng/NAO698 78Sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FrFeVRKY; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p90si2749641edd.284.2020.10.28.06.46.35; Wed, 28 Oct 2020 06:46:57 -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=@gmail.com header.s=20161025 header.b=FrFeVRKY; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1803118AbgJ0PwP (ORCPT + 99 others); Tue, 27 Oct 2020 11:52:15 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:43618 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1799418AbgJ0PbZ (ORCPT ); Tue, 27 Oct 2020 11:31:25 -0400 Received: by mail-lf1-f66.google.com with SMTP id l28so2838520lfp.10; Tue, 27 Oct 2020 08:31:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=fHBOxQ4ds2L5zAe+IuVRpnyZ/0NNh1Z4K/iPh0DplL0=; b=FrFeVRKYfjR60SUSEWYarWyVfbowL0Ud1Eji9GIT0h5PaTT8VDCPnslo8AaFuNtyTd jWYa1PiIUnDfYqal6c8SXQEGtn35Dx21FF1vpSXT/Btm2N9+/PYsVDp7eH9bU0f59QPY HXARwhnWZ8mHG6Me8oDKdLMsoWrWhpCPn802tusd2n260z0+Ji2TSVsZbPB3dojZQcre FMzxlua8ApZGgx/pHHhBci76Np9dDQWX7/3v8iziLolh76ZICVvcLICkNuqidccCVUJ8 kIBYt1gFcoDUs80eLG3Kpj0NEfPuZB7bqQtufpYzTE2XOQepKo+kxYGjR6bCRzFbtDm/ Lx4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=fHBOxQ4ds2L5zAe+IuVRpnyZ/0NNh1Z4K/iPh0DplL0=; b=dYOmeYo2MQqLAiD6bHUSem9hN3ZDOnXnGdPHkL167i9owALV3wqjWBIxzGikS9Idon Co1exfnMC15jTnokCHej5ZYVlyZM4jXz/r1Boj/ckaK0zRjxyXBcZaM6GFgzC4S48UB6 CKv0WBYwEbPfetAOK86lj6ekd0nnnjfl+0qRhe0zZVq9OttPiSzvg4jzdTqZlf+SgXep ABmdOxSOjxUTWMOglM5Uf80hPlTNILLxbS7e4a3kg4/tDLfS5pt0Vi23HY8Zx03nJoj+ 6zNE5XCbG42bciGKcK8QZxCDy0baSd2hexddyxS9OcS1tfkOAw3oQh5Fcicc9ObB/5Si /jxg== X-Gm-Message-State: AOAM531E0I6e0oqsSkiOXCwRNhgIZS9a9mO6wA52wbWrFn0lsbIAa33k yVBA8S6bVGED0Xjr7Db/6acFCFiuXkEZPIzzx1lOZnKMrDY= X-Received: by 2002:a19:7fc2:: with SMTP id a185mr970412lfd.84.1603812683068; Tue, 27 Oct 2020 08:31:23 -0700 (PDT) MIME-Version: 1.0 References: <20201026125227.54520-1-a.nogikh@gmail.com> <20201026125227.54520-3-a.nogikh@gmail.com> In-Reply-To: <20201026125227.54520-3-a.nogikh@gmail.com> From: Akinobu Mita Date: Wed, 28 Oct 2020 00:31:11 +0900 Message-ID: Subject: Re: [RFC PATCH v2 2/2] docs: add fail_lsm_hooks info to fault-injection.rst To: Aleksandr Nogikh Cc: jmorris@namei.org, serge@hallyn.com, Andrey Konovalov , Dmitry Vyukov , Marco Elver , Alexander Potapenko , keescook@google.com, LKML , linux-security-module@vger.kernel.org, Aleksandr Nogikh Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2020=E5=B9=B410=E6=9C=8826=E6=97=A5(=E6=9C=88) 21:52 Aleksandr Nogikh : > > From: Aleksandr Nogikh > > Describe fail_lsm_hooks fault injection capability. > > Signed-off-by: Aleksandr Nogikh > --- > v2: > - Added this commit. > --- > Documentation/fault-injection/fault-injection.rst | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/Documentation/fault-injection/fault-injection.rst b/Document= ation/fault-injection/fault-injection.rst > index 31ecfe44e5b4..48705adfbc18 100644 > --- a/Documentation/fault-injection/fault-injection.rst > +++ b/Documentation/fault-injection/fault-injection.rst > @@ -48,6 +48,12 @@ Available fault injection capabilities > status code is NVME_SC_INVALID_OPCODE with no retry. The status code a= nd > retry flag can be set via the debugfs. > > +- fail_lsm_hooks > + > + injects failures into LSM hooks. When a fault is injected, actual hook= s > + are not executed and a code from /sys/kernel/debug/fail_lsm_hooks/retv= al > + is returned (the default value is -EACCES). In addition to this global one, what do you think about per-hook fault injection, i.e. /sys/kernel/debug/fail_lsm_hooks//retval ? In this case, we need a fault_attr for each hook. (Maybe, we can use the sa= me technique that is used to define security_hook_heads).