Re: [PATCH v2 1/2] libfs: Introduce tokenize_user_input()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2022-08-30 8:33 PM, Matthew Wilcox wrote:
On Thu, Aug 25, 2022 at 06:48:32PM +0200, Cezary Rojewski wrote:
Add new helper function to allow for splitting specified user string
into a sequence of integers. Internally it makes use of get_options() so
the returned sequence contains the integers extracted plus an additional
element that begins the sequence and specifies the integers count.

Suggested-by: Andy Shevchenko <andy.shevchenko@xxxxxxxxx>
Signed-off-by: Cezary Rojewski <cezary.rojewski@xxxxxxxxx>
---
  fs/libfs.c         | 45 +++++++++++++++++++++++++++++++++++++++++++++
  include/linux/fs.h |  1 +

This really has nothing to do with filesystems.  Surely
string_helpers.[ch] is the appropriate place for this code?
Also get_options() should probably move its prototype from kernel.h to
string_helpers.h.


Hello Matthew,

Thanks for your input. The initial version of the change was located in the string_helpers.[ch] just like you propose and I have no problem moving it back again. string_helpers are devoid of __user content though and that's why in v2 it's part of libfs instead.

I'll give a day or two to see if there are other suggestions and then send v3 relocating the implementation.


Regards,
Czarek



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux