lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 30 Oct 2008 06:02:17 -0400
From:	Sarangi_Santosh@....com
To:	<linux-kernel@...r.kernel.org>
Subject: PROBLEM: ioctl (HDIO_GETGEO) on partition

Hi,
I am into a problem where the ioctl (HDIO_GETGEO) if failing on a device
partition(ex: /dev/emcpowerg1), which is working fine for full device (
ex: /dev/emcpowerg).
Basically I am trying to get start offset of the device partition
(hd_geometry.start).
The host information where I am seeing the above problem is as follows:

Linux ampersandmex01 2.6.18-53.el5PAE #1 SMP Wed Oct 10 16:48:18 EDT
2007 i686 i686 i386 GNU/Linux 

Red Hat Enterprise Linux Server release 5.1 (Tikanga)


Can anyone suggest if there is any patch available, so that the problem
can be resolved ?
If the patch is not available, then is there any other way, I can get
the above information without using  the ioctl (HDIO_GETGEO) ?

I am pasting the code snip set below for your reference.

Thanks,
-Santosh

<code snip>
  int                  fd;
  int                  sts;
  struct hd_geometry   hd_geometry_rec;
  unsigned int                offset;

  
  if ((fd = open(p_ppdevname, O_RDONLY | O_NONBLOCK)) < 0)
    {
        return OS_SYSTEM_CALL_FAILED;
    }
  if ((sts = ioctl(fd, HDIO_GETGEO, &hd_geometry_rec)) < 0) ------->
ioctl((HDIO_GETGEO)  is failing for device partition (/dev/emcpowerg1)
    {
      close(fd);
      return OS_SYSTEM_CALL_FAILED;
    }
  offset = (unsigned int) hd_geometry_rec.start;
.
.
.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ