linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junxiao Bi <junxiao.bi@oracle.com>
To: linux-kernel@vger.kernel.org,
	linux-security-module@vger.kernel.org,
	linux-block@vger.kernel.org
Cc: paul@paul-moore.com, nathanl@linux.ibm.com, axboe@kernel.dk,
	jmorris@namei.org, serge@hallyn.com, konrad.wilk@oracle.com,
	joe.jin@oracle.com
Subject: Re: [PATCH V4 2/2] blktrace: allow access trace file in lockdown mode
Date: Tue, 25 Apr 2023 10:55:46 -0700	[thread overview]
Message-ID: <05b3eebd-7a3f-13d5-1fe9-8f4ab3080521@oracle.com> (raw)
In-Reply-To: <20230420215331.88326-2-junxiao.bi@oracle.com>

Any IO folks can help review this patch?

Paul needs a confirm from you that the information blktrace exporting to 
userspace through the relay files are safe, not leaking information that 
userspace shouldn't know in lockdown mode.

Thanks,

Junxiao.

On 4/20/23 2:53 PM, Junxiao Bi wrote:
> blktrace trace files are per-cpu relay files that are used by kernel to
> export IO metadata(IO events, type, target disk, offset and len etc.) to
> userspace, no data from IO itself will be exported. Bypass lockdown for
> these files will make blktrace work in lockdown mode.
>
> Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com>
> ---
>   kernel/trace/blktrace.c | 6 ++++++
>   1 file changed, 6 insertions(+)
>
> diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
> index d5d94510afd3..e1a9f8b7d710 100644
> --- a/kernel/trace/blktrace.c
> +++ b/kernel/trace/blktrace.c
> @@ -490,10 +490,16 @@ static struct dentry *blk_create_buf_file_callback(const char *filename,
>   					&relay_file_operations);
>   }
>   
> +static bool blk_bypass_lockdown(struct inode *inode)
> +{
> +	return true;
> +}
> +
>   static const struct rchan_callbacks blk_relay_callbacks = {
>   	.subbuf_start		= blk_subbuf_start_callback,
>   	.create_buf_file	= blk_create_buf_file_callback,
>   	.remove_buf_file	= blk_remove_buf_file_callback,
> +	.bypass_lockdown	= blk_bypass_lockdown,
>   };
>   
>   static void blk_trace_setup_lba(struct blk_trace *bt,

  reply	other threads:[~2023-04-25 18:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-20 21:53 [PATCH V4 1/2] debugfs: provide a way for relay user bypass lockdown Junxiao Bi
2023-04-20 21:53 ` [PATCH V4 2/2] blktrace: allow access trace file in lockdown mode Junxiao Bi
2023-04-25 17:55   ` Junxiao Bi [this message]
2023-04-25 19:12     ` Jens Axboe
2023-04-26 16:32       ` Junxiao Bi
2023-04-28 21:26         ` Paul Moore
2023-04-28 22:41           ` Junxiao Bi
2023-04-30 21:46             ` Paul Moore
2023-05-09 16:13               ` Junxiao Bi
2023-05-26 16:56                 ` Junxiao Bi
2023-05-26 21:37                   ` Paul Moore
2023-05-26 22:20                     ` Junxiao Bi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=05b3eebd-7a3f-13d5-1fe9-8f4ab3080521@oracle.com \
    --to=junxiao.bi@oracle.com \
    --cc=axboe@kernel.dk \
    --cc=jmorris@namei.org \
    --cc=joe.jin@oracle.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=nathanl@linux.ibm.com \
    --cc=paul@paul-moore.com \
    --cc=serge@hallyn.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).