- 21 1月, 2016 1 次提交
-
-
由 Andrey Ryabinin 提交于
UBSAN uses compile-time instrumentation to catch undefined behavior (UB). Compiler inserts code that perform certain kinds of checks before operations that could cause UB. If check fails (i.e. UB detected) __ubsan_handle_* function called to print error message. So the most of the work is done by compiler. This patch just implements ubsan handlers printing errors. GCC has this capability since 4.9.x [1] (see -fsanitize=undefined option and its suboptions). However GCC 5.x has more checkers implemented [2]. Article [3] has a bit more details about UBSAN in the GCC. [1] - https://gcc.gnu.org/onlinedocs/gcc-4.9.0/gcc/Debugging-Options.html [2] - https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html [3] - http://developerblog.redhat.com/2014/10/16/gcc-undefined-behavior-sanitizer-ubsan/ Issues which UBSAN has found thus far are: Found bugs: * out-of-bounds access - 97840cb6 ("netfilter: nfnetlink: fix insufficient validation in nfnetlink_bind") undefined shifts: * d48458d4 ("jbd2: use a better hash function for the revoke table") * 10632008 ("clockevents: Prevent shift out of bounds") * 'x << -1' shift in ext4 - http://lkml.kernel.org/r/<5444EF21.8020501@samsung.com> * undefined rol32(0) - http://lkml.kernel.org/r/<1449198241-20654-1-git-send-email-sasha.levin@oracle.com> * undefined dirty_ratelimit calculation - http://lkml.kernel.org/r/<566594E2.3050306@odin.com> * undefined roundown_pow_of_two(0) - http://lkml.kernel.org/r/<1449156616-11474-1-git-send-email-sasha.levin@oracle.com> * [WONTFIX] undefined shift in __bpf_prog_run - http://lkml.kernel.org/r/<CACT4Y+ZxoR3UjLgcNdUm4fECLMx2VdtfrENMtRRCdgHB2n0bJA@mail.gmail.com> WONTFIX here because it should be fixed in bpf program, not in kernel. signed overflows: * 32a8df4e ("sched: Fix odd values in effective_load() calculations") * mul overflow in ntp - http://lkml.kernel.org/r/<1449175608-1146-1-git-send-email-sasha.levin@oracle.com> * incorrect conversion into rtc_time in rtc_time64_to_tm() - http://lkml.kernel.org/r/<1449187944-11730-1-git-send-email-sasha.levin@oracle.com> * unvalidated timespec in io_getevents() - http://lkml.kernel.org/r/<CACT4Y+bBxVYLQ6LtOKrKtnLthqLHcw-BMp3aqP3mjdAvr9FULQ@mail.gmail.com> * [NOTABUG] signed overflow in ktime_add_safe() - http://lkml.kernel.org/r/<CACT4Y+aJ4muRnWxsUe1CMnA6P8nooO33kwG-c8YZg=0Xc8rJqw@mail.gmail.com> [akpm@linux-foundation.org: fix unused local warning] [akpm@linux-foundation.org: fix __int128 build woes] Signed-off-by: NAndrey Ryabinin <aryabinin@virtuozzo.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Sasha Levin <sasha.levin@oracle.com> Cc: Randy Dunlap <rdunlap@infradead.org> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Michal Marek <mmarek@suse.cz> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Yury Gribov <y.gribov@samsung.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kostya Serebryany <kcc@google.com> Cc: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 11 1月, 2016 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 04 1月, 2016 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 28 12月, 2015 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 21 12月, 2015 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 17 12月, 2015 1 次提交
-
-
由 Wang YanQing 提交于
Commit 62718979 ("Makefile: Document ability to make file.lst and file.S") document ability to make file.S, but there isn't such ability in kbuild, so revert it. Signed-off-by: NWang YanQing <udknight@gmail.com> Signed-off-by: NMichal Marek <mmarek@suse.com>
-
- 14 12月, 2015 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 10 12月, 2015 1 次提交
-
-
由 Michal Marek 提交于
Based on a x86-only patch by Andy Lutomirski <luto@amacapital.net> With modular kernels, 'make install' is going to need the installed modules at some point to generate the initramfs. Signed-off-by: NMichal Marek <mmarek@suse.cz>
-
- 07 12月, 2015 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 30 11月, 2015 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 23 11月, 2015 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 16 11月, 2015 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 02 11月, 2015 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 25 10月, 2015 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 19 10月, 2015 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 12 10月, 2015 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 08 10月, 2015 1 次提交
-
-
由 Wang Long 提交于
We use $make TARGETS="size timers" kselftest to build and run selftests. but there is no rule for us to clean the kselftest generated files. This patch add the rules, for example: $ make TARGETS="size timers" kselftest-clean can clean all kselftest generated files. Signed-off-by: NWang Long <long.wanglong@huawei.com> Acked-by: NMichael Ellerman <mpe@ellerman.id.au> Signed-off-by: NMichal Marek <mmarek@suse.com>
-
- 04 10月, 2015 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 01 10月, 2015 1 次提交
-
-
由 Feng Wu 提交于
We need to build files in virt/lib/, which are now used by KVM and VFIO, so add virt directory to the top Makefile. Signed-off-by: NFeng Wu <feng.wu@intel.com> Acked-by: NMichal Marek <mmarek@suse.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 28 9月, 2015 1 次提交
-
-
由 Ben Hutchings 提交于
Currently the encoding of documents generated by DocBook depends on the current locale. Make the output reproducible independently of the locale, by setting the encoding to UTF-8 (LC_CTYPE=C.UTF-8) by preference, or ASCII (LC_CTYPE=C) as a fallback. LC_CTYPE can normally be overridden by LC_ALL, but the top-level Makefile unsets that. Signed-off-by: NBen Hutchings <ben@decadent.org.uk> [jc: added check-lc_ctype to .gitignore] Signed-off-by: NJonathan Corbet <corbet@lwn.net>
-
- 27 9月, 2015 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 21 9月, 2015 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 13 9月, 2015 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 04 9月, 2015 1 次提交
-
-
由 Michal Marek 提交于
We cannot detect clang before including the arch Makefile, because that can set the default cross compiler. We also cannot detect clang after including the arch Makefile, because powerpc wants to know about clang. Solve this by using an deferred variable. This costs us a few shell invocations, but this is only a constant number. Reported-by: NBehan Webster <behanw@converseincode.com> Reported-by: NAnton Blanchard <anton@samba.org> Signed-off-by: NMichal Marek <mmarek@suse.com>
-
- 31 8月, 2015 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 28 8月, 2015 1 次提交
-
-
由 Rasmus Villemoes 提交于
Make sure 'make clean' removes *.su files generated by the gcc option -fstack-usage. Signed-off-by: NRasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: NMichal Marek <mmarek@suse.com>
-
- 24 8月, 2015 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 17 8月, 2015 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 14 8月, 2015 2 次提交
-
-
由 David Woodhouse 提交于
Since commit 1329e8cc ("modsign: Extract signing cert from CONFIG_MODULE_SIG_KEY if needed"), the build system has carefully coped with the signing key being specified as a relative path in either the source or or the build trees. However, the actual signing of modules has not worked if the filename is relative to the source tree. Fix that by moving the config_filename helper into scripts/Kbuild.include so that it can be used from elsewhere, and then using it in the top-level Makefile to find the signing key file. Kill the intermediate $(MODPUBKEY) and $(MODSECKEY) variables too, while we're at it. There's no need for them. Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com> Signed-off-by: NDavid Howells <dhowells@redhat.com>
-
由 David Howells 提交于
Move certificate handling out of the kernel/ directory and into a certs/ directory to get all the weird stuff in one place and move the generated signing keys into this directory. Signed-off-by: NDavid Howells <dhowells@redhat.com> Reviewed-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-
- 10 8月, 2015 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 07 8月, 2015 3 次提交
-
-
由 David Woodhouse 提交于
The current rule for generating signing_key.priv and signing_key.x509 is a classic example of a bad rule which has a tendency to break parallel make. When invoked to create *either* target, it generates the other target as a side-effect that make didn't predict. So let's switch to using a single file signing_key.pem which contains both key and certificate. That matches what we do in the case of an external key specified by CONFIG_MODULE_SIG_KEY anyway, so it's also slightly cleaner. Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com> Signed-off-by: NDavid Howells <dhowells@redhat.com>
-
由 David Woodhouse 提交于
Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com> Signed-off-by: NDavid Howells <dhowells@redhat.com>
-
由 David Howells 提交于
Move to using PKCS#7 messages as module signatures because: (1) We have to be able to support the use of X.509 certificates that don't have a subjKeyId set. We're currently relying on this to look up the X.509 certificate in the trusted keyring list. (2) PKCS#7 message signed information blocks have a field that supplies the data required to match with the X.509 certificate that signed it. (3) The PKCS#7 certificate carries fields that specify the digest algorithm used to generate the signature in a standardised way and the X.509 certificates specify the public key algorithm in a standardised way - so we don't need our own methods of specifying these. (4) We now have PKCS#7 message support in the kernel for signed kexec purposes and we can make use of this. To make this work, the old sign-file script has been replaced with a program that needs compiling in a previous patch. The rules to build it are added here. Signed-off-by: NDavid Howells <dhowells@redhat.com> Tested-by: NVivek Goyal <vgoyal@redhat.com>
-
- 03 8月, 2015 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 27 7月, 2015 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 22 7月, 2015 2 次提交
-
-
由 Jason A. Donenfeld 提交于
Running `make modules_install` ordinarily will overwrite existing modules. This is the desired behavior, and is how pretty much every other `make install` target works. However, if CONFIG_MODULE_COMPRESS is enabled, modules are passed through gzip and xz which then do the file writing. Both gzip and xz will error out if the file already exists, unless -f is passed. This patch adds -f so that the behavior is uniform. Signed-off-by: NJason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: NMichal Marek <mmarek@suse.com>
-
由 Michal Marek 提交于
Initialize the ARCH_* overrides before including the arch Makefile, to avoid picking up the values from the environment. The variables can still be overriden on the make command line, but this won't happen by accident. Signed-off-by: NMichal Marek <mmarek@suse.com>
-
- 20 7月, 2015 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 13 7月, 2015 1 次提交
-
-
由 Linus Torvalds 提交于
-