Skip to main content

Search

Items tagged with: kernel


 

Kernellog



 

 
#Linux #kernel 5.0-rc7 is out lore.kernel.org/lkml/CAHk-=wgv… "[…] A nice and calm week, with statistics looking normal. […] Nothing particularly odd stands out, and everything is pretty small. Just the way I like it. Shortlog appended, Linus […]"


 

ftrace and calling conventions


While linux workstations and servers may be set up with fancy tracing tools (ebpf etc) so far the embedded devices I work on do not have such luxuries. I'm grateful just to have ftrace, given the early pushback from Linus against such features, but it does have a steep learning curve. For example, in order to display function arguments in your traces, you need to know the calling convention for your architecture.

This little table of 32-bit/64-bit x86 and 32-bit arm calling conventions can be really handy when trying to troubleshoot something that works on x86 and bugs out on arm. You can find information on arm64 "aarch64" calling convention at wikipedia (albeit less prettily formatted than the aforementioned table with arm32).

Suppose you are tracing some kernel code and want to show arguments from get_user_pages_fast() as well as its return code.

Example script (x86_64)
cd /sys/kernel/debug/tracing 
echo 0 > events/kprobes/enable 
echo 'p:user_pages_probe get_user_pages_fast uaddr=%di:x32 nr_pages=%si:s32 write=%dx:x32' > kprobe_events 
echo 'r:user_pages_rprobe get_user_pages_fast return=$retval:s32' >> kprobe_events 
echo 1 > events/kprobes/enable

To run this same example on arm, change the register names in the first probe to follow the arm calling convention
echo 'p:user_pages_probe get_user_pages_fast uaddr=%r0:x32 nr_pages=%r1:s32 write=%r2:x32' > kprobe_events

#linux #embedded #kernel #programming #tracing

 

ftrace overview


Not the most recent article, but still a friendly intro that includes dynamic kprobes and plenty of examples
https://alex.dzyoba.com/blog/ftrace/

#linux #kernel #tracing

 
io_uring, the next gen #AIO interface from @axboe, hit linux-next and thus in on track to get merged into #Linux #kernel 5.1. \o/
For more details about it see see lore.kernel.org/linux-block/20… and the @lwnnet article "Ringing in a new asynchronous I/O API" lwn.net/Articles/77670…


 
#Linux #kernel 5.0-rc6 is out lore.kernel.org/lkml/CAHk-=whu…
"[…] Things are fairly normal, although rc6 is a bit bigger than I would have liked to see. […] nothing in there looks all that odd or scary. I think we're still solidly on track for a normal release. Linus"

Image/Photo

 
Fun fact (no judgement, JFYI TCIMC): #OpenSuse #Tumbleweed, a rolling release distro, got the #Linux #kernel 4.20 about ten days ago. #Fedora 29, a more traditionally updated distro, got this kernel version a week later as regular update.

 
That's unusual: The #Linux stable and longterm #kernel 4.20.2, 4.19.5 and 4.14.93 (released an hour ago) mark devm_memremap_pages() as well as hmm_devmem_{add, add_resource}() as EXPORT_SYMBOL_GPL. Thus proprietary drivers won't be able to use those functions anymore.

To clarify the "[…] won't be able to use […]" bit here's a quote from https://www.kernel.org/doc/html/latest/kernel-hacking/hacking.html?highlight=export_symbol_gpl#export-symbol-gpl: "[…] symbols exported by EXPORT_SYMBOL_GPL() can only be seen by modules with a MODULE_LICENSE() that specifies a GPL compatible license. […]".

For completeness: Last #LKML discussion about these patches before they got merged to mainline before #Linux version 5.0-rc1 recently: https://lore.kernel.org/lkml/154275557457.76910.16923571232582744134.stgit@dwillia2-desk3.amr.corp.intel.com/t/#mf921de6121863f733a6b12e348f4013a56e53233 Commits for 4.19.y:
* https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-4.19.y&id=0f1a62e0737a9a1c09d4cc86162724656db9eb70
* https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-4.19.y&id=b30ea244cf3e1f086da008fe6fa0278154f49244





 
Virtio_Blk finally supports discard and write zeroes in the #Linux mainline #kernel (thus it will be in 4.21, which might be called 5.0 instead). That will make it easier to shrink VM images by getting rid of data that got deleted (like TRIM does for SSDs)
git.kernel.org/torvalds/c/1f2…


 
Slides and code from below talk about the tracing abilities and some of the risks of #eBPF in the modern #Linux #kernel are now up as well
Code: github.com/nccgroup/ebpf
Slides: frab.cccv.de/system/event_a…

 
The legacy block layer stack including I/O-schedulers like #CFQ were removed from the #Linux mainline #kernel last night; the same merge contains quite a few improvements and speedups for the modern block stack that can utilize multiple queues (#blk-mq)
git.kernel.org/torvalds/c/0e9…


 
TWIMC: You can get RPMs with vanilla #Linux 4.19, 4.20 and mainline snapshots in my #Kernel vanilla repos for #Fedora: fedoraproject.org/wiki/Kernel_Va…

BTW: Does anyone know if there is a proper PPA (e.g. enable once and leave the rest to apt) that provides something similar for #Ubuntu?

To clarify the "proper PPA": I know about https://kernel.ubuntu.com/~kernel-ppa/mainline/ as well as tools like Ukuu or ubuntu-mainline-kernel.sh, but even with those its harder to use than a proper PPA where a regular "apt update" will to the "right thing"™ automatically.



 
Linux 4.20 unterm Weihnachtsbaum

\#linux #linuxnews #opensource #Kernel #Linux-420

 
The #Linux #Kernel 4.20 is out: lore.kernel.org/lkml/CAHk-=wg0… Only available via git right now, as the tarball is not yet available on kernel.org; its frontpage also does not mentioned the release yet.


 
Linus latest statement on #regressions in the #linux #kernel: '[…] "we don't break user space" is the #1 rule […] If somebody ignores that rule, it needs to be escalated to me. Immediately. Because I need to know. […]'
lore.kernel.org/lkml/CAHk-=wg-…
Context:





 
Regarding the part "[…] KERNEL API BREAKAGE: #Linux #kernel 4.18 changed behaviour regarding mknod() handling[…]" from the #systemd 240 announcement see my alter ego at twitter.com/kernellogger/s… as Linus reverted the change that caused this regression.

 
For those that have seen "[…] KERNEL API BREAKAGE: #Linux #kernel 4.18 changed behaviour regarding mknod() handling[…]" in the #systemd 240 announcement (lists.freedesktop.org/archives/syste…): The cause for this regression was reverted from #Linux mainline last night git.kernel.org/torvalds/c/94f…


 
TWIMC. But remember, normally there is no need for a service like this, as you simply should use the latest version from a supported #stable or #longterm version line all the time. Why you ask? Well, not every bug or security issue the #Linux #kernel developers fix gets a CVE.

 
BTW, my talk "What's up in #Linux #Kernel land" is scheduled for Sunday afternoon. devconfcz2019.sched.com/event/JchG/wha…

 
#Linux #Kernel 4.19.9, 4.14.88, 4.9.145, 4.4.167, 3.18.129 are out, bringing the usual pile of fixes and small improvements along with the "you just update" advice. Among the changes in 4.19.9 are a few #Amdgpu patches that improve support for the #Radeon RX 590.


 
BTW, #Linux 4.14.87 and 4.9.144 are out, too. All those new #Longterm #kernel bring the usual pile of fixes and small improvements, so you must update.

Site node: If you do not know which kernel version line is the best for your machines go and read kroah.com/log/blog/2018/…

 
#Linux #kernel 4.19.8 is out. It fixes the data corruption issue in blk-mq that made the news recently and was alleged to ext4 in the beginning.

Note: The fix applied on Wednesday was basically reverted today and replaced by a better one. For details see git.kernel.org/pub/scm/linux/…


 
Block/XFS: Support alternative mirror device retry "[…]If #XFS successfully reads a metadata buffer off a raid1 but decides that [it]is garbage, today it will shut down the entire fs without trying any of the other mirrors. This patch[…]" #linux #kernel
lore.kernel.org/linux-block/15…


 

 
the patchset to "Remedy the STIBP/IBPB overhead" was updated: lore.kernel.org/lkml/201811251…
"[…] Thats hopefully the final version of this. […] removes the ptrace check for the always IBPB case. That's substantial overhead for dubious value […]" #linux #kernel


 
#Linux #kernel 4.19.4 is now available in my "kernel vanilla repositories" for #Fedora 27, 28 and 29.
fedoraproject.org/wiki/Kernel_Va…

 
A bunch of new Stable and Longterm #Linux #Kernel got released today. With those 4.18 is EOL now: "Note, this is the LAST 4.18.y kernel release. 4.18 is now end-of-life, please move to 4.19.y at this point in time." lore.kernel.org/lkml/201811211…


 
#Linux #kernel 4.20-rc2 is out lore.kernel.org/lkml/CAHk-=wiW… "[…] Fairly normal week […] about half drivers, wih the rest being the usual architecture updates, ooling, networking, and some filesystem updates. […] Go forth and test, […]"


 
Pull Request tracker bot korg.wiki.kernel.org/userdoc/prtrac… "[…] sends automatic notifications when a pull request submitted to a mailing list has been merged to one of the #Linux #kernel repositories. […]at this time, it is only used to track mainline […] #LKML […]" Thx @monsieuricon!)


 
So, der @kernellog Autor wühlt sich kurz vorm Wochenende noch durch ein paar für #Linux #Kernel 4.20 vorgenommenen Commits. Bis Feierabend schaffe ich es vermutlich nichtmal durch die 200 Merges, die eine Hauptquelle für interessante Neuerungen sind, aber viel Arbeit machen :-/


 

 
RHEL 7.6 based #Oracle #Linux 7 Update 6 is out: blogs.oracle.com/linux/announci… … Ships with Unbreakable Enterprise Kernel Release 5, released in June and based on #Linux #kernel 4.14: blogs.oracle.com/linux/announci…


 
JFYI for those that do not know yet: I build #Linux vanilla kernel packages for Fedora. Won't normally tweet about those here, as I leave tweets from the #redhat, #centos and #fedora universe to my alter ego @knurd42rhfc For even more alter egos see leemhuis.info/me/

 
#Linux 4.20-rc1 is now available in my #kernel vanilla repositories for #Fedora 27, 28, 29 and 30; latest stable (4.19.1) and a vanilla build of the latest Fedora kernel (4.18.x) are available there, too: fedoraproject.org/wiki/Kernel_Va…


 

 
#Linux #kernel 4.20-rc1 is out, thus the merge window ended. The jump to version number did not happen for now (he "didn't want
to make a pattern of it"), but Linus plans to do it next year. lore.kernel.org/lkml/CAHk-=whD…


 
Nice status overview about the #y2k38 countermeasures (on 32 bit #linux a time variable will overflow on in 2038) in the #kernel and the linux world in general:
The End of Time, 19 Years to Go - Arnd Bergmann
Recording: youtu.be/8OiTB8qWqXk
Slides: events.linuxfoundation.org/wp-content/upl…






 
"[…] we [Facebook]are announcing a suite of open source #Linux #kernel components and related tools that address critical fleet management issues. These include resource control, resource utilization, workload isolation, load balancing, measuring, […]" code.fb.com/open-source/li…

Facebook open-sources new suite of Linux kernel components and tools