lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEf4BzZKYTnj-=PBSQ_74-o4rzKx2_VO4PRLwyq4szCcZvoGbQ@mail.gmail.com>
Date: Wed, 12 Jun 2024 07:57:59 +0100
From: Andrii Nakryiko <andrii.nakryiko@...il.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Andrii Nakryiko <andrii@...nel.org>, linux-fsdevel@...r.kernel.org, brauner@...nel.org, 
	viro@...iv.linux.org.uk, linux-kernel@...r.kernel.org, bpf@...r.kernel.org, 
	gregkh@...uxfoundation.org, linux-mm@...ck.org, liam.howlett@...cle.com, 
	surenb@...gle.com, rppt@...nel.org, Alexey Dobriyan <adobriyan@...il.com>
Subject: Re: [PATCH v4 0/7] ioctl()-based API to query VMAs from /proc/<pid>/maps

On Tue, Jun 11, 2024 at 7:59 PM Andrew Morton <akpm@...ux-foundation.org> wrote:
>
>
> (Please cc Alexey on procfs changes)

ack, will do

>
> On Tue, 11 Jun 2024 04:00:48 -0700 Andrii Nakryiko <andrii@...nel.org> wrote:
>
> > Implement binary ioctl()-based interface to /proc/<pid>/maps file to allow
> > applications to query VMA information more efficiently than reading *all* VMAs
> > nonselectively through text-based interface of /proc/<pid>/maps file.
>
> Looks nice but I'll await further reviewer input.
>

Thanks! I'll work on adding more tests meanwhile.

> >
> > ...
> >
> >  Documentation/filesystems/proc.rst          |   9 +
> >  fs/proc/task_mmu.c                          | 366 +++++++++++--
> >  include/uapi/linux/fs.h                     | 156 +++++-
> >  tools/include/uapi/linux/fs.h               | 550 ++++++++++++++++++++
> >  tools/testing/selftests/bpf/.gitignore      |   1 +
> >  tools/testing/selftests/bpf/Makefile        |   2 +-
> >  tools/testing/selftests/bpf/procfs_query.c  | 386 ++++++++++++++
> >  tools/testing/selftests/bpf/test_progs.c    |   3 +
> >  tools/testing/selftests/bpf/test_progs.h    |   2 +
> >  tools/testing/selftests/bpf/trace_helpers.c | 104 +++-
> >  10 files changed, 1508 insertions(+), 71 deletions(-)
> >  create mode 100644 tools/include/uapi/linux/fs.h
> >  create mode 100644 tools/testing/selftests/bpf/procfs_query.c
>
> Should the selftests be under bpf/?  This is a procfs feature which
> could be used by many things apart from bpf and it really isn't a bpf
> thing at all.  Wouldn't tools/testing/selftests/proc/ be a more
> appropriate place?
>

Yep, agreed. I used BPF selftests as a quick and simple way to
validate it's working end-to-end (because we use /proc/<pid>/maps
across a bunch of pre-existing BPF selftests, so that gave me good
coverage and signal). I'll look into adding more tests under
selftests/proc for the next revision.

As for the procfs_query.c, it's not really a test, rather a custom
testing/benchmarking tool convenient for development, so I think I'll
drop it from the patch set for the next revision (and maybe will put
it up in a separate repo on Github or something).

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ