Linux bluetooth development
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Max Krasnyansky <maxk@qualcomm.com>
Cc: bluez-devel@lists.sourceforge.net
Subject: Re: [Bluez-devel] [PATCH] Fix abuse of kernel headers.
Date: Fri, 25 Apr 2003 22:16:02 +0100	[thread overview]
Message-ID: <1051305362.13999.115.camel@imladris.demon.co.uk> (raw)
In-Reply-To: <5.1.0.14.2.20030425104103.1040bb30@unixmail.qualcomm.com>

On Fri, 2003-04-25 at 18:43, Max Krasnyansky wrote:
> At 06:25 AM 4/25/2003, David Woodhouse wrote:
> >Thou Shalt Not Use Private Kernel Headers In Userspace.
> Yes. But asm/unaligned.h is the integral part of the glibc headers.

Take a look at the PPC version.

The rule is that you're not permitted to use _anything_ in asm/ or
linux/ directly from userspace. We know people do, but they shouldn't,
and if it breaks they get to keep both pieces. 

> 
> >-       return ntohs(get_unaligned(u16_ptr));
> >+       return (u8_ptr[0] << 8) | u8_ptr[1];
> I'd rather see reimplementation of get_unaligned() in hcidump headers 
> than this. We have sdp_get/put_unaligned() btw.

I looked at that but AFAIK the C standard doesn't actually guarantee the
packed structure method will work, and since we were always byteswapping
in the hcidump case anyway it didn't seem worth implementing a safe
generic version.

-- 
dwmw2




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

  reply	other threads:[~2003-04-25 21:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-25 13:25 [Bluez-devel] [PATCH] Fix abuse of kernel headers David Woodhouse
2003-04-25 17:43 ` Max Krasnyansky
2003-04-25 21:16   ` David Woodhouse [this message]
2003-04-25 22:49     ` Max Krasnyansky
2003-04-25 23:28       ` David Woodhouse
2003-04-28 21:49         ` Max Krasnyansky
2003-04-29 10:15           ` David Woodhouse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1051305362.13999.115.camel@imladris.demon.co.uk \
    --to=dwmw2@infradead.org \
    --cc=bluez-devel@lists.sourceforge.net \
    --cc=maxk@qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox