Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 452534 - [RFE] Enable raw devices on s390x
Summary: [RFE] Enable raw devices on s390x
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel
Version: 5.2
Hardware: s390x
OS: Linux
Target Milestone: rc
: ---
Assignee: Jeff Moyer
QA Contact: Red Hat Kernel QE team
Depends On:
TreeView+ depends on / blocked
Reported: 2008-06-23 15:56 UTC by Bryn M. Reeves
Modified: 2018-10-20 04:23 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
This enables raw device support for IBM System z platforms.
Clone Of:
Last Closed: 2009-09-02 08:48:16 UTC
Target Upstream Version:

Attachments (Terms of Use)
Kconfig patch for raw driver on s390x (deleted)
2008-06-23 15:56 UTC, Bryn M. Reeves
no flags Details | Diff

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2009:1243 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 5.4 kernel security and bug fix update 2009-09-01 08:53:34 UTC

Description Bryn M. Reeves 2008-06-23 15:56:45 UTC
Description of problem:
Raw device support is not enabled on the s390 architecture (vanilla 2.6.18 s390x
driver config does not allow the driver to be enabled). Third party applications
may require access to devices using the old /dev/raw/rawN interface.

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

How reproducible:

Steps to Reproduce:
1. Install an s390x system
2. # grep RAW_D /boot/config-*
Actual results:

Expected results:

Additional info:
There were previously problems with the raw I/O driver on s390 that were fixed
back in 2005:

commit 68f66feb300423bb9ee5daecb1951af394425a38
Author: Stephen Tweedie <>
Date:   Fri May 13 23:31:19 2005 -0400

    [PATCH] Fix root hole in raw device
    [Patch] Fix raw device ioctl pass-through
    Raw character devices are supposed to pass ioctls through to the block
    devices they are bound to.  Unfortunately, they are using the wrong
    function for this: ioctl_by_bdev(), instead of blkdev_ioctl().
    ioctl_by_bdev() performs a set_fs(KERNEL_DS) before calling the ioctl,
    redirecting the user-space buffer access to the kernel address space.
    This is, needless to say, a bad thing.
    This was noticed first on s390, where raw IO was non-functioning.  The
    s390 driver config does not actually allow raw IO to be enabled, which
    was the first part of the problem.  Secondly, the s390 kernel address
    space is distinct from user, causing legal raw ioctls to fail.  I've
    reproduced this on a kernel built with 4G:4G split on x86, which fails
    in the same way (-EFAULT if the address does not exist kernel-side;
    returns success without actually populating the user buffer if it does.)
    The patch below fixes both the config and address-space problems.  It's
    based closely on a patch by Jan Glauber <>, which has
    been tested on s390 at IBM.  I've tested it on x86 4G:4G (split address
    space) and x86_64 (common address space).
    Kernel-address-space access has been assigned CAN-2005-1264.
    Signed-off-by: Stephen Tweedie <>
    Signed-off-by: Dave Jones <>
    Signed-off-by: Greg Kroah-Hartman <>

The remaining pieces are just the Kconfig patch to add options to enable the
driver on s390x and a change to the s390 config in the kernel configuration files.

Comment 1 Bryn M. Reeves 2008-06-23 15:56:45 UTC
Created attachment 310038 [details]
Kconfig patch for raw driver on s390x

Comment 13 RHEL Product and Program Management 2009-02-16 15:38:25 UTC
Updating PM score.

Comment 14 Jeff Moyer 2009-04-22 02:10:29 UTC
I'm having troubles reserving an s390 system, unfortunately.  However, it looks to me like raw devices are supported on s390 already.  If you have access to an s390 system, please check to see if /dev/rawctl exists, and whether the raw command works for binding devices.


Comment 15 Jeff Moyer 2009-04-22 11:34:25 UTC
I managed to reserve a system and rawctl is not available.

Comment 17 Jeff Moyer 2009-04-22 16:17:53 UTC
The attached patch applied with minimal offsets and worked as advertised.  I was not able to verify that I/O could be performed to a raw device because of the configuration of the system I was using.  Is there any chance we can get testing from the customer on this?  Simply performing some dd commands should be sufficient.


Comment 18 Don Zickus 2009-04-27 15:57:40 UTC
in kernel-2.6.18-141.el5
You can download this test kernel from

Please do NOT transition this bugzilla state to VERIFIED until our QE team
has sent specific instructions indicating when to do so.  However feel free
to provide a comment indicating that this fix has been verified.

Comment 20 Chris Ward 2009-07-03 18:03:56 UTC
~~ Attention - RHEL 5.4 Beta Released! ~~

RHEL 5.4 Beta has been released! There should be a fix present in the Beta release that addresses this particular request. Please test and report back results here, at your earliest convenience. RHEL 5.4 General Availability release is just around the corner!

If you encounter any issues while testing Beta, please describe the issues you have encountered and set the bug into NEED_INFO. If you encounter new issues, please clone this bug to open a new issue and request it be reviewed for inclusion in RHEL 5.4 or a later update, if it is not of urgent severity.

Please do not flip the bug status to VERIFIED. Only post your verification results, and if available, update Verified field with the appropriate value.

Questions can be posted to this bug or your customer or partner representative.

Comment 21 Shawn Wells 2009-07-08 22:06:14 UTC
Release note added. If any revisions are required, please set the 
"requires_release_notes" flag to "?" and edit the "Release Notes" field accordingly.
All revisions will be proofread by the Engineering Content Services team.

New Contents:
This enables raw device support for IBM System z platforms.

Comment 25 errata-xmlrpc 2009-09-02 08:48:16 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

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