As for windowsIn Windows, there can be a problem with kernel adresses , each. Each service pack has different kernel address ,addresses. I'd suggest taking "cross platform" shellcode from exploit-db.com ,exploit-db.com or packetstormsecurity.
Thankspacketstormsecurity.org