Re: [PATCH 05/21] bpf...d_path(): constify path argument

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

 



On Sat 06-09-25 10:11:21, Al Viro wrote:
> Signed-off-by: Al Viro <viro@xxxxxxxxxxxxxxxxxx>

Looks good. Feel free to add:

Reviewed-by: Jan Kara <jack@xxxxxxx>

								Honza

> ---
>  fs/bpf_fs_kfuncs.c                             | 2 +-
>  kernel/trace/bpf_trace.c                       | 2 +-
>  tools/testing/selftests/bpf/bpf_experimental.h | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/bpf_fs_kfuncs.c b/fs/bpf_fs_kfuncs.c
> index 1e36a12b88f7..5ace2511fec5 100644
> --- a/fs/bpf_fs_kfuncs.c
> +++ b/fs/bpf_fs_kfuncs.c
> @@ -79,7 +79,7 @@ __bpf_kfunc void bpf_put_file(struct file *file)
>   * pathname in *buf*, including the NUL termination character. On error, a
>   * negative integer is returned.
>   */
> -__bpf_kfunc int bpf_path_d_path(struct path *path, char *buf, size_t buf__sz)
> +__bpf_kfunc int bpf_path_d_path(const struct path *path, char *buf, size_t buf__sz)
>  {
>  	int len;
>  	char *ret;
> diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c
> index 3ae52978cae6..a8bd6a7351a3 100644
> --- a/kernel/trace/bpf_trace.c
> +++ b/kernel/trace/bpf_trace.c
> @@ -900,7 +900,7 @@ const struct bpf_func_proto bpf_send_signal_thread_proto = {
>  	.arg1_type	= ARG_ANYTHING,
>  };
>  
> -BPF_CALL_3(bpf_d_path, struct path *, path, char *, buf, u32, sz)
> +BPF_CALL_3(bpf_d_path, const struct path *, path, char *, buf, u32, sz)
>  {
>  	struct path copy;
>  	long len;
> diff --git a/tools/testing/selftests/bpf/bpf_experimental.h b/tools/testing/selftests/bpf/bpf_experimental.h
> index da7e230f2781..c15797660cdf 100644
> --- a/tools/testing/selftests/bpf/bpf_experimental.h
> +++ b/tools/testing/selftests/bpf/bpf_experimental.h
> @@ -219,7 +219,7 @@ extern void bpf_put_file(struct file *file) __ksym;
>   *	including the NULL termination character, stored in the supplied
>   *	buffer. On error, a negative integer is returned.
>   */
> -extern int bpf_path_d_path(struct path *path, char *buf, size_t buf__sz) __ksym;
> +extern int bpf_path_d_path(const struct path *path, char *buf, size_t buf__sz) __ksym;
>  
>  /* This macro must be used to mark the exception callback corresponding to the
>   * main program. For example:
> -- 
> 2.47.2
> 
-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR




[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