Robert’s blog

  • New year's resolution 2023

    During the past few weeks, I’ve been building this blog from the ground up, using Hugo, and the knowledge I have acquired since I started writing software, to help me keep track of the goals I’ve set for myself for this year. These are:

    • Prepare and sit for the C1 Advanced (Cambridge English: Advanced) Exam.
    • Save as much money as I can for the B.Sc. in CS offered by the University of London.
    • Do some exercise at least 3 times a week.
    • Take a cold shower every day for at least 30 days.
    • Reduce caffeine consumption.
    • Read one chapter from a book each day.
    • Sleep 8 hours a day

    I’ll be posting frequently on the progress I’m making towards earning that degree I pursuit.

  • Disabling Hyper-threading

    Overview

    If your computer contains an Intel(R) processor implementing out-of-order execution (which is effectively every processor Intel manufactured since 1995, with the exception of Intel(R) Itanium and Intel(R) Atom before 2013), chances are, your system can be exploited using Microarchitectural Data Sampling (MDS).

    Mitigating vulnerabilities like Foreshadow/L1TF, Fallout, and RIDL, disabling SMT [1] (commonly known as hyper-threading [2]) on Intel CPUs can be a good security measure to take into consideration.

    Having said that, there will be a reduction in your system’s performance in exchange for the added security. It is highly advisable that the following mitigation is only reviewed/applied for the SMT specific concerns.

    What is the problem with SMT and MDS?

    Intel’s proprietary Simultaneous Multithreading (SMT) allows multiple execution threads to be executed on a single physical CPU core.

    When buffers are shared between hyper-threads then, SMT might lead to possible system exploitation.

    Citing from a document published on kernel.org:

    “When performing store, load, L1 refill operations, processors write data into temporary microarchitectural structures (buffers). The data in the buffer can be forwarded to load operations as an optimization.

    Under certain conditions, usually a fault/assist caused by a load operation, data unrelated to the load memory address can be speculatively forwarded from the buffers. Because the load operation causes a fault or assist and its result will be discarded, the forwarded data will not cause incorrect program execution or state changes. But a malicious operation may be able to forward this speculative data to a disclosure gadget which allows in turn to infer the value via a cache side channel attack.

    Because the buffers are potentially shared between Hyper-Threads cross Hyper-Thread attacks are possible.”

    Mitigation mechanism

    Event though, the Linux kernel detects the affected CPUs and the presence of the required microcode, in which case the kernel enables some mitigation mechanisms by default [3], completely disabling hyper-threading is the compete solution as regarded by the OpenBSD project in 2018 [4]

    To check if your system is affected, run:

    $ grep . -r /sys/devices/system/cpu/vulnerabilities/
    

    If the output contains SMT vulnerable then you may proceed by using the following kernel parameters:

    l1tf=full,force mds=full,nosmt mitigations=auto,nosmt nosmt=force
    

    To do this edit your /etc/default/grub file and append the given kernel options between the quotes in the GRUB_CMDLINE_LINUX_DEFAULT line.

    The resulting GRUB_CMDLINE_LINUX_DEFAULT line should look something like this:

    GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 l1tf=full,force mds=full,nosmt mitigations=auto,nosmt nosmt=force"
    

    And then automatically re-generate the grub.cfg file with:

    # grub-mkconfig -o /boot/grub/grub.cfg
    

    Changes will take effect upon reboot. After rebooting your system, running the grep command stated above should now contain SMT disabled.

  • On the derivation of a mathematical model representative of the 3-bit counter register (es_AR)

    The information contained in these documents was developed for academic purposes for the K1001 Computer Architecture course of UTN FRBA (National Technological University Buenos Aires Regional Faculty) as taught in its annual format in 2020 by Engineer Gonzalo Vilanova.

    Read Document

    View Demonstration

  • On Social Media and On Becoming Platform Independent

    Who remembers how the internet was in the 00’s?

    There used to be a time where the internet was different: most websites were sort of equal, in the sense that, there was no data mining, no terms of service, no pop-ups, no unethical JavaScripts running in the background, no trackers, no third-party statistics, no constant monitoring. Why would a website want to know my location? Why should I need to review some terms and conditions before reading an article published on the internet? How are you improving my experience by using cookies? “Just sign-in to continue reading/viewing!”, “Join our newsletter to get all our top stories in your inbox!”.

    This is the story about why I decided, on the first quarter of 2019, that I would say no to all of it, and try to become day after day a little more platform independent and build my own website.

    Not to anyone’s surprise, a good day I realized how much time I was spending staring at my mobile phone’s screen browsing through social media and/or just the web. I became aware of the humongous amount of time I was wasting using what we call the internet… which practically speaking (for most people) consists of the handful of websites and services that we all know and use.

    With that in mind, I want to state that the internet is not just what we see on a daily basis. The Internet is not just ****book, I****gram, Yo****e, **ddit and ***gle, etc. Those sites (often called apps or services) are part of the internet, yes, but the concept comprehends much more than that. It seems that the definition of it turned to be this group of social media sites and web services that, to use them, all require people to sell their privacy and freedom, their thoughts and ideas, their rights and goodwill, their free will.

    Social media is to be described as this omnipresent entity that is constantly priming our thought process with misleading headers/titles, advertisement, misinformation, stereotypes, and bombarding our brain with irrelevant and invasive “junk-food information” that doesn’t allow us to have clear thoughts, to think properly, to think. We are (constantly) being assaulted by psychological tricks that these “service providers” are playing on us all, and that we passively absorb like plants absorb the sunlight [1]. Frankly we’ve become as devoted to these applications/websites /services as we are devoted to religion.

    Not only does our thought process get skewed, social media also targets the weaknesses of our personality with content that makes us think we are spending our time wisely when we are not. They feed us with discomfort, with misery, they make us think we need to buy into a lifestyle, into a brand, into trends to fit into a social group (sometimes even our own social circle) tagging ourselves like products in a catalog. These platforms make us prisoners of their “convenience”, they make us develop an unbelievable, and always increasing, amount of dependency for them while also making us feel wretched and alike. We are regressing toward the mean, we are becoming standardized.

    To put an example on how imprisoned we are, let me ask you: How many times did you check your social media feeds on the last hour? How many hours have you spent today scrolling through your feeds? How long would it take for a friend of yours to respond to that text message you just sent him?

    As radical as it might sound, there is evidence (see [2], [3] and [4]) that, to accomplish this objective, classical conditioning has been employed regarding how our brain reacts to likes, shares and follows; yes it’s just like what Pavlov did with the dogs, the food, and the bells. And what is worst, studies have been held in order to optimize and improve their effectiveness over time.

    Citing from a BBC piece of news titled “Social media apps are ‘deliberately’ addictive to users” [5]:

    A former ****book employee made a related point.

    “Social media is very similar to a slot machine” , said Sandy Parakilas, who tried to stop using the service after he left the company in 2012.

    “It literally felt like I was quitting cigarettes.”

    During his year and five months at ****book, he said, others had also recognized this risk.

    “There was definitely an awareness of the fact that the product was habit-forming and addictive,” he said.

    “You have a business model designed to engage you and get you to basically suck as much time out of your life as possible and then selling that attention to advertisers.”

    From the little dopamine shot we receive when we get a like, to the anxiety and insatiable need for more content that these services generate unconsciously on us, with the promise of instant gratification available at the click of a button, setting oneself free is a rather difficult decision to make, and one even harder to accomplish.

    It’s not a lack of self-control nor does it mean we don’t have a strong enough will. Social media has become so deeply integrated into our lifestyle that it’s like one will disappear from the world if one dares to close/delete one’s accounts. After all, all our friends and family are on these sites and therefore it seems unnatural not to be on them, doesn’t it?

    The span of it does not only imply classical conditioning but a detriment in our cognitive system, in our ability to focus, to pay attention. All of those, endless and ever-changing scrolling feeds with frequent shifts in information structure, lead up to something called the pinball effect.

    Citing from paragraphs 7 and 8 from an article published on ScienceNordic titled “Why looking at social media at work disrupts your concentration” [6]:

    “The pinball effect … is exactly the psychological repercussions, which stem from frequent shifts in information structure. In other words, the attempt to divide attention to different sets or chambers of information simultaneously….”

    …“The pinball should illustrate the awareness which is “thrown” or “dashed” by enabling technology (“the pinball machine”) towards various information clusters that each demand to be made sense of. Concentration, as an item, is bouncing unsystematically between different sets of information. On their own, these sets or spaces are harmless, but in pairing or juxtaposing within the same conscious agent they result in cognitive diffusion which leads to disorientation, confusion and, most literally, de-localisation.”

    We are flagrantly boycotting ourselves. The never ending amount of content instantly available to us is destroying our ability to stay focused in one single task. That is so true that I would really be impressed if someone makes it to the end of this article without checking their phone, getting distracted by a notification or message, or carried away by some other stimuli.

    In order to conclude, I’d like to invite you (the reader) to imagine then, having to rely on these platforms’ consent for any form of self- expression. I would also like to encourage you to join me on my journey and try to become more platform independent and less reliant on social media, if possible.

    This little project of mine “https://savinelli.com.ar” aims to be my humble try to overcome this hazard, to become a bit more independent and less attached to these massive social media providers that dominate the internet and control its freedom of speech. It also is an effort to heal myself from all the toxicity and harm that comes from using them.