On Sat, Aug 22, 2020 at 2:01 PM David Miller wrote:
> > About the pid part -
> > On top of multiple pids to scan for a given socket, there's also the
> > security provided by /proc - I'm not sure what inet_diag does for that
> > So maybe users calling it will need to scan /proc for a long time any
On Sat, Aug 22, 2020 at 1:19 PM Pascal Bouchareine wrote:
>
> On Sat, Aug 22, 2020 at 12:59 PM Pascal Bouchareine wrote:
>
> > Would it make sense to also make UDIAG_SHOW_NAME use sk_description?
> > (And keep the existing change - setsockopt + show_fd_info via
> > /p
On Sat, Aug 22, 2020 at 12:59 PM Pascal Bouchareine wrote:
> Would it make sense to also make UDIAG_SHOW_NAME use sk_description?
> (And keep the existing change - setsockopt + show_fd_info via
> /proc/.../fdinfo/..)
Ah,very wrong example - to be more precise, I suppose that'
Thank you,
On Sat, Aug 22, 2020 at 12:36 PM David Miller wrote:
> > We ignore optlen and constrain the string to a static max size
> >
> > Signed-off-by: Pascal Bouchareine
>
> This change is really a non-starter unless the information gets
> published somewhere wh
Thanks for taking a look!
On Fri, Aug 21, 2020 at 8:51 PM Andrew Morton wrote:
> Why change all existing callsites so that one callsite can pass in a
> different gfp_t?
My initial thought was to change strndup_user to use
GFP_KERNEL_ACCOUNT (or GFP_USER | __GFP_ACCOUNT ?) unconditionally.
(Woul
ignore optlen and constrain the string to a static max size
Signed-off-by: Pascal Bouchareine
---
include/net/sock.h| 4 +++
include/uapi/asm-generic/socket.h | 2 ++
net/core/sock.c | 53 +++
net/socket.c | 5
Let caller specify allocation.
Preserve existing calls with GFP_USER.
Signed-off-by: Pascal Bouchareine
---
Updating patch 1/ and 2/ to address comments
drivers/dma-buf/dma-buf.c | 2 +-
drivers/gpu/drm/i915/i915_debugfs_params.c | 2 +-
drivers/gpu/drm/vc4/vc4_bo.c
On Sun, Aug 16, 2020 at 11:15 AM Eric Dumazet wrote:
>
> 1) You also ignored what would happen at accept() time.
>
> Please test your patches with ASAN.
Ouch, I will look into it - thanks for pointing that out & 3/
>
> 2) Also, why is that description specific to sockets ?
fcntl on struct file
Let caller specify allocation.
Preserve existing calls with GFP_USER.
Signed-off-by: Pascal Bouchareine
---
drivers/dma-buf/dma-buf.c | 2 +-
drivers/gpu/drm/i915/i915_debugfs_params.c | 2 +-
drivers/gpu/drm/vc4/vc4_bo.c | 3 +-
drivers/input/misc/uinput.c
ignore optlen and constrain the string to a static max size
Signed-off-by: Pascal Bouchareine
---
include/net/sock.h| 4
include/uapi/asm-generic/socket.h | 2 ++
net/core/sock.c | 23 +++
net/socket.c | 5 +
4
Checking to see if this could fit in struct sock.
This goes against v5.8
I tried to make it tl;dr in commit 2/2 but motivation is also described
a bit in
https://lore.kernel.org/linux-api/CAGbU3_nVvuzMn2wo4_ZKufWcGfmGsopVujzTWw-Bbeky=xs...@mail.gmail.com/
On Thu, Aug 13, 2020 at 10:28 PM Christoph Hellwig wrote:
> > One intended usage is to allow processes to self-document sockets
> > for netstat and friends to report
>
> NAK. There is no way we're going to bloat a criticial structure like
> struct file for some vanity information like this.
The
Let caller specify allocation.
Keep the existing calls with GFP_USER, and enforce the existing
defense against log spam from userspace with __GFP_NOWARN.
Signed-off-by: Pascal Bouchareine
---
drivers/dma-buf/dma-buf.c | 2 +-
drivers/gpu/drm/i915/i915_debugfs_params.c | 2
This is a first attempt at taking Alexey's comments into account
This goes against v5.8
tl;dr in commit 2/2 but motivation is also described a bit in
https://lore.kernel.org/linux-api/CAGbU3_nVvuzMn2wo4_ZKufWcGfmGsopVujzTWw-Bbeky=xs...@mail.gmail.com/
: Pascal Bouchareine
---
fs/fcntl.c | 21 +
fs/file_table.c| 2 ++
fs/proc/fd.c | 5 +
include/linux/fs.h | 3 +++
include/uapi/linux/fcntl.h | 5 +
5 files changed, 36 insertions(+)
diff --git a/fs/fcntl.c b/fs/fcntl.c
On Mon, Jul 27, 2020 at 6:39 PM Pascal Bouchareine wrote:
> > struct file is nicely aligned to 256 bytes on distro configs.
> > Will this break everything?
> >
> > $ cat /sys/kernel/slab/filp/object_size
>
> Indeed on the config I'm using here this
Thanks for reviewing, I added some questions inline below
On Mon, Jul 27, 2020 at 7:21 AM Alexey Dobriyan wrote:
> > + d = strndup_user(desc, MAX_FILE_DESC_SIZE);
>
> This should be kmem accounted because allocation is persistent.
> To make things more entertaining, strndup_user() doesn't hav
Sorry about all the noise, please disregard this one.
On Sat, Jul 25, 2020 at 7:04 PM Pascal Bouchareine wrote:
>
> One intended usage is to allow processes to self-document sockets
> for netstat and friends to report
>
> Signed-off-by: Pascal Bouchareine
> ---
> Docu
: Pascal Bouchareine
---
Documentation/filesystems/proc.rst | 3 +++
fs/fcntl.c | 19 +++
fs/file_table.c| 2 ++
fs/proc/fd.c | 5 +
include/linux/fs.h | 3 +++
include/uapi/linux/fcntl.h
One intended usage is to allow processes to self-document sockets
for netstat and friends to report
Signed-off-by: Pascal Bouchareine
---
Documentation/filesystems/proc.rst | 3 +++
fs/fcntl.c | 19 +++
fs/file_table.c| 2 ++
fs/proc
: Pascal Bouchareine
---
Documentation/filesystems/proc.rst | 3 +++
fs/fcntl.c | 19 +++
fs/file_table.c| 3 +++
fs/proc/fd.c | 5 +
include/linux/fs.h | 3 +++
include/uapi/linux/fcntl.h
On Sat, Jul 25, 2020 at 3:10 PM Al Viro wrote:
> Have you even tried to test it? When will it ever free those things?
Thanks for pointing that out, I'll try to address that in the thread
I did basic tests against 5.4: set a description, concurrently set it
from multiple child processes, read, d
: Pascal Bouchareine
---
More context sent earlier this week:
https://lore.kernel.org/linux-api/CAGbU3_nVvuzMn2wo4_ZKufWcGfmGsopVujzTWw-Bbeky=xs...@mail.gmail.com/T/#u
Documentation/filesystems/proc.rst | 3 +++
fs/fcntl.c | 19 +++
fs/proc/fd.c
23 matches
Mail list logo