<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/scripts/basic, branch v4.9.146</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.146</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.146'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2016-08-24T20:34:19Z</updated>
<entry>
<title>fixdep: faster CONFIG_ search</title>
<updated>2016-08-24T20:34:19Z</updated>
<author>
<name>Alexey Dobriyan</name>
<email>adobriyan@gmail.com</email>
</author>
<published>2016-08-24T18:03:05Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=dee81e9886748594babac67c14b0f720148e255d'/>
<id>urn:sha1:dee81e9886748594babac67c14b0f720148e255d</id>
<content type='text'>
Do you think kernel build is 100% dominated by gcc? You are wrong!
One small utility called "fixdep" consistently manages to sneak into
profile's first page (unless you have small monitor of course).

The choke point is this clever code:

	for (; m &lt; end; m++) {
		if (*m == INT_CONF) { p = (char *) m  ; goto conf; }
		if (*m == INT_ONFI) { p = (char *) m-1; goto conf; }
		if (*m == INT_NFIG) { p = (char *) m-2; goto conf; }
		if (*m == INT_FIG_) { p = (char *) m-3; goto conf; }

4 branches per 4 characters is not fast.

Use strstr(3), so that SSE2 etc can be used.

With this patch, fixdep is so deep at the bottom, it is hard to find it.

Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.com&gt;
</content>
</entry>
<entry>
<title>scripts: Fix size mismatch of kexec_purgatory_size</title>
<updated>2016-07-22T12:05:40Z</updated>
<author>
<name>Tautschnig, Michael</name>
<email>tautschn@amazon.co.uk</email>
</author>
<published>2016-07-04T13:55:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=21532b9e5bd597631cfe38d9eb34df069938065b'/>
<id>urn:sha1:21532b9e5bd597631cfe38d9eb34df069938065b</id>
<content type='text'>
bin2c is used to create a valid C file out of a binary file where two
symbols will be globally defined: &lt;name&gt; and &lt;name&gt;_size. &lt;name&gt; is
passed as the first parameter of the host binary.

Building using goto-cc reported that the purgatory binary code (the only
current user of this utility) declares kexec_purgatory_size as 'size_t'
where bin2c generate &lt;name&gt;_size to be 'int' so in a 64-bit host where
sizeof(size_t) &gt; sizeof(int) this type mismatch will always yield the
wrong value for big-endian architectures while for little-endian it will
be wrong if the object laid in memory directly after
kexec_purgatory_size contains non-zero value at the time of reading.

This commit changes &lt;name&gt;_size to be size_t instead.

Note:

Another way to fix the problem is to change the type of
kexec_purgatory_size to be 'int' as there's this check in code:
(kexec_purgatory_size &lt;= 0)

Signed-off-by: Michael Tautschnig &lt;tautschn@amazon.com&gt;
Cc: Vivek Goyal &lt;vgoyal@redhat.com&gt;
Acked-by: Dave Young &lt;dyoung@redhat.com&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.com&gt;
</content>
</entry>
<entry>
<title>kbuild: add fine grained build dependencies for exported symbols</title>
<updated>2016-03-29T20:30:56Z</updated>
<author>
<name>Nicolas Pitre</name>
<email>nicolas.pitre@linaro.org</email>
</author>
<published>2016-01-22T18:41:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c1a95fda2a40ae8c7aad3fa44fa7718a3710eb2d'/>
<id>urn:sha1:c1a95fda2a40ae8c7aad3fa44fa7718a3710eb2d</id>
<content type='text'>
Like with kconfig options, we now have the ability to compile in and
out individual EXPORT_SYMBOL() declarations based on the content of
include/generated/autoksyms.h.  However we don't want the entire
world to be rebuilt whenever that file is touched.

Let's apply the same build dependency trick used for CONFIG_* symbols
where the time stamp of empty files whose paths matching those symbols
is used to trigger fine grained rebuilds. In our case the key is the
symbol name passed to EXPORT_SYMBOL().

However, unlike config options, we cannot just use fixdep to parse
the source code for EXPORT_SYMBOL(ksym) because several variants exist
and parsing them all in a separate tool, and keeping it in synch, is
not trivially maintainable.  Furthermore, there are variants such as

	EXPORT_SYMBOL_GPL(pci_user_read_config_##size);

that are instanciated via a macro for which we can't easily determine
the actual exported symbol name(s) short of actually running the
preprocessor on them.

Storing the symbol name string in a special ELF section doesn't work
for targets that output assembly or preprocessed source.

So the best way is really to leverage the preprocessor by having it
output actual symbol names anchored by a special sequence that can be
easily filtered out. Then the list of symbols is simply fed to fixdep
to be merged with the other dependencies.

That implies the preprocessor is executed twice for each source file.
A previous attempt relied on a warning pragma for each EXPORT_SYMBOL()
instance that was filtered apart from stderr by the build system with
a sed script during the actual compilation pass. Unfortunately the
preprocessor/compiler diagnostic output isn't stable between versions
and this solution, although more efficient, was deemed too fragile.

Because of the lowercasing performed by fixdep, there might be name
collisions triggering spurious rebuilds for similar symbols. But this
shouldn't be a big issue in practice. (This is the case for CONFIG_*
symbols and I didn't want to be different here, whatever the original
reason for doing so.)

To avoid needless build overhead, the exported symbol name gathering is
performed only when CONFIG_TRIM_UNUSED_KSYMS is selected.

Signed-off-by: Nicolas Pitre &lt;nico@linaro.org&gt;
Acked-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>fixdep: accept extra dependencies on stdin</title>
<updated>2016-03-29T20:19:40Z</updated>
<author>
<name>Nicolas Pitre</name>
<email>nicolas.pitre@linaro.org</email>
</author>
<published>2016-02-12T20:00:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d8329e35cc08e07a3250b3873325d300c1e91c81'/>
<id>urn:sha1:d8329e35cc08e07a3250b3873325d300c1e91c81</id>
<content type='text'>
... and merge them in the list of parsed dependencies.

Signed-off-by: Nicolas Pitre &lt;nico@linaro.org&gt;
</content>
</entry>
<entry>
<title>kbuild: fixdep: Check fstat(2) return value</title>
<updated>2016-02-17T21:52:04Z</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2015-12-07T21:26:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=46fe94ad18aa7ce6b3dad8c035fb538942020f2b'/>
<id>urn:sha1:46fe94ad18aa7ce6b3dad8c035fb538942020f2b</id>
<content type='text'>
Coverity has recently added a check that will find when we don't check
the return code from fstat(2).  Copy/paste the checking logic that
print_deps() has with an appropriate re-wording of the perror() message.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.com&gt;
</content>
</entry>
<entry>
<title>fixdep: constify strrcmp arguments</title>
<updated>2015-12-07T11:42:55Z</updated>
<author>
<name>Nicolas Iooss</name>
<email>nicolas.iooss_linux@m4x.org</email>
</author>
<published>2015-11-18T18:07:15Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4c835b57b8de88aef8446867701034128a8a3522'/>
<id>urn:sha1:4c835b57b8de88aef8446867701034128a8a3522</id>
<content type='text'>
strrcmp only performs read access to the memory addressed by its
arguments so make them const pointers.

Signed-off-by: Nicolas Iooss &lt;nicolas.iooss_linux@m4x.org&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.com&gt;
</content>
</entry>
<entry>
<title>kbuild: fixdep: drop meaningless hash table initialization</title>
<updated>2015-08-24T14:36:08Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2015-07-24T05:18:46Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d179e22762fd38414c4108acedd5feca4cf7e0d8'/>
<id>urn:sha1:d179e22762fd38414c4108acedd5feca4cf7e0d8</id>
<content type='text'>
The clear_config() is called just once at the beginning of this
program, but the global variable hashtab[] is already zero-filled
at the start-up.

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.com&gt;
</content>
</entry>
<entry>
<title>kbuild: fixdep: optimize code slightly</title>
<updated>2015-08-24T14:36:08Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2015-07-24T05:18:45Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d721109611fb94aff53c2397859046e5f92f55ae'/>
<id>urn:sha1:d721109611fb94aff53c2397859046e5f92f55ae</id>
<content type='text'>
If the target string matches "CONFIG_", move the pointer p
forward.  This saves several 7-chars adjustments.

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.com&gt;
</content>
</entry>
<entry>
<title>kernel: build bin2c based on config option CONFIG_BUILD_BIN2C</title>
<updated>2014-08-08T22:57:32Z</updated>
<author>
<name>Vivek Goyal</name>
<email>vgoyal@redhat.com</email>
</author>
<published>2014-08-08T21:25:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=de5b56ba51f63973ceb5c184ee0855f0c8a13fc9'/>
<id>urn:sha1:de5b56ba51f63973ceb5c184ee0855f0c8a13fc9</id>
<content type='text'>
currently bin2c builds only if CONFIG_IKCONFIG=y. But bin2c will now be
used by kexec too.  So make it compilation dependent on CONFIG_BUILD_BIN2C
and this config option can be selected by CONFIG_KEXEC and CONFIG_IKCONFIG.

Signed-off-by: Vivek Goyal &lt;vgoyal@redhat.com&gt;
Cc: Borislav Petkov &lt;bp@suse.de&gt;
Cc: Michael Kerrisk &lt;mtk.manpages@gmail.com&gt;
Cc: Yinghai Lu &lt;yinghai@kernel.org&gt;
Cc: Eric Biederman &lt;ebiederm@xmission.com&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Matthew Garrett &lt;mjg59@srcf.ucam.org&gt;
Cc: Greg Kroah-Hartman &lt;greg@kroah.com&gt;
Cc: Dave Young &lt;dyoung@redhat.com&gt;
Cc: WANG Chao &lt;chaowang@redhat.com&gt;
Cc: Baoquan He &lt;bhe@redhat.com&gt;
Cc: Andy Lutomirski &lt;luto@amacapital.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>bin2c: move bin2c in scripts/basic</title>
<updated>2014-08-08T22:57:32Z</updated>
<author>
<name>Vivek Goyal</name>
<email>vgoyal@redhat.com</email>
</author>
<published>2014-08-08T21:25:38Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8370edea81e321b8a976969753d6b2811e6d5ed6'/>
<id>urn:sha1:8370edea81e321b8a976969753d6b2811e6d5ed6</id>
<content type='text'>
This patch series does not do kernel signature verification yet.  I plan
to post another patch series for that.  Now distributions are already
signing PE/COFF bzImage with PKCS7 signature I plan to parse and verify
those signatures.

Primary goal of this patchset is to prepare groundwork so that kernel
image can be signed and signatures be verified during kexec load.  This
should help with two things.

- It should allow kexec/kdump on secureboot enabled machines.

- In general it can help even without secureboot. By being able to verify
  kernel image signature in kexec, it should help with avoiding module
  signing restrictions. Matthew Garret showed how to boot into a custom
  kernel, modify first kernel's memory and then jump back to old kernel and
  bypass any policy one wants to.

This patch (of 15):

Kexec wants to use bin2c and it wants to use it really early in the build
process. See arch/x86/purgatory/ code in later patches.

So move bin2c in scripts/basic so that it can be built very early and
be usable by arch/x86/purgatory/

Signed-off-by: Vivek Goyal &lt;vgoyal@redhat.com&gt;
Cc: Borislav Petkov &lt;bp@suse.de&gt;
Cc: Michael Kerrisk &lt;mtk.manpages@gmail.com&gt;
Cc: Yinghai Lu &lt;yinghai@kernel.org&gt;
Cc: Eric Biederman &lt;ebiederm@xmission.com&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Matthew Garrett &lt;mjg59@srcf.ucam.org&gt;
Cc: Greg Kroah-Hartman &lt;greg@kroah.com&gt;
Cc: Dave Young &lt;dyoung@redhat.com&gt;
Cc: WANG Chao &lt;chaowang@redhat.com&gt;
Cc: Baoquan He &lt;bhe@redhat.com&gt;
Cc: Andy Lutomirski &lt;luto@amacapital.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
