Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp520641pxx; Wed, 28 Oct 2020 10:11:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxzWiITL1YeLkX61ev+0s20qhmtb8p4S27EI2UwOAPKWhTG9XNvkgcyUBcbdgbMf3oRrnyR X-Received: by 2002:a7b:c8d4:: with SMTP id f20mr472500wml.36.1603905100662; Wed, 28 Oct 2020 10:11:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603905100; cv=none; d=google.com; s=arc-20160816; b=PmaM451oxcc1eYoKzN4B8stWSZZJj5DP09BpYGBJguyb2zQZGgfi6GUwMK3Al8qwyx Za2fwCezOj/jxXSzSg0bwwnyk5JJYENyX421+qiPxA3R/5A6buSUTDgRXCwnBYZ08ghV iVwsHOMLXE6Yb8Sxyq7IhntQNI8fErVxIWAq0t9qabeRjqF2w5gbcjr3tMsciyANjmtM Sa4pbJfFghThx1FCWjaSNM3rGdsUBaIjNcgogfztSOGiGke0uBpI7njdN2KRQKnEIR1F 5s0COEG9YzEPvOtsacTNigxkogue2qOGzSDv25yK0QQgGCJ07RLcmK4n71WObA64IKUq GyzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=SaQbFGzEXNDGk1pZ4O1HsiR48TwG2ZRAen3YJtUpq54=; b=c+034gtX5GKJBpUg3AVPrTJ8LYuL1UP4Gny9WQjd+2HrpdnvveDxGeQj1AKwdkkp5K bt6y5hyGzQku/ZFd+GKckT67sexq1WYijERKX0axmjx0K56b9qYRsL8Ap/35NoJf7Yv5 3gUoJDGZRCnEMRdZNYPL1MScs/Br5DoTn2I3VGxdQWhciTGL3Hf7MjjNOQ+GuG1sycsC rxYDRyStxiHMoYyA6srX2YOSnCiiBV6ZZwZ3t2xPS9rumJk2pH37DhzZ5g2EX8eKYzrG 3ljzXyOGyNNCi3LsWDZO8VxfyUUWpZHBnthiLapd7Vkm6nlkghOJaHkVZPH/GFCWPuUp ofsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="A/3G8fUm"; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w11si3696538ejq.533.2020.10.28.10.11.11; Wed, 28 Oct 2020 10:11:40 -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=@google.com header.s=20161025 header.b="A/3G8fUm"; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1820248AbgJ0ReG (ORCPT + 99 others); Tue, 27 Oct 2020 13:34:06 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:35776 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1814638AbgJ0ReA (ORCPT ); Tue, 27 Oct 2020 13:34:00 -0400 Received: by mail-io1-f68.google.com with SMTP id k6so2435967ior.2 for ; Tue, 27 Oct 2020 10:34:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SaQbFGzEXNDGk1pZ4O1HsiR48TwG2ZRAen3YJtUpq54=; b=A/3G8fUm4hjh/JNx8o769i7ImwXATsmSdZoFysVH+hTEn09YeG1uyFFpeCn9l4Y3QZ E9FwO0tv0Hn7ECi9YFN/WkZ6wkFSzJUpllCTq9RKuTOpdWQkLbj70z4FBUO6sP2boo7r 8IN1fqW0KUXvWFCgKYXBfEJtgkn9dQxx5+xj8ji/algFHoUPZPEdrmi1EXpVhnXDt/x0 i95X0GuNUTNdXr98dPdGgoC48aS5kZLi7Ayuh25mscPYdb4TlVHHxrCwA0pTWDyJkCgD Bmw1oWaq/eCJ111W8bYH78WPCqpwh6KjxtDfb3AzhPmx07qkK69vRuvWpq/Xvbi+wTwX JrCg== 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; bh=SaQbFGzEXNDGk1pZ4O1HsiR48TwG2ZRAen3YJtUpq54=; b=T6sHM7ZO4YOFPxBGwJe9yQSTY9yyb0IKDk40KD7UYU5skYwNS9ajdc9ru7MGtF+LsT sy1Oww9iW5cu+WwDr/ZKC/cAkJ/vwI7SSpg2U44hgafDORfjiMoHSEdZVNJtrtQvYiFX f1bF43HBPIQAWwoErIEL3RaRWTmWpduVr3hJxSrUHBs5m+T2WHBE4POFMPWFx/oK2GNE EV9jbixuaUWu87OhUWJ+MWeBys3+Wl+TuOpYuKZsO2jxlgTjTjk/chmC3cRpQ7AJZ/Nd uPI5I8+NNOxYS8AS+vKc/uYD+Yu7cHAM9rqQZzC8yOGB2cM5RMwhv5XUvo12wNaZCbq2 pi6A== X-Gm-Message-State: AOAM533JIS2rY4B+aMnlBzjT7vAwEhOxmkfRmRgEun9ulQdNPAo9V3CY sgVnGio2zaCCjczHaw8iGeXwEupPLcG7jux2Ki1VqA== X-Received: by 2002:a05:6602:2181:: with SMTP id b1mr3170150iob.172.1603820039871; Tue, 27 Oct 2020 10:33:59 -0700 (PDT) MIME-Version: 1.0 References: <20201026125227.54520-1-a.nogikh@gmail.com> <20201026125227.54520-3-a.nogikh@gmail.com> In-Reply-To: From: Aleksandr Nogikh Date: Tue, 27 Oct 2020 20:33:48 +0300 Message-ID: Subject: Re: [RFC PATCH v2 2/2] docs: add fail_lsm_hooks info to fault-injection.rst To: Akinobu Mita Cc: Aleksandr Nogikh , jmorris@namei.org, serge@hallyn.com, Andrey Konovalov , Dmitry Vyukov , Marco Elver , Alexander Potapenko , keescook@google.com, LKML , linux-security-module@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 27, 2020 at 6:31 PM Akinobu Mita wrote: > [...] > In addition to this global one, what do you think about per-hook fault > injection, > i.e. /sys/kernel/debug/fail_lsm_hooks//retval ? I was thinking about this, but decided to begin with a simple version that could definitely be useful in practice (for syzbot/syzkaller it is just necessary to have a fault injection capability that will be triggered via fail-nth). If per-hook fault injection can also be useful to someone, I can try to add it as well. > In this case, we need a fault_attr for each hook. (Maybe, we can use the same > technique that is used to define security_hook_heads). Yes, that technique should help to implement the feature in a very concise way. Thanks for the suggestion.