Hi, Don AFAIK, these macros get and set the current->addr_limit.(See the source). current->addr_limit is used by kernel when the kernel want to check the address's validity. For example, when the kernel want to copy_to_user or copy_from_user). In normal cases, every process( excluding kernel thread) has its addr_limit set to USER_DS, which corresponds PAGE_OFFSET(0xc000000000). If you set addr_limit to KERNEL_DS, which corresponds 0xFFFFFFFF, then the process can access all the 4G logical memory space. Yours Sincerely, Jim Chen ----- Original Message ----- From: "Lee Hock Nang, Don" <donlee@dsi.nus.edu.sg> To: <kernelnewbies@nl.linux.org>; <linux-net@vger.kernel.org> Sent: Tuesday, November 06, 2001 8:47 AM Subject: get_fs() and set_fs() mm_segment_t > > Hi guys, > > Can someone explain what get_fs(), set_fs() .... set_fs(KERNEL_DS) means? > Cos' I can't find any explaination on them. > > I guess is related to memory management. Does a UDP socket needs these? > > Many Thanks, have a nice day. > > DOn > > -- > Kernelnewbies: Help each other learn about the Linux kernel. > Archive: http://mail.nl.linux.org/kernelnewbies/ > IRC Channel: irc.openprojects.net / #kernelnewbies > Web Page: http://www.kernelnewbies.org/ -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ IRC Channel: irc.openprojects.net / #kernelnewbies Web Page: http://www.kernelnewbies.org/