105 points · by mikece · 3y ago · 169 comments
My take away: jeffxu@google.com has to go back to rethink the whole thing.
Good idea, execution, not so, yet.
It is your job to do this. You seem to have taken the attitude that you will give the Chrome team exactly what they asked for instead of trying to understand their requirements and give them what they need. mseal() is a clone of mimmutable(2), but with an extremely over-complicated API based upon dubious arguments.Sucks to be on the receiving end, but in the end its better for everyone. Wish our developers could work like this.
People have become so fragile in the last decade or so. It's pathetic.
> Christ. That's literally the remap_file_pages() system call definition. No way in hell does "ON_BEHALF_OF_KERNEL" make any sense in this context.
This could be
> That's the remap_file_pages() system call definition. "ON_BEHALF_OF_KERNEL" does not make any sense in this context.
If someone I didn't know or was unfamiliar with gave me a review like this I'd frown, but since Torvalds is known for this then I'd shrug it off probably. It's a good, thorough review though.
Anyway there is no possible argument that the meanness of those replies is productive; it would clearly be more useful and direct to omit it and speak clearly about the problems instead of implying the person is an idiot for not understanding their mistakes.
Moreover, why are you "surprised"? Do you live in a some toxic alternate reality where people talk like that regularly? For most people these messages are the only time they'll ever see someone being that mean in a professional context in their lives.
This is particularly funny because I remember that several years ago, he publicly apologized for being abrasive and promised to get better... but old habits die hard.
He has every right to run the project as he sees fit, but then, people here have every right to be mildly cranky about that too.
Would you speak to your teammates this way? Your child?
Sorry my message must've hit a traumatic chord on your brain, but I didn't say I was offended, just that it was aggressive.
Like watching wwa show, it's aggressive, but entertaining.
Please try to not project your thinking too much next time you read someone else's comment next time.
There is no need for such language. Other commenter here shown the whole "review" could be just one or two sentences.
That to me shows someone has not been going to therapy.
Because that's what you're seeing here.
…was really all it needed. The wall of text is more offensive than the insulting tone.
But it's also not Torvald's job to tutor here or be a mentor. He has limited time in the day. And the company doing the proposal here is Google. They probably should have come in with a more-better-finished product.
The consequences to design errors in kernel syscalls are rather intense.
That invites pointless discussion when most of the points in Linus review are a clear "hell no". Quite sure the last thing someone in Linus position wants is never ending discussions of already rejected ideas, it only wastes time on both sides.
With a bit of practice it's possible to give the same feedback, but in a way that will encourage and teach, instead of what this was.
Nobody emails the CEO of their org with a terrible idea due to complete lack of context, and then gets support from everyone saying "I can't believe he didn't take the time out of his day to nicely explain why you were wrong here!"
I used to think we should strive to make everybody grow. But the more I've been confronted with hard challenges and limited resources, the more I've had to filter out.
Now I lean toward "filter first, teach to what remains, repeat".
And yes, being tactless is a very good filter, even give the obvious side effects.
Screaming loudly instead of addressing your own failure is of course a choice, but it's not a great one.
This patch is coming from google, are you suggesting that google just be added to some black list they have?
Is there some forum in which he could/should have vetted the patch before making this submission?
(Sincere question. I'm not very familiar with submitting kernel patches.)
Sometimes people and corporations with enough clout manage to slip by the normal processes and this is the result.
I would be fine being the recipient of this. It's simple, direct, clear, and give you a good sense of how bad things are and the priority of it.
If you fuck up, you fuck up.
I feel utterly disgusted by the opposite however. The "I like it but I don't love it" and other BS.
Feels like hypocrisy and frankly, behavior from people that don't have enough serious problems in their life to assess what is important and what is not.
Well, good thing it's not a dichotomy!
It's possible this has been filtering exactly the right people he wants or needs for the job given its constraints and objectives.
its a good attempt at something, even if it didn't end up being a good idea
better to learn from mistakes than to not learn at all
Mseal alone doesn't seem enough for that. There are plenty of other API's that would also need locking down - and many future API's too. This looks like a big maintenance burden forever into the future.
Perhaps a better model is seccomp BPF. Allow a process to install a seccomp BPF filter on itself. The filter could prevent calling mmap, mprotect, mremap and friends. The filter could also prevent the modification of the installed filter.
That seems far more general and far more powerful and requires less kernel code with only a handful of uses.
https://man.openbsd.org/mimmutable
The OpenBSD kernel does automatic immutable for certain regions (e.g: stack, program text, bss), as well as from ld.so.
Ironically, mimmutable(2) is already used in the OpenBSD chromium port for v8.
https://marc.info/?l=openbsd-ports-cvs&m=168854379207826&w=2
There is absolutely no excuse for Google to propose something different for no reason.
In general the code review process can work at Google for most projects because the essential design questions are already set in stone. You use protobuf/gRPC, follow the patterns that other services have mandated. There is usually a "recipe."
And within Google design problems are perhaps sometimes addressed during PRD/design-doc phase, in a big Google Doc. But not always.
But I can see how this could completely fall over when these things go out into the external world.
That and the need to make everything into small microlevel reviews that get nitpicked for days means that large wholesale architecture simplifications and refactors just don't really happen very often. Few projects have people with that kind of authority.
The Torvalds review is pretty savage.
Also internal politics sometimes impacts technical decisions ("No, you can't add an API to our teams codebase - we're underresourced and don't have time to review your changes till Q4 2025").
End result: API's are added in silly places.
There are some APIs that are real stinkers (and quite a few of them obviously targeted at use of a single Google app and noone cared to actually make them good APIs).
Several of them are really well thought out and designed to the point that iOS devs were envious for years.
Gain some, lose some. It's not the best API surface, but it aint GTK or Win32 either.
The innards are spaghetti.
[0] https://developer.android.com/reference/android/app/Service#... [1] Control Coupling - https://en.wikipedia.org/wiki/Coupling_%28computer_programmi...
It's very common for the debugger to forcibly make a read-only page read-write.
Maybe it wouldn't, but I definitely would hope for some mention of ptrace.
- - - -
Edit to add: I've read the thing now and it seems mild and reasonable to me.
What would enterprise look like if Linus was polite and held everybody's hand who wanted to push code into the kernel? Would Linux be as far along as it is? Would it be the same quality?
Do you actually think rudeness directly correlates to code quality? Like, the more of a dick you are, the better your code gets? What kind of sadistic computer science class were you subjected to? Did you watch the movie "whiplash" and take it as a truism?
Politeness and hand-holding are not the same thing. You can be direct and reject patches while also being polite.
> What would it look like if everyone's code were "good enough"?
Nobody is suggesting this...