[PATCH] cdrom: Make device operations read-only

2017-02-13 Thread Kees Cook
Since function tables are a common target for attackers, it's best to keep them in read-only memory. As such, this makes the CDROM device ops tables const. This drops additionally n_minors, since it isn't used meaningfully, and sets the only user of cdrom_dummy_generic_packet explicitly so the vari

Re: [PATCH v2 1/4] seccomp: Add sysctl to display available actions

2017-02-13 Thread Kees Cook
On Mon, Feb 13, 2017 at 4:25 PM, Tyler Hicks wrote: > kmemleak doesn't complain if we save it to a global. That makes sense > because it means that we have a persistent reference to the allocated > memory. > > However, kmemleak doesn't complain about this allocation as-is (meaning > that I simply

Re: [PATCH] [TRIVIAL] kasan: Add a prototype of task_struct to avoid warning

2017-02-13 Thread Masami Hiramatsu
On Mon, 13 Feb 2017 18:06:34 +0300 Andrey Ryabinin wrote: > > > On 02/13/2017 05:28 PM, Masami Hiramatsu wrote: > > Add a prototype of task_struct to fix below warning on arm64. > > > > CC arch/arm64/kernel/probes/kprobes.o > > In file included from /tmp/linux/arch/arm64/kernel/probes/k

Re: [PATCH] Input: trackpoint: add new trackpoint firmware ID

2017-02-13 Thread Andrew Duggan
On 02/12/2017 02:38 PM, Dmitry Torokhov wrote: On Fri, Feb 10, 2017 at 11:02:21AM +0800, Aaron Ma wrote: Synaptics add new TP firmware ID: 0x2 and 0x3, for now both lower 2 bits are indicated as TP. Change the constant to bitwise values. Hmm, I thought IBM/Lenovo owned trackpoint support... And

Re: [PATCH 1/2] f2fs: enable inline_xattr by default

2017-02-13 Thread Jaegeuk Kim
Hi Chao, On 02/08, Chao Yu wrote: > In android, since SElinux is enable, security policy will be appliedd for > each file, it stores in inode as an xattr entry, so it will take one 4k > size node block additionally for each file. > > Let's enable inline_xattr by default in order to save storage s

[PATCH] mtd: spi-nor: add support for GD25Q256

2017-02-13 Thread Andy Yan
GD25Q256 is a 32MiB SPI Nor flash from Gigadevice. Signed-off-by: Andy Yan --- drivers/mtd/spi-nor/spi-nor.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) mode change 100644 => 100755 drivers/mtd/spi-nor/spi-nor.c diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor

[PATCH] platform: intel_turbo_max_3: make it explicitly non-modular

2017-02-13 Thread Paul Gortmaker
The Kconfig currently controlling compilation of this code is: drivers/platform/x86/Kconfig:config INTEL_TURBO_MAX_3 drivers/platform/x86/Kconfig: bool "Intel Turbo Boost Max Technology 3.0 enumeration driver" ...meaning that it currently is not being built as a module by anyone. Lets remove

[PATCH] cpufreq: make ti-cpufreq explicitly non-modular

2017-02-13 Thread Paul Gortmaker
The Kconfig currently controlling compilation of this code is: drivers/cpufreq/Kconfig.arm:config ARM_TI_CPUFREQ drivers/cpufreq/Kconfig.arm:bool "Texas Instruments CPUFreq support" ...meaning that it currently is not being built as a module by anyone. Lets remove the couple traces of modula

Re: [RFC PATCH 28/33] irqchip/gic-v3-its: Support VPE doorbell invalidation even when !DirectLPI

2017-02-13 Thread Shanker Donthineni
Hi Marc, On 01/17/2017 04:20 AM, Marc Zyngier wrote: When we don't have the DirectLPI feature, we must work around the architecture shortcomings to be able to perform the required invalidation. For this, we create a fake device whose sole purpose is to provide a way to issue a map/inv/unmap se

Re: [PATCH 1/2] driver core: emit uevents when device is bound to a driver

2017-02-13 Thread Greg Kroah-Hartman
On Mon, Feb 13, 2017 at 10:46:16AM -0800, Dmitry Torokhov wrote: > On Mon, Feb 13, 2017 at 04:07:01AM -0800, Greg Kroah-Hartman wrote: > > On Sun, Feb 12, 2017 at 04:36:18PM -0800, Dmitry Torokhov wrote: > > > Majority of standard for a subsystem device attributes are created at the > > > same time

[PATCH v4 2/3] Bluetooth: cmtp: fix possible might sleep error in cmtp_session

2017-02-13 Thread Jeffy Chen
It looks like cmtp_session has same pattern as the issue reported in old rfcomm: while (1) { set_current_state(TASK_INTERRUPTIBLE); if (condition) break; // may call might_sleep here schedule();

[PATCH v4 1/3] Bluetooth: bnep: fix possible might sleep error in bnep_session

2017-02-13 Thread Jeffy Chen
It looks like bnep_session has same pattern as the issue reported in old rfcomm: while (1) { set_current_state(TASK_INTERRUPTIBLE); if (condition) break; // may call might_sleep here schedule();

[PATCH v4 3/3] Bluetooth: hidp: fix possible might sleep error in hidp_session_thread

2017-02-13 Thread Jeffy Chen
It looks like hidp_session_thread has same pattern as the issue reported in old rfcomm: while (1) { set_current_state(TASK_INTERRUPTIBLE); if (condition) break; // may call might_sleep here schedule();

Re: [PATCH v3 3/3] Bluetooth: hidp: fix possible might sleep error in hidp_session_thread

2017-02-13 Thread jeffy
Hi Dmitry, On 02/14/2017 05:27 AM, Dmitry Torokhov wrote: Hi Jeffy, On Sun, Feb 12, 2017 at 8:12 PM, Jeffy Chen wrote: It looks like hidp_session_thread has same pattern as the issue reported in old rfcomm: while (1) { set_current_state(TASK_INTERRUPTIBLE);

Re: [PATCH v1 1/5] block: introduce bio_clone_bioset_partial()

2017-02-13 Thread Ming Lei
On Mon, Feb 13, 2017 at 9:46 PM, Christoph Hellwig wrote: > On Fri, Feb 10, 2017 at 06:56:13PM +0800, Ming Lei wrote: >> md still need bio clone(not the fast version) for behind write, >> and it is more efficient to use bio_clone_bioset_partial(). >> >> The idea is simple and just copy the bvecs r

[PATCH 14/15] samples/bpf: Ignore already processed ELF sections

2017-02-13 Thread Arnaldo Carvalho de Melo
From: Mickaël Salaün Add a missing check for the map fixup loop. Signed-off-by: Mickaël Salaün Acked-by: Joe Stringer Acked-by: Wang Nan Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: David S. Miller Cc: net...@vger.kernel.org Link: http://lkml.kernel.org/r/20170208202744.16274-2-...@digik

[PATCH 04/15] perf diff: Add diff.compute config option

2017-02-13 Thread Arnaldo Carvalho de Melo
From: Namhyung Kim The diff.compute config variable is to set the default compute method of perf diff command (-c option). Possible values 'delta' (default), 'delta-abs', 'ratio' and 'wdiff'. Signed-off-by: Namhyung Kim Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Taeung Song Link: http://lkml.kern

[PATCH 03/15] perf diff: Add diff.order config option

2017-02-13 Thread Arnaldo Carvalho de Melo
From: Namhyung Kim In many cases, I need to look at differences between two data so I often used the -o option to sort the result base on the difference first. It'd be nice to have a config option to set it by default. The diff.order config option is to set the default value of -o/--order option

[PATCH 01/15] tools include: Introduce linux/compiler-gcc.h

2017-02-13 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo To match the kernel headers structure, setting up things that are specific to gcc or to some specific version of gcc. It gets included by linux/compiler.h when gcc is the compiler being used. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Joe Perches Cc:

[PATCH 09/15] perf evsel: Inform how to make a sysctl setting permanent

2017-02-13 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo When a tool can't open counters due to the kernel.perf_event_paranoit sysctl setting, we inform how to tweak it to allow the operation to succeed, in addition to that, suggest setting /etc/sysctl.conf to make the setting permanent. Suggested-by: Ingo Molnar Cc: Ad

[PATCH 06/15] perf scripting perl: Fix compile error with some perl5 versions

2017-02-13 Thread Arnaldo Carvalho de Melo
From: Wang YanQing Fix below compile error: CC util/scripting-engines/trace-event-perl.o In file included from /usr/lib/perl5/5.22.2/i686-linux/CORE/perl.h:5673:0, from util/scripting-engines/trace-event-perl.c:31: /usr/lib/perl5/5.22.2/i686-linux/CORE/inline.h: In

[PATCH 11/15] perf tests record: No need to test an array against NULL

2017-02-13 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo It will always evaluate to 'true', as clang warns: CC /tmp/build/perf/tests/perf-record.o CC /tmp/build/perf/tests/evsel-roundtrip-name.o tests/perf-record.c:69:24: error: comparison of array 'argv' equal to a null pointer is always false [-W

[PATCH 15/15] samples/bpf: Reset global variables

2017-02-13 Thread Arnaldo Carvalho de Melo
From: Mickaël Salaün Before loading a new ELF, clean previous kernel version, license and processed sections. Signed-off-by: Mickaël Salaün Acked-by: Joe Stringer Acked-by: Wang Nan Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: David S. Miller Cc: net...@vger.kernel.org Link: http://lkml.

[PATCH 13/15] samples/bpf: Add missing header

2017-02-13 Thread Arnaldo Carvalho de Melo
From: Mickaël Salaün Include unistd.h to define __NR_getuid and __NR_getsid. Signed-off-by: Mickaël Salaün Acked-by: Joe Stringer Acked-by: Wang Nan Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: David S. Miller Cc: net...@vger.kernel.org Link: http://lkml.kernel.org/r/20170208202744.16274

[GIT PULL 00/15] perf/core improvements and fixes

2017-02-13 Thread Arnaldo Carvalho de Melo
: git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-4.11-20170213 for you to fetch changes up to a734fb5d60067a73dd7099a58756847c07f9cd68: samples/bpf: Reset global variables (2017-02-13 17:22:53 -0300

[PATCH 05/15] perf diff: Change default setting to "delta-abs"

2017-02-13 Thread Arnaldo Carvalho de Melo
From: Namhyung Kim The "delta-abs" compute method will show most changed entries on top. So users can easily see how much effect between the data. Note that it also changes the default of -o option to 1 in order to apply the compute method. To see original-style (sorted by baseline) use -o 0 op

[PATCH 07/15] tools lib traceevent: Initialize lenght on OLD_RING_BUFFER_TYPE_TIME_STAMP

2017-02-13 Thread Arnaldo Carvalho de Melo
From: "Steven Rostedt (VMware)" A undefined value was being used for the OLD_RING_BUFFER_TYPE_TIME_STAMP case entry, as the 'length' variable was not being initialized, fix it. Caught by the reporter when building tools/perf/ using clang, which emmitted this warning: kbuffer-parse.c:312:7: wa

Re: [PATCH] bcm2835-audio: Fix checkpatch errors

2017-02-13 Thread Man Choy
On Mon, Feb 13, 2017 at 8:03 PM, Greg Kroah-Hartman wrote: > On Mon, Feb 13, 2017 at 08:49:06AM +0800, Man Choy wrote: >> A quick question, I just updated my linux-next tree last night, >> checkout tag "next-20170210" and working on the cleanup. How do I >> double check my current working file alr

[PATCH 08/15] tools lib traceevent plugin function: Initialize 'index' variable

2017-02-13 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo Detected with clang: CC /tmp/build/perf/plugin_function.o plugin_function.c:145:6: warning: variable 'index' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] if (parent && ftrace_indent->set) ^~

[PATCH 10/15] perf symbols: No need to check if sym->name is NULL

2017-02-13 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo As it is an array, so will always evaluate to 'true', as reported by clang: builtin-sched.c:2070:19: error: address of array 'sym->name' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] if (sym && sym->name) {

[PATCH 12/15] perf symbols: dso->name is an array, no need to check it against NULL

2017-02-13 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo As it will always evaluate to 'true', as reported by clang: util/map.c:390:36: error: address of array 'map->dso->name' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] if (map && map->dso && (map->dso->name || map->dso->long_name)) {

[PATCH 02/15] perf diff: Add 'delta-abs' compute method

2017-02-13 Thread Arnaldo Carvalho de Melo
From: Namhyung Kim The 'delta-abs' compute method is same as 'delta' but shows entries with bigger absolute delta first instead of sorting numerically. This is only useful together with -o option. Below is default output (-c delta): $ perf diff -o 1 -c delta | grep -v ^# | head 42.22%

Re: [PATCH v2 5/6] drm: convert drivers to use drm_of_find_panel_or_bridge

2017-02-13 Thread Rob Herring
On Mon, Feb 13, 2017 at 1:47 AM, Boris Brezillon wrote: > On Thu, 9 Feb 2017 13:05:57 -0600 > Rob Herring wrote: > >> Similar to the previous commit, convert drivers open coding OF graph >> parsing to use drm_of_find_panel_or_bridge instead. >> >> This changes some error messages to debug messag

Re: [RFC PATCH 24/33] irqchip/gic-v3-its: Add VPE scheduling

2017-02-13 Thread Shanker Donthineni
Hi Marc, On 01/17/2017 04:20 AM, Marc Zyngier wrote: When a VPE is scheduled to run, the corresponding redistributor must be told so, by setting VPROPBASER to the VM's property table, and VPENDBASER to the vcpu's pending table. When scheduled out, we preserve the IDAI and PendingLast bits. The

Re: [PATCH v2 3/6] drm: of: introduce drm_of_find_panel_or_bridge

2017-02-13 Thread Rob Herring
On Sun, Feb 12, 2017 at 10:47 PM, Archit Taneja wrote: > > > On 02/10/2017 12:35 AM, Rob Herring wrote: >> >> Many drivers have a common pattern of searching the OF graph for either an >> attached panel or bridge and then finding the DRM struct for the panel >> or bridge. Also, most drivers need t

[PATCH v5 00/15] livepatch: hybrid consistency model

2017-02-13 Thread Josh Poimboeuf
go Molnar for the use of task_rq_lock() and the modification of do_idle() in patch 13. Thanks! Based on linux-next/master (20170213). v5: - return -EINVAL in __save_stack_trace_reliable() - only call show_stack() once - add save_stack_trace_tsk_reliable() define for !CONFIG_STACKTRACE - upda

[PATCH v5 14/15] livepatch: add /proc//patch_state

2017-02-13 Thread Josh Poimboeuf
Expose the per-task patch state value so users can determine which tasks are holding up completion of a patching operation. Signed-off-by: Josh Poimboeuf Reviewed-by: Petr Mladek Reviewed-by: Miroslav Benes --- Documentation/filesystems/proc.txt | 18 ++ fs/proc/base.c

[PATCH v5 04/15] livepatch/x86: add TIF_PATCH_PENDING thread flag

2017-02-13 Thread Josh Poimboeuf
Add the TIF_PATCH_PENDING thread flag to enable the new livepatch per-task consistency model for x86_64. The bit getting set indicates the thread has a pending patch which needs to be applied when the thread exits the kernel. The bit is placed in the _TIF_ALLWORK_MASK macro, which results in exit

[PATCH v5 08/15] livepatch: separate enabled and patched states

2017-02-13 Thread Josh Poimboeuf
Once we have a consistency model, patches and their objects will be enabled and disabled at different times. For example, when a patch is disabled, its loaded objects' funcs can remain registered with ftrace indefinitely until the unpatching operation is complete and they're no longer in use. It'

[PATCH v5 11/15] livepatch: use kstrtobool() in enabled_store()

2017-02-13 Thread Josh Poimboeuf
The sysfs enabled value is a boolean, so kstrtobool() is a better fit for parsing the input string since it does the range checking for us. Suggested-by: Petr Mladek Signed-off-by: Josh Poimboeuf Acked-by: Miroslav Benes Reviewed-by: Petr Mladek --- kernel/livepatch/core.c | 13 +

[PATCH v5 15/15] livepatch: allow removal of a disabled patch

2017-02-13 Thread Josh Poimboeuf
From: Miroslav Benes Currently we do not allow patch module to unload since there is no method to determine if a task is still running in the patched code. The consistency model gives us the way because when the unpatching finishes we know that all tasks were marked as safe to call an original f

[PATCH v5 10/15] livepatch: move patching functions into patch.c

2017-02-13 Thread Josh Poimboeuf
Move functions related to the actual patching of functions and objects into a new patch.c file. Signed-off-by: Josh Poimboeuf Acked-by: Miroslav Benes Reviewed-by: Petr Mladek Reviewed-by: Kamalesh Babulal --- kernel/livepatch/Makefile | 2 +- kernel/livepatch/core.c | 202 +--

[PATCH v5 07/15] livepatch/s390: add TIF_PATCH_PENDING thread flag

2017-02-13 Thread Josh Poimboeuf
From: Miroslav Benes Update a task's patch state when returning from a system call or user space interrupt, or after handling a signal. This greatly increases the chances of a patch operation succeeding. If a task is I/O bound, it can be patched when returning from a system call. If a task is

Re: [PATCH] usercopy: add testcases to check zeroing on failure of usercopy

2017-02-13 Thread Hoeun Ryu
> On Feb 14, 2017, at 4:24 AM, Kees Cook wrote: > >> On Mon, Feb 13, 2017 at 10:33 AM, Kees Cook wrote: >>> On Sat, Feb 11, 2017 at 10:13 PM, Hoeun Ryu wrote: >>> In the hardend usercopy, the destination buffer will be zeroed if >>> copy_from_user/get_user fails. This patch adds testcases for

[PATCH v5 12/15] livepatch: store function sizes

2017-02-13 Thread Josh Poimboeuf
For the consistency model we'll need to know the sizes of the old and new functions to determine if they're on the stacks of any tasks. Signed-off-by: Josh Poimboeuf Acked-by: Miroslav Benes Reviewed-by: Petr Mladek Reviewed-by: Kamalesh Babulal --- include/linux/livepatch.h | 3 +++ kernel/

[PATCH v5 09/15] livepatch: remove unnecessary object loaded check

2017-02-13 Thread Josh Poimboeuf
klp_patch_object()'s callers already ensure that the object is loaded, so its call to klp_is_object_loaded() is unnecessary. This will also make it possible to move the patching code into a separate file. Signed-off-by: Josh Poimboeuf Acked-by: Miroslav Benes Reviewed-by: Petr Mladek Reviewed-

[PATCH v5 13/15] livepatch: change to a per-task consistency model

2017-02-13 Thread Josh Poimboeuf
Change livepatch to use a basic per-task consistency model. This is the foundation which will eventually enable us to patch those ~10% of security patches which change function or data semantics. This is the biggest remaining piece needed to make livepatch more generally useful. This code stems

[PATCH v5 05/15] livepatch/powerpc: add TIF_PATCH_PENDING thread flag

2017-02-13 Thread Josh Poimboeuf
Add the TIF_PATCH_PENDING thread flag to enable the new livepatch per-task consistency model for powerpc. The bit getting set indicates the thread has a pending patch which needs to be applied when the thread exits the kernel. The bit is included in the _TIF_USER_WORK_MASK macro so that do_notify

[PATCH v5 06/15] livepatch/s390: reorganize TIF thread flag bits

2017-02-13 Thread Josh Poimboeuf
From: Jiri Slaby Group the TIF thread flag bits by their inclusion in the _TIF_WORK and _TIF_TRACE macros. Signed-off-by: Jiri Slaby Signed-off-by: Josh Poimboeuf Reviewed-by: Miroslav Benes --- arch/s390/include/asm/thread_info.h | 22 ++ 1 file changed, 14 insertions(+)

[PATCH v5 03/15] livepatch: create temporary klp_update_patch_state() stub

2017-02-13 Thread Josh Poimboeuf
Create temporary stubs for klp_update_patch_state() so we can add TIF_PATCH_PENDING to different architectures in separate patches without breaking build bisectability. Signed-off-by: Josh Poimboeuf Reviewed-by: Petr Mladek --- include/linux/livepatch.h | 5 - kernel/livepatch/core.c | 3

[PATCH v5 02/15] x86/entry: define _TIF_ALLWORK_MASK flags explicitly

2017-02-13 Thread Josh Poimboeuf
The _TIF_ALLWORK_MASK macro automatically includes the least-significant 16 bits of the thread_info flags, which is less than obvious and tends to create confusion and surprises when reading or modifying the code. Define the flags explicitly. Signed-off-by: Josh Poimboeuf Reviewed-by: Petr Mlade

Re: [PATCH] /proc/kcore: Update physical address for kcore ram and text

2017-02-13 Thread Pratyush Anand
On Tuesday 14 February 2017 03:55 AM, Kees Cook wrote: On Mon, Jan 30, 2017 at 11:00 AM, Pratyush Anand wrote: CCing Andrew and Kees for their review comments. On Wednesday 25 January 2017 10:14 AM, Pratyush Anand wrote: Currently all the p_paddr of PT_LOAD headers are assigned to 0, which

[PATCH v5 01/15] stacktrace/x86: add function for detecting reliable stack traces

2017-02-13 Thread Josh Poimboeuf
For live patching and possibly other use cases, a stack trace is only useful if it can be assured that it's completely reliable. Add a new save_stack_trace_tsk_reliable() function to achieve that. Note that if the target task isn't the current task, and the target task is allowed to run, then it

Re: [PATCH] sched/isolcpus: Show isolated cpu map

2017-02-13 Thread Kefeng Wang
On 2017/2/13 21:32, Peter Zijlstra wrote: > On Mon, Feb 13, 2017 at 09:07:02PM +0800, Kefeng Wang wrote: >> Hi Peter >> >> +Tejun >> >> On 2017/2/13 20:06, Peter Zijlstra wrote: >>> On Mon, Feb 13, 2017 at 05:43:59PM +0800, Kefeng Wang wrote: The commit a6e4491c682a ("sched/isolcpus: Output

[PATCH] ACPI, APEI: Fix BERT resources conflict with ACPI NVS area

2017-02-13 Thread Huang, Ying
From: Huang Ying It was reported that some firmware will use ACPI NVS area for BERT address range. This will cause resources conflict because the ACPI NVS area is marked as busy already. Fix this via excluding ACPI NVS area when requesting IO resources for BERT. Reported-and-tested-by: Hans Kr

Re: drivers/base/power/opp/core.c:241:15: error: redefinition of 'dev_pm_opp_get_max_volt_latency'

2017-02-13 Thread Philip Li
On Mon, Feb 13, 2017 at 09:27:59AM +0530, Viresh Kumar wrote: > On 13-02-17, 11:41, Philip Li wrote: > > on the other side, this is a build issue from randconfig, looks the failure > > exists on linus/master > > head 1ce4284, and caused by 655c9df commit. Not sure whether you can > > reproduce it

[PATCH 1/3] f2fs: remove build_free_nids() during checkpoint

2017-02-13 Thread Jaegeuk Kim
Let's avoid build_free_nids() in checkpoint path. Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index e6e42a4b1344..042f8d9afe44 100644 --- a/fs/f2fs/checkpoint.c +++ b/fs/f2fs/checkpoint.c @@

[PATCH 2/3] f2fs: add bitmaps for empty or full NAT blocks

2017-02-13 Thread Jaegeuk Kim
This patches adds bitmaps to represent empty or full NAT blocks containing free nid entries. If we can find valid crc|cp_ver in the last block of checkpoint pack, we'll use these bitmaps when building free nids. In order to avoid checkpointing burden, up-to-date bitmaps will be flushed only during

Re: [PATCH] sched/deadline: Remove redundant code replenishing runtime

2017-02-13 Thread Byungchul Park
On Tue, Feb 14, 2017 at 08:42:43AM +0900, Byungchul Park wrote: > On Mon, Feb 13, 2017 at 03:24:55PM +, Juri Lelli wrote: > > > > > I think we actually want to replenish and set the next deadline at > > > > > this > > > > > point of time, not the one that we get when the task will eventually

[PATCH 3/3] f2fs: avoid reading NAT page by get_node_info

2017-02-13 Thread Jaegeuk Kim
We've not seen this buggy case for a long time, so it's time to avoid this unnecessary get_node_info() call which reading NAT page to cache nat entry. Signed-off-by: Jaegeuk Kim --- fs/f2fs/node.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/fs/f2fs/node.c b/fs

Re: [PATCH 1/5] selftests: Fix selftests build to just build, not run tests

2017-02-13 Thread Michael Ellerman
Michael Ellerman writes: > In commit 88baa78d1f31 ("selftests: remove duplicated all and clean > target"), the "all" target was removed from individual Makefiles and > added to lib.mk. > > However the "all" target was added to lib.mk *after* the existing > "runtests" target. This means "runtests"

linux-next: manual merge of the mfd tree with the input tree

2017-02-13 Thread Stephen Rothwell
Hi Lee, Today's linux-next merge of the mfd tree got a conflict in: drivers/input/keyboard/cros_ec_keyb.c between commits: 2057e15945a8 ("Input: cros_ec_keyb - drop unnecessary call to dev_set_drvdata and other changes") aef01aad89e4 ("Input: matrix-keypad - switch to using generic devic

[PATCH] clk: sunxi-ng: sun6i: Fix enable bit offset for hdmi-ddc module clock

2017-02-13 Thread Chen-Yu Tsai
The enable bit offset for the hdmi-ddc module clock is wrong. It is pointing to the main hdmi module clock enable bit. Reported-by: Bob Ham Fixes: c6e6c96d8fa6 ("clk: sunxi-ng: Add A31/A31s clocks") Cc: sta...@vger.kernel.org # 4.9.x- Signed-off-by: Chen-Yu Tsai --- Hi Bob, Can you try this pa

Re: drivers/base/power/opp/core.c:1901:6: error: redefinition of 'dev_pm_opp_remove_table'

2017-02-13 Thread Philip Li
On Mon, Feb 13, 2017 at 10:40:53AM +, Sudeep Holla wrote: > On Sun, Feb 12, 2017 at 9:09 PM, kbuild test robot > wrote: > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > > master > > head: 1ce42845f987e92eabfc6e026d44d826c25c74a5 > > commit: 411466c5081d2f649b

[PATCH] clk: sunxi-ng: sun6i: Fix enable bit offset for hdmi-ddc module clock

2017-02-13 Thread Chen-Yu Tsai
The enable bit offset for the hdmi-ddc module clock is wrong. It is pointing to the main hdmi module clock enable bit. Reported-by: Bob Ham Fixes: c6e6c96d8fa6 ("clk: sunxi-ng: Add A31/A31s clocks") Cc: sta...@vger.kernel.org # 4.9.x- Signed-off-by: Chen-Yu Tsai --- Hi Bob, Can you try this pa

Re: [PATCH v1 1/3] ASoC: zx-tdm: add documentation for zte's tdm controller

2017-02-13 Thread Shawn Guo
On Mon, Feb 13, 2017 at 04:17:31PM +0800, Baoyou Xie wrote: > This patch adds dt-binding documentation for zte's tdm controller. > > Signed-off-by: Baoyou Xie "bindings doc" instead of "documentation" in patch subject is more clear. > --- > .../devicetree/bindings/sound/zte,tdm.txt |

[PATCH v7 1/5] x86: add simple udelay calibration

2017-02-13 Thread Lu Baolu
Add a simple udelay calibration in x86 architecture-specific boot-time initializations. This will get a workable estimate for loops_per_jiffy. Hence, udelay() could be used after this initialization. Cc: Ingo Molnar Cc: x...@kernel.org Signed-off-by: Lu Baolu --- arch/x86/kernel/setup.c | 22 ++

[PATCH v7 4/5] usb: serial: add dbc debug device support to usb_debug

2017-02-13 Thread Lu Baolu
This patch adds dbc debug device support to the usb_debug driver. Signed-off-by: Lu Baolu Acked-by: Johan Hovold --- drivers/usb/serial/usb_debug.c | 28 +--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/drivers/usb/serial/usb_debug.c b/drivers/usb/seri

[PATCH v7 2/5] usb: dbc: early driver for xhci debug capability

2017-02-13 Thread Lu Baolu
xHCI debug capability (DbC) is an optional but standalone functionality provided by an xHCI host controller. Software learns this capability by walking through the extended capability list of the host. xHCI specification describes DbC in section 7.6. This patch introduces the code to probe and ini

[PATCH v7 5/5] usb: doc: add document for USB3 debug port usage

2017-02-13 Thread Lu Baolu
Add Documentation/usb/usb3-debug-port.rst. This document includes the user guide for USB3 debug port. Cc: linux-...@vger.kernel.org Signed-off-by: Lu Baolu --- Documentation/usb/usb3-debug-port.rst | 98 +++ 1 file changed, 98 insertions(+) create mode 100644 Doc

[PATCH v7 3/5] x86: add support for earlyprintk via USB3 debug port

2017-02-13 Thread Lu Baolu
Add support for early printk by writing debug messages to the USB3 debug port. Users can use this type of early printk by specifying kernel parameter of "earlyprintk=xdbc". This gives users a chance of providing debug output. The hardware for USB3 debug port requires DMA memory blocks. This requ

[PATCH v7 0/5] usb: early: add support for early printk through USB3 debug port

2017-02-13 Thread Lu Baolu
xHCI debug capability (DbC) is an optional but standalone functionality provided by an xHCI host controller. With DbC hardware initialized, the system will present a debug device through the USB3 debug port (normally the first USB3 port). The debug device is fully compliant with the USB framework a

Re: [RFC][PATCH 13/21] tracing: Add simple expression support to hist triggers

2017-02-13 Thread Namhyung Kim
On Wed, Feb 08, 2017 at 11:25:09AM -0600, Tom Zanussi wrote: > Add support for simple addition, subtraction, and unary expressions > (-(expr) and expr, where expr = b-a, a+b, a+b+c) to hist triggers, in > order to support a minimal set of useful inter-event calculations. > > These operations are n

[PATCH v3 2/2] x86/purgatory: Fix sparse warning, symbol not declared

2017-02-13 Thread Tobin C. Harding
Sparse emits warning, 'symbol not declared' for a function that has neither file scope nor a forward declaration. The only call site is in an ASM file. Add a header file with the function declaration. Include the header file in the C source file defining the function in order to fix the sparse war

[PATCH v3 0/2] x86/purgatory: Fix sparse warning, symbol not declared

2017-02-13 Thread Tobin C. Harding
Sparse emits several 'symbol not declared' warnings for various functions and variables. Add static keyword to functions and variables which have file scope only. Add header file with funciton declaration. Add preprocessor guard and include header in ASM file. Include header in C file contianing

[PATCH v3 1/2] x86/purgatory: Fix sparse warning, symbol not declared

2017-02-13 Thread Tobin C. Harding
Sparse emits several 'symbol not declared' warnings for various functions and variables. Add static keyword to functions and variables which have file scope only. Remove definition to zero for each variable declared static in accord with kernel standard. Signed-off-by: Tobin C. Harding --- arch

[RFC/PATCH] of: Mark property::value as const

2017-02-13 Thread Stephen Boyd
The 'blob' we pass into populate_properties() is marked as const, but we cast that const away when we assign the result of fdt_getprop_by_offset() to pp->value. Let's mark value as const instead, so that code can't mistakenly write to the value of the property that we've so far advertised as const.

[PATCH v3 0/3] Add Mediatek CIRQ interrupt controller

2017-02-13 Thread Youlin Pei
In Mediatek SOCs, the CIRQ is a low power interrupt controller designed to works outside MCUSYS which comprises with Cortex-Ax cores,CCI and GIC. The CIRQ controller is integrated in between MCUSYS and interrupt sources as the second level interrupt controller. The external interrupts which outsi

[PATCH v3 3/3] ARM: dts: mt2701: Add mtk-cirq node for mt2701

2017-02-13 Thread Youlin Pei
This commit add mtk-cirq node to mt2701 dtsi. Signed-off-by: Youlin Pei --- arch/arm/boot/dts/mt2701.dtsi | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/mt2701.dtsi b/arch/arm/boot/dts/mt2701.dtsi index 7eab6f4..6ac9108 100644 --- a/arch/arm/

[PATCH v3 1/3] binding: irqchip: mtk-cirq: Add binding document

2017-02-13 Thread Youlin Pei
This commit adds the device tree binding document for the mediatek cirq. Signed-off-by: Youlin Pei --- .../interrupt-controller/mediatek,cirq.txt | 35 1 file changed, 35 insertions(+) create mode 100644 Documentation/devicetree/bindings/interrupt-controller/medi

[PATCH v3 2/3] irqchip: mtk-cirq: Add mediatek mtk-cirq implement

2017-02-13 Thread Youlin Pei
In Mediatek SOCs, the CIRQ is a low power interrupt controller designed to works outside MCUSYS which comprises with Cortex-Ax cores,CCI and GIC. The CIRQ controller is integrated in between MCUSYS( include Cortex-Ax, CCI and GIC ) and interrupt sources as the second level interrupt controller. Th

Re: [PATCH] cdrom: Make device operations read-only

2017-02-13 Thread David Miller
From: Kees Cook Date: Mon, 13 Feb 2017 16:25:26 -0800 > diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c > index 9cbd217bc0c9..ab9232e1e16f 100644 > --- a/drivers/ide/ide-cd.c > +++ b/drivers/ide/ide-cd.c > @@ -1166,7 +1166,7 @@ void ide_cdrom_update_speed(ide_drive_t *drive, u8 *buf) >

Re: [PATCH 1/5] selftests: Fix selftests build to just build, not run tests

2017-02-13 Thread Bamvor Zhang Jian
Tested by: Bamvor Jian Zhang On 9 February 2017 at 16:56, Michael Ellerman wrote: > In commit 88baa78d1f31 ("selftests: remove duplicated all and clean > target"), the "all" target was removed from individual Makefiles and > added to lib.mk. > > However the "all" target was added to lib.mk *afte

Re: [PATCH 2/5] selftests: Fix the .c linking rule

2017-02-13 Thread Bamvor Zhang Jian
Tested-by: Bamvor Jian Zhang On 9 February 2017 at 16:56, Michael Ellerman wrote: > Currently we can't build some tests, for example: > > $ make -C tools/testing/selftests/ TARGETS=vm > ... > gcc -Wall -I ../../../../usr/include -lrt -lpthread > ../../../../usr/include/linux/kernel.h us

Re: [PATCH 3/5] selftests: Fix the .S and .S -> .o rules

2017-02-13 Thread Bamvor Zhang Jian
Tested-by: Bamvor Jian Zhang On 9 February 2017 at 16:56, Michael Ellerman wrote: > Both these rules incorrectly use $< (first prerequisite) rather than > $^ (all prerequisites), meaning they don't work if we're using more than > one .S file as input. Switch them to using $^. > > They also don't

Re: [PATCH net-next 0/2] afs: Use system UUID generation

2017-02-13 Thread David Miller
From: David Howells Date: Fri, 10 Feb 2017 16:46:12 + > There is now a general function for generating a UUID and AFS should make > use of it. It's also been recommended to me that I switch to using random > rather than time plus MAC address-based UUIDs which this function does. > > The pat

linux-next: manual merge of the kvm tree with the powerpc tree

2017-02-13 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the kvm tree got a conflict in: arch/powerpc/include/asm/hvcall.h between commit: 64b40ffbc830 ("powerpc/pseries: Add hypercall wrappers for hash page table resizing") from the powerpc tree and commit: cc3d2940133d ("powerpc/64: Enable use of radix M

Re: [PATCH 2/2] net: fs_enet: Simplify code

2017-02-13 Thread David Miller
From: Christophe JAILLET Date: Fri, 10 Feb 2017 21:17:19 +0100 > There is no need to use an intermediate variable to handle an error code > in this case. > > Signed-off-by: Christophe JAILLET Applied.

Re: [PATCH 1/2] net: fs_enet: Fix an error handling path

2017-02-13 Thread David Miller
From: Christophe JAILLET Date: Fri, 10 Feb 2017 21:17:06 +0100 > 'of_node_put(fpi->phy_node)' should also be called if we branch to > 'out_deregister_fixed_link' error handling path. > > Signed-off-by: Christophe JAILLET Applied.

linux-next: manual merge of the kvm tree with the powerpc tree

2017-02-13 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the kvm tree got a conflict in: arch/powerpc/include/asm/prom.h between commit: 0de0fb09bbce ("powerpc/pseries: Advertise HPT resizing support via CAS") from the powerpc tree and commit: 3f4ab2f83b4e ("powerpc/pseries: Fixes for the "ibm,architecture-

linux-next: manual merge of the kvm tree with the powerpc tree

2017-02-13 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the kvm tree got a conflict in: arch/powerpc/platforms/pseries/lpar.c between commit: dbcf929c0062 ("powerpc/pseries: Add support for hash table resizing") from the powerpc tree and commit: cc3d2940133d ("powerpc/64: Enable use of radix MMU under hype

Re: [patch net-next] net: qcom/emac: fix a sizeof() typo

2017-02-13 Thread David Miller
From: Dan Carpenter Date: Mon, 13 Feb 2017 14:00:22 +0300 > We had intended to say "sizeof(u32)" but the "u" is missing. > Fortunately, sizeof(32) is also 4, so the original code still works. > > Fixes: c4e7beea2192 ("net: qcom/emac: add ethtool support for reading > hardware registers") > Sign

[PATCH 2/4] Documentation: devicetree: arm: Add Realtek RTD1295 bindings

2017-02-13 Thread Andreas Färber
Signed-off-by: Andreas Färber --- Documentation/devicetree/bindings/arm/realtek.txt | 15 +++ 1 file changed, 15 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/realtek.txt diff --git a/Documentation/devicetree/bindings/arm/realtek.txt b/Documentation/devicet

[PATCH 0/4] ARM64: Initial Realtek RTD1295 enablement

2017-02-13 Thread Andreas Färber
Hello, This mini-series adds initial support for the Realtek RTD1295 SoC and the Zidoo X9S TV box. With these patches CPU0 can be booted with earlycon. PSCI doesn't work despite present in the vendor device tree; as enable-method it instead used a custom "rtk-spin-table" that I sadly have no sou

[PATCH 5/5] ARM: dts: sun8i-a83t: Add CCU device nodes

2017-02-13 Thread Chen-Yu Tsai
Now that we have support for the A83T CCU, add a device node for it, and replace any existing placeholder clock phandles with the correct ones. Signed-off-by: Chen-Yu Tsai --- arch/arm/boot/dts/sun8i-a83t.dtsi | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git

[PATCH 4/5] clk: sunxi-ng: Add driver for A83T CCU

2017-02-13 Thread Chen-Yu Tsai
The A83T clock control unit is a hybrid of some new style clock designs from the A80, and old style layout from the other Allwinner SoCs. The mmc2 module clock supports a new timing mode. This mode outputs the clock at half the set rate, and moves the output and sample delays into the mmc controll

[PATCH 2/5] clk: sunxi-ng: gate: Support common pre-dividers

2017-02-13 Thread Chen-Yu Tsai
Some clock gates have a pre-divider between the source input and the gate itself. A notable example is the HSIC 12 MHz clock found on the A83T, which has the 24 MHz main oscillator as its input, and a /2 pre-divider. Signed-off-by: Chen-Yu Tsai --- drivers/clk/sunxi-ng/ccu_gate.c | 47 ++

[PATCH 1/5] clk: sunxi-ng: mp: Adjust parent rate for pre-dividers

2017-02-13 Thread Chen-Yu Tsai
The MP style clocks support an mux with pre-dividers. While the driver correctly accounted for them in the .determine_rate callback, it did not in the .recalc_rate and .set_rate callbacks. This means when calculating the factors in the .set_rate callback, they would be off by a factor of the activ

[PATCH 3/5] clk: sunxi-ng: Add compatible string for A83T CCU to bindings

2017-02-13 Thread Chen-Yu Tsai
The A83T clock control unit is a hybrid of some new style clock designs from the A80, and old style layout from the other Allwinner SoCs. Signed-off-by: Chen-Yu Tsai --- Documentation/devicetree/bindings/clock/sunxi-ccu.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/device

[PATCH 0/5] clk: sunxi-ng: Add support for A83T CCU

2017-02-13 Thread Chen-Yu Tsai
Hi everyone, This is yet another series that adds support for the A83T CCU. The A83T CCU has a mix of new styled (like the A80) clocks at old (like A3x) offsets. Some differences include: - D1/D2 style PLL clocks - divisible audio module clocks - new timing mode for mmc2 module clock Patch

<    3   4   5   6   7   8   9   10   >