Language Selection

English French German Italian Portuguese Spanish

Programming Leftovers

Filed under
Development

  • LLVM Clang 12 Adds Support For Vectorization Using Glibc's Vector Math Library - Phoronix

    Upstream LLVM/Clang now supports making use of the vector math library found within the GNU C Library.

    Clang 12 will allow for vectorization using libmvec via the -fvec-lib=libmvec compiler option.

  • Notes to self on frama-c | Richard WM Jones

    Frama-C is a giant modular system for writing formal proofs of C code. For months I’ve been on-and-off trying to see if we could use it to do useful proofs for any parts of the projects we write, like qemu, libvirt, libguestfs, nbdkit etc. I got side-tracked at first with this frama-c tutorial which is fine, but I got stuck trying to make the GUI work.

  • Why I Dislike Switch Statements

    Of course this is a contrived example, but readers will hopefully agree it's representative of the construct.

  • Setup - Full Stack Tracing Part 2 - KDAB

    If you’ve read the first article in this series, you’ll know what full stack tracing is and why you definitely want it. This time, we’ll show you how to setup full stack tracing on your Linux system. There are two steps – first get everything configured to capture a trace, and then view and interpret the trace.

    Setup full stack tracing with a bit of kernel help

    To capture a trace, we’ll be using LTTng (Linux tracing toolkit next generation) in our examples. LTTng captures tracepoints with minimal overhead. This is something you definitely want, as too much extra CPU introduced by tracing can change the system’s behavior, even causing it to fail unpredictably. Another factor in LTTng’s favor is that it’s well supported by the open source community.

    LTTng was designed to record kernel level events. However, you’ll also want to use its user space tracepoints to capture application level events. That will give you consistent visibility, regardless of where execution moves throughout the software stack. User space tracepoints is critical to the setup of full stack tracing as it lets you integrate application, Qt, and kernel tracepoints together in a single view.

  • Mariuz's Blog: Firebird 3.0.7 sub-release is available

    Firebird Project is happy to announce general availability of Firebird 3.0.7 — the latest point release in the Firebird 3.0 series.This sub-release offers many bug fixes and also adds a few improvements, please refer to the Release Notes for the full list of changes.Binary kits for Windows, Linux, Mac OS and Android platforms are immediately available for download.All users of Firebird v3.0.6 are

  • Use of self or $this in PHP – Linux Hint

    In PHP object-oriented programming, we have the self keyword and $this variable that is used for different purposes. The self keyword represents current and static members of the class. While the $this variable represents current object and non-static members of the class. More about these are discussed in this article.

  • 4 C programming courses for every skill level

    Even with so many other system-level languages to choose from, C remains the popular choice. Many key projects—such as the Linux kernel and the Python runtime—still use C, and they will likely do so indefinitely. For some fields of computing, like embedded programming, C is a must.
    And there has never been a better time to learn C. Resources abound, from books to guided courses. Here we’ll look at four major online course offerings for learning C programming, each aimed at different levels of user and offering different approaches. For instance, one combines learning C with learning Linux, while another teaches C and C++ together.

  • rand() Function in C Language – Linux Hint

    In the C language, the rand() function is used for Pseudo Number Generator(PRNG). The random numbers generated by the rand() function are not truly random. It is a sequence that repeats periodically, but the period is so large that we can ignore it. The rand() function works by remembering a seed value that is used to compute the next random number and the next new seed. In this article, we are going to discuss in detail how random numbers can be generated using the rand() function. So, let’s get started!

  • A bug by any other name – Open Source Security

    This tweet from Jim Manico really has me thinking about why we like to consider security bugs special. There are a lot of tools on the market today to scan your github repos, containers, operating systems, web pages … pick something, for security vulnerabilities. I’ve written a very very long series about these scanners and why they’re generally terrible today but will get better, but only if we demand it. I’m now wondering why we want to consider security special. Why do we have an entire industry focused just on security bugs?

    Let’s change the conversation a little bit. Rather than focus on security bugs, let’s ask the question: Which bugs in a given project should we care about?

    There are of course bugs an attacker could use to compromise your system. There are also bugs that could result in data loss. Or bugs that could bring everything down. What about a bug that uses 10% more CPU? Every piece of software has bugs. All bugs are equal, but some bugs are more equal than others.

    We are at a time in software history where we have decided security bugs are more equal than other bugs. This has created entire industries around scanning just for security problems. Unfortunately the end goal isn’t always to fix problems, the goal is often to find problems, so problems are found (a LOT of problems). I think this is a pretty typical case of perverse incentives. You will always find what you measure. The pendulum will swing back in time, maybe we can help it swing a little faster.

  • Why you should use ppport.h in your XS code modules | Karl Williamson [blogs.perl.org]
    
    
    
    
    The answer comes down to two words: Security and Reliability.
    As a bonus, less work on your part.
    
    
    
    
    It's surprising to find that there are modules on CPAN that aren't using
    ppport.h that could stand to benefit from it.
    
    
    
    
    ppport.h is a file that is part of the Devel::PPPort distribution. As you
    know, Perl has evolved over the years, adding new features, and new API for XS
    writers to use. Some of that is to support the new features, and some to make
    tasks easier to accomplish. ppport.h implements portions of the API that
    people have found desirable to have when a module gets installed in a Perl that
    was released before that API element was created. You can write your module
    using the latest API, and have it automatically work on old Perls, simply by
    #including ppport.h in your XS code. ppport.h generally provides support for
    an API element as is reasonably practicable, with many supported to 5.03007.
    
    
    
    
    Importantly, but often overlooked, ppport.h can override buggy early Perl
    implementations of an API element. By using it, you get fixed, proper
    behavior. That sure beats trying to reproduce a reported problem in your
    module that only happens in some ancient Perl, and then try to come up with a
    workaround in an area you aren't familiar with.
    
    
    
    
    This is especially important if your XS code interacts with Unicode in any way.
    Early versions of the Unicode standard and early Perls allowed things that we
    now know are potential attack vectors. Right now, someone could be using your
    module to hack into systems, so you are actually being negligent if you don't
    use ppport.h.
    
    
    
    
    If your XS code has preprocessor #if statements that check for the existence of
    functions, macros, etc, that are only in later perls, you can generally avoid
    that by simply using ppport.h
    

More in Tux Machines

Arcan 0.6 – ‘M’ – Start Networking

This time around, the changes are big enough across the board that the sub-projects will get individual posts instead of being clumped together, and that will become a recurring theme as the progress cadence becomes less and less interlocked. We also have a sister blog at www.divergent-desktop.org that will slowly cover higher level design philosophy, rants and reasoning behind some of what is being done here. A few observant ones have pieced together the puzzle — but most have not. This release is a thematic shift from low level graphics plumbing to the network transparency related code. We will still make and accept patches, changes and features to the lower video layers, of course — ‘Moby Blit’ is still out there — but focus will be elsewhere. Hopefully this will be one of the last time these massive releases make sense, and we can tick on a (bi-)monthly basis for a while. Read more Also: Arcan 0.6 Display Server Adds Network Transparency, XWayland Client Isolation - Phoronix

Games: HIVESWAP: ACT 2, Gaming Rack Design and Construction, Parkitect and DualSense

  • Amusing adventure game HIVESWAP: ACT 2 is out now | GamingOnLinux

    With no prior knowledge of the Homestuck web comic series needed, the second part of the video game adventure is out now with HIVESWAP: ACT 2. "The artistry and humor of the golden age of adventure games meet hand-drawn 2D animation in this love letter to the point-and-click classics. Bizarre, beautifully illustrated alien landscapes and colorful characters make Alternia a joy to explore."

  • Gaming Rack Design and Construction – CubicleNate's Techpad

    I have collected a number of gaming systems throughout my life and there is little point in having them if they sit in a box or using them takes an annoying level of set-up time, making it fun prohibitive. I was then inspired by Perifractic Retro Recipes video where the computer museum has everything so nicely laid out. I looked at my mess and decided that I had to do something about it because my arrangement just isn’t presentable.

  • Theme park building game Parkitect is getting 8-player online multiplayer | GamingOnLinux

    With the second year release anniversary of the great theme park building game Parkitect coming up, Texel Raptor had a quite a huge surprise ready. Releasing on December 8 is the free cooperative online multiplayer mode. This is absolutely crazy considering the type of game it is, and one I can only imagine right now being ridiculously fun to play online with others. Eight people in total too, that's a lot of building that can get done. Texel Raptor mentioned you can see what everyone else is doing, and it's going to have a full online lobby system it seems too.

  • The DualSense Is Making Even More Sense - Boiling Steam

    As reported earlier this month, the DualSense controller from Sony was already working great out of the box on Linux. However, it wasn’t long after that that Valve added support for the more advanced features of the device. Starting November 12, Valve updated the controller to have basic input functionality with their beta Steam client:

Devices/Embedded and Open Hardware Leftovers

  • Embedded Linux for Teams | Ubuntu

    Developer-friendly embedded Linux should just deliver apps to devices. Satellite companies don’t build their own rockets. They focus on building satellites and lease a rocket to deliver it as a payload. Many developer teams also have to “build the rocket” to deliver embedded applications. Developers would be more successful, if Linux vendors made it their job to provide and maintain the scaffold that teams need to deliver embedded apps. In such a world, teams would focus on creating apps. The resulting app-centric development cycle could boil down to booting, building and deploying. Building on top of vendor-provided scaffolds, developers would create a bootable image for their target boards. Teams would then develop apps. After testing, they will build a system image that delivers all these apps. Then burn, deploy, done.

  • Personal Raspberry Pi music streamer
  • Run Pi-hole as a container with Podman on openSUSE - SUSE Communities

    There is arguably no better way to protect devices on your local network from unwanted content than Pi-hole. Add a machine running Pi-hole to your network, and it will quietly scrub all incoming traffic from pesky stuff like ads and trackers in the background. As the name suggests, Pi-hole was initially designed to run on a Raspberry Pi. But if you already have a machine running openSUSE on your network, you can deploy a Pi-hole container on it instead. And to make things a bit more interesting, you can use Podman instead of Docker for that. Installing Podman on openSUSE 15.2 is a matter of running the sudo zypper install podman command. A Pi-hole container needs the 80 and 53 ports, so make sure that these ports are available on your machine.

  • MorphESP 240 ESP32-S2 board integrates a 1.3-inch color display (Crowdfunding)

    We’ve already seen ESP32 platforms with a color display such as M5Stack, but MorphESP 240 is kind of cute with a 1.3-inch color display, features the more recent ESP32-S2 WiFi processor, and supports battery power & charging.

  • Rockchip RK3588 specifications revealed – 8K video, 6 TOPS NPU, PCIe 3.0, up to 32GB RAM

    Rockchip RK3588 is one of the most anticipated processors for the year on this side of the Internet with the octa-core processor features four Cortex-A76 cores, four Cortex-A55 cores, an NPU, and 8K video decoding support. The roadmap shows an expected launch date in Q3/Q4 2020, but sadly the release date will be pushed back in the future. Having said that, the Rockchip Developer Conference (RKDC) is now taking place, and the company has put up a poster that reveals a bit more about the processor.

  • Arduino Blog » Arduino psychic ‘magically’ guesses random numbers

    Standard Arduino Nanos can be used for many purposes, but they do not feature wireless capabilities. Somehow, though, Hari Wiguna’s Arduino psychic system is apparently able to pass data between two of them. No external communication hardware is implemented, yet one Nano is able to recognize when a random number chosen on the other Nano setup is input via an attached keypad. As noted by Wiguna, it’s easier shown than explained, and you can see this techno-magic trick in action in the first clip. How things work is revealed in the second video, but can you guess how it’s done?

Security, Digital Restrictions (DRM), and Proprietary Problems

  • Best forensic and pentesting Linux distros of 2020

    20.04 LTS and uses the Xfce desktop, and is available as a single ISO only for 64-bit machines. In addition to the regular boot options, the distro’s boot menu also offers the option to boot into a forensics mode where it doesn’t mount the disks on the computer. BackBox includes some of the most common security and analysis tools. The project aims for a wide spread of goals, ranging from network analysis, stress tests, sniffing, vulnerability assessment, computer forensic analysis, exploitation, privilege escalation, and more. All the pentesting tools are neatly organized in the Auditing menu under relevant categories. These are broadly divided into three sections. The first has tools to help you gather information about the environment, assess vulnerabilities of web tools, and more. The second has tools to help you reverse-engineer programs and social-engineer people. The third has tools for all kinds of analysis. BackBox has further customized its application menu to display tooltips with a brief description of each bundled tool, which will be really helpful for new users who aren’t familiar with the tools. As an added bonus, the distro also ships with Tor and a script that will route all Internet bound traffic from the distro via the Tor network.

  • Thanksgiving security updates

    Security updates have been issued by openSUSE (blueman, chromium, firefox, LibVNCServer, postgresql10, postgresql12, thunderbird, and xen), Slackware (bind), SUSE (bluez, kernel, LibVNCServer, thunderbird, and ucode-intel), and Ubuntu (mutt, poppler, thunderbird, and webkit2gtk).

  • Drupal core - Critical - Arbitrary PHP code execution - SA-CORE-2020-013

    AC:Complex/A:User/CI:All/II:All/E:Exploit/TD:UncommonVulnerability: Arbitrary PHP code executionCVE IDs: CVE-2020-28949CVE-2020-28948Description: The Drupal project uses the PEAR Archive_Tar library. The PEAR Archive_Tar library has released a security update that impacts Drupal. For more information please see: CVE-2020-28948 CVE-2020-28949 Multiple vulnerabilities are possible if Drupal is configured to allow .tar, .tar.gz, .bz2 or .tlz file uploads and processes them. To mitigate this issue, prevent untrusted users from uploading .tar, .tar.gz, .bz2 or .tlz files. This is a different issue than SA-CORE-2019-12, similar configuration changes may mitigate the problem until you are able to patch.

  • Financial software firm cites security, control as reasons for moving from email to Slack [Ed: Unbelievable stupidity; Slack is illegal mass surveillance and it’s centralised proprietary software (whereas E-mail can be encrypted, e2e)]

    ASX-listed financial software firm Iress is moving away from email to Slack for communications and its chief technology officer, Andrew Todd, says this is because the app offers improved security and control.

  • Introducing another free CA as an alternative to Let's Encrypt

    Let's Encrypt is an amazing organisation doing an amazing thing by providing certificates at scale, for free. The problem though was that they were the only such organisation for a long time, but I'm glad to say that the ecosystem is changing.

  • Denuvo's Anti-Piracy Protection Probably Makes Sense For Big-Selling AAA Titles

    A hacking team believed to have obtained data from gaming giant Ubisoft has published documents that claim to reveal the costs of implementing Denuvo's anti-piracy protection. While the service doesn't come cheap, the figures suggest that for a big company putting out big titles with the potential for plenty of sales, the anti-tamper technology may represent value for money.

  • Disappointing: Netflix Decides To Settle With Chooseco LLC Over 'Bandersnatch' Lawsuit

    Well, it's been quite a stupid and frustrating run in the trademark lawsuit between Netflix and Chooseco LLC, the folks behind Choose Your Own Adventure books from our youth. At issue was the Black Mirror production Bandersnatch, in which the viewer takes part in an interactive film where they help decide the outcome. The main character is creating a book he refers to as a "choose your own adventure" book. Chooseco also complained that the dark nature of the film would make the public think less of CYOA books as a result. Netflix fought back hard, arguing for a dismissal on First Amendment grounds, since the film is a work of art and the limited use or reference to CYOA books was an important, though small, part of that art. The court decided that any such argument was better made at trial and allowed this madness to proceed, leading Netflix to petition for the cancellation of Chooseco's trademark entirely. This story all seemed to be speeding towards an appropriately impactful conclusion.

  • TPM circumvention and website blocking orders: An EU perspective

    Website blocking orders in IP cases (mostly, though not solely, in relation to copyright-infringing websites) are routinely granted in several jurisdictions, whether in Europe or third countries. The availability of such relief has been established in case law, administrative frameworks and academic studies alike. The Court of Justice of the European Union ('CJEU') expressly acknowledged the compatibility of such a remedy with EU law in its 2014 decision in UPC Telekabel. Also the European Court of Human Rights recently found that, although it is necessary that this particular remedy is available within a balanced and carefully drafted legislative framework which contains a robust and articulated set of safeguards against abuse, website blocking orders are not per se contrary to the provision in Article 10 ECHR. Over time, courts and other authorities (including administrative authorities in certain EU Member States) have dealt with applications which have: been based on different legal grounds; been aimed at protecting different types of rights; and resulted in different types of orders against internet service providers ('ISPs'). An interesting recent development concerns website blocking orders in relation to websites that market and sell devices and software aimed at circumventing technological protection measures (‘TPMs’). TPMs offer rights holders an ancillary right of protection and are deployed to protect against infringement of copyright in works that subsist in multimedia content such as video games. TPMs are a cornerstone in copyright protection in the digital age where large-scale copying and dissemination of copyright-protected content is so prevalent. [...] In light of the foregoing, copyright owners appear entitled to seek injunctions against intermediaries to also block access to websites dealing with TPM-circumventing devices. The legal basis for that can also be, subject to satisfying all the other requirements under EU and national law, the domestic provision implementing Article 8(3) of the InfoSoc Directive. All in all, it appears likely that we will see more blocking orders in the future, including orders – issued by courts and competent authorities around Europe – targeting websites that provide TPM-circumventing devices. This is an unsurprising and natural evolution of website blocking jurisprudence. It also serves to show the very flexibility of this type of remedy and, matched inter alia with the loose notion of ‘intermediary’, its inherently broad availability.

  • Prolonged AWS outage takes down a big chunk of the internet

    Many apps, services, and websites have posted on Twitter about how the AWS outage is affecting them, including 1Password, Acorns, Adobe Spark, Anchor, Autodesk, Capital Gazette, Coinbase, DataCamp, Getaround, Glassdoor, Flickr, iRobot, The Philadelphia Inquirer, Pocket, RadioLab, Roku, RSS Podcasting, Tampa Bay Times, Vonage, The Washington Post, and WNYC. Downdetector.com has also shown spikes in user reports of problems with many Amazon services throughout the day.