med-mastodon.com is one of the many independent Mastodon servers you can use to participate in the fediverse.
Medical community on Mastodon

Administered by:

Server stats:

411
active users

#portability

0 posts0 participants0 posts today

Next #swad improvement: Make sure to #wipe #passwords from RAM directly after used. That's more of a #security precaution, because there *should* be no way how an attacker can access a running process' memory, but you never know which bugs surface 🙈.

Unexpectedly, that posed #portability issues. #C11 has #memset_s ... a pretty weird function, but suitable for wiping. It's there on #FreeBSD and on #OpenBSD. Not on #NetBSD though. But NetBSD offers the much saner #C23 function #memset_explicit. Looking at #Linux, there's neither. But there is the (non-standard!) #explicit_bzero 🤯 .. and with glibc, it requires _DEFAULT_SOURCE to be defined as soon as you compile with a C standard version given to the compiler. This function exists on some other systems as well, but there's confusion whether it should be declared in string.h or strings.h. 🤪

Here's the full set of compile-tests I'm now doing, only to find the best way to really erase memory:
github.com/Zirias/swad/blob/ma

And if none of these functions is found, swad uses the "hacky" way that most likely works as well: Access the normal memset function via a volatile pointer.

Simple Web Authentication Daemon. Contribute to Zirias/swad development by creating an account on GitHub.
GitHubswad/src/bin/swad/swad.mk at master · Zirias/swadSimple Web Authentication Daemon. Contribute to Zirias/swad development by creating an account on GitHub.

#introduction

Our motto is »#Linux #OpenSource News & #KnowHow for #Office Tasks.«

Our posts are for #solopreneurs, #trainers, #facilitators, and everybody else who tackles their office tasks using open source software under Linux.

While we appreciate #portability, we're strictly Linux-only. With respect to other operating systems: no bashing, no praise, no comparisons. We've already made our choice.

Formerly @social.tchncs.de, 2021-09-01 to 2024-06-15; then @mastodon.de until 2025-04-17

Continued thread

Big question, Why ATProtocol from #BlueSkySocial #PBC’s mouth instead of Mastodon and ActivityPub?:

“Why not use ActivityPub? #ActivityPub is a federated social networking technology popularized by #Mastodon.

Account #portability is a major reason why we chose to build a separate protocol. We consider portability to be crucial because it protects #users from sudden bans, server shutdowns, and policy disagreements. Our #solution for portability requires both signed data repositories and #DIDs, neither of which are easy to retrofit into ActivityPub. The migration #tools for ActivityPub are comparatively limited; they require the original server to provide a redirect and cannot migrate the user's previous data.

Another major reason is #scalability. #ActivityPub depends heavily on delivering messages between a wide network of small-to-medium sized nodes, which can cause individual #nodes to be flooded with traffic and generally struggles to provide global views of #activity.”

Short version, WE CANT CONTROL YOU.

<atproto.com/guides/faq>

AT ProtocolAtproto Ethos - AT ProtocolA deep dive into the philosophical and aesthetic principles underlying the design of AT Protocol.

Something I hadn’t considered about account #portability

It will simplify initial user onboarding. Interested in XYZ software? Cool. Sign up now on xyz.social. You can move your account in a week or two once you have a lay of the land…

New on blog: "Overview of cross-architecture #portability problems"

"""
Ideally, you'd want your program to work everywhere. Unfortunately, that's not that simple, even if you're using high-level "portable" languages such as #Python. In this blog post, I'd like to focus on some aspects of cross-architecture problems I've seen or heard about during my time in #Gentoo. Please note that I don't mean this to be a comprehensive list of problems — instead, I'm aiming for an interesting read.
"""

blogs.gentoo.org/mgorny/2024/0

Michał Górny · Overview of cross-architecture portability problemsIdeally, you’d want your program to work everywhere. Unfortunately, that’s not that simple, even if you’re using high-level “portable” languages such as Python. In thi…

Against all odds, #32bit #time_t is sometimes helpful.

For example, yesterday I've found an interesting bug in the #Moto library. It was passing to botocore a date that resembled ISO-8601, except it did not use any separators, e.g. "20240907201715" — while botocore expected either numeric UNIX timestamp, or a more typical date format. As a result, the joined digits were incorrectly interpreted as a UNIX timestamp, giving a date in the year 643378.

I suspect that if not for 32-bit time_t failing on timestamps this large, for a long time nobody would have noticed the dates being misinterpreted.

github.com/getmoto/moto/pull/8

GitHub[transfer] Fix date_imported to use a correct ISO 8601 date by mgorny · Pull Request #8095 · getmoto/motoBy mgorny

I'm slowly working on a new blog post. In the meantime, I've looked closer at the #y2k38 problem, and I'd like to share some observations with you.

It seems that the problem is mostly considered from the "overflow" in 32-bit programs angle — i.e. that we're suddenly going to move back in time from 2038 to 1901, and there will be some "funny" effects of that. However, in reality we're probably going to see different kinds of problems.

Firstly, `stat()` stops working on files whose timestamps can't be expressed in 32-bit `time_t` (the files can still be opened, though). It is quite counterintuitive; we usually assume that opening files is more restrictive. In the most absurd case, a program would be able to use a file only once. Once used, timestamps will get updated and `stat()` will start failing.

Secondly, `time()` returns an error. Many developers (myself included) doesn't even consider that `time()` can fail. Yet after 2038, every single call is going to return `-1`. What does that mean? A "well-written" software will just fail with an error. Other programs will just be "stuck" 1 second prior to midnight of December 31, 1969. And I believe that could be worse than returning an "overflowed" time counter, as every call will return the same value.

What could the consequences be? Clocks showing the same date and time all the time. Waiting loops based on wall clock time hanging immediately. Events never getting triggered. Clock-seeded pseudorandom number generators (`srand(time(NULL))`) always returning the same sequence of numbers.

This will affect all proprietary software on 32-bit platforms. If we wanted to play an old game, we're going to have quite a fight ahead of us. What's even worse, even faketime doesn't suffice here — it will adjust the time returned by `time()` calls, but not file timestamps.

Replied in thread

@viq By #open #saas, I mean software that's #opensource, but somebody else is managing it for your so that you don't have to. So you get all of the benefits of open source (e.g. #portability) as a service that you pay for.

I'm working on @backupscale right now, which is another example: securely #hosted #Restic respositories with #ransomware protection. You can set up your own backup system the same way, but it's tricky so that's why we're offering it as a service.

Ok, I have a #portability issue to fix in #Xmoji. As reported by @0x1eef, it does not build on #OpenBSD. Seems OpenBSD doesn't provide the "#POSIX interval timers":

github.com/Zirias/xmoji/issues

I guess that's possible to fix by writing code to multiplex the single timer offered by setitimer(). Of course, that's exactly what I wanted to avoid by using the POSIX interval timers. 😞

Is there any good alternative for OpenBSD? What are other projects doing? 🤔 @thomasadam, does #fvwm need timers and, if so, how is it solved there?

GitHubBuild error on OpenBSD: Missing timer_* functions · Issue #4 · Zirias/xmojiBy Zirias

:kitten: Kitten¹ update

Domain migrations are now live for your Kitten apps.

You can now point any custom domain to a deployed Kitten app. When the first Domain² instance goes live at small-web.org later this year, you’ll be able to deploy Kitten apps in ~10 seconds at <your domain>.small-web.org.

Then, if you want to, you can point any domain to it using any registrar.

¹ kitten.small-web.org
² codeberg.org/domain/app