Headers and kernel linking are separate issues. The headers are definitely part of the documented public API.
Meanwhile, when the module system was built for the kernel, all of the modules were GPL and the question wasn't even considered. It's a bit of a special case, when it's Free software, what constitutes the public API? Linux clarifies that marking the function as _GPL makes it the public API in kernel space.
In non-Free software, non-public API is that which is not in the headers or that which no proper way to access it is provided. Effectively, "intent of author" has always been the standard, Linus just documents it a lot more clearly than others.
Oracle should lose. I simply can't see bare documentation of an API as a creative work and simply offering the same API is more akin to writing a distinct work in the same genre than it is to copyright violation. Otherwise, there could only ever be one detective novel (if you've seen one McGuffin, you've seen them all) and one space opera, etc. That is, nearly every environment has a read function that takes some sort of handle (generally returned by an open function), a size, and a destination. There's not many ways to express that in a header.