how to determine if buffers are in user-space/kernel-space

2 messages, 2 authors, 2021-01-19 · open the first message on its own page

how to determine if buffers are in user-space/kernel-space

From: Raju Rangoju <hidden>
Date: 2021-01-18 18:42:11

Hi,

We have an out-of-tree kernel module which was using
segment_eq(get_fs(), KERNEL_DS) to determine whether buffers are in
Kernel space vs User space. However, with the get_fs() and its friends
removed[1], we are out of ideas on how to determine if buffers are in
user space or kernel space. Can someone shed some light on how to
accomplish it?


Thanks in Advance,
Raju

[1]
https://patchwork.kernel.org/project/linux-fsdevel/patch/20200817073212.830069-10-hch@lst.de/

Re: how to determine if buffers are in user-space/kernel-space

From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2021-01-19 02:21:37

On Mon, 18 Jan 2021 23:56:37 +0530
Raju Rangoju [off-list ref] wrote:
Hi,

We have an out-of-tree kernel module which was using
segment_eq(get_fs(), KERNEL_DS) to determine whether buffers are in
Kernel space vs User space. However, with the get_fs() and its friends
removed[1], we are out of ideas on how to determine if buffers are in
user space or kernel space. Can someone shed some light on how to
accomplish it?
Sorry, you are asking in the wrong place. Supporting any out of
tree modules is completely your own problem to deal with.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help