Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754097Ab1D0DSw (ORCPT ); Tue, 26 Apr 2011 23:18:52 -0400 Received: from mail-bw0-f46.google.com ([209.85.214.46]:49930 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752312Ab1D0DSv (ORCPT ); Tue, 26 Apr 2011 23:18:51 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=ZM4SN08CgXRvTySjK0FCx85zk4otOWgU/8tLm0HCfU70Gb0EE7dXbAeR4+bj2c0rve f+xGKhEWnubEYpKuVgpFef22HOUwPJtRsSpGZ73dYcG1PvdLS2lXtpb02G7pxx8+K9fB mCzJPZkWfBRKjnuliLh9O/YFfvnS+vAyQuu/U= Date: Wed, 27 Apr 2011 06:18:44 +0300 From: Alexey Dobriyan To: Am??rico Wang Cc: Jidong Xiao , Kernel development list Subject: Re: How to export information larger than PROC_BLOCK_SIZE via /proc file system? Message-ID: <20110427031844.GA5595@p183> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1130 Lines: 24 On Wed, Apr 27, 2011 at 11:00:32AM +0800, Am??rico Wang wrote: > On Wed, Apr 27, 2011 at 8:54 AM, Jidong Xiao wrote: > > Hi, > > > > I am tracing some data inside the kernel, and I plan to export the > > tracing data through /proc file system. I created a file under /proc > > file system, and I use cat to display the tracing data. However, every > > time there is only 3072 bytes data displayed, which is the size > > defined by PROC_BLOCK_SIZE. And I wonder that how to export > > information more than that limit? Judging from the function > > fs/proc/generic.c/proc_file_read(), if the size returned by my > > read_proc function is large than a PAGE_SIZE, then I will get a > > KERN_ERR message which says "proc_file_read: Apparent buffer > > overflow!". Any help would be appreciated! > > > > Why not switch to use debugfs? Or use seq_file/proc_create. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/