Bug 64838 - /proc/ksyms is truncated with cat, dd works
Summary: /proc/ksyms is truncated with cat, dd works
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel
Version: 7.3
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ben LaHaise
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-05-13 11:10 UTC by Steffen Persvold
Modified: 2007-04-18 16:42 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-05-17 19:58:16 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2002:110 0 normal SHIPPED_LIVE Updated kernel with bugfixes available 2002-06-10 04:00:00 UTC

Description Steffen Persvold 2002-05-13 11:10:28 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.4.9-13win4lin i686)

Description of problem:
When using cat on /proc/ksyms, the output is truncated. However using 'dd
if=/proc/ksyms' gives the full output. Further found that reading more than 4095
bytes from /proc/ksyms in one read leads to truncation of the output.

Version-Release number of selected component (if applicable): 2.4.18-4


How reproducible:
Always

Steps to Reproduce:
1. cat /proc/ksyms >cat_ksyms
2. ls -l cat_ksyms
3. dd if=/proc/ksyms >dd_ksyms
4. ls -l dd_ksyms
	

Actual Results:  [root@gbe2 root]# ls -l cat_ksyms 
-rw-r--r--    1 root     root        73424 May  5 12:38 cat_ksyms
[root@gbe2 root]# ls -l dd_ksyms 
-rw-r--r--    1 root     root        87452 May  5 12:39 dd_ksyms


Expected Results:  [root@gbe2 root]# ls -l cat_ksyms 
-rw-r--r--    1 root     root        87452 May  5 12:38 cat_ksyms
[root@gbe2 root]# ls -l dd_ksyms 
-rw-r--r--    1 root     root        87452 May  5 12:39 dd_ksyms


Additional info:

Comment 1 Michael Schwendt 2002-05-13 12:27:05 UTC
$ cat /proc/ksyms > cat_ksyms
$ dd if=/proc/ksyms > dd_ksyms
$ diff --brief cat_ksyms dd_ksyms
$

Works for me (2.4.18-4.athlon). Both files are 72155 bytes long.


Comment 2 Steffen Persvold 2002-05-13 12:57:50 UTC
Ok, so could it be glibc then ? I just tried this kernel on a RedHat 7.2 machine
(glibc-2.2.4-19.3) and everything seems to work just fine except this. Also the
machines I'm testing this on is dual Xeons (so I'm running kernel-smp-2.4.18-4).

Comment 3 Ben LaHaise 2002-05-16 19:47:08 UTC
Confirmed.  I'll post a patch in a while.

Comment 4 Ben LaHaise 2002-05-17 19:58:10 UTC
This is strange, I'm not able to reproduce it with a self built test kernel. 
Still investigating...

Comment 5 Ben LaHaise 2002-05-27 22:21:41 UTC
Fix is committed for the next kernel erratum.


Note You need to log in before you can comment on or make changes to this bug.