title: How can I read large data from proc file?
body: <p>I'm trying to write a kernel module which writes some data to a proc file. I'm trying to write something like 5000 characters but when I say $>cat /proc/myentry I can read only 1000 characters. </p>
  
  <pre><code>int procfile_read(char *buffer,  char **buffer_location,  off_t offset, int buffer_length, int *eof, void *data){
  int ret;
  static char my_buffer[4096];
  
  if (offset &gt; 0) {
  
      ret  = 0;
  } else {
  
      ret = sprintf(my_buffer, LARGE STRING HERE);
  }
  
  *buffer_location=my_buffer;
  return ret;
  }
  </code></pre>
  
  <p>This is my code. Thanks in advance.</p>