21 Jan, 2016
8 commits
-
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 - 97840cb67ff5 ("netfilter: nfnetlink: fix
insufficient validation in nfnetlink_bind")undefined shifts:
* d48458d4a768 ("jbd2: use a better hash function for the revoke
table")* 10632008b9e1 ("clockevents: Prevent shift out of bounds")
* 'x << -1' shift in ext4 -
http://lkml.kernel.org/r/* undefined rol32(0) -
http://lkml.kernel.org/r/* undefined dirty_ratelimit calculation -
http://lkml.kernel.org/r/* undefined roundown_pow_of_two(0) -
http://lkml.kernel.org/r/* [WONTFIX] undefined shift in __bpf_prog_run -
http://lkml.kernel.org/r/WONTFIX here because it should be fixed in bpf program, not in kernel.
signed overflows:
* 32a8df4e0b33f ("sched: Fix odd values in effective_load()
calculations")* mul overflow in ntp -
http://lkml.kernel.org/r/* incorrect conversion into rtc_time in rtc_time64_to_tm() -
http://lkml.kernel.org/r/* unvalidated timespec in io_getevents() -
http://lkml.kernel.org/r/* [NOTABUG] signed overflow in ktime_add_safe() -
http://lkml.kernel.org/r/[akpm@linux-foundation.org: fix unused local warning]
[akpm@linux-foundation.org: fix __int128 build woes]
Signed-off-by: Andrey Ryabinin
Cc: Peter Zijlstra
Cc: Sasha Levin
Cc: Randy Dunlap
Cc: Rasmus Villemoes
Cc: Jonathan Corbet
Cc: Michal Marek
Cc: Thomas Gleixner
Cc: Ingo Molnar
Cc: "H. Peter Anvin"
Cc: Yury Gribov
Cc: Dmitry Vyukov
Cc: Konstantin Khlebnikov
Cc: Kostya Serebryany
Cc: Johannes Berg
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
A simple search over the kernel souce displays a number of correctly
defined multiline macro, which generally are used as an array element
initializer:% find ../linux -type f | xargs grep -B1 -H '^[:space]*\[.*\\$'
However checkpatch.pl unexpectedly complains about all these macro
definitions:% ./scripts/checkpatch.pl --types COMPLEX_MACRO -f include/linux/perf/arm_pmu.h
ERROR: Macros with complex values should be enclosed in parentheses
+#define PERF_MAP_ALL_UNSUPPORTED \
+ [0 ... PERF_COUNT_HW_MAX - 1] = HW_OP_UNSUPPORTEDThe change intends to fix this type of false positives by flattening
only array members and skipping array element designators.Signed-off-by: Vladimir Zapolskiy
Acked-by: Joe Perches
Cc: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The current test excludes any macro with ## concatenation from being
reported with hidden flow control.Some macros are used with return or goto statements along with ##args or
##__VA_ARGS__. A somewhat common case is a logging macro like
pr_info(fmt, ...) then a return or goto statement.Check the concatenated variable for args or __VA_ARGS__ and allow those
macros to also be reported when they contain a return or goto.Signed-off-by: Joe Perches
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Linus Torvalds wrote:
> I can't but help to react that this:
> #define IOMMU_ERROR_CODE (~(unsigned long) 0)
> Not that this *matters*, but it's a bit odd to have to cast constants
> to perfectly regular C types.So add a test that looks for constants that are cast to
standard C90 int or longer types and suggest using C90
"6.4.4.1 Integer constants" integer-suffixes instead.Miscellanea:
o Add a --fix option too
Signed-off-by: Joe Perches
Suggested-by: Andrew Morton
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The problem is that get_maintainer.pl doesn't work if you have a ./
prefix on the filename. For example, if you type:./scripts/get_maintainer.pl -f ./drivers/usb/usb-skeleton.c
then the current code only includes LKML and people from the git log, it
doesn't include Greg or the linux-usb list.Reported-by: Dan Carpenter
Cc: Joe Perches
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Pull misc kbuild updates from Michal Marek:
- Fix for make O=... perf-tar*
- make tags revamp and fix for the fallout. Patch for warnings about
line breaks inside DEFINE_PER_CPU macros is pending
- New coccinelle test* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
coccinelle: tests: unsigned value cannot be lesser than zero
tags: Unify emacs and exuberant rules
tags: Drop the _PE rule
tags: Do not try to index defconfigs
tags: Process Kconfig files in a single pass
tags: Fix erroneous pattern match in a comment
aic7xxx: Avoid name collision with
tags: Treat header files as C code
package Makefile: fix perf-tar targets when outdir is set
scripts/tags.sh: Teach tags about more powerpc macros -
Pull kconfig updates from Michal Marek:
- Fix for make xconfig segfault
- Handle long strings in config symbol values
- Fix for mixing boolean and kconfig ternary type* 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
kconfig: fix qconf segfault by deleting heap objects
kconfig: return 'false' instead of 'no' in bool function
kconfig: allow kconfig to handle longer path names -
Pull kbuild updates from Michal Marek:
- Make -m in makefiles work like -y and fix the
fallout
- Minor genksyms fix
- Fix race with make -j install modules_install
- Move -Wsign-compare from make W=1 to W=2
- Other minor fixes* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
kbuild: Demote 'sign-compare' warning to W=2
Makefile: revert "Makefile: Document ability to make file.lst and file.S" partially
kbuild: Do not run modules_install and install in paralel
genksyms: Handle string literals with spaces in reference files
fixdep: constify strrcmp arguments
ath10k: Fix build with CONFIG_THERMAL=m
Revert "drm: Hack around CONFIG_AGP=m build failures"
kbuild: Allow to specify composite modules with modname-m
staging/ad7606: Actually build the interface modules
19 Jan, 2016
1 commit
-
Pull virtio barrier rework+fixes from Michael Tsirkin:
"This adds a new kind of barrier, and reworks virtio and xen to use it.Plus some fixes here and there"
* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (44 commits)
checkpatch: add virt barriers
checkpatch: check for __smp outside barrier.h
checkpatch.pl: add missing memory barriers
virtio: make find_vqs() checkpatch.pl-friendly
virtio_balloon: fix race between migration and ballooning
virtio_balloon: fix race by fill and leak
s390: more efficient smp barriers
s390: use generic memory barriers
xen/events: use virt_xxx barriers
xen/io: use virt_xxx barriers
xenbus: use virt_xxx barriers
virtio_ring: use virt_store_mb
sh: move xchg_cmpxchg to a header by itself
sh: support 1 and 2 byte xchg
virtio_ring: update weak barriers to use virt_xxx
Revert "virtio_ring: Update weak barriers to use dma_wmb/rmb"
asm-generic: implement virt_xxx memory barriers
x86: define __smp_xxx
xtensa: define __smp_xxx
tile: define __smp_xxx
...
18 Jan, 2016
2 commits
-
Merge second patch-bomb from Andrew Morton:
- more MM stuff:
- Kirill's page-flags rework
- Kirill's now-allegedly-fixed THP rework
- MADV_FREE implementation
- DAX feature work (msync/fsync). This isn't quite complete but DAX
is new and it's good enough and the guys have a handle on what
needs to be done - I expect this to be wrapped in the next week or
two.- some vsprintf maintenance work
- various other misc bits
* emailed patches from Andrew Morton : (145 commits)
printk: change recursion_bug type to bool
lib/vsprintf: factor out %pN[F] handler as netdev_bits()
lib/vsprintf: refactor duplicate code to special_hex_number()
printk-formats.txt: remove unimplemented %pT
printk: help pr_debug and pr_devel to optimize out arguments
lib/test_printf.c: test dentry printing
lib/test_printf.c: add test for large bitmaps
lib/test_printf.c: account for kvasprintf tests
lib/test_printf.c: add a few number() tests
lib/test_printf.c: test precision quirks
lib/test_printf.c: check for out-of-bound writes
lib/test_printf.c: don't BUG
lib/kasprintf.c: add sanity check to kvasprintf
lib/vsprintf.c: warn about too large precisions and field widths
lib/vsprintf.c: help gcc make number() smaller
lib/vsprintf.c: expand field_width to 24 bits
lib/vsprintf.c: eliminate potential race in string()
lib/vsprintf.c: move string() below widen_string()
lib/vsprintf.c: pull out padding code from dentry_name()
printk: do cond_resched() between lines while outputting to consoles
... -
Pull documentation updates from Jon Corbet:
"A relatively boring cycle in the docs tree. There's a few kernel-doc
fixes and various document tweaks.One patch reaches out of the documentation subtree to fix a comment in
init/do_mounts_rd.c. There didn't seem to be anybody more appropriate
to take that one, so I accepted it"* tag 'docs-4.5' of git://git.lwn.net/linux: (29 commits)
thermal: add description for integral_cutoff unit
Documentation: update libhugetlbfs site url
Documentation: Explain pci=conf1,conf2 more verbosely
DMA-API: fix confusing sentence in Documentation/DMA-API.txt
Documentation: translations: update linux cross reference link
Documentation: fix typo in CodingStyle
init, Documentation: Remove ramdisk_blocksize mentions
Documentation-getdelays: Apply a recommendation from "checkpatch.pl" in main()
Documentation: HOWTO: update versions from 3.x to 4.x
Documentation: remove outdated references from translations
Doc: treewide: Fix grammar "a" to "an"
Documentation: cpu-hotplug: Fix sysfs mount instructions
can-doc: Add hint about getting timestamps
Fix CFQ I/O scheduler parameter name in documentation
Documentation: arm: remove dead links from Marvell Berlin docs
Documentation: HOWTO: update code cross reference link
Doc: Docbook/iio: Fix typo in iio.tmpl
DocBook: make index.html generation less verbose by default
DocBook: Cleanup: remove an unused $(call) line
DocBook: Add a help message for DOCBOOKS env var
...
16 Jan, 2016
2 commits
-
Nobody uses them.
Signed-off-by: Kirill A. Shutemov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Pull powerpc updates from Michael Ellerman:
"Core:
- Ground work for the new Power9 MMU from Aneesh Kumar K.V
- Optimise FP/VMX/VSX context switching from Anton BlanchardMisc:
- Various cleanups from Krzysztof Kozlowski, John Ogness, Rashmica
Gupta, Russell Currey, Gavin Shan, Daniel Axtens, Michael Neuling,
Andrew Donnellan
- Allow wrapper to work on non-english system from Laurent Vivier
- Add rN aliases to the pt_regs_offset table from Rashmica Gupta
- Fix module autoload for rackmeter & axonram drivers from Luis de
Bethencourt
- Include KVM guest test in all interrupt vectors from Paul Mackerras
- Fix DSCR inheritance over fork() from Anton Blanchard
- Make value-returning atomics & {cmp}xchg* & their atomic_ versions
fully ordered from Boqun Feng
- Print MSR TM bits in oops messages from Michael Neuling
- Add TM signal return & invalid stack selftests from Michael Neuling
- Limit EPOW reset event warnings from Vipin K Parashar
- Remove the Cell QPACE code from Rashmica Gupta
- Append linux_banner to exception information in xmon from Rashmica
Gupta
- Add selftest to check if VSRs are corrupted from Rashmica Gupta
- Remove broken GregorianDay() from Daniel Axtens
- Import Anton's context_switch2 benchmark into selftests from
Michael Ellerman
- Add selftest script to test HMI functionality from Daniel Axtens
- Remove obsolete OPAL v2 support from Stewart Smith
- Make enter_rtas() private from Michael Ellerman
- PPR exception cleanups from Michael Ellerman
- Add page soft dirty tracking from Laurent Dufour
- Add support for Nvlink NPUs from Alistair Popple
- Add support for kexec on 476fpe from Alistair Popple
- Enable kernel CPU dlpar from sysfs from Nathan Fontenot
- Copy only required pieces of the mm_context_t to the paca from
Michael Neuling
- Add a kmsg_dumper that flushes OPAL console output on panic from
Russell Currey
- Implement save_stack_trace_regs() to enable kprobe stack tracing
from Steven Rostedt
- Add HWCAP bits for Power9 from Michael Ellerman
- Fix _PAGE_PTE breaking swapoff from Aneesh Kumar K.V
- Fix _PAGE_SWP_SOFT_DIRTY breaking swapoff from Hugh Dickins
- scripts/recordmcount.pl: support data in text section on powerpc
from Ulrich Weigand
- Handle R_PPC64_ENTRY relocations in modules from Ulrich Weigandcxl:
- cxl: Fix possible idr warning when contexts are released from
Vaibhav Jain
- cxl: use correct operator when writing pcie config space values
from Andrew Donnellan
- cxl: Fix DSI misses when the context owning task exits from Vaibhav
Jain
- cxl: fix build for GCC 4.6.x from Brian Norris
- cxl: use -Werror only with CONFIG_PPC_WERROR from Brian Norris
- cxl: Enable PCI device ID for future IBM CXL adapter from Uma
KrishnanFreescale:
- Freescale updates from Scott: Highlights include moving QE code out
of arch/powerpc (to be shared with arm), device tree updates, and
minor fixes"* tag 'powerpc-4.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (149 commits)
powerpc/module: Handle R_PPC64_ENTRY relocations
scripts/recordmcount.pl: support data in text section on powerpc
powerpc/powernv: Fix OPAL_CONSOLE_FLUSH prototype and usages
powerpc/mm: fix _PAGE_SWP_SOFT_DIRTY breaking swapoff
powerpc/mm: Fix _PAGE_PTE breaking swapoff
cxl: Enable PCI device ID for future IBM CXL adapter
cxl: use -Werror only with CONFIG_PPC_WERROR
cxl: fix build for GCC 4.6.x
powerpc: Add HWCAP bits for Power9
powerpc/powernv: Reserve PE#0 on NPU
powerpc/powernv: Change NPU PE# assignment
powerpc/powernv: Fix update of NVLink DMA mask
powerpc/powernv: Remove misleading comment in pci.c
powerpc: Implement save_stack_trace_regs() to enable kprobe stack tracing
powerpc: Fix build break due to paca mm_context_t changes
cxl: Fix DSI misses when the context owning task exits
MAINTAINERS: Update Scott Wood's e-mail address
powerpc/powernv: Fix minor off-by-one error in opal_mce_check_early_recovery()
powerpc: Fix style of self-test config prompts
powerpc/powernv: Only delay opal_rtc_read() retry when necessary
...
15 Jan, 2016
2 commits
-
Commit ac551828993e ("modpost: i2c aliases need no trailing wildcard")
removed the wildcard at the end of the I2C module aliases because I2C
devices have no IDs so the aliases are just arbitrary device names.This is also true for OF modaliases since a compatible string is used to
define a specific IP hardware block. So the modalias should match a
specific compatible string and not attempt to match a compatible string
whose name matches the beginning of another one.For example, the following driver module:
$ modinfo cros_ec_keyb | grep alias
alias: platform:cros-ec-keyb
alias: of:N*T*Cgoogle,cros-ec-keyb*will be tried to be loaded for an alias of:N*T*Cgoogle,cros-ec-keyb-v2
but there could be a different driver that supports the device for that
compatible string so it's better to remove the trailing wildcard for OF.Also, remove the word "always" from the add_wildcard() function comment
since that was carried from the time where a wildcard was always added
at the end of the module alias for all the devices.Signed-off-by: Javier Martinez Canillas
Suggested-by: Brian Norris
Reviewed-by: Sjoerd Simons
Cc: Rusty Russell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
In Python3+ print is a function so the old syntax is not correct
anymore:$ ./scripts/bloat-o-meter vmlinux.o vmlinux.o.old
File "./scripts/bloat-o-meter", line 61
print "add/remove: %s/%s grow/shrink: %s/%s up/down: %s/%s (%s)" % \
^
SyntaxError: invalid syntaxFix by calling print as a function.
Tested on python 2.7.11, 3.5.1
Signed-off-by: Sergey Senozhatsky
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
14 Jan, 2016
2 commits
-
Pull s390 updates from Martin Schwidefsky:
"Among the traditional bug fixes and cleanups are some improvements:- A tool to generated the facility lists, generating the bit fields
by hand has been a source of bugs in the past- The spinlock loop is reordered to avoid bursts of hypervisor calls
- Add support for the open-for-business interface to the service
element- The get_cpu call is added to the vdso
- A set of tracepoints is defined for the common I/O layer
- The deprecated sclp_cpi module is removed
- Update default configuration"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (56 commits)
s390/sclp: fix possible control register corruption
s390: fix normalization bug in exception table sorting
s390/configs: update default configurations
s390/vdso: optimize getcpu system call
s390: drop smp_mb in vdso_init
s390: rename struct _lowcore to struct lowcore
s390/mem_detect: use unsigned longs
s390/ptrace: get rid of long longs in psw_bits
s390/sysinfo: add missing SYSIB 1.2.2 multithreading fields
s390: get rid of CONFIG_SCHED_MC and CONFIG_SCHED_BOOK
s390/Kconfig: remove pointless 64 bit dependencies
s390/dasd: fix failfast for disconnected devices
s390/con3270: testing return kzalloc retval
s390/hmcdrv: constify hmcdrv_ftp_ops structs
s390/cio: add NULL test
s390/cio: Change I/O instructions from inline to normal functions
s390/cio: Introduce common I/O layer tracepoints
s390/cio: Consolidate inline assemblies and related data definitions
s390/cio: Fix incorrect xsch opcode specification
s390/cio: Remove unused inline assemblies
... -
Pull char/misc updates from Greg KH:
"Here's the big set of char/misc patches for 4.5-rc1.Nothing major, lots of different driver subsystem updates, full
details in the shortlog. All of these have been in linux-next for a
while"* tag 'char-misc-4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (71 commits)
mei: fix fasync return value on error
parport: avoid assignment in if
parport: remove unneeded space
parport: change style of NULL comparison
parport: remove unnecessary out of memory message
parport: remove braces
parport: quoted strings should not be split
parport: code indent should use tabs
parport: fix coding style
parport: EXPORT_SYMBOL should follow function
parport: remove trailing white space
parport: fix a trivial typo
coresight: Fix a typo in Kconfig
coresight: checking for NULL string in coresight_name_match()
Drivers: hv: vmbus: Treat Fibre Channel devices as performance critical
Drivers: hv: utils: fix hvt_op_poll() return value on transport destroy
Drivers: hv: vmbus: fix the building warning with hyperv-keyboard
extcon: add Maxim MAX3355 driver
Drivers: hv: ring_buffer: eliminate hv_ringbuffer_peek()
Drivers: hv: remove code duplication between vmbus_recvpacket()/vmbus_recvpacket_raw()
...
13 Jan, 2016
7 commits
-
If a text section starts out with a data blob before the first
function start label, disassembly parsing doing in recordmcount.pl
gets confused on powerpc, leading to creation of corrupted module
objects.This was not a problem so far since the compiler would never create
such text sections. However, this has changed with a recent change
in GCC 6 to support distances of > 2GB between a function and its
assoicated TOC in the ELFv2 ABI, exposing this problem.There is already code in recordmcount.pl to handle such data blobs
on the sparc64 platform. This patch uses the same method to handle
those on powerpc as well.Cc: stable@vger.kernel.org
Acked-by: Steven Rostedt
Signed-off-by: Ulrich Weigand
Signed-off-by: Michael Ellerman -
Pull UML updates from Richard Weinberger:
"This contains beside of random fixes/cleanups two bigger changes:- seccomp support by Mickaël Salaün
- IRQ rework by Anton Ivanov"
* 'for-linus-4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
um: Use race-free temporary file creation
um: Do not set unsecure permission for temporary file
um: Fix build error and kconfig for i386
um: Add seccomp support
um: Add full asm/syscall.h support
selftests/seccomp: Remove the need for HAVE_ARCH_TRACEHOOK
um: Fix ptrace GETREGS/SETREGS bugs
um: link with -lpthread
um: Update UBD to use pread/pwrite family of functions
um: Do not change hard IRQ flags in soft IRQ processing
um: Prevent IRQ handler reentrancy
uml: flush stdout before forking
uml: fix hostfs mknod() -
Add virt_ barriers to list of barriers to check for
presence of a comment.Signed-off-by: Michael S. Tsirkin
Acked-by: Julian Calaby
Acked-by: Joe Perches
Acked-by: Peter Zijlstra (Intel) -
Introduction of __smp barriers cleans up a bunch of duplicate code, but
it gives people an additional handle onto a "new" set of barriers - just
because they're prefixed with __* unfortunately doesn't stop anyone from
using it (as happened with other arch stuff before.)Add a checkpatch test so it will trigger a warning.
Reported-by: Russell King
Signed-off-by: Michael S. Tsirkin
Acked-by: Julian Calaby
Acked-by: Joe Perches
Acked-by: Peter Zijlstra (Intel) -
SMP-only barriers were missing in checkpatch.pl
Refactor code slightly to make adding more variants easier.
Signed-off-by: Michael S. Tsirkin
Acked-by: Julian Calaby
Acked-by: Joe Perches
Acked-by: Peter Zijlstra (Intel) -
Pull MIPS fixes from Ralf Baechle:
"This is the final pull request for MIPS for 4.4. It fixes:- scripts/ld-version.sh parsing of ld version numbers that contain
large numbers as components.
- fix parsing of version numbers as used by Fedora's ld.Currently scripts/ld-version.sh is only being used by MIPS"
[ This obviously missed 4.4, so getting merged now in the merge window
for 4.5 instead ]* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
ld-version: Fix it on Fedora
Fix ld-version.sh to handle large 3rd version part -
Unsigned expressions cannot be lesser than zero. Presence of comparisons
'unsigned (|>=) 0' often indicates a bug, usually wrong type of variable.
The patch beside finding such comparisons tries to eliminate false positives,
mainly by bypassing range checks.gcc can detect such comparisons also using -Wtype-limits switch, but it warns
also in correct cases, making too much noise.Signed-off-by: Andrzej Hajda
Acked-by: Julia Lawall
Signed-off-by: Michal Marek
12 Jan, 2016
1 commit
-
Ideally, a kernel compile with W=1 enabled should complete cleanly;
however, when we run one currently we are presented with ~25k warnings.
'sign-compare' accounts for ~22k of those ~25k.In this patch we're demoting 'sign-compare' warnings to W=2, with a view
to fixing the remaining 3k W=1 warnings required for a clean build.Arnd adds:
"As per our discussion, I'd add that this was inadvertedly introduced
by Behan when he moved the clang specific warnings into an ifdef block
and did not notice that -Wsign-compare was interpreted by both gcc
and clang.Earlier, it was introduced in just the same way by Jan-Simon as part
of 3d3d6b847420 ("kbuild: LLVMLinux: Adapt warnings for compilation
with clang")."Acked-by: Arnd Bergmann
Fixes: 26ea6bb1fef0 ("kbuild, LLVMLinux: Supress warnings unless W=1-3")
Signed-off-by: Lee Jones
Signed-off-by: Michal Marek
11 Jan, 2016
2 commits
-
On Debian stable (qt-4.8.6) 'make xconfig' intermittently fails due to
qconf segfaulting at exit time in QXcbEventReader. The cause of this is
destructors on the heap objects never being called, so fix this by
properly deleting the heap objects before exit.Signed-off-by: Chris Bainbridge
Signed-off-by: Michal Marek -
Similarly to commit fb1770aa78a43530940d0c2dd161e77bc705bdac, with gcc 5
on Ubuntu and CONFIG_STATIC_LINK=y I was seeing these linker errors:/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/librt.a(timer_create.o): In function `__timer_create_new':
(.text+0xcd): undefined reference to `pthread_once'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/librt.a(timer_create.o): In function `__timer_create_new':
(.text+0x126): undefined reference to `pthread_attr_init'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/librt.a(timer_create.o): In function `__timer_create_new':
(.text+0x168): undefined reference to `pthread_attr_setdetachstate'
[...]Obviously we also need -lpthread for librt.a.
Cc: stable@vger.kernel.org # 4.4
Signed-off-by: Vegard Nossum
Signed-off-by: Richard Weinberger
08 Jan, 2016
1 commit
-
On Fedora 23, ld --version outputs:
GNU ld version 2.25-15.fc23But ld-version.sh fails to parse this, so e.g. mips build fails to
enable VDSO, printing a warning that binutils >= 2.24 is required.To fix, teach ld-version to parse this format.
Signed-off-by: Michael S. Tsirkin
Cc: linux-kernel@vger.kernel.org
Cc: Michal Marek
Cc: linux-kbuild@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/12023/
Signed-off-by: Ralf Baechle
06 Jan, 2016
6 commits
-
The emacs rules were constantly lagging behind the exuberant ones. Use a
single set of rules for both, to make the script easier to maintain.
The language understood by both tools is basic regular expression with
some limitations, which are documented in a comment. To be able to store
the rules in an array and easily iterate over it, the script requires
bash now. In the exuberant case, the change fixes some false matches in
and also some too greedy matches in the arguments
of the DECLARE_*/DEFINE_* macros. In the emacs case, several previously
not working rules are matching now. Tested with these versions of the
tools:Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
etags (GNU Emacs 24.5)Signed-off-by: Michal Marek
-
We are not indexing the userspace tools, so the rules only match some
false positives in the kernel code.Signed-off-by: Michal Marek
-
The defconfig files are in predictable locations, so there is no need to
index them. Plus, the script was only looking for files named
'defconfig', which only works on a few architectures nowadays.Signed-off-by: Michal Marek
-
Signed-off-by: Michal Marek
-
Apparently, ctags applies the rules before deleting comments:
ctags: Warning: include/linux/completion.h:22: null expansion of name pattern "\2"
Work around this particular case by requiring the group to contain at
least one character. Leave the other patters as they are, until a better
solution is found.Signed-off-by: Michal Marek
-
This allows to apply the same patters to both source and header files.
The effect is mostly visible in the case of DECLARE_BITMAP, but there
are small gains all over the place. There is also lots of random changes
in the diff, I believe this is simply because there are still lots of
unexpanded macros in the code and the C and C++ parsers fail and recover
at different points. Also, qconf.h is parsed as C, but that's a
negligible regression.Signed-off-by: Michal Marek
05 Jan, 2016
2 commits
-
menu_is_visible() is a bool function and should use boolean return
values. "no" is a tristate value which happens to also have a value
of 0, but we should nevertheless use the right symbol for it.This is a very minor cleanup with no semantic change.
Fixes: 86e187ff9 ("kconfig: add an option to determine a menu's visibility")
Cc: Arnaud Lacombe
Cc: Mauro Carvalho Chehab
Signed-off-by: Vegard Nossum
Signed-off-by: Michal Marek -
Fix build warning:
scripts/recordmcount.c:589:4: warning: format not a string
literal and no format arguments [-Wformat-security]
sprintf("%s: failed\n", file);Fixes: a50bd43935586 ("ftrace/scripts: Have recordmcount copy the object file")
Link: http://lkml.kernel.org/r/1451516801-16951-1-git-send-email-colin.king@canonical.comCc: Li Bin
Cc: Russell King
Cc: Will Deacon
Cc: stable@vger.kernel.org # 2.6.37+
Signed-off-by: Colin Ian King
Signed-off-by: Steven Rostedt
04 Jan, 2016
1 commit
-
The ld-version.sh script doesn't handle versions with large (>= 10) 3rd
version components, because the 2nd component is only multiplied by 10
times that of the 3rd component.For example the following version string:
GNU ld (Codescape GNU Tools 2015.06-05 for MIPS MTI Linux) 2.24.90gives a bogus version number:
20000000
+ 2400000
+ 900000 = 23300000Breakage, confusion and mole-whacking ensues.
Increase the multipliers of the first two version components by a factor
of 10 to give space for a 3rd components of up to 99, and update the
sole user of ld-ifversion (MIPS VDSO) accordingly.Signed-off-by: James Hogan
Acked-by: Guenter Roeck
Reviewed-by: Andi Kleen
Cc: Andi Kleen
Cc: Michal Marek
Cc: Guenter Roeck
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/11931/
Signed-off-by: Ralf Baechle
18 Dec, 2015
1 commit
-
It is already possible to remove CFLAGS with the CFLAGS_REMOVE option
that was introduced with commit 656ee82cc855 ("kbuild: create new
CFLAGS_REMOVE_(basename).o option"). However it is not possible to
remove AFLAGS for assembler files.So this patch just adds the AFLAGS_REMOVE option which works the same
like CFLAGS_REMOVE.Signed-off-by: Heiko Carstens
Acked-by: Michal Marek
Signed-off-by: Martin Schwidefsky
17 Dec, 2015
1 commit
-
Russell King found that he had weird side effects when compiling the kernel
with hard linked ccache. The reason was that recordmcount modified the
kernel in place via mmap, and when a file gets modified twice by
recordmcount, it will complain about it. To fix this issue, Russell wrote a
patch that checked if the file was hard linked more than once and would
unlink it if it was.Linus Torvalds was not happy with the fact that recordmcount does this in
place modification. Instead of doing the unlink only if the file has two or
more hard links, it does the unlink all the time. In otherwords, it always
does a copy if it changed something. That is, it does the write out if a
change was made.Cc: stable@vger.kernel.org # 2.6.37+
Signed-off-by: Steven Rostedt
16 Dec, 2015
1 commit
-
recordmcount edits the file in-place, which can cause problems when
using ccache in hardlink mode. Arrange for recordmcount to break a
hardlinked object.Link: http://lkml.kernel.org/r/E1a7MVT-0000et-62@rmk-PC.arm.linux.org.uk
Cc: stable@vger.kernel.org # 2.6.37+
Signed-off-by: Russell King
Signed-off-by: Steven Rostedt