Bug 504417
Summary: | file -s is not able to detect swap signature on ppc | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Milan Broz <mbroz> | ||||||
Component: | file | Assignee: | Jan Kaluža <jkaluza> | ||||||
Status: | CLOSED ERRATA | QA Contact: | BaseOS QE <qe-baseos-auto> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | low | ||||||||
Version: | 5.3 | CC: | ksrot, ovasik, pvrabec | ||||||
Target Milestone: | rc | ||||||||
Target Release: | --- | ||||||||
Hardware: | ppc64 | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | file-4.17-17 | Doc Type: | Bug Fix | ||||||
Doc Text: |
Cause: PPC swapspace signature is located at different offset than swapspace signature on different architectures.
Consequence: File didn't recognize swap on PPC.
Fix: New magic pattern has been added to detect swap on PPC.
Result: File now identifies swapspace on PPC as "Linux/ppc swap file"
|
Story Points: | --- | ||||||
Clone Of: | |||||||||
: | 530083 (view as bug list) | Environment: | |||||||
Last Closed: | 2012-02-21 05:45:53 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Description
Milan Broz
2009-06-06 15:51:04 UTC
the ppc swap is vastly different than the i386/x86_64 one: we will need a new magic I created a ppc swapfile and will analyze this Created attachment 364252 [details]
swap file created by dd-ing /dev/zero and mkswap(8)ing afterwards
an interesting thing:
[root@ibm-js20-02 ~]# dd if=/dev/zero of=swap.ppc bs=4k count=16
16+0 records in
16+0 records out
65536 bytes (66 kB) copied, 0.000857522 seconds, 76.4 MB/s
[root@ibm-js20-02 ~]# mkswap swap.ppc
mkswap: error: swap area needs to be at least 655kB
so I created a larger file. the signature is quite long way down in the file:
[dnovotny@dhcp-0-118 file-testfiles]$ od -c swap.ppc
0000000 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
*
0002000 \0 \0 \0 001 \0 \0 \0 \v \0 \0 \0 \0 \0 \0 \0 \0
0002020 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
*
0177760 \0 \0 \0 \0 \0 \0 S W A P S P A C E 2
0200000 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
*
3100000
Created attachment 365333 [details]
a patch
adding new magic
This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unfortunately unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux. This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unfortunately unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux. This request was erroneously denied for the current release of Red Hat Enterprise Linux. The error has been fixed and this request has been re-proposed for the current release. This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unfortunately unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux. Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Cause: PPC swapspace signature is located at different offset than swapspace signature on different architectures. Consequence: File didn't recognize swap on PPC. Fix: New magic pattern has been added to detect swap on PPC. Result: File now identifies swapspace on PPC as "Linux/ppc swap file" Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2012-0201.html |