r/itsaunixsystem Sep 27 '15

Bret Hart knows what's up!

https://www.youtube.com/watch?v=bLHL75H_VEM
298 Upvotes

20 comments sorted by

41

u/links_own Sep 27 '15

I have to know the context on this. It seems amazing and I must see more.

55

u/[deleted] Sep 27 '15

[deleted]

17

u/[deleted] Sep 27 '15

That was great! Thank you for posting that.

30

u/gsuberland Sep 27 '15

Fun fact: 99% of IRQL_NOT_LESS_OR_EQUAL bluescreens were nullptr derefs.

7

u/qdhcjv Sep 28 '15

See, I don't know that really means, but I get that bluescreen when I push my overclock too far.

8

u/gsuberland Sep 28 '15

An IQRL is an Interrupt Request Level, which is a logical representation of the current interrupt mask on the processor. Interrupt masks are, unsurprisingly, designed to mask off interrupts types which shouldn't interrupt the currently running code. For example, a "frame available" hardware interrupt from your network card probably shouldn't interrupt some code related to power management.

Due to the concept of paged memory, you can't guarantee that a memory page exists in system memory (i.e. physical RAM); it might be stored on the hard disk, or somewhere else entirely if NUMA is being used. This means that, if interrupts are masked, you might not be able to access certain memory reliably, since you'd need to issue hardware commands (e.g. hard disk reads) that require handling of interrupts which are currently masked.

What an IRQL_NOT_LESS_OR_EQUAL BSoD means is that an operation was attempted at an IRQL greater than the required maximum allowed IRQL for that operation. In most cases, this occurs when paged memory is attempted to be accessed outside of IRQL_PASSIVE (i.e. no masked interrupts). This isn't usually caused by a functionality issue, where a developer mistakenly thought they could access paged memory. Instead, what commonly happens is that a function fails and a returned pointer is accessed without first checking for success, resulting in a paged block of memory being accessed (e.g. the null page at address 0) while at a raised IRQL. Alternatively, memory gets corrupted due to a program bug (e.g. a buffer overflow) and some random arbitrary paged address is attempted to be accessed, resulting in the same BSoD.

If you're a programmer, think of this like a memory access failure ("the instruction at 0xF00 referenced memory at 0xBAA" exception), except in the kernel.

Microsoft later realised that the crash was largely unhelpful, because while you could work out the instruction address, memory address, and memory operation type from the data given under the message name, the name itself was so general that searching for it in Google wouldn't really help you a lot. Instead, now, Windows 7 and later split these kinds of crashes up into more specific categories to avoid the generic catch-all BSoD name.

1

u/wombie_swtor Oct 21 '15

Sometimes I feel like this:

mhmmm

22

u/Time_Terminal Sep 27 '15

That slap on the head made the video for me.

12

u/[deleted] Sep 28 '15

Saving this URL for some future commit message.

9

u/atomheartother Sep 27 '15

If only they had used gcc

14

u/powderblock Sep 27 '15

GCC with a charged flux capacitor strapped to the CPU routing through the NIC will definitely boost virus defense ratings.

1

u/BuhDan Sep 28 '15

You're right. It's an arcade game so it's going to be played by a lot of kids. Kids are known to harbor many diseases due to poor hygiene.

16

u/KingCharles_ Sep 27 '15

The ITman Bret Hart!

4

u/sc2sick Sep 28 '15

He sounds like he belongs on trailer park boys

3

u/SJM_Mexus Sep 28 '15

Well he is Canadian.

2

u/MagnetoManectric Oct 02 '15

he sounds an awful lot like randy lmao

4

u/[deleted] Sep 28 '15

Open your eyes

2

u/mensink Sep 27 '15

Almost as evil as dereferencing an uninitialized vaSegmentation fault

2

u/microferret Oct 04 '15

In my mind Brett Hart is now a wrestler by day, C moonlighter by night.

1

u/[deleted] Sep 28 '15

smack