lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 15 Aug 2011 17:37:06 -0400
From:	Pavel Roskin <proski@....org>
To:	linux-kernel@...r.kernel.org
Subject: Suppressing a plus from setlocalversion

Hello!

There is one annoyance in the build system that I cannot work around.
Before I attempt hacking the code, I'd like to make sure I'm not
missing anything obvious.

Suppose that I have a kernel version 3.1-rc2.  I want to test some patch
for some code that is compiled as a module.  I change the code and
create a patch with STGit.  I recompile the modules, install them by
"make module_install", unload the module I patched, load it again
and find that there is no effect from my change.  It turns out that the
modules were installed to "/lib/modules/3.1.0-rc2+" and the plus was
added by scripts/localversion because the source tree is now modified.

So I recompile the whole kernel, reboot and continue working on my
patch.  Many days later, I'm about to send my patch, but I want to
retest the system without it, so I "stg pop" it, recompile the
module, install it and find that the unpatched module behaves just like
the patched one.  Of course, it turns out that the unpatched
module ended up in "/lib/modules/3.1.0-rc2", whereas modprobe keeps
loading the modified module from "/lib/modules/3.1.0-rc2+"

CONFIG_LOCALVERSION_AUTO is unset, but that doesn't stop
scripts/localversion from adding the plus.  Setting CONFIG_LOCALVERSION
doesn't help.  Setting LOCALVERSION on the make command line helps, but
it needs to be done every time, and it's too easy to forget.  I don't
want to write a wrapper around make, it would be too intrusive
(actually, it's my solution for now).

Adding anything to localversion* doesn't suppress the plus.  Keeping
some patch in STGit all the time is quite annoying, I'll eventually end
up sending it to some mailing list by mistake.  STGit cannot hide
applied patches.  Besides, I'll need to be aware of the patch when
switching branches.

File .scmversion is only read from the source directory, so having it
is equivalent to having a modified source all the time, which is what
I'm trying to avoid.  Sure, I can keep .scmversion not in git, but I
risk to clean it up with "git clean" eventually.

If there is no simple solution with the existing code, maybe
non-empty CONFIG_LOCALVERSION should suppress the plus just like
LOCALVERSION?

Or maybe CONFIG_LOCALVERSION_AUTO should be not yes/no, but
full/minimal/no?

-- 
Regards,
Pavel Roskin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ