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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0907231133450.2930@cobra.newdream.net>
Date:	Thu, 23 Jul 2009 11:42:49 -0700 (PDT)
From:	Sage Weil <sage@...dream.net>
To:	Andi Kleen <andi@...stfloor.org>
cc:	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 17/19] ceph: ioctls

On Thu, 23 Jul 2009, Andi Kleen wrote:
> What I find more suspicious is that it's the direct network
> data structure. Presumably that's in a defined endian?
> So that means the application would already need to 
> change to network endian order at the ioctl level?
> 
> That seems wrong if true. I think defining
> a ioctl directly based on a network protocol header is 
> likely a bad idea.

That's a good point.  I've defined an ioctl-specific struct, so the entire 
interface is defined in the header:

---
#include <linux/ioctl.h>
#include <linux/types.h>

#define CEPH_IOCTL_MAGIC 0x97

/* just use u64 to align sanely on all archs */
struct ceph_ioctl_layout {
	__u64 stripe_unit, stripe_count, object_size;
	__u64 data_pool;
};

#define CEPH_IOC_GET_LAYOUT _IOR(CEPH_IOCTL_MAGIC, 1,		\
				   struct ceph_ioctl_layout)
#define CEPH_IOC_SET_LAYOUT _IOW(CEPH_IOCTL_MAGIC, 2,		\
				   struct ceph_ioctl_layout)
---

The remaining issues are:
- this isn't complete.  I haven't made up my mind how to list, describe, 
  and choose the data pool to store a file in; for now it's ignored.
- where the header should go.  I don't see any other file system ioctls in 
  include/linux other than ext[23]; the rest are all in fs/*.

sage
--
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