LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-28-2016, 11:54 PM   #1
worsel
Member
 
Registered: Feb 2008
Location: Washington State, USA
Distribution: Slackware 14.2, Slackware-from-Scratch
Posts: 241

Rep: Reputation: 45
slackware64-live-14.2


Finally got slackware-live working. Downloaded it,
burned to a dvd-rw.

Tried it on my desktop machine. Boot starts fine, gets to
where it's printing something about vram(?) and reboots.

Tried on my laptop (lenovo Thinkpad W540. Starts out with the
initial grub message (only two words), then hangs. Hit a carriage
return and it boots up just fine.

Burnt it to a pen drive and it works in both machines. Kinda neat!
 
Old 07-29-2016, 04:58 PM   #2
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Hit a bug with Slackware Live and the new 4.4.16 kernel...reported as https://bugzilla.kernel.org/show_bug.cgi?id=150711
Basically, I can not create the ISO on kernel 4.4.16 and also the live OS craps out when installing certain (not all) packages.
Still investigating.
 
1 members found this post helpful.
Old 07-30-2016, 07:04 AM   #3
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 15.0 + Multilib
Posts: 2,159

Rep: Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512
Good Catch Eric !

I have already installed 4.4.16 on my Production 14.2 Laptop and this bug scared me a bit when I saw it ...

Looking at your BUG dumps on kernel.org, the bug is isolated to Overlay File Systems, and may have been triggered by this change in fs/overlayfs/inode.c:

https://git.kernel.org/cgit/linux/ke...16&id2=v4.4.15

Before 4.4.16, inode->i_mode was 'anded' with S_IFMT before writing mode into the inode structure ( mode &= S_IFMT ).

But with 4.4.16, `mode &= S_IFMT` is performed after writing the mode into the inode structure which appears to cause the BUG() in fs/attr.c:238 ...

If I understand the code, fs/attr.c lines 240 and 246 look like a catch-22 situation when compared to the test at line 236 that caused the BUG() to be thrown.

fs/attr.c lines 229..254:
Code:
        /*
         * We now pass ATTR_KILL_S*ID to the lower level setattr function so
         * that the function has the ability to reinterpret a mode change
         * that's due to these bits. This adds an implicit restriction that
         * no function will ever call notify_change with both ATTR_MODE and
         * ATTR_KILL_S*ID set.
         */
        if ((ia_valid & (ATTR_KILL_SUID|ATTR_KILL_SGID)) &&     // this is line 236
            (ia_valid & ATTR_MODE))
                BUG();                                          // this is attr.c line 238

        if (ia_valid & ATTR_KILL_SUID) {                        // this is line 240
                if (mode & S_ISUID) {
                        ia_valid = attr->ia_valid |= ATTR_MODE;
                        attr->ia_mode = (inode->i_mode & ~S_ISUID);
                }
        }
        if (ia_valid & ATTR_KILL_SGID) {                        // this is line 246
                if ((mode & (S_ISGID | S_IXGRP)) == (S_ISGID | S_IXGRP)) {
                        if (!(ia_valid & ATTR_MODE)) {
                                ia_valid = attr->ia_valid |= ATTR_MODE;
                                attr->ia_mode = inode->i_mode;
                        }
                        attr->ia_mode &= ~S_ISGID;
                }
        }
But then again, I can't say I understand the kernel code

No worries for me since I don't use the OverlayFS on my Prod Systems but it appears that this bug will prevent adding inodes to an overlayfs for files with the SUID / SGID Bits set ...

Thanks for the report !

-- kjh

This is the change to fs/overlayfs/inode.c referenced by the above URL

Code:
diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c
index 05ac9a9..0597820 100644
--- a/fs/overlayfs/inode.c
+++ b/fs/overlayfs/inode.c
@@ -412,12 +412,11 @@ struct inode *ovl_new_inode(struct super_block *sb, umode_t mode,
 	if (!inode)
 		return NULL;
 
-	mode &= S_IFMT;
-
 	inode->i_ino = get_next_ino();
 	inode->i_mode = mode;
 	inode->i_flags |= S_NOATIME | S_NOCMTIME;
 
+	mode &= S_IFMT;
 	switch (mode) {
 	case S_IFDIR:
 		inode->i_private = oe;

Last edited by kjhambrick; 07-30-2016 at 07:41 AM. Reason: added line numbers to code snip
 
3 members found this post helpful.
Old 07-31-2016, 12:17 AM   #4
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
I just posted on the bug and had somehow missed your comment on it. It's definitely that commit.
 
Old 07-31-2016, 04:50 AM   #5
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 15.0 + Multilib
Posts: 2,159

Rep: Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512
Thanks Robbie.

Just read your comment on Eric's Bug Report.

I've never participated in the Kernel Bugzilla Process and I like your comment better than mine

-- kjh
 
Old 07-31-2016, 09:22 AM   #6
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 15.0 + Multilib
Posts: 2,159

Rep: Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512
Looks like the Kernel Developers are on it:

https://bugzilla.kernel.org/show_bug.cgi?id=150711#c5

-- kjh

Last edited by kjhambrick; 07-31-2016 at 09:22 AM. Reason: typo
 
Old 08-03-2016, 10:17 AM   #7
phenixia2003
Senior Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 1,052

Rep: Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008
Hello,

Note that the commit which causes that issue, also affects, in a different way, the kernels 4.6/4.7 as stated here and there :

Quote:
> > > commit 07a2daab49c549a37b5b744cbebb6e3f445f12bc upstream.
...
> > > inode's ->i_mode from underlying inode ->i_mode but we retain only
> > > file type bits (S_IFMT) and discard permission bits.
...
> > This patch introduced a hang when writing to suid file, fstests
> > generic/355 could reproduce the hang easily, it only failed the test
> > without this patch and didn't hang the kernel.

...
> Does Linus's tree have the same problem?

Yes, 4.7 kernel hangs as well.

>
> > (The 4.6-stable tree faces the same question)
--
SeB
 
Old 08-06-2016, 02:19 AM   #8
worsel
Member
 
Registered: Feb 2008
Location: Washington State, USA
Distribution: Slackware 14.2, Slackware-from-Scratch
Posts: 241

Original Poster
Rep: Reputation: 45
Finally got around to applying the patch and rebuilding my kernel
and reburning the dvd..

Slightly improved results with the dvd. My desktop still reboots
during the boot process, but the laptop boots up properly.

Haven't tried on a pen drive yet. Midnight here and I need my
beauty sleep. Will try it tomorrow, but don't expect any problems.
 
  


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
Slackware64-14.2-live... vito_spatafore Slackware 22 07-20-2016 07:57 AM
Alien Bob's slackware64-current-live -- NICE Job ! kjhambrick Slackware 4 06-04-2016 10:53 AM
Complaint: no fsck.jfs when booting slackware64 13.0 as live DVD, why ? H_TeXMeX_H Slackware 5 03-07-2010 07:48 AM
Slackware64 and Linux-Live Scripts - data dir not found markcole Slackware 6 02-25-2010 08:16 PM
[SOLVED] Slackware64-C client wont detect Slackware64-C Samba server slackass Slackware 5 08-07-2009 11:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:16 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