Register FAQ/Rules Forum Spy Search Today's Posts Mark Forums Read

Welcome to the Mac Forums forums. Please read the FAQ if you have questions. Register to participate.

 
Go Back   Mac Forums > News and Article Discussion > MacRumors.com News Discussion
TouchArcade.com - iPhone Game Reviews and News

Reply
 
Thread Tools Search this Thread  
Old Jan 24, 2008, 11:42 AM   #1
MacRumors
macrumors bot
 
Join Date: Apr 2001
Discussion Over Apple's Modification Of Sun's DTrace



One of the most anticipated features of Mac OS X Leopard amongst the technical community was the port of Sun's DTrace utility for application and system profiling. DTrace is a powerful, low-level dynamic tracing framework that allows system administrators and developers to trace applications for tuning or troubleshooting purposes.

Recently, Adam Leventhal, one of DTrace's initial developers, discovered that Apple's implementation creates a way for a program to exclude itself from being traced. Namely, he was unsuccessful at tracing iTunes, and found that Apple had added a method of disabling probing on certain applications defined with the directive P_LNOATTACH.

Quote:
Wow. So Apple is explicitly preventing DTrace from examining or recording data for processes which don't permit tracing. This is antithetical to the notion of systemic tracing, antithetical to the goals of DTrace, and antithetical to the spirit of open source. I'm sure this was inserted under pressure from ISVs, but that makes the pill no easier to swallow.
Since the initial publication of the blog entry last week, the story has begun to pop up around the mac web.

The practice is not entirely new to Apple. A commenter on Adam Leventhal's blog noted that Apple used the same directive to prevent GDB tracing on iTunes. Additionally, the implementation of this directive appears to be limited to iTunes (for the moment?), so many are speculating that the move is to protect Apple's FairPlay DRM.

To present an alternate view, Apple has extended Java, Ruby, Python, and Perl to include DTrace support, and Apple has built a GUI front-end called Instruments. Also the issue may eventually become moot with Apple's stated desire to move towards DRM-free music.

Article Link
MacRumors is offline   Reply With Quote
Old Jan 24, 2008, 11:43 AM   #2
longofest
Demi-God (Editor)
 
longofest's Avatar
 
Join Date: Jul 2003
Location: Falls Church, VA
Send a message via AIM to longofest
For those interested, from Adam's blog... the code that was added.

Code:
#if defined(__APPLE__)
        /*
         * If the thread on which this probe has fired belongs to a process marked P_LNOATTACH
         * then this enabling is not permitted to observe it. Move along, nothing to see here.
         */
        if (ISSET(current_proc()->p_lflag, P_LNOATTACH)) {
            continue;
        }
#endif /* __APPLE__ */
longofest is offline   Reply With Quote
Old Jan 24, 2008, 11:49 AM   #3
parapup
macrumors 6502
 
Join Date: Oct 2006
I don't understand...

...the point Apple was trying to make here. Preventing iTunes from being traced when there exist things like QTFairUse which rid the DRM in Apple sold music and continue to support latest iTunes versions.

On top of that, noted developer Landon Fuller posted a fairly quick and tiny Kext with source that will disallow applications from doing the NOATTACH trick so iTunes can be traced anyways.

parapup is offline   Reply With Quote
Old Jan 24, 2008, 11:52 AM   #4
daveschroeder
macrumors 6502
 
Join Date: Sep 2003
Location: Madison, WI
Send a message via AIM to daveschroeder Send a message via MSN to daveschroeder Send a message via Yahoo to daveschroeder
And the reason it's so easy to see what's going on?

Because the source code for things like dtrace is readily available on Apple's site.

And since the source is available, it's easy to fix for things like gdb and dtrace.

Making good-faith attempts to protect things like iTunes is a necessary evil for Apple to play in things like the video rental realm. Some people might not like it, but for the current iTunes ecosystem to exist, it's simply necessary to take steps to make the DRM environment more difficult to defeat.

But since Jobs himself has stated in no uncertain terms that DRM will always be broken - both literally and figuratively - this simply represents a necessary intermediate step to a world where digital content isn't encumbered with DRM. And it's only Apple who is going to be able to move the industry in that direction the fastest, because they have the most influence. In the meantime, Apple needs to do what needs to be done.

If FairPlay was trivial (anymore trivial than it already has been, anyway) to break, do you think Apple would have been able to get ALL the studios on board for movie rentals?

That means Apple takes actions which can be construed to ISVs as good-faith attempts to protect FairPlay.

Last edited by daveschroeder : Jan 24, 2008 at 12:08 PM.
daveschroeder is offline   Reply With Quote
Old Jan 24, 2008, 11:54 AM   #5
messedkid
macrumors 6502
 
Join Date: Jul 2007
Location: Coquitlam, BC
As a mac user for the past year and a half, all I have to say is...


....Wha?
__________________
Macbook + Snow Leopard
AAO Netbook + Windows 7
Dell Dimension 3000 + WinXP
messedkid is offline   Reply With Quote
Old Jan 24, 2008, 11:55 AM   #6
em500
macrumors regular
 
Join Date: Apr 2005
Quote:
Also the issue may eventually become moot with Apple's stated desire to move towards DRM-free music.
They may be moving towards DRM-free music, but DRM-free movies are nowhere near the horizons yet.
em500 is offline   Reply With Quote
Old Jan 24, 2008, 11:56 AM   #7
irmongoose
macrumors Demi-God
 
irmongoose's Avatar
 
Join Date: Dec 2001
Location: Sometimes Tokyo, sometimes California
Music might be on its way to no-DRM, but FairPlay is also used for movies, so I don't see how the issue will be obviated - especially with the new movie rentals which need DRM by nature.


irmongoose
__________________
A Film and Artwork Portfolio
irmongoose is offline   Reply With Quote
Old Jan 24, 2008, 11:57 AM   #8
madrag
macrumors member
 
Join Date: Nov 2007
that's why I don't use iTunes.
Sad.
madrag is offline   Reply With Quote
Old Jan 24, 2008, 11:59 AM   #9
JoeG4
macrumors 6502
 
Join Date: Jan 2002
Location: Bay Area, Ca.
Send a message via ICQ to JoeG4 Send a message via AIM to JoeG4
Apple only brought out their desire to sell DRM-free music after the music studios decided that was the way to go.

Steve Jobs happily changes his mind however it benefits him.
__________________
VGMasters - a different video game forum!
JoeG4 is offline   Reply With Quote
Old Jan 24, 2008, 12:06 PM   #10
tk421
macrumors 6502a
 
Join Date: Dec 2005
Why should an average user even care about this?

I'm not trying to be a jerk, I'm seriously wondering. If you're not a software developer, does this affect you? Why shouldn't Apple be able to protect a designated part of their code? They don't seem to have a problem opening up things besides iTunes.
tk421 is offline   Reply With Quote
Old Jan 24, 2008, 12:07 PM   #11
daveschroeder
macrumors 6502
 
Join Date: Sep 2003
Location: Madison, WI
Send a message via AIM to daveschroeder Send a message via MSN to daveschroeder Send a message via Yahoo to daveschroeder
Quote:
Originally Posted by JoeG4 View Post
Apple only brought out their desire to sell DRM-free music after the music studios decided that was the way to go.

Steve Jobs happily changes his mind however it benefits him.
You are completely wrong, and that is revisionist history.

No one is staying Steve Jobs is God, but the DRM statement was the single biggest shot across the bow with respect to DRM that the music industry has EVER had from anyone close to that stature, and it was only AFTER that statement that the vast, vast, overwhelming majority of no-DRM music sales activity has gone on.

Was it due exclusively and only to Jobs? No.

Did it have a lot to do with that? Absolutely. Both from the standpoint of the statement, and from the standpoint of content owners trying to figure out how to still make content available to the widest range of customers without being beholden to iTunes.
daveschroeder is offline   Reply With Quote
Old Jan 24, 2008, 12:09 PM   #12
parapup
macrumors 6502
 
Join Date: Oct 2006
Quote:
Originally Posted by daveschroeder View Post
But since Jobs himself has stated in no uncertain terms that DRM will always be broken - both literally and figuratively
Properly implemented DRM, like Encryption, cannot be broken. But I agree with your point that they have to take some steps to convince the music and video companies and this poorly implemented DRM is a good faith attempt. The "poorly implemented" part may have its roots in practical limitations - they don't have the Vista style hardware and OS assisted DRM yet in OSX to be able to thwart breaking attempts.
parapup is offline   Reply With Quote
Old Jan 24, 2008, 12:09 PM   #13
Iroganai
macrumors regular
 
Join Date: Oct 2003
Quote:
Originally Posted by madrag View Post
that's why I don't use iTunes.
Sad.
No, it's not just the fault of iTunes, it's the combination of iTunes and the
OS X kernel. So, if this is why you don't use iTunes, you shouldn't use OS X itself

Anyways, it shows the good thing about the open-sourced Darwin project,
in that people can easily find what's `crippled' in the DTrace implementation on Leopard by looking at the code. You can't do that for a truly closed-source kernel. You can also re-compile the kernel with the offending code removed if you'd like, although it's not particularly easy.
Iroganai is offline   Reply With Quote
Old Jan 24, 2008, 12:18 PM   #14
notjustjay
macrumors 68030
 
notjustjay's Avatar
 
Join Date: Sep 2003
Location: Canada, eh?
Quote:
Originally Posted by tk421 View Post
Why shouldn't Apple be able to protect a designated part of their code? They don't seem to have a problem opening up things besides iTunes.
I agree with this statement.
__________________
MRoogle
notjustjay is offline   Reply With Quote
Old Jan 24, 2008, 12:22 PM   #15
QuarterSwede
macrumors 68030
 
QuarterSwede's Avatar
 
Join Date: Oct 2005
Location: Colorado Springs, CO
Quote:
Originally Posted by parapup View Post
Properly implemented DRM, like Encryption, cannot be broken.
That's not true either. Any encryption can be broken. It's just that hardware assisted encryption, be it an RSA key or other schema, just takes a really long time to break. Long enough to make it almost impossible.

Personally I agree with daveschroeder. I believe he's right in saying that they're doing it to protect their current interests. What do developers care about it anyway? I don't see how this really affects 3rd parties.
__________________
Help stop children from viewing internet pornography.
What happened to all the great leaders?
QuarterSwede is offline   Reply With Quote
Old Jan 24, 2008, 12:31 PM   #16
madmax_2069
macrumors 6502a
 
madmax_2069's Avatar
 
Join Date: Aug 2005
Location: Springfield Ohio
Quote:
Originally Posted by QuarterSwede View Post
That's not true either. Any encryption can be broken. It's just that hardware assisted encryption, be it an RSA key or other schema, just takes a really long time to break. Long enough to make it almost impossible.

Personally I agree with daveschroeder. I believe he's right in saying that they're doing it to protect their current interests. What do developers care about it anyway? I don't see how this really affects 3rd parties.
well can 3rd party's use it to point out a bug that Apple didn't see
__________________
Beige G3 AIO, Rev B rom, G3 466mhz, 768mb Ram, WD SE 120gb hdd OS 9.2.2 and OS X 10.4.10
Macdomain
Beige G3 AIO
madmax_2069 is offline   Reply With Quote
Old Jan 24, 2008, 12:31 PM   #17
diamond.g
macrumors 68040
 
Join Date: Mar 2007
Location: Virginia
Quote:
Originally Posted by QuarterSwede View Post
That's not true either. Any encryption can be broken. It's just that hardware assisted encryption, be it an RSA key or other schema, just takes a really long time to break. Long enough to make it almost impossible.

Personally I agree with daveschroeder. I believe he's right in saying that they're doing it to protect their current interests. What do developers care about it anyway? I don't see how this really affects 3rd parties.
The problem, reading slashdots comments on the issue, is that if iTunes is open it screws up the trace log. So you could have iTunes (or any program that uses the flag) open and your trace log would basically be empty or corrupted. I am guessing that Apple didn't tell anyone that they were doing that, it took someone doing some snooping to figure out what was going on. It isn't that big of a deal as you can just compile that flag right out of the program, but it is annoying if one doesn't realize that is happening.
__________________
The whole earth should be like Hawaii (weather wise)
diamond.g is offline   Reply With Quote
Old Jan 24, 2008, 12:32 PM   #18
kainjow
Demi-God (Moderator)
 
kainjow's Avatar
 
Join Date: Jun 2000
Quote:
Originally Posted by messedkid View Post
As a mac user for the past year and a half, all I have to say is...


....Wha?
Basically, Apple is preventing open-sourced debugging tools (software that helps a developer troubleshoot their programs) from working on iTunes
kainjow is offline   Reply With Quote
Old Jan 24, 2008, 12:33 PM   #19
milo
macrumors 68030
 
Join Date: Sep 2003
Quote:
Originally Posted by madrag View Post
that's why I don't use iTunes.
Sad.
What's why? Because you can't run dtrace on it? Um...what?
milo is offline   Reply With Quote
Old Jan 24, 2008, 12:35 PM   #20
QuarterSwede
macrumors 68030
 
QuarterSwede's Avatar
 
Join Date: Oct 2005
Location: Colorado Springs, CO
Quote:
Originally Posted by diamond.g View Post
The problem, reading slashdots comments on the issue, is that if iTunes is open it screws up the trace log. So you could have iTunes (or any program that uses the flag) open and your trace log would basically be empty or corrupted. I am guessing that Apple didn't tell anyone that they were doing that, it took someone doing some snooping to figure out what was going on. It isn't that big of a deal as you can just compile that flag right out of the program, but it is annoying if one doesn't realize that is happening.
Ahhh I see. Thanks for clarifying. Yeah, that would've pissed me off too.
__________________
Help stop children from viewing internet pornography.
What happened to all the great leaders?
QuarterSwede is offline   Reply With Quote
Old Jan 24, 2008, 12:36 PM   #21
milo
macrumors 68030
 
Join Date: Sep 2003
Quote:
Originally Posted by kainjow View Post
Basically, Apple is preventing open-sourced debugging tools (software that helps a developer troubleshoot their programs) from working on iTunes
And why does a developer really need to use the debugging tool on itunes? Or while iTunes is running?

Quit iTunes. Debug your program.
milo is offline   Reply With Quote
Old Jan 24, 2008, 12:36 PM   #22
iSee
macrumors 65816
 
iSee's Avatar
 
Join Date: Oct 2004
Quote:
Originally Posted by tk421 View Post
Why should an average user even care about this?

I'm not trying to be a jerk, I'm seriously wondering. If you're not a software developer, does this affect you? Why shouldn't Apple be able to protect a designated part of their code? They don't seem to have a problem opening up things besides iTunes.
You're not a jerk: this doesn't really even affect software developers.

Well, actually it is a positive thing for software developers because we can use the same mechanism to make our apps opaque to DTrace, too, if we choose to.

It's kind of a negative for hackers (who else wants to debug someone else's apps?). But not really, because they can work around it. Actually, hackers enjoy working around things like this, so it's actually a positive for them, too.

In practical terms, this doesn't really mean anything to anyone. If you are the type of person who wants everything to be "open," the idea of this will annoy you. I assume that's why such an esoteric thing is posted on as a main story.
iSee is offline   Reply With Quote
Old Jan 24, 2008, 12:38 PM   #23
kainjow
Demi-God (Moderator)
 
kainjow's Avatar
 
Join Date: Jun 2000
Quote:
Originally Posted by milo View Post
And why does a developer really need to use the debugging tool on itunes? Or while iTunes is running?

Quit iTunes. Debug your program.
What if your program is in iTunes? Visualizers?
kainjow is offline   Reply With Quote
Old Jan 24, 2008, 12:39 PM   #24
gnasher729
macrumors 68040
 
gnasher729's Avatar
 
Join Date: Nov 2005
Quote:
Originally Posted by tk421 View Post
I'm not trying to be a jerk, I'm seriously wondering. If you're not a software developer, does this affect you? Why shouldn't Apple be able to protect a designated part of their code? They don't seem to have a problem opening up things besides iTunes.
If you are not a software developer, it doesn't affect you at all.

There are two things worth discussing here: The first thing is that Apple tries (moderately successful) to keep people from looking at what iTunes is doing, which I think is their right to do. It's trivial (well, for a developer with a bit of hacker blood in him) to get around this. It is actually trivial to change DTrace so that it will _only_ work with applications that don't want it to look.

The second thing, which is not nice, is that DTrace doesn't work properly when iTunes is running. The problem isn't that DTrace cannot look what iTunes does, the problem is that DTrace cannot look what _my own code_ does while iTunes is running. That is a problem. The whole purpose why DTrace is there (and it has been proudly announced by Apple, is a major feature of Leopard as far as developers are concerned, and was reportedly very valuable for developers working at Apple) is to look at _my_ code, and it doesn't work properly. So whoever added those few lines of code should have done a better job and changed DTrace so that it doesn't look at iTunes, but continues working when iTunes is running.

The real problem is that DTrace can give completely wrong results without any warning. So a developer who listens to iTunes while he works might spend hours and hours looking for problems that don't exist - because DTrace gives the wrong results. Or he might not be able to find the cause of a real problem because DTrace gives the wrong results.
gnasher729 is offline   Reply With Quote
Old Jan 24, 2008, 12:42 PM   #25
diamond.g
macrumors 68040
 
Join Date: Mar 2007
Location: Virginia
Quote:
Originally Posted by milo View Post
And why does a developer really need to use the debugging tool on itunes? Or while iTunes is running?

Quit iTunes. Debug your program.
It may not be only iTunes using that flag. It could be any program. Apple not telling anyone was the issue.
__________________
The whole earth should be like Hawaii (weather wise)
diamond.g is offline   Reply With Quote

Reply

Mac Forums > News and Article Discussion > MacRumors.com News Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:33 PM.

Mac News | Mac Rumors | iPhone Game Reviews | iPhone Apps

Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright 2002-2009, MacRumors.com, LLC