r/kernel • • Oct 09 '26

Non-kernel "Platform" APIs on Linux

https://soc.me/interfaces/non-kernel-platform-apis
3 Upvotes

25 comments sorted by

View all comments

Show parent comment

2

u/yrro Oct 12 '26

Kernel should be as simple as possible but no simpler. Dates and times and (most) unicode data is not it's concern.

If we could wave a magic want to enforce UTF-8 strings at all boundaries, with whatever is generally regarded as the best form of normalisation, could be an improvement, but it's too late for that now.

Look at the crypto API, after several critical vulnerabilities we've come around to agree that it should not be in the kernel at all.

Same for try handling, all that complexity just results in bugs, better hand it off to user space where it will do less harm when it goes wrong...

1

u/simon_o Oct 12 '26

What's the difference to the time-related functions that the kernel already provides in the vDSO?

1

u/yrro Oct 12 '26

I dunno, do they deal with dates/time zones/leap seconds or just seconds since 1970?

1

u/simon_o Oct 12 '26

Then it might be educational for you to look that up, compare them to the C wrappers and think about the reasons we ended up that way.

1

u/yrro Oct 12 '26

Or you could explain your point because I'm not following you