The OPCODE GASLIMIT gets the block's gas limit. Could in-line assembly,
uint gasLimit; assembly { gasLimit := gaslimit } fetch the gas limit ?
contract B { function getGasLimit() returns (uint) { uint gasLimit; assembly { gasLimit := gaslimit } return gasLimit; } } Using https://ethereum.github.io/browser-solidity/, with a gaslimit set to 3000000, getGasLimit() returns 6000000.
Why does it return twice the gas limit ?

msg.gasfor the transactions being sent. It will be what you put in thegas limitfield (minus a bit)