LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-26-2020, 11:08 AM   #1
garryjp
LQ Newbie
 
Registered: Jun 2020
Posts: 16

Rep: Reputation: Disabled
Exclamation virtual memory manager & filesystem


1 Can someone Describe the purpose of the virtual memory manager in Linux and how that differs from traditional ‘swap’ on a Linux machine.

2. What is the purpose of a filesystem in Linux? Describe the major components of a filesystem.

3. What is a kernel panic? What can be done to debug such an event? What are the common causes of kernel panics? Can a kernel panic be triggered on purpose? Why would you do so?
4. If A customer’s systems require a patch they found upstream, how can you tell which version of an Ubuntu package contains the commit that includes that patch?
 
Old 06-26-2020, 11:47 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931
Welcome to the forums.

Do you have your own thoughts on these topics?

We're not really a help desk, but we're happy to give some thoughts.

These are several disparate topics, and just asking for full information without any opinions or thoughts of you own is not really helpful.

Have you looked up information on any of these topics?
 
2 members found this post helpful.
Old 06-26-2020, 01:46 PM   #3
garryjp
LQ Newbie
 
Registered: Jun 2020
Posts: 16

Original Poster
Rep: Reputation: Disabled
I m looking for the answer for the below questions.

1 Can someone Describe the purpose of the virtual memory manager in Linux and how that differs from traditional ‘swap’ on a Linux machine.

2. What is the purpose of a filesystem in Linux? Describe the major components of a filesystem.

3. What is a kernel panic? What can be done to debug such an event? What are the common causes of kernel panics? Can a kernel panic be triggered on purpose? Why would you do so?
4. If A customer’s systems require a patch they found upstream, how can you tell which version of an Ubuntu package contains the commit that includes that patch?
 
Old 06-26-2020, 01:47 PM   #4
sevendogsbsd
Senior Member
 
Registered: Sep 2017
Distribution: FreeBSD
Posts: 2,252

Rep: Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011
OP: you just asked the exact same questions twice. Did you read rmistler's post?
 
1 members found this post helpful.
Old 06-26-2020, 05:32 PM   #5
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by garryjp View Post
I
1 Can someone Describe the purpose of the virtual memory manager in Linux
Yes; https://www.kernel.org/doc/html/late.../mm/index.html.
Quote:
and how that differs from traditional ‘swap’ on a Linux machine.
Can you elaborate what you mean by "traditional ‘swap’ on a Linux machine"?
Quote:
2. What is the purpose of a filesystem in Linux?
Managing files. In most cases, this means persistent data.
Quote:
Describe the major components of a filesystem.
Perhaps this might help: https://opensource.com/article/17/5/...xt4-filesystem
EDIT: Also wikipedia: https://en.m.wikipedia.org/wiki/File_system.
Quote:
3. What is a kernel panic? What can be done to debug such an event? What are the common causes of kernel panics? Can a kernel panic be triggered on purpose? Why would you do so?
Start at https://en.m.wikipedia.org/wiki/Kernel_panic.
Quote:
4. If A customer’s systems require a patch they found upstream, how can you tell which version of an Ubuntu package contains the commit that includes that patch?
Would this help you find the patch? https://stackoverflow.com/questions/...d-on-my-ubuntu

Last edited by berndbausch; 06-26-2020 at 06:05 PM.
 
Old 06-28-2020, 12:04 PM   #6
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,677

Rep: Reputation: Disabled
These are mostly generic questions. I believe you should make an effort and look up the relevant information yourself. But the last question is very specific, so I feel it deserves a detailed answer because this info may be not so easy to come by.
Quote:
Originally Posted by garryjp View Post
4. If A customer’s systems require a patch they found upstream, how can you tell which version of an Ubuntu package contains the commit that includes that patch?
Quote:
Originally Posted by berndbausch View Post
Would this help you find the patch? https://stackoverflow.com/questions/23705358
I'm afraid not.

First, let's talk not about patches in general, but specifically about security patches. Each security vulnerability gets assigned a CVE identifier. They are usually searched and referenced by these. Ubuntu Security Team provides a (semi-)official web interface for this, Ubuntu CVE Tracker. So if the upstream patch in question fixes a security vulnerability, the CVE most certainly is mentioned in the patch description. Now, search for that CVE-ID in the Ubuntu CVE Tracker.

To give you an example, let's try it with CVE-2014-6271, which was the initial CVE-ID for Shellshock (well-known bugs get cool names nowadays). As the search result, you'll get this page. There you can see what package was affected, whether the patch fixing it was released by Ubuntu, and if it was what package release did it. Also pay attention to the Notes section there. In this case it says:
Quote:
After updates were released for this issue, it was discovered that the fix was incomplete. The new issue is being tracked as CVE-2014-7169.
I leave finding info for the last one mentioned to you as an exercise.

From the same web search form (Ubuntu CVE Tracker) you may also look up package names rather than CVE-IDs. You'll get a nice matrix then. This is how it currently looks for bash. As you can see the CVE-IDs for Shellshock don't even get mentioned there, that vulnerability being just too old.

Now, what to do if the patch in question didn't get assigned a CVE-ID? I'd suggest you'll start from the distro-patches page by OSS-Security. It will give you useful hints about how to find specific patches not only for Ubuntu, but for several other distros as well. Their Ubuntu section references Debian, don't forget to have a look there, too.

You'll also have to learn how to use the bug tracker for you distribution. For Ubuntu, it's launchpad.net. E.g. bugs for bash can be found at https://bugs.launchpad.net/ubuntu/+source/bash and patches at https://bugs.launchpad.net/ubuntu/+source/bash/+patches (those are the patches currently being worked on, they may be not the patches you're looking for).

Also keep in mind that the name of the source package is not always the same as the name of the binary package that you install on your system. To find out what source package a certain binary package was built from you may use either the web interface at https://packages.ubuntu.com or the command line.

The page for a specific binary package on packages.ubuntu.com includes a link to the corresponding source package page on the top left. E.g. on the page for libssl1.1 you'll see
Quote:
[ Source: openssl ]
You'll get that info from the command line with apt-cache:
Code:
apt-cache showsrc libssl1.1
The package page on packages.ubuntu.com also includes links to the bugs page on launchpad.net and to the Ubuntu changelog page (see below) for that package.

All that said, finding what version of an Ubuntu package included the fix for a certain bug may be very time-consuming if following the procedure for Debian described on the distro-patches page linked above. So are there any shortcuts? Yes, there are. But they are just this, shortcuts. That means, they not always work. If you find the package version in question using them, fine. If not, that doesn't mean yet that the package is unpatched. That only means you have to search it harder, using the proper procedure. So what they are? Quite simple: search the package changelogs.

Every Debian package installs /usr/share/doc/<packagename>/changelog.Debian.gz Quite a few packages also install upstream changelogs as /usr/share/doc/<packagename>/changelog.gz. So if you find that specific bug being mentioned in either changelog as fixed, you'll know the answer to your question.

Unfortunately, there are two problems specific to Ubuntu. When a Debian package is being rebuilt by Ubuntu, the upstream changelog gets removed, and the Debian changelog truncated to the ten most recent entries. The full Debian changelogs can still be seen at https://changelogs.ubuntu.com.

You can also look for them from the command line with apt. I'll show you how to do it for a CVE-ID, but this works the same for anything mentioned in the changelog:
Code:
#!/bin/sh
pkg=libssl1.1
cve=CVE-2014-3470
cmd="apt-get changelog $pkg"
echo == awk ==
$cmd 2>/dev/null | awk '/^[^ \t]/{v=$0}/'"$cve"'/{print v;print;exit}'
echo
echo == sed ==
$cmd 2>/dev/null | sed -n "/^\S/h;/$cve/{x;G;p;q}"
An additional benefit of doing it this way is that you can also search in packages currently not installed on your system.

Ubuntu packages retain Debian patches, so perusing Debian infrastructure may turn out to be useful. E.g. Debian patches for the Debian unstable (sid) version of bash are here. You can get to that page from the bash package page on packages.debian.org. Obviously, you won't obtain there any patches that were added by Ubuntu on top of Debian. They (or rather it, because they're maintained as one big sweeping patch including all the differences between a Debian package and the Ubuntu package based on it) can be accessed from the package page on Debian Package Tracker (the page for bash) or from https://patches.ubuntu.com.

Last edited by shruggy; 06-30-2020 at 08:26 AM. Reason: Edited out the part about searching mailing lists archives
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between resident memory,shared memory and virtual memory in system monitor mathimca05 Linux - Newbie 1 11-11-2007 04:05 AM
AOL UK && BT Voyager 100 && Slackware 10.2 && RP-PPPoE pitt0071 Linux - Networking 3 01-17-2006 06:10 AM
(FreeBSD && Fedora Core 4 && Slackware 10.0) Filesystem Support taylor_venable *BSD 1 07-14-2005 02:24 PM
Ph&#7909;c h&#7891;i d&#7919; li&#7879;u b&#7883; m&#7845;t???, c&#7913; pollsite General 1 06-27-2005 12:39 PM
Gotta love those &#1649;&#1649;&#1649;&#1649;&#1649;&#1649;&#1649;&# iLLuSionZ Linux - General 5 11-18-2003 07:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration