I was wondering why my Termux is so slow. ARM might be slow but not this slow.
Maybe I have too high expectations on interactivity of a local development environment.
Please use the
correct (perma)link to bookmark this article, not the page
listing all wlog entries of the last decade. Thank you.</update>
Some updates inline and at the bottom.
The
new Terms of Service of GitHub became effective today, which is quite
problematic there was a review phase, but my reviews pointing out the
problems were not answered, and, while the language is somewhat changed
from the draft, they became effective immediately.
Now, the new ToS are not so bad that one immediately must stop using
their service for disagreement, but it s important that certain content
may no longer legally be pushed to GitHub. I ll try to explain
which is affected, and why.
I m mostly working my way backwards through section D, as
that s where the problems I identified lie, and because this is from
easier to harder.
Note that using a private repository does not
help, as the same terms apply.
Anything requiring attribution (e.g. CC-BY, but also BSD, )
Section D.7 requires the person uploading content to waive any and all
attribution rights. Ostensibly to allow basic functions like search to
work , which I can even believe, but, for a work the uploader did not
create completely by themselves, they can t grant this licence.
The CC licences are notably bad because they don t permit sublicencing,
but even so, anything requiring attribution can, in almost all cases, not
written or otherwise, created or uploaded by our Users . This is fact,
and the exceptions are few.
Anything putting conditions on the right to use, display and perform
the work and, worse, reproduce (all Copyleft)
Section D.5 requires the uploader to grant all other GitHub users
Here is my monthly update covering what I have been doing in the free software world (previous month):
diffoscope is our in-depth and content-aware diff utility that can locate and diagnose reproducibility issues.
buildinfo.debian.net is my experiment into how to process, store and distribute .buildinfo files after the Debian archive software has processed them.
strip-nondeterminism is our tool to remove specific non-deterministic results from a completed build.
.buildinfo files after the Debian archive
software has processed them.
.buildinfo files to buildinfo.debian.net and added notification about this failure.
Previously: v4.9.
Here s a quick summary of some of the interesting security things in last week s v4.10 release of the Linux kernel:
PAN emulation on arm64
Catalin Marinas introduced ARM64_SW_TTBR0_PAN, which is functionally the arm64 equivalent of arm s CONFIG_CPU_SW_DOMAIN_PAN. While Privileged eXecute Never (PXN) has been available in ARM hardware for a while now, Privileged Access Never (PAN) will only be available in hardware once vendors start manufacturing ARMv8.1 or later CPUs. Right now, everything is still ARMv8.0, which left a bit of a gap in security flaw mitigations on ARM since CONFIG_CPU_SW_DOMAIN_PAN can only provide PAN coverage on ARMv7 systems, but nothing existed on ARMv8.0. This solves that problem and closes a common exploitation method for arm64 systems.
thread_info relocation on arm64
As done earlier for x86, Mark Rutland has moved thread_info off the kernel stack on arm64. With thread_info no longer on the stack, it s more difficult for attackers to find it, which makes it harder to subvert the very sensitive addr_limit field.
linked list hardeningCONFIG_BUG_ON_DATA_CORRUPTION to restore the original CONFIG_DEBUG_LIST behavior that existed prior to v2.6.27 (9 years ago): if list metadata corruption is detected, the kernel refuses to perform the operation, rather than just WARNing and continuing with the corrupted operation anyway. Since linked list corruption (usually via heap overflows) are a common method for attackers to gain a write-what-where primitive, it s important to stop the list add/del operation if the metadata is obviously corrupted.
seeding kernel RNG from UEFI
A problem for many architectures is finding a viable source of early boot entropy to initialize the kernel Random Number Generator. For x86, this is mainly solved with the RDRAND instruction. On ARM, however, the solutions continue to be very vendor-specific. As it turns out, UEFI is supposed to hide various vendor-specific things behind a common set of APIs. The EFI_RNG_PROTOCOL call is designed to provide entropy, but it can t be called when the kernel is running. To get entropy into the kernel, Ard Biesheuvel created a UEFI config table (LINUX_EFI_RANDOM_SEED_TABLE_GUID) that is populated during the UEFI boot stub and fed into the kernel entropy pool during early boot.
arm64 W^X detection
As done earlier for x86, Laura Abbott implemented CONFIG_DEBUG_WX on arm64. Now any dangerous arm64 kernel memory protections will be loudly reported at boot time.
64-bit get_user() zeroing fix on armlib/test_user_copy.c. Hoeun Ryu added zeroing-on-failure testing, and I expanded the get_user()/put_user() tests to include all sizes. Neither improvement alone would have found the ARM bug, but together they uncovered a typo in a corner case.
no-new-privs visible in /proc/$pid/status/proc/$pid/status, as NoNewPrivs.
That s all for now! Please let me know if you saw anything else you think needs to be called out. :) I m already excited about the v4.11 merge window opening
2017, Kees Cook. This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License.
Once again, I'm making an announcement mainly for my local circle of friends and (gasp!) followers. For those of you over 100Km away from Mexico City, please disregard this message.
Back in July 2015, and after two years of hard work, my university finished the publishing step of my second book. This is a textbook for the subject I teach at Computer Engineering: Operating Systems Fundamentals.
The book is, from its inception, fully available online under a permissive (CC-BY) license. One of the books aimed contributions is to present a text natively written in Spanish. Besides, our goal (I coordinated a team of authors, working with two colleagues from Rosario, Argentina, and one from Cauca, Colombia) was to provide a book students can easily and legally share with no legal issues.
I have got many good reviews so far, and after teaching based on it for four years (while working on it and after its publication), I can attest the material is light enough to fit in a Bachelors level degree, while it's deep enough to make our students sweat healthily ;-)
Anyway: I have been scheduled to present the book at my university's main book show, 38 Feria Internacional del Libro del Palacio de Miner a this Saturday, 2017.03.04 16:00; Sal n Manuel Tols . What's even better: This time, I won't be preparing a speech! The book will be presented by my two very good friends, Jos Mar a Serralde and Rolando Cedillo. Both of them are clever, witty, fun, and a real honor to work with. Of course, having them present our book is more than a double honor.
So, everybody who can make it: FIL Miner a is always great and fun. Come share the love! Come have a book! Or, at least, have a good time and a nice chat with us!
Working with 9-Patch Images, Adapter Classes, Layouts in Android. Before starting this new task I never wondered .. How does that bubble around our chat messages wraps around the width of the text written by us?? . The image being used as the background of our messages are called 9-Patch images. They stretch themselves according to the text length and font size! Android will automatically resize to accommodate the contents , like

Source- developer.android.com
These images have to be designed a certain way and should be stored as the smallest size and leave 1px to all sides. Details are clearly explained in Android Documentation
https://developer.android.com/guide/topics/graphics/2d-graphics.html#nine-patch
Then, save the image by concatenating .9 between the file name and extension.
For example if your image name is bubble.png. Rename it to bubble.9.png
They should be stored like any other image file in res/drawable folder.
Using 9-patch images these problems are taken care of

git-annex has never used SHA1 by
default. But, there are concerns about SHA1 collisions being used to
exploit git repositories in various ways. Since git-annex builds on top of
git, it inherits its foundational SHA1 weaknesses. Or does it?
Interestingly, when I dug into the details, I found a way to make git-annex
repositories secure from SHA1 collision attacks, as long as signed commits
are used (and verified).
When git commits are signed (and verified), SHA1 collisions in
commits are not a problem. And there seems to be no way to generate
usefully colliding git tree objects (unless they contain really ugly binary
filenames). That leaves blob objects, and when using git-annex, those are
git-annex key names, which can be secured from being a vector for SHA1
collision attacks.
This needed some work on git-annex, which is now done, so look
for a release in the next day or two that hardens it against
SHA1 collision attacks. For details about how to use it,
and more about why it avoids git's SHA1 weaknesses, see
https://git-annex.branchable.com/tips/using_signed_git_commits/.
My advice is, if you are using a git repository to publish or collaborate
on binary files, in which it's easy to hide SHA1 collisions,
you should switch to using git-annex and signed commits.
PS: Of course, verifying gpg signatures on signed commits adds some
complexity and won't always be done. It turns out that the current
SHA1 known-prefix collision attack cannot be usefully used to generate
colliding commit objects, although a future common-prefix collision
attack might. So, even if users don't verify signed commits, I believe
that repositories using git-annex for binary files will be as secure as
git repositories containing binary files used to be.
How-ever secure that might be..
The Fantasyland Institute of Learning is the organisation behind Lambdaconf, a functional programming conference perhaps best known for standing behind a racist they had invited as a speaker. The fallout of that has resulted in them trying to band together events in order to reduce disruption caused by sponsors or speakers declining to be associated with conferences that think inviting racists is more important than the comfort of non-racists, which is weird in all sorts of ways but not what I'm talking about here because they've also written a "Code of Professionalism" which is like a Code of Conduct except it protects abusers rather than minorities and no really it is genuinely as bad as it sounds.
Following the post about 10-bit Y'CbCr earlier this week, I
thought
I'd make an actual test of 10-bit H.264 compression for live streaming. The
basic question is;
sure, it's better-per-bit, but it's also slower, so it is better-per-MHz?
This is largely inspired by Ronald Bultje's post about streaming
performance,
where he largely showed that HEVC is currently useless for live streaming
from software; unless you can encode at x264's veryslow preset (which, at
720p60, means basically rather simple content and 20 cores or so),
the best x265 presets you can afford will give you worse quality than
the best x264 presets you can afford. My results will maybe not be as
scientific, but hopefully still enlightening.
I used the same test clip as Ronald, namely a two-minute clip of
Tears of Steel. Note that this is an 8-bit input, so we're not
testing the effects of 10-bit input; it's just testing the increased
internal precision in the codec. Since my
focus is practical streaming, I ran the last version of x264 at four threads
(a typical desktop machine), using one-pass encoding at 4000 kbit/sec.
Nageru's speed control has 26 presets to choose from, which gives pretty
smooth steps between neighboring ones, but I've been sticking to the ten
standard x264 presets (ultrafast, superfast, veryfast, faster,
fast, medium, slow, slower, veryslow, placebo). Here's the graph:
The x-axis is seconds used for the encode (note the logarithmic scale;
placebo takes 200 250 times as long as ultrafast).
The y-axis is SSIM dB, so up and to the left is better. The blue line is
8-bit, and the red line is 10-bit. (I ran most encodes five times and
averaged the results, but it doesn't really matter, due to the logarithmic
scale.)
The results are actually much stronger than I assumed; if you run on
(8-bit) ultrafast or superfast, you should stay with 8-bit, but from there
on, 10-bit is on the Pareto frontier. Actually, 10-bit veryfast (18.187 dB)
is better than 8-bit medium (18.111 dB), while being four times as fast!
But not all of us have a relation to dB quality, so I chose to also do a
test that maybe is a bit more intuitive, centered around bitrate needed for
constant quality. I locked quality to 18 dBm, ie., for each preset, I
adjusted the bitrate until the SSIM showed 18.000 dB plus/minus 0.001 dB.
(Note that this means faster presets get less of a speed advantage, because
they need higher bitrate, which means more time spent entropy coding.)
Then I measured the encoding time (again five times) and graphed the results:
x-axis is again seconds, and y-axis is bitrate needed in kbit/sec, so lower
and to the left is better. Blue is again 8-bit and red is again 10-bit.
If the previous graph was enough to make me intrigued, this is enough to make
me excited. In general, 10-bit gives 20-30% lower bitrate for the same
quality and CPU usage! (Compare this with the supposed up to 50% benefits
of HEVC over H.264, given infinite CPU usage.) The most dramatic example
is when comparing the medium presets directly, where 10-bit runs at
2648 kbit/sec versus 3715 kbit/sec (29% lower bitrate!) and is only 5%
slower. As one progresses towards the slower presets, the gap is somewhat
narrowed (placebo is 27% slower and only 24% lower bitrate), but in the
realistic middle range, the difference is quite marked. If you run 3 Mbit/sec
at 10-bit, you get the quality of 4 Mbit/sec at 8-bit.
So is 10-bit H.264 a no-brainer? Unfortunately, no; the client hardware support
is nearly nil. Not even Skylake, which can do 10-bit HEVC encoding in
hardware (and 10-bit VP9 decoding), can do 10-bit H.264 decoding in hardware.
Worse still, mobile chipsets generally don't support it. There are rumors
that iPhone 6s supports it, but these are unconfirmed; some Android chips
support it, but most don't.
I guess this explains a lot of the limited uptake; since it's in some ways
a new codec, implementers are more keen to get the full benefits of HEVC instead
(even though the licensing situation is really icky). The only ones I know
that have really picked it up as a distribution format is the anime scene,
and they're feeling quite specific pains due to unique content (large
gradients giving pronounced banding in undithered 8-bit).
So, 10-bit H.264: It's awesome, but you can't have it. Sorry :-)
systemd 233 is scheduled to be released next week, and there is only
a handful of small issues left.
As usual there are tons of improvements and fixes,
but the most intrusive one probably is another attempt to move from legacy cgroup v1
to a hybrid setup where the new unified (cgroup v2) hierarchy is mounted at
/sys/fs/cgroup/unified/ and the legacy one stays at /sys/fs/cgroup/ as
usual. This should provide an easier path for software like Docker or LXC to
migrate to the unified hiearchy, but even that hybrid mode broke some bits.
While systemd 233 will not make it into Debian stretch or Ubuntu zesty, as both
are in feature freeze, it will soon be available in Debian experimental, and in
the next Ubuntu release after 17.04 gets released. Thus now is another good
time to give this some thorough testing!
To help with this, please give the
PPA with builds from upstream master
a spin. In addition to the usual packages for Ubuntu 16.10 I also uploaded a
build for Ubuntu zesty, and a build for Debian stretch
(aka testing) which also works on Debian sid. You can use that URL as an apt source:
deb [trusted=yes] https://people.debian.org/~mpitt/tmp/systemd-master-20170225/ /
These packages pass our autopkgtests and I tested them manually too. LXC and
LXD work fine, docker.io/runc needs a fix
which I uploaded to Ubuntu zesty.
(It s not yet available in Debian, sorry.)
Please file reports about regressions on GitHub,
but please also le me know about successes on my Google+ page
so that we can get some idea about how many people tested this.
Thank you, and happy booting!
Very strange. Verrrry strange.
Yesterday I wrote a blog post on spam stuff that has been hitting my mailbox. Nothing too deep, just me scratching my head.
Coincidentally (I guess/hope), I have been getting messages via my Bitlbee to one of my Jabber accounts, offering me ransomware services. I am reproducing it here, omitting of course everything I can recognize as their brand names related URLs (as I'm not going to promote the 3vi1-doers). I'm reproducing this whole as I'm sure the information will be interesting for some.
*BRAND* Ransomware - The Most Advanced and Customisable you've Ever Seen Conquer your Independence with *BRAND* Ransomware Full Lifetime License! * UNIQUE FEATURES * NO DEPENDENCIES (.net or whatever)!!! * Edit file Icon and UAC - Works on All Windows Versions * Set Folders and Extensions to Encrypt, Deadline and Russian Roulette * Edit the Text, speak with voice (multilang) and Colors for Ransom Window * Enable/disable USB infect, network spread & file melt * Set Process Name, sleep time, update ransom amount, Give mercy button * Full-featured headquarter (for Windows) with unlimited builds, PDF reports, charts and maps, totally autonomous operation * PHP Bridges instead of expensive C&C servers! * Automatic Bitcoin payment detection (impossible to bypass/crack - we challege who says the contrary to prove what they say!) * Totally/Mathematically IMPOSSIBLE to DECRYPT! Period. * Award-Winning Five-Stars support and constant updates! * We Have lot vouchs in *BRAND* Market, can check! Watch the promo video: *URL* Screenshots: *URL* Website: *URL* Price: $389 Promo: just $309 - 20% OFF! until 25th Feb 2017 Jabber: *JID*I think I can comment on this with my students. Hopefully, this is interesting to others.
One of the products I have done some work on at Red Hat has recently been
released to customers and there have been a few things written about it:
package require TclCurl
# download to a variable
curl::transfer -url https://sven.stormbind.net -bodyvar page
# or store it in a file
curl::transfer -url https://sven.stormbind.net -file page.html
Now the remaining problem is that the code is unmaintained upstream and there is one
codebase on bitbucket and one on github. While I fed patches to the bitbucket repo and
thus based the Debian package on that repo, the github repo diverted in a different direction.
Next.