From mboxrd@z Thu Jan 1 00:00:00 1970 From: william.r.douglas@gmail.com (William Douglas) Date: Thu, 04 Aug 2011 22:40:53 -0000 Subject: SYSLOG_ACTION_READ_ALL question Message-ID: <87pqkk4wnt.fsf@intel.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Hello all, I'm trying to figure out why the do_syslog code in kernel/printk.c is using put_user instead of copy_to_user. There is even a comment about how because of sleep, the buffer is read from back to front to minimize the impact of printk overwriting the syslog section we are using. That wouldn't be necessary if a temporary copy was made and then written out with copy_to_user. Does that make sense or am I missing something? Thanks, William