Re: [PATCH 2/3] wireless: iwlwifi: function definition cosmetic fix

2017-10-04 Thread Luciano Coelho
On Wed, 2017-10-04 at 17:56 +0200, Christoph Böhmwalder wrote: > Separate the function from the previous definition with a newline and > put the `static` keyword on the same line, as it just looks nicer. > > Signed-off-by: Christoph Böhmwalder > --- > drivers/net/wireless/intel/iwlwifi/iwl-phy-d

[PATCH v2] serial: imx: Correct comment imx_flush_buffer()

2017-10-04 Thread Martyn Welch
The comment in imx_flush_buffer() states that the state of 4 registers are to be saved/restored, then only saves and restores 3 registers. The missing register (UBRC) is read only and thus can't be restored. Update the comment to reflect reality. Signed-off-by: Martyn Welch --- v2: Remove trail

Re: [PATCH 3/3] wireless: iwlwifi: wrap macro into braces

2017-10-04 Thread Joe Perches
On Wed, 2017-10-04 at 17:57 +0200, Christoph Böhmwalder wrote: > Macros should always be wrapped in braces, so fix this instance. > > Signed-off-by: Christoph Böhmwalder > --- > drivers/net/wireless/intel/iwlwifi/iwl-io.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/

Re: [PATCH 1/3] wireless: iwlwifi: use bool instead of int

2017-10-04 Thread Luciano Coelho
On Wed, 2017-10-04 at 17:56 +0200, Christoph Böhmwalder wrote: > Change a usage of int in a boolean context to use the bool type > instead, as it > makes the intent of the function clearer and helps clarify its > semantics. > > Also eliminate the if/else and just return the boolean result > direct

RE: [kernel-hardening] [RFC V2 0/6] add more kernel pointer filter options

2017-10-04 Thread Roberts, William C
> -Original Message- > From: Greg KH [mailto:gre...@linuxfoundation.org] > Sent: Wednesday, October 4, 2017 1:59 AM > To: Tobin C. Harding > Cc: Petr Mladek ; Joe Perches ; Ian > Campbell ; Sergey Senozhatsky > ; kernel-harden...@lists.openwall.com; linux- > ker...@vger.kernel.org; Catal

Re: [PATCH v3] crypto: s5p-sss: Add HASH support for Exynos

2017-10-04 Thread Kamil Konieczny
On 03.10.2017 21:30, Krzysztof Kozlowski wrote: > On Tue, Oct 03, 2017 at 04:57:43PM +0200, Kamil Konieczny wrote: > [...] +static struct ahash_alg algs_sha256[] = { +{ + .init = s5p_hash_init, + .update = s5p_hash_update, + .final = s5p

Re: sysbench throughput degradation in 4.13+

2017-10-04 Thread Peter Zijlstra
On Tue, Oct 03, 2017 at 10:39:32AM +0200, Peter Zijlstra wrote: > So I was waiting for Rik, who promised to run a bunch of NUMA workloads > over the weekend. > > The trivial thing regresses a wee bit on the overloaded case, I've not > yet tried to fix it. WA_IDLE is my 'old' patch and what you al

Re: [PATCH 0/3] iwlwifi: cosmetic fixes

2017-10-04 Thread Luciano Coelho
On Wed, 2017-10-04 at 17:56 +0200, Christoph Böhmwalder wrote: > Fix several code style issues, some of which were reported by > checkpatch.pl. > > The changes are: > * One instance of an `int` variable being used in a boolean context, > chaned to > use the more appropriate `bool` type. > * One

Re: [kernel-hardening] Re: [PATCH 2/3] Makefile: Move stackprotector availability out of Kconfig

2017-10-04 Thread Kees Cook
On Wed, Oct 4, 2017 at 8:13 AM, Greg KH wrote: > On Wed, Oct 04, 2017 at 11:33:38PM +0900, Masahiro Yamada wrote: >> Hi Kees, >> >> >> 2017-10-03 4:20 GMT+09:00 Kees Cook : >> > Various portions of the kernel, especially per-architecture pieces, >> > need to know if the compiler is building it wit

Re: [kernel-hardening] [RFC V2 0/6] add more kernel pointer filter options

2017-10-04 Thread Boris Lukashev
On Wed, Oct 4, 2017 at 11:41 AM, Linus Torvalds wrote: > On Sat, Sep 30, 2017 at 5:06 PM, Tobin C. Harding wrote: >> lib: vsprintf: default kptr_restrict to the maximum value > > So I'm not convinced about this one. > > It removes kernel pointers even for root, which is annoying for things > li

Re: multi producer / multi consumer lock-free queue with ptr_ring

2017-10-04 Thread Michael S. Tsirkin
On Wed, Oct 04, 2017 at 01:18:24PM +0200, Jason A. Donenfeld wrote: > Hey Michael, > > Thanks for your work on ptr_ring.h. I'm interested in using it, but in > a multi-producer, multi-consumer context. I realize it's been designed > for a single-producer, single-consumer context, and thus uses a >

Re: [PATCH] pinctrl: cherryview: fix issues caused by dynamic gpio irqs mapping

2017-10-04 Thread Mika Westerberg
On Wed, Oct 04, 2017 at 12:07:34PM -0400, Chris Gorman wrote: > Tested-by: Chris Gorman I guess you sent this because of the "Tested-by", right? It is enough if you reply to the original thread (the one posted by Grygorii yesterday) and say something like: Works for me, Tested-by: ... Then

Re: [RFC PATCH 1/2] kbuild: Pass HOSTCC and similar to tools Makefiles

2017-10-04 Thread Josh Poimboeuf
On Wed, Oct 04, 2017 at 09:09:51AM -0700, Doug Anderson wrote: > Hi, > > On Tue, Oct 3, 2017 at 9:07 PM, Guenter Roeck wrote: > > On Tue, Oct 3, 2017 at 8:20 PM, Masahiro Yamada > >> CC: for building tools that run on the target machine > >> HOSTCC: for building tools that run on the build ma

Re: [PATCH 1/3] wireless: iwlwifi: use bool instead of int

2017-10-04 Thread Joe Perches
On Wed, 2017-10-04 at 17:56 +0200, Christoph Böhmwalder wrote: > Change a usage of int in a boolean context to use the bool type instead, as it > makes the intent of the function clearer and helps clarify its semantics. > > Also eliminate the if/else and just return the boolean result directly, >

Re: [PATCH 2/2] perf, tools: Don't force MetricExprs to lower case

2017-10-04 Thread Andi Kleen
On Wed, Oct 04, 2017 at 12:30:52PM +0200, Jiri Olsa wrote: > On Tue, Oct 03, 2017 at 01:06:05PM -0300, Arnaldo Carvalho de Melo wrote: > > Em Tue, Sep 12, 2017 at 12:56:43PM -0700, Andi Kleen escreveu: > > > From: Andi Kleen > > > > > > There are still problems with BPF misinterpreting some event

Re: [kernel-hardening] [RFC V2 0/6] add more kernel pointer filter options

2017-10-04 Thread Linus Torvalds
On Wed, Oct 4, 2017 at 9:22 AM, Boris Lukashev wrote: > > When adding modules from outside the mainline tree (zfs, aufs, scst, > etc), we would not be able to audit the source, and risk leaking > sensitive pointers from those components if we dont filter them out > this way or in a similar program

Re: [PATCH v7 2/2] tracing: Add support for preempt and irq enable/disable events

2017-10-04 Thread Joel Fernandes
Hi Peter, On Wed, Oct 4, 2017 at 9:04 AM, Peter Zijlstra wrote: > On Fri, Sep 29, 2017 at 02:22:45PM -0700, Joel Fernandes wrote: >> +++ b/kernel/trace/trace_irqsoff.c > >> EXPORT_SYMBOL(trace_hardirqs_on); >> EXPORT_SYMBOL(trace_hardirqs_off); >> EXPORT_SYMBOL(trace_hardirqs_on_caller); >> E

Re: [Outreachy kernel] [PATCH] Staging: rtl8188eu: core: Use list_for_each_entry_safe

2017-10-04 Thread Srishti Sharma
On Wed, Oct 4, 2017 at 8:38 PM, Dan Carpenter wrote: > On Wed, Oct 04, 2017 at 03:34:05PM +0200, Julia Lawall wrote: >> Again, you have three patches on different files with the same subject >> line. You could add the file name eg rtw_ap: to the subject line to make >> them unique. >> > > And the

Re: [PATCH v3 2/7] KEYS: fix race between updating and finding negative key

2017-10-04 Thread David Howells
Eric Biggers wrote: > Therefore, fix the bug by moving ->reject_error into the high bits of > ->flags so that we can read and write it atomically with respect to > KEY_FLAG_NEGATIVE and KEY_FLAG_INSTANTIATED. I would rather not eat up that much of the flags word. I would rather something like t

Re: + pid-delete-reserved_pids.patch added to -mm tree

2017-10-04 Thread Oleg Nesterov
On 10/04, Alexey Dobriyan wrote: > > On Tue, Oct 03, 2017 at 05:53:15PM +0200, Oleg Nesterov wrote: > > On 10/02, Andrew Morton wrote: > > > > > > From: Alexey Dobriyan > > > Subject: pid: delete RESERVED_PIDS > > > > > > RESERVED_PIDS had a noble goal: to protect root from PID exhaustion since >

[PATCH 2/2] mm: Consolidate page table accounting

2017-10-04 Thread Kirill A. Shutemov
This patch switches page table accounting to single counter from three -- nr_ptes, nr_pmds and nr_puds. mm->pgtables_bytes is now used to account page table levels. We use bytes, because page table size for different levels of page table tree may be different. The change has user-visible effect:

[PATCH 1/2] mm: Introduce wrapper to access mm->nr_ptes

2017-10-04 Thread Kirill A. Shutemov
Let's add wrappers for ->nr_ptes with the same interface as for nr_pmd and nr_pud. It's preparation for consolidation of page-table counters in mm_struct. Signed-off-by: Kirill A. Shutemov --- arch/arm/mm/pgd.c | 2 +- arch/sparc/mm/hugetlbpage.c | 2 +- arch/unicore32/mm/pgd.c

[PATCH v4] crypto: s5p-sss: Add HASH support for Exynos

2017-10-04 Thread Kamil Konieczny
Add support for MD5, SHA1, SHA256 hash algorithms for Exynos HW. It uses the crypto framework asynchronous hash api. It is based on omap-sham.c driver. S5P has some HW differencies and is not implemented. Modifications in s5p-sss: - Add hash supporting structures and functions. - Modify irq hand

Re: [PATCH 1/3] wireless: iwlwifi: use bool instead of int

2017-10-04 Thread Luciano Coelho
On Wed, 2017-10-04 at 09:26 -0700, Joe Perches wrote: > On Wed, 2017-10-04 at 17:56 +0200, Christoph Böhmwalder wrote: > > Change a usage of int in a boolean context to use the bool type > > instead, as it > > makes the intent of the function clearer and helps clarify its > > semantics. > > > > Al

Re: [PATCH] PM / OPP: Add missing of_node_put(np)

2017-10-04 Thread Stephen Boyd
On 10/03/2017 11:05 PM, Viresh Kumar wrote: > From: Tobias Jordan > > The for_each_available_child_of_node() loop in _of_add_opp_table_v2() > doesn't drop the reference to "np" on errors. Fix that. > > Fixes: 274659029c9d ("PM / OPP: Add support to parse "operating-points-v2" > bindings") > Cc: 4

Re: [kernel-hardening] [RFC V2 4/6] lib: vsprintf: default kptr_restrict to the maximum value

2017-10-04 Thread Kees Cook
On Sat, Sep 30, 2017 at 5:06 PM, Tobin C. Harding wrote: > Set the initial value of kptr_restrict to the maximum > setting rather than the minimum setting, to ensure that > early boot logging is not leaking information. > > Signed-off-by: Tobin C. Harding > --- > lib/vsprintf.c | 2 +- > 1 file

Re: [PATCH v7 2/2] tracing: Add support for preempt and irq enable/disable events

2017-10-04 Thread Joel Fernandes
Hi Peter, On Wed, Oct 4, 2017 at 9:01 AM, Peter Zijlstra wrote: > On Fri, Sep 29, 2017 at 02:22:45PM -0700, Joel Fernandes wrote: >> diff --git a/kernel/trace/trace_irqsoff.c b/kernel/trace/trace_irqsoff.c >> index 0e3033c00474..515ac851841a 100644 >> --- a/kernel/trace/trace_irqsoff.c >> +++ b/k

Re: [PATCH v7 2/2] tracing: Add support for preempt and irq enable/disable events

2017-10-04 Thread Steven Rostedt
On Wed, 4 Oct 2017 18:04:34 +0200 Peter Zijlstra wrote: > On Fri, Sep 29, 2017 at 02:22:45PM -0700, Joel Fernandes wrote: > > +++ b/kernel/trace/trace_irqsoff.c > > > EXPORT_SYMBOL(trace_hardirqs_on); > > EXPORT_SYMBOL(trace_hardirqs_off); > > EXPORT_SYMBOL(trace_hardirqs_on_caller); > > E

RE: [kernel-hardening] [RFC V2 4/6] lib: vsprintf: default kptr_restrict to the maximum value

2017-10-04 Thread Roberts, William C
> -Original Message- > From: keesc...@google.com [mailto:keesc...@google.com] On Behalf Of Kees > Cook > Sent: Wednesday, October 4, 2017 9:43 AM > To: Tobin C. Harding > Cc: Greg KH ; Petr Mladek ; > Joe Perches ; Ian Campbell ; Sergey > Senozhatsky ; kernel- > harden...@lists.openwall.

Re: [PATCH v8 12/28] x86/insn-eval: Add utility functions to get segment selector

2017-10-04 Thread Ricardo Neri
On Fri, 2017-09-29 at 13:56 +0200, Borislav Petkov wrote: > On Thu, Sep 28, 2017 at 11:06:42PM -0700, Ricardo Neri wrote: > > > > I agree. In fact, insn_get_seg_base() does not need insn at all. All it > > needs is > > a INAT_SEG_REG_* index. This would make things clear. UMIP (and callers that >

Re: [RFC 4/5] ext4: add fs freezing support on suspend/hibernation

2017-10-04 Thread Theodore Ts'o
On Wed, Oct 04, 2017 at 06:05:23PM +1100, Dave Chinner wrote: > Basically, before thawing filesystems the rest of the kernel > infrastructure needs to have been restarted. i.e. the order > needs to be: > > freeze userspace > freeze filesystems > freeze kernel threads > freeze workqueues > > thaw

Re: [kernel-hardening] [RFC V2 0/6] add more kernel pointer filter options

2017-10-04 Thread Steven Rostedt
On Wed, 4 Oct 2017 09:29:16 -0700 Linus Torvalds wrote: > If this is seriously the quality of excuses for this patch-series, I > never ever want to see those patches again. Note, the one you are replying to isn't the author of the patches nor was he even Cc'd in the patch series. I wouldn't jud

[PATCH] scripts/kallsyms: Ignore symbol type 'n'

2017-10-04 Thread Guenter Roeck
gcc on aarch64 may emit synbols of type 'n' if the kernel is built with '-frecord-gcc-switches'. In most cases, those symbols are reported with nm as 000e n $d and with objdump as ld .GCC.command.line .GCC.command.line

Re: [PATCH v7 2/2] tracing: Add support for preempt and irq enable/disable events

2017-10-04 Thread Joel Fernandes
Hi Steven, On Wed, Oct 4, 2017 at 9:44 AM, Steven Rostedt wrote: > On Wed, 4 Oct 2017 18:04:34 +0200 > Peter Zijlstra wrote: > >> On Fri, Sep 29, 2017 at 02:22:45PM -0700, Joel Fernandes wrote: >> > +++ b/kernel/trace/trace_irqsoff.c >> >> > EXPORT_SYMBOL(trace_hardirqs_on); >> > EXPORT_SYMBOL

[PATCH] lib: memmove: Use optimised memcpy if possible

2017-10-04 Thread PrasannaKumar Muralidharan
When there is no overlap between src and dst use optimised memcpy if it is available. Signed-off-by: Paul Burton Signed-off-by: PrasannaKumar Muralidharan --- This change is a small part of a patch [1] from Paul Burton. I have added his Signed-off by. I do not know whether it is correct. Please

Re: [PATCH] [STABLE-4.4, 3.18]: fix xen_swiotlb_dma_mmap prototype

2017-10-04 Thread Stefano Stabellini
On Wed, 4 Oct 2017, Arnd Bergmann wrote: > xen_swiotlb_dma_mmap was backported from v4.10, but older > kernels before commit 00085f1efa38 ("dma-mapping: use unsigned long > for dma_attrs") use a different signature: > > arm/xen/mm.c:202:10: error: initialization from incompatible pointer type > [

Re: [PATCH] pinctrl: cherryview: fix issues caused by dynamic gpio irqs mapping

2017-10-04 Thread Chris Gorman
Tested on 4.14.0-rc3 and this works for me. Tested by: Chris Gorman On Tue, Oct 3, 2017 at 1:00 PM, Grygorii Strashko wrote: > New GPIO IRQs are allocated and mapped dynamically by default when > GPIO IRQ infrastructure is used by cherryview-pinctrl driver. > This causes issues on some Intel pl

Re: [PATCH v7 2/2] tracing: Add support for preempt and irq enable/disable events

2017-10-04 Thread Steven Rostedt
On Wed, 4 Oct 2017 09:56:33 -0700 Joel Fernandes wrote: > > I don't see the protection in the patches. I will definitely test that > > before pushing it anywhere. > > The protection added by CONFIG_PROVE_LOCKING was already there before > my patches. I just moved the code around in patch 1/2,

Re: [PATCH RFC hack dont apply] intel_idle: support running within a VM

2017-10-04 Thread Jacob Pan
On Wed, 4 Oct 2017 05:09:09 +0300 "Michael S. Tsirkin" wrote: > On Mon, Oct 02, 2017 at 10:12:49AM -0700, Jacob Pan wrote: > > On Sat, 30 Sep 2017 01:21:43 +0200 > > "Rafael J. Wysocki" wrote: > > > > > On Sat, Sep 30, 2017 at 12:01 AM, Michael S. Tsirkin > > > wrote: > > > > intel idle dr

Re: [kernel-hardening] [RFC V2 4/6] lib: vsprintf: default kptr_restrict to the maximum value

2017-10-04 Thread Linus Torvalds
On Wed, Oct 4, 2017 at 9:42 AM, Kees Cook wrote: > > I'd argue that a default of "1" would be a sensible starting place, > but that can be a separate patch, IMO. I agree that '1' is a much saner default for _some_ uses, in that it still gives root access to /proc file data etc. However, the sad

Re: [Outreachy kernel] [PATCH] Staging: rtl8188eu: core: Use list_for_each_entry_safe

2017-10-04 Thread Julia Lawall
On Wed, 4 Oct 2017, Srishti Sharma wrote: > On Wed, Oct 4, 2017 at 8:38 PM, Dan Carpenter > wrote: > > On Wed, Oct 04, 2017 at 03:34:05PM +0200, Julia Lawall wrote: > >> Again, you have three patches on different files with the same subject > >> line. You could add the file name eg rtw_ap: to

Re: [RFC] mmap(MAP_CONTIG)

2017-10-04 Thread Mike Kravetz
On 10/04/2017 04:54 AM, Michal Nazarewicz wrote: > On Tue, Oct 03 2017, Mike Kravetz wrote: >> At Plumbers this year, Guy Shattah and Christoph Lameter gave a presentation >> titled 'User space contiguous memory allocation for DMA' [1]. The slides >> point out the performance benefits of devices t

Re: [Outreachy kernel] [PATCH] Staging: rtl8188eu: core: Use list_for_each_entry_safe

2017-10-04 Thread Srishti Sharma
On Wed, Oct 4, 2017 at 10:37 PM, Julia Lawall wrote: > > > On Wed, 4 Oct 2017, Srishti Sharma wrote: > >> On Wed, Oct 4, 2017 at 8:38 PM, Dan Carpenter >> wrote: >> > On Wed, Oct 04, 2017 at 03:34:05PM +0200, Julia Lawall wrote: >> >> Again, you have three patches on different files with the sam

Re: [PATCH RFC hack dont apply] intel_idle: support running within a VM

2017-10-04 Thread Michael S. Tsirkin
On Wed, Oct 04, 2017 at 10:09:39AM -0700, Jacob Pan wrote: > On Wed, 4 Oct 2017 05:09:09 +0300 > "Michael S. Tsirkin" wrote: > > > On Mon, Oct 02, 2017 at 10:12:49AM -0700, Jacob Pan wrote: > > > On Sat, 30 Sep 2017 01:21:43 +0200 > > > "Rafael J. Wysocki" wrote: > > > > > > > On Sat, Sep 30,

Re: MAP_FIXED for ELF mappings

2017-10-04 Thread Michal Hocko
On Wed 04-10-17 23:37:41, Baoquan He wrote: > On 10/04/17 at 05:17pm, Michal Hocko wrote: > > On Wed 04-10-17 23:12:38, Baoquan He wrote: > > > I made a clean up patch according to Oleg's suggestion. It's trying to > > > get an map area to cover total_size, then do mmap for for the 1st > > > progra

Re: [PATCH v3 03/33] ring-buffer: Add interface for setting absolute time stamps

2017-10-04 Thread Steven Rostedt
On Fri, 22 Sep 2017 14:59:43 -0500 Tom Zanussi wrote: > + /* > + * New timestamps may not be consistent with the previous setting. > + * Reset the buffer so that it doesn't have incomparable timestamps. I would like to make the ring buffer robust enough to handle both. Can this be

[PATCH v2] Staging: rtl8188eu: core: rtw_ap: Use list_for_each_entry_safe

2017-10-04 Thread Srishti Sharma
This is a cleanup patch and doesn't change runtime behaviour. It changes an open coded list traversal to use list_for_each_entry_safe. Done using the following semantic patch by coccinelle. @r@ struct list_head* l; expression e; identifier m,list_del_init,f; type T1; T1* pos; iterator name list_f

Re: MAP_FIXED for ELF mappings

2017-10-04 Thread Linus Torvalds
On Wed, Oct 4, 2017 at 10:12 AM, Michal Hocko wrote: > > Yes, but we already have a new stack mapped and that was the point of > the referenced CVE where the binary segments got mapped over the stack > AFAIU. Well, if you control the binary to the point where you just make the ELF section map on

[PATCH v2] Staging: rtl8188eu: core: rtw_xmit: Use list_for_each_entry_safe

2017-10-04 Thread Srishti Sharma
This is a cleanup patch and doesn't change runtime behaviour. It changes an open coded list traversal to use list_for_each_entry_safe. Done using the following semantic patch by coccinelle. @r@ struct list_head* l; expression e; identifier m,list_del_init,f; type T1; T1* pos; iterator name list_fo

Re: [kernel-hardening] Re: [PATCH 2/3] Makefile: Move stackprotector availability out of Kconfig

2017-10-04 Thread Greg KH
On Wed, Oct 04, 2017 at 09:22:24AM -0700, Kees Cook wrote: > Do you want me to send this patch, or should we allow it to fail with > the "missing reference" (which may actually be more expressive...) I > think the way it is right now is better, but I'm open to either. I think the current way is fi

[PATCH v2] Staging: rtl8188eu: core: rtw_mlme_ext: Use list_for_each_entry_safe

2017-10-04 Thread Srishti Sharma
This is a cleanup patch and doesn't change runtime behaviour. It changes an open coded list traversal to use list_for_each_entry_safe. Done using the following semantic patch by coccinelle. @r@ struct list_head* l; expression e; identifier m, list_del_init, f; type T1; T1* pos; iterator name list

Re: [kernel-hardening] [RFC V2 0/6] add more kernel pointer filter options

2017-10-04 Thread Ian Campbell
On Sun, 2017-10-01 at 11:06 +1100, Tobin C. Harding wrote: > Suggestion by Ian Campbell to add comments on the threat model being mitigated > by use of %pa vs %paP etc is not implemented because I do not know the threat > model (I'm only the janitor). Happy to add them if someone writes them. Than

Re: [Part2 PATCH v5 08/31] KVM: Introduce KVM_MEMORY_ENCRYPT_REGISTER_REGION ioctl

2017-10-04 Thread Brijesh Singh
On 10/04/2017 10:19 AM, Borislav Petkov wrote: +}; + +#define KVM_MEMORY_ENCRYPT_REGISTER_REGION_IOR(KVMIO, 0xbb,\ +struct kvm_enc_region) +#define KVM_MEMORY_ENCRYPT_UNREGISTER_REGION _IOR(KVMIO, 0xbc,\ +

Re: [PATCH -v2] blk-mq: Start to fix memory ordering...

2017-10-04 Thread Jens Axboe
On 09/06/2017 02:00 AM, Peter Zijlstra wrote: > > Attempt to untangle the ordering in blk-mq. The patch introducing the > single smp_mb__before_atomic() is obviously broken in that it doesn't > clearly specify a pairing barrier and an obtained guarantee. > > The comment is further misleading in t

[PATCH] Staging: rtl8723bs: Externs should be avoided in .C file

2017-10-04 Thread Srinivasan Shanmugam
Removed all the unnecessary extern from rtl8723bs Signed-off-by: Srinivasan Shanmugam --- drivers/staging/rtl8723bs/core/rtw_recv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_recv.c b/drivers/staging/rtl8723bs/core/rtw_recv.c index c

Re: [Tee-dev] [PATCH v1 00/14] tee: optee: add dynamic shared memory support

2017-10-04 Thread Volodymyr Babchuk
Hello Stuart, On 03.10.17 19:05, Stuart Yoder wrote: On 9/28/17 1:03 PM, Volodymyr Babchuk wrote: From: Volodymyr Babchuk This patch series enables dynamic shared memory support in the TEE subsystem as a whole and in OP-TEE in particular. Global Platform TEE specification [1] allows client

[PATCH] Staging: rtl8723bs: Externs should be avoided in .C file

2017-10-04 Thread Srinivasan Shanmugam
Removed warning from 0001-Staging-rtl8723bs-Externs-should-be-avoided-in-.C-fi.patch file after running checkpatch.pl Signed-off-by: Srinivasan Shanmugam --- drivers/staging/rtl8723bs/core/rtw_recv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rtl8723b

Re: [kernel-hardening] [RFC V2 4/6] lib: vsprintf: default kptr_restrict to the maximum value

2017-10-04 Thread Linus Torvalds
On Wed, Oct 4, 2017 at 10:08 AM, Linus Torvalds wrote: > > So I honestly doubt the value of kptr_restrict. Any *sane* policy > pretty much has to be in the caller, and by thinking about what you > print out. IOW, things like proc_pid_wchan(). Looking at /proc/kallsyms is actually a prime example

Re: MAP_FIXED for ELF mappings

2017-10-04 Thread Michal Hocko
On Wed 04-10-17 10:15:31, Linus Torvalds wrote: > On Wed, Oct 4, 2017 at 10:12 AM, Michal Hocko wrote: > > > > Yes, but we already have a new stack mapped and that was the point of > > the referenced CVE where the binary segments got mapped over the stack > > AFAIU. > > Well, if you control the b

Re: [PATCH 2/2] pci: Expose offset, stride, and VF device ID via sysfs

2017-10-04 Thread Sironi, Filippo
> On 3. Oct 2017, at 21:48, Bjorn Helgaas wrote: > > On Tue, Oct 03, 2017 at 02:31:14PM -0500, Bjorn Helgaas wrote: >> On Fri, Sep 29, 2017 at 07:53:31AM +, Sironi, Filippo wrote: >>> >>> Hi Bjorn, >>> On 25. Sep 2017, at 20:55, Bjorn Helgaas wrote: Hi Filippo,

Re: [PATCH] cxgb4vf: make a couple of functions static

2017-10-04 Thread David Miller
From: Colin King Date: Wed, 4 Oct 2017 14:20:37 +0100 > From: Colin Ian King > > The functions t4vf_link_down_rc_str and t4vf_handle_get_port_info are > local to the source and do not need to be in global scope, so make > them static. > > Cleans up sparse warnings: > symbol 't4vf_link_down_rc

Re: [PATCH v2] serial: imx: Correct comment imx_flush_buffer()

2017-10-04 Thread Uwe Kleine-König
On Wed, Oct 04, 2017 at 05:13:27PM +0100, Martyn Welch wrote: > The comment in imx_flush_buffer() states that the state of 4 registers > are to be saved/restored, then only saves and restores 3 registers. The > missing register (UBRC) is read only and thus can't be restored. > > Update the comment

Re: [PATCH v3 16/33] tracing: Generalize per-element hist trigger data

2017-10-04 Thread Steven Rostedt
On Fri, 22 Sep 2017 14:59:56 -0500 Tom Zanussi wrote: > @@ -1742,7 +1746,8 @@ static void hist_trigger_stacktrace_print(struct > seq_file *m, > seq_printf(m, "%s: [%llx] %-55s", field_name, > uval, str); > } else if (key_field-

Re: [RFC] mmap(MAP_CONTIG)

2017-10-04 Thread Mike Kravetz
On 10/04/2017 06:49 AM, Anshuman Khandual wrote: > On 10/04/2017 05:26 AM, Mike Kravetz wrote: >> At Plumbers this year, Guy Shattah and Christoph Lameter gave a presentation >> titled 'User space contiguous memory allocation for DMA' [1]. The slides >> point out the performance benefits of device

Re: [PATCH v3 04/22] firmware: arm_scmi: add basic driver infrastructure for SCMI

2017-10-04 Thread Sudeep Holla
On 04/10/17 11:59, Arnd Bergmann wrote: > On Thu, Sep 28, 2017 at 3:11 PM, Sudeep Holla wrote: > >> +/** >> + * struct scmi_msg_hdr - Message(Tx/Rx) header >> + * >> + * @id: The identifier of the command being sent >> + * @protocol_id: The identifier of the protocol used to send @id command >>

Re: [PATCH 3/3] mm: oom: show unreclaimable slab info when unreclaimable slabs > user memory

2017-10-04 Thread Yang Shi
On 10/4/17 7:27 AM, Michal Hocko wrote: On Wed 04-10-17 02:06:17, Yang Shi wrote: +static bool is_dump_unreclaim_slabs(void) +{ + unsigned long nr_lru; + + nr_lru = global_node_page_state(NR_ACTIVE_ANON) + +global_node_page_state(NR_INACTIVE_ANON) + +

Re: [RFC] mmap(MAP_CONTIG)

2017-10-04 Thread Mike Kravetz
On 10/04/2017 09:05 AM, Christopher Lameter wrote: > On Wed, 4 Oct 2017, Anshuman Khandual wrote: > >>> - Using 'pre-allocated' pages in the fault paths may be intrusive. >> >> But we have already faulted in all of them for the mapping and they >> are also locked. Hence there should not be any pag

Re: [PATCH] nfp: convert nfp_eth_set_bit_config() into a macro

2017-10-04 Thread Matthias Kaehlcke
El Tue, Oct 03, 2017 at 02:50:00PM -0700 Jakub Kicinski ha dit: > On Tue, 3 Oct 2017 13:05:46 -0700, Matthias Kaehlcke wrote: > > nfp_eth_set_bit_config() is marked as __always_inline to allow gcc to > > identify the 'mask' parameter as known to be constant at compile time, > > which is required

Re: [PATCH] scripts/kallsyms: Ignore symbol type 'n'

2017-10-04 Thread Ard Biesheuvel
On 4 October 2017 at 17:54, Guenter Roeck wrote: > gcc on aarch64 may emit synbols of type 'n' if the kernel is built with > '-frecord-gcc-switches'. In most cases, those symbols are reported > with nm as > 000e n $d > and with objdump as > ld .GCC

Re: [PATCH] nfp: convert nfp_eth_set_bit_config() into a macro

2017-10-04 Thread David Miller
From: Matthias Kaehlcke Date: Wed, 4 Oct 2017 10:42:15 -0700 > Given that this doesn't seem to be a widespread issue in the kernel > personally I would consider the conversion to a macro in this case an > acceptable solution, though it is definitely ugly. However I'm not the > owner of the driver

[PATCH] drm/rockchip: analogix_dp: Use mutex rather than spinlock

2017-10-04 Thread Emil Renner Berthing
On the Samsung Chromebook Plus I get this error with 4.14-rc3: BUG: scheduling while atomic: kworker/3:1/50/0x0002 Modules linked in: CPU: 3 PID: 50 Comm: kworker/3:1 Not tainted 4.14.0-0.rc3-kevin #2 Hardware name: Google Kevin (DT) Workqueue: events analogix_dp_psr_work Call trace: [] dump_b

Re: [PATCH 1/3] wireless: iwlwifi: use bool instead of int

2017-10-04 Thread Joe Perches
On Wed, 2017-10-04 at 19:39 +0300, Luciano Coelho wrote: > On Wed, 2017-10-04 at 09:26 -0700, Joe Perches wrote: [] > > This might be more intelligble as separate tests > > > > static bool is_valid_channel(u16 ch_id) > > { > > if (ch_id <= 14) > > return true; > > > > if ((ch_

Re: [PATCH 1/6] ARM: s3c24xx: Delete an error message for a failed memory allocation in s3c2410_iotiming_get()

2017-10-04 Thread Krzysztof Kozlowski
On Mon, Oct 02, 2017 at 07:58:02PM +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Mon, 2 Oct 2017 19:14:20 +0200 > > Omit an extra message for a memory allocation failure in this function. > > This issue was detected by using the Coccinelle software. > > Signed-off-by: Markus El

Re: sysbench throughput degradation in 4.13+

2017-10-04 Thread Rik van Riel
On Wed, 2017-10-04 at 18:18 +0200, Peter Zijlstra wrote: > On Tue, Oct 03, 2017 at 10:39:32AM +0200, Peter Zijlstra wrote: > > So I was waiting for Rik, who promised to run a bunch of NUMA > > workloads > > over the weekend. > > > > The trivial thing regresses a wee bit on the overloaded case, I'v

Re: [PATCH 4/6] ARM: s3c24xx: Delete an error message for a failed memory allocation in s3c2412_iotiming_get()

2017-10-04 Thread Krzysztof Kozlowski
On Mon, Oct 02, 2017 at 08:01:28PM +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Mon, 2 Oct 2017 19:37:07 +0200 > > Omit an extra message for a memory allocation failure in this function. > > This issue was detected by using the Coccinelle software. > > Signed-off-by: Markus El

[PATCH v2] staging: fbtft: differentiate between buffer and data types to fix sparse warning

2017-10-04 Thread Alfonso Lima Astor
sparse was complaning about an incorrect type cast: drivers/staging/fbtft/fbtft-bus.c:60:1: warning: incorrect type in assignment (different base types) drivers/staging/fbtft/fbtft-bus.c:60:1:expected unsigned short [unsigned] [short] [usertype] drivers/staging/fbtft/fbtft-bus.c:60:1:got

Re: [PATCH] nfp: convert nfp_eth_set_bit_config() into a macro

2017-10-04 Thread Joe Perches
On Tue, 2017-10-03 at 13:05 -0700, Matthias Kaehlcke wrote: > nfp_eth_set_bit_config() is marked as __always_inline to allow gcc to > identify the 'mask' parameter as known to be constant at compile time, > which is required to use the FIELD_GET() macro. > > The forced inlining does the trick for

Re: [PATCH v3 21/33] tracing: Add support for 'synthetic' events

2017-10-04 Thread Steven Rostedt
On Fri, 22 Sep 2017 15:00:01 -0500 Tom Zanussi wrote: > +/* This function releases synth_event_mutex */ > +static int unregister_synth_event(struct synth_event *event) > +{ > + struct trace_event_call *call = &event->call; > + int ret; > + > + mutex_unlock(&synth_event_mutex); > +

[PATCH] x86/alternatives: Fix alt_max_short macro to really be a max()

2017-10-04 Thread Mathias Krause
The alt_max_short() macro in asm/alternative.h does not work as intended, leading to nasty bugs. E.g. alt_max_short("1", "3") evaluates to 3, but alt_max_short("3", "1") evaluates to 1 -- not exactly the maximum of 1 and 3. In fact, I had to learn it the hard way by crashing my kernel in not so fu

Re: [PATCH 3/3] mm: oom: show unreclaimable slab info when unreclaimable slabs > user memory

2017-10-04 Thread Yang Shi
On 10/4/17 7:27 AM, Michal Hocko wrote: On Wed 04-10-17 02:06:17, Yang Shi wrote: +static bool is_dump_unreclaim_slabs(void) +{ + unsigned long nr_lru; + + nr_lru = global_node_page_state(NR_ACTIVE_ANON) + +global_node_page_state(NR_INACTIVE_ANON) + +

RE: [PATCH] netfilter: fix stringop-overflow warning with UBSAN

2017-10-04 Thread Jozsef Kadlecsik
Hi, [Sorry, at holiday I just cursory watched the mailing lists.] On Tue, 1 Aug 2017, David Laight wrote: > From: Arnd Bergmann > > Sent: 31 July 2017 11:09 > > Using gcc-7 with UBSAN enabled, we get this false-positive warning: > > > > net/netfilter/ipset/ip_set_core.c: In function 'ip_set_soc

Re: [PATCH v3 25/33] tracing: Allow whitespace to surround hist trigger filter

2017-10-04 Thread Steven Rostedt
On Fri, 22 Sep 2017 15:00:05 -0500 Tom Zanussi wrote: > The existing code only allows for one space before and after the 'if' > specifying the filter for a hist trigger. Add code to make that more > permissive as far as whitespace goes. Specifically, we want to allow > spaces in the trigger its

Re: [PATCH 2/6] ARM: s3c24xx: Improve a size determination in s3c2410_iotiming_get()

2017-10-04 Thread Krzysztof Kozlowski
On Mon, Oct 02, 2017 at 07:59:19PM +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Mon, 2 Oct 2017 19:16:58 +0200 > > Replace the specification of a data structure by a pointer dereference > as the parameter for the operator "sizeof" to make the corresponding size > determination a

Re: [PATCH v3 26/33] tracing: Add cpu field for hist triggers

2017-10-04 Thread Steven Rostedt
On Fri, 22 Sep 2017 15:00:06 -0500 Tom Zanussi wrote: > A common key to use in a histogram is the cpuid - add a new cpu > 'synthetic' field for that purpose. This field is named cpu rather > than $cpu or $common_cpu because 'cpu' already exists as a special > filter field and it makes more sense

Re: [PATCH 3/6] ARM: s3c2410: Fix a typo in a comment line

2017-10-04 Thread Krzysztof Kozlowski
On Mon, Oct 02, 2017 at 08:00:27PM +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Mon, 2 Oct 2017 19:34:36 +0200 > > Adjust a word in this function description. > > Signed-off-by: Markus Elfring > --- > arch/arm/mach-s3c24xx/iotiming-s3c2410.c | 2 +- > 1 file changed, 1 insert

Re: [PATCH] nfp: convert nfp_eth_set_bit_config() into a macro

2017-10-04 Thread Jakub Kicinski
On Wed, 4 Oct 2017 10:42:42 -0700, Manoj Gupta wrote: > Hi Jakub, > > I had discussed about supporting this code with some clang developers. > However, the consensus was this code relies on a specific GCC optimizer > behavior and Clang does not share the same behavior by design. Hm. I find surpr

Re: Extreme time jitter with suspend/resume cycles

2017-10-04 Thread Thomas Gleixner
Gabriel, On Wed, 4 Oct 2017, Gabriel Beddingfield wrote: thanks for bringing this up. Let's see where this goes. Disclaimer: I did not bother to look at the patch yet because: 1) It's an attachment and I'm too lazy to open and convert it to inline for reply. Sending patches inline is the

[PATCH] mwifiex: Use put_unaligned_le32

2017-10-04 Thread Himanshu Jha
Use put_unaligned_le32 rather than using byte ordering function and memcpy which makes code clear. Also, add the header file where it is declared. Done using Coccinelle and semantic patch used is : @ rule1 @ identifier tmp; expression ptr,x; type T; @@ - tmp = cpu_to_le32(x); <+... when != tm

Re: [PATCH RFC hack dont apply] intel_idle: support running within a VM

2017-10-04 Thread Jacob Pan
On Wed, 4 Oct 2017 20:12:28 +0300 "Michael S. Tsirkin" wrote: > On Wed, Oct 04, 2017 at 10:09:39AM -0700, Jacob Pan wrote: > > On Wed, 4 Oct 2017 05:09:09 +0300 > > "Michael S. Tsirkin" wrote: > > > > > On Mon, Oct 02, 2017 at 10:12:49AM -0700, Jacob Pan wrote: > > > > On Sat, 30 Sep 2017 0

[PATCH] usb: wusbcore: Use put_unaligned_le32

2017-10-04 Thread Himanshu Jha
Use put_unaligned_le32 rather than using byte ordering function and memcpy which makes code clear. Also, add the header file where it is declared. Done using Coccinelle and semantic patch used is : @ rule1 @ identifier tmp; expression ptr,x; type T; @@ - tmp = cpu_to_le32(x); <+... when != tm

Re: [PATCH] arm64: Enforce endianness build flags for LD and AS

2017-10-04 Thread Guenter Roeck
On Tue, Oct 03, 2017 at 01:58:22PM -0700, Guenter Roeck wrote: > If LD or AS is specified on the command line using "make LD=", > the endianness flag will not be added. Depending on the toolchain used, > this can result in endianness mismatch errors, such as > > aarch64-cros-linux-gnu/binutils-bin

[PATCH 1/2] selinux: fix build warning by removing the unused sid variable

2017-10-04 Thread Corentin Labbe
This patch remove the unused variable sid This fix the following build warning: security/selinux/hooks.c:2921:6: warning: variable 'sid' set but not used [-Wunused-but-set-variable] Signed-off-by: Corentin Labbe --- security/selinux/hooks.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-

[PATCH 2/2] selinux: fix build warning

2017-10-04 Thread Corentin Labbe
This patch make selinux_task_prlimit() static since it is not used anywhere else. This fix the following build warning: security/selinux/hooks.c:3981:5: warning: no previous prototype for 'selinux_task_prlimit' [-Wmissing-prototypes] Signed-off-by: Corentin Labbe --- security/selinux/hooks.c |

Re: [PATCH 1/2] mm: Introduce wrapper to access mm->nr_ptes

2017-10-04 Thread Mike Kravetz
On 10/04/2017 09:36 AM, Kirill A. Shutemov wrote: > Let's add wrappers for ->nr_ptes with the same interface as for nr_pmd > and nr_pud. > > It's preparation for consolidation of page-table counters in mm_struct. > > Signed-off-by: Kirill A. Shutemov > --- > arch/arm/mm/pgd.c | 2 +-

Re: [PATCH v2] ARC: reset: introduce AXS10x reset driver

2017-10-04 Thread Vineet Gupta
Hi Philipp, On 10/04/2017 03:09 AM, Philipp Zabel wrote: Maybe it is better to do this the other way around? I can put this patch on a stable reset/arc branch for you to merge before applying the reset DT updates. Have you come to a decision on this? Just in case, I have removed the AXS10x dr

Re: [PATCH 1/2] ARM: s3c64xx: Delete two error messages for a failed memory allocation in samsung_bl_set()

2017-10-04 Thread Krzysztof Kozlowski
On Mon, Oct 02, 2017 at 10:39:56PM +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Mon, 2 Oct 2017 22:20:39 +0200 > > Omit extra messages for a memory allocation failure in this function. > > This issue was detected by using the Coccinelle software. > > Signed-off-by: Markus Elfr

Re: [PATCH] RDMA/hns: return 0 rather than return a garbage status value

2017-10-04 Thread Doug Ledford
On Fri, 2017-09-29 at 21:13 +0100, Colin King wrote: > From: Colin Ian King > > For the case where hr_qp->state == IB_QPS_RESET, an uninitialized > value in ret is being returned by function hns_roce_v2_query_qp. > Fix this by setting ret to 0 for this specific return condition. > > Detected by

Re: [PATCH 2/2] ARM: s3c64xx: Delete an unnecessary return statement in samsung_bl_set()

2017-10-04 Thread Krzysztof Kozlowski
On Mon, Oct 02, 2017 at 10:40:44PM +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Mon, 2 Oct 2017 22:30:55 +0200 > > The script "checkpatch.pl" pointed information out like the following. > > WARNING: void function return statements are not generally useful > > Thus remove such

Re: [PATCH] arm64: Enforce endianness build flags for LD and AS

2017-10-04 Thread Guenter Roeck
On Wed, Oct 04, 2017 at 11:31:08AM -0700, Guenter Roeck wrote: > On Tue, Oct 03, 2017 at 01:58:22PM -0700, Guenter Roeck wrote: > > If LD or AS is specified on the command line using "make LD=", > > the endianness flag will not be added. Depending on the toolchain used, > > this can result in endia

[PATCH 0/5] CRIS v32: Adjustments for crisv32_nand_flash_probe()

2017-10-04 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 4 Oct 2017 20:33:20 +0200 A few update suggestions were taken into account from static source code analysis. Markus Elfring (5): Delete an error message for a failed memory allocation Improve a size determination Delete a jump target Delete an unnecessary

<    1   2   3   4   5   6   7   8   9   10   >