[Discuss] I need a recommendation for a Linux-compatible high-endPC builder
Alan W. Irwin
irwin at beluga.phys.uvic.ca
Mon Jan 29 18:07:34 PST 2018
On 2018-01-29 15:25-0800 Cy Schubert wrote:
> What is special kernel memory?
It is memory whose size is a multiple of a set of particular discrete
sizes that are especially suitable for certain kernel uses. I cannot
remember exactly, but there were roughly 10 kinds of this kind of
special memory (each with a different base size to be used as the
multiple). Obviously the kernel could have just used ordinary malloc
and free with multiples of these special sizes when it needed memory.
But instead (presumably for efficiency reasons) the Linux kernel from
3 years ago defined a fixed area of ordinary memory and used its own
special routines for allocating and freeing the specially sized memory
blocks of the various kinds within that fixed region.
> What is a special type of memory leak?
Just like an ordinary memory leak only for each kind of special memory.
One example would be when the kernel has a loop that does a special
kind of such memory allocation without a corresponding special free.
So in my case the size of one of those specially allocated areas
started small after a boot but constantly grew as time progressed
according to /sys/kernel information.
> Are you suggesting that the Linux kernel is particularly unstable?
Nope. But the above idea (which was definitely part of the Linux kernel
from three years ago) has some obvious special memory handling
requirements for each kind of special memory in complete analogy with
ordinary memory management. So there are possibilities for such
memory management screwups for each kind of special memory. In my
case I discovered such a kernel issue with just one special kind of
memory. But it must have been a corner case because the Debian
kernel developers could not reproduce it.
> Are you sure it's JavaScript that is the issue or could it be Java?
I note for the others here this is a completely different topic then the above
special memory leak issues you asked me about above. And the answer to
your question is javascript. Do a google search for the terms
javascript memory leak and you will find lots of references. Add
"theweathernetwork" to that search and you will find
<https://forums.informaction.com/viewtopic.php?f=10&t=21675> which
gives a clear example.
If JavaScript, are you suggesting that Firefox is unstable?
No more than other browsers, but historically they have all been much
too trustful of javascript. Thus, javascript code that your browser
encounters when you browse a malicious website provides a huge
opportunity for security attacks against your operating system.
That's why javascript is mentioned so much in articles discussing the
Spectre variant 2 vulnerability, and part of the mitigation for that
vulnerability must include hardening of all the browsers against bad
javascript code. That process is obviously ongoing, but it takes time.
So for now the suggestion I have read several places is to always use
the noscript extension to firefox and similar whitelist measures for
other browsers. Side benefits of such whitelist measures are
typically ads disappear (if you don't allow domains that generate ads
on your javascript code source whitelist) and the chances of
javascript-related memory leaks are also obviously reduced by simply
reducing the domains that you use for javascript.
For example, the above Weather Network user used the firefox nolist
extension to isolate a javascript-related memory leak in the
javascript code generated by the legitimate domain twnmm.com.
According to the discussion, twnmm.com had a horrific javascript code
screwup in the code they were sending to all users who were browsing
The Weather Network and presumably users of any other website that
uses javascript code distributed by twnmm.com in the same way. But
presumably twnmm.com have long-since fixed up that javascript bug
because the google utility (conveniently accessible from nolist with a
middle click) for evaluating the legitimacy of javascript code
produced by a given domain gives twnmm.com a clean bill of health, and
when I allowed twnmm.com on my whitelist, no memory leaks resulted and
I got obviously improved graphics file capability for the The Weather
Network (although there is still some site I am missing from my
whitelist that is required to make that fully work).
Anyhow, I suggest those here who use firefox and are currently not
aware of the nolist extension to that browser should try it
immediately for enhanced security (especially appropriate when
javascript attacks via Spectre are presumably on the upsurge),
reduction of ads, and reduction of chances for javascript memory
leaks.
Alan
__________________________
Alan W. Irwin
Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).
Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________
Linux-powered Science
__________________________
More information about the Discuss
mailing list