Bug 452534 - [RFE] Enable raw devices on s390x
[RFE] Enable raw devices on s390x
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel (Show other bugs)
5.2
s390x Linux
medium Severity medium
: rc
: ---
Assigned To: Jeff Moyer
Red Hat Kernel QE team
: FutureFeature, Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-06-23 11:56 EDT by Bryn M. Reeves
Modified: 2010-10-22 22:08 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
This enables raw device support for IBM System z platforms.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-02 04:48:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Bryn M. Reeves 2008-06-23 11:56:45 EDT
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):
2.6.18-*.el5

How reproducible:
100%

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

Expected results:
CONFIG_RAW_DRIVER=y
CONFIG_MAX_RAW_DEVS=8192

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 <sct@redhat.com>
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 <jang@de.ibm.com>, 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 <sct@redhat.com>
    Signed-off-by: Dave Jones <davej@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

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 11:56:45 EDT
Created attachment 310038 [details]
Kconfig patch for raw driver on s390x
Comment 13 RHEL Product and Program Management 2009-02-16 10:38:25 EST
Updating PM score.
Comment 14 Jeff Moyer 2009-04-21 22:10:29 EDT
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.

Thanks!
Comment 15 Jeff Moyer 2009-04-22 07:34:25 EDT
I managed to reserve a system and rawctl is not available.
Comment 17 Jeff Moyer 2009-04-22 12:17:53 EDT
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.

Thanks!
Comment 18 Don Zickus 2009-04-27 11:57:40 EDT
in kernel-2.6.18-141.el5
You can download this test kernel from http://people.redhat.com/dzickus/el5

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 14:03:56 EDT
~~ 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 18:06:14 EDT
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 04:48:16 EDT
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.

http://rhn.redhat.com/errata/RHSA-2009-1243.html

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