From: Christoph Hellwig <hch@infradead.org>
To: Sergei Shtepa <sergei.shtepa@linux.dev>
Cc: axboe@kernel.dk, hch@infradead.org, corbet@lwn.net,
snitzer@kernel.org, mingo@redhat.com, peterz@infradead.org,
juri.lelli@redhat.com, viro@zeniv.linux.org.uk,
brauner@kernel.org, linux-block@vger.kernel.org,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org,
Sergei Shtepa <sergei.shtepa@veeam.com>
Subject: Re: [PATCH v6 06/11] blksnap: handling and tracking I/O units
Date: Thu, 7 Dec 2023 00:23:01 -0800 [thread overview]
Message-ID: <ZXGA5f0/UqC/OHu6@infradead.org> (raw)
In-Reply-To: <20231124165933.27580-7-sergei.shtepa@linux.dev>
> +
> +static int (*const ctl_table[])(struct tracker *tracker,
> + __u8 __user *buf, __u32 *plen) = {
> + ctl_cbtinfo,
> + ctl_cbtmap,
> + ctl_cbtdirty,
> + ctl_snapshotadd,
> + ctl_snapshotinfo,
> +};
Please use a switch statement like the rest of the kernel. Besides
being simple to follow it also avoid having a speculation gadget
on user controlled input.
next prev parent reply other threads:[~2023-12-07 8:23 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-24 16:59 [PATCH v6 00/11] blksnap - block devices snapshots module Sergei Shtepa
2023-11-24 16:59 ` [PATCH v6 01/11] documentation: Block Device Filtering Mechanism Sergei Shtepa
2023-11-24 16:59 ` [PATCH v6 02/11] block: " Sergei Shtepa
2023-12-07 7:44 ` Christoph Hellwig
2023-12-07 11:22 ` Sergei Shtepa
2023-11-24 16:59 ` [PATCH v6 03/11] documentation: Block Devices Snapshots Module Sergei Shtepa
2023-11-24 16:59 ` [PATCH v6 04/11] blksnap: header file of the module interface Sergei Shtepa
2023-11-24 16:59 ` [PATCH v6 05/11] blksnap: module management interface functions Sergei Shtepa
2023-11-24 16:59 ` [PATCH v6 06/11] blksnap: handling and tracking I/O units Sergei Shtepa
2023-12-07 8:23 ` Christoph Hellwig [this message]
2023-11-24 16:59 ` [PATCH v6 07/11] blksnap: difference storage and chunk Sergei Shtepa
2023-12-07 8:36 ` Christoph Hellwig
2023-11-24 16:59 ` [PATCH v6 08/11] blksnap: event queue from the difference storage Sergei Shtepa
2023-11-24 16:59 ` [PATCH v6 09/11] blksnap: snapshot and snapshot image block device Sergei Shtepa
2023-11-24 16:59 ` [PATCH v6 10/11] blksnap: Kconfig and Makefile Sergei Shtepa
2023-12-07 7:47 ` Christoph Hellwig
2023-11-24 16:59 ` [PATCH v6 11/11] blksnap: prevents using devices with data integrity or inline encryption Sergei Shtepa
2023-11-27 22:47 ` Eric Biggers
2023-11-28 11:00 ` Sergei Shtepa
2023-11-28 17:18 ` Eric Biggers
2023-11-29 15:15 ` Sergei Shtepa
2023-11-24 17:03 ` [PATCH v6 00/11] blksnap - block devices snapshots module Jens Axboe
2023-11-24 17:12 ` Sergei Shtepa
-- strict thread matches above, loose matches on Subject: below --
2023-11-24 16:38 Sergei Shtepa
2023-11-24 16:38 ` [PATCH v6 06/11] blksnap: handling and tracking I/O units Sergei Shtepa
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=ZXGA5f0/UqC/OHu6@infradead.org \
--to=hch@infradead.org \
--cc=axboe@kernel.dk \
--cc=brauner@kernel.org \
--cc=corbet@lwn.net \
--cc=juri.lelli@redhat.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=sergei.shtepa@linux.dev \
--cc=sergei.shtepa@veeam.com \
--cc=snitzer@kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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).