[PATCH 05/14] x86/cqm,perf/core: Cgroup support prepare

2016-12-16 Thread Vikas Shivappa
From: David Carrillo-Cisneros cgroup hierarchy monitoring is not supported currently. This patch builds all the necessary datastructures, cgroup APIs like alloc, free etc and necessary quirks for supporting cgroup hierarchy monitoring in later patches. - Introduce a architecture specific data st

[PATCH 07/14] x86/rdt,cqm: Scheduling support update

2016-12-16 Thread Vikas Shivappa
Introduce a scheduling hook finish_arch_pre_lock_switch which is called just after the perf sched_in during context switch. This method handles both cat and cqm sched in scenarios. The IA32_PQR_ASSOC MSR is used by cat(cache allocation) and cqm and this patch integrates the two msr writes to one. T

[PATCH 12/14] perf/core,x86/cqm: Add read for Cgroup events,per pkg reads.

2016-12-16 Thread Vikas Shivappa
For cqm cgroup events, the events can be read even if the event was not active on the cpu on which the event is being read. This is because the RMIDs are per package and hence if we read the llc_occupancy value on a cpu x, we are really reading the occupancy for the package where cpu x belongs. Th

[PATCH 13/14] perf/stat: fix bug in handling events in error state

2016-12-16 Thread Vikas Shivappa
From: Stephane Eranian When an event is in error state, read() returns 0 instead of sizeof() buffer. In certain modes, such as interval printing, ignoring the 0 return value may cause bogus count deltas to be computed and thus invalid results printed. this patch fixes this problem by modifying r

[PATCH 06/14] x86/cqm: Add cgroup hierarchical monitoring support

2016-12-16 Thread Vikas Shivappa
From: David Carrillo-Cisneros Patch adds support for monitoring cgroup hierarchy. The arch_info that was introduced in the perf_cgroup is used to maintain the cgroup related rmid and hierarchy information. Since cgroup supports hierarchical monitoring, a cgroup is always monitoring for some ance

[PATCH 10/14] x86/cqm: Add RMID reuse

2016-12-16 Thread Vikas Shivappa
When an RMID is freed by an event it cannot be reused immediately as the RMID may still have some cache occupancy. Hence when an RMID is freed it goes into limbo list and not free list. This patch provides support to periodically check the occupancy values of such RMIDs and move them to the free li

[PATCH 14/14] perf/stat: revamp read error handling, snapshot and per_pkg events

2016-12-16 Thread Vikas Shivappa
From: David Carrillo-Cisneros A package wide event can return a valid read even if it has not run in a specific cpu, this does not fit well with the assumption that run == 0 is equivalent to a . To fix the problem, this patch defines special error values for val, run and ena (~0ULL), and use the

[PATCH 03/14] x86/rdt: Add rdt common/cqm compile option

2016-12-16 Thread Vikas Shivappa
Add a compile option INTEL_RDT which enables common code for all RDT(Resource director technology) and a specific INTEL_RDT_M which enables code for RDT monitoring. CQM(cache quality monitoring) and mbm(memory b/w monitoring) are part of Intel RDT monitoring. Signed-off-by: Vikas Shivappa Confli

[PATCH 11/14] x86/cqm: Add failure on open and read

2016-12-16 Thread Vikas Shivappa
To provide reliable output to the user, cqm throws error when it does not have enough RMIDs to monitor depending upon the mode user choses. This also takes care to not overuse RMIDs. Default is LAZY mode. NOLAZY mode: This patch adds a file mon_mask in the perf_cgroup which indicates the packages

[PATCH 04/14] x86/cqm: Add Per pkg rmid support

2016-12-16 Thread Vikas Shivappa
The RMID is currently global and this extends it to per pkg rmid. The h/w provides a set of RMIDs on each package and the same task can hence be associated with different RMIDs on each package. Patch introduces a new cqm_pkgs_data to keep track of the per package free list, limbo list and other lo

[PATCH 02/14] x86/cqm: Remove cqm recycling/conflict handling

2016-12-16 Thread Vikas Shivappa
From: David Carrillo-Cisneros We only supported global RMIDs till now and not per-pkg RMIDs and hence the RMIDs would not scale and we would more easily run out of RMIDs. When we run out of RMIDs we did RMID recycling and ended up in several issues some of which listed below and complications whi

[PATCH V4 00/14] Cqm2: Intel Cache Monitoring fixes and enhancements

2016-12-16 Thread Vikas Shivappa
Another attempt for cqm2 series- The current upstream cqm(Cache monitoring) has major issues which make the feature almost unusable which this series tries to fix and also address Thomas comments on previous versions of the cqm2 patch series to better document what we are trying to fix. Patch is b

[PATCH 01/14] x86/cqm: Intel Resource Monitoring Documentation

2016-12-16 Thread Vikas Shivappa
Add documentation of usage of cqm and mbm events, continuous monitoring, lazy and non-lazy monitoring. Signed-off-by: Vikas Shivappa --- Documentation/x86/intel_rdt_mon_ui.txt | 91 ++ 1 file changed, 91 insertions(+) create mode 100644 Documentation/x86/intel_rd

Re: [GIT PULL (resend)] readlink cleanup

2016-12-16 Thread Al Viro
On Fri, Dec 16, 2016 at 11:48:59PM +0100, Miklos Szeredi wrote: > This is a rework of the readlink cleanup patchset from the last cycle. Now > readlink(2) does the following: > > - if i_op->readlink() is non-NULL (only proc and afs mountpoints for now) >then it calls that > > - otherwise

Re: [PATCH 1/3] staging: android: remove ION_IOC_SYNC

2016-12-16 Thread Laura Abbott
On 12/16/2016 02:42 PM, Matthew Smith wrote: > Remove definition of ION_IOC_CUSTOM from ion.h. > Remove usage from compat_ion.c and ion-ioctl.c. > Remove item from TODO file. The 'remove' from that TODO is more than just removing the code. There's also an implicit 'replace it with something else'.

Re: [PATCH] acpi: Fix format string type mistakes

2016-12-16 Thread Kees Cook
On Fri, Dec 16, 2016 at 2:36 PM, Rafael J. Wysocki wrote: > On Fri, Dec 16, 2016 at 10:51 PM, Kees Cook wrote: >> From: Emese Revfy >> >> This adds the missing __printf attribute which allows compile time >> format string checking (and will be used by the coming initify gcc >> plugin). Additiona

Re: [PATCH v4 1/4] gcc-plugins: Add the initify gcc plugin

2016-12-16 Thread Kees Cook
On Fri, Dec 16, 2016 at 2:45 PM, PaX Team wrote: > On 16 Dec 2016 at 14:06, Kees Cook wrote: > >> diff --git a/scripts/gcc-plugins/gcc-common.h >> b/scripts/gcc-plugins/gcc-common.h >> index 950fd2e64bb7..369bfb471e58 100644 >> --- a/scripts/gcc-plugins/gcc-common.h >> +++ b/scripts/gcc-plugins/g

Re: [PATCH v6 1/3] clk: x86: Add Atom PMC platform clocks

2016-12-16 Thread Darren Hart
On Sat, Dec 17, 2016 at 12:29:41AM +0200, Andy Shevchenko wrote: > On Fri, Dec 16, 2016 at 9:19 PM, Darren Hart wrote: > > On Fri, Dec 16, 2016 at 08:49:13PM +0200, Andy Shevchenko wrote: > >> On Fri, Dec 16, 2016 at 8:36 PM, Darren Hart wrote: > >> > On Tue, Dec 13, 2016 at 02:26:21AM +0200, And

[GIT PULL (resend)] readlink cleanup

2016-12-16 Thread Miklos Szeredi
Al, Linus, I've got the ACK from Al for this set, except for the readlink signature conversion. But I firmly believe that that's also a valid cleanup, so here goes the unmodified resend. There's a conflict in ubifs, the obvious resolution is to use the new value of .get_link and remove the .read

Re: [PATCH v4 1/4] gcc-plugins: Add the initify gcc plugin

2016-12-16 Thread PaX Team
On 16 Dec 2016 at 14:06, Kees Cook wrote: > diff --git a/scripts/gcc-plugins/gcc-common.h > b/scripts/gcc-plugins/gcc-common.h > index 950fd2e64bb7..369bfb471e58 100644 > --- a/scripts/gcc-plugins/gcc-common.h > +++ b/scripts/gcc-plugins/gcc-common.h > @@ -287,6 +287,26 @@ static inline struct cg

Re: OOM: Better, but still there on 4.9

2016-12-16 Thread Chris Mason
On 12/16/2016 05:14 PM, Michal Hocko wrote: On Fri 16-12-16 13:15:18, Chris Mason wrote: On 12/16/2016 02:39 AM, Michal Hocko wrote: [...] I believe the right way to go around this is to pursue what I've started in [1]. I will try to prepare something for testing today for you. Stay tuned. But

[PATCH 1/3] staging: android: remove ION_IOC_SYNC

2016-12-16 Thread Matthew Smith
Remove definition of ION_IOC_CUSTOM from ion.h. Remove usage from compat_ion.c and ion-ioctl.c. Remove item from TODO file. Signed-off-by: Matthew Smith --- drivers/staging/android/TODO | 3 --- drivers/staging/android/ion/compat_ion.c | 1 - drivers/staging/android/ion/ion-ioctl.c

[PATCH 3/3] staging: android: remove compat_get_ion_custom_data

2016-12-16 Thread Matthew Smith
After removing the ION_IOC_CUSTOM case, compat_get_ion_custom_data is no longer required. Signed-off-by: Matthew Smith --- drivers/staging/android/ion/compat_ion.c | 16 1 file changed, 16 deletions(-) diff --git a/drivers/staging/android/ion/compat_ion.c b/drivers/staging/and

[PATCH 2/3] staging: android: remove ION_IOC_CUSTOM

2016-12-16 Thread Matthew Smith
Remove definition of ION_IOC_CUSTOM from ion.h. Remove usage from compat_ion.c and ion-ioctl.c. Remove item from TOOD file. Signed-off-by: Matthew Smith --- drivers/staging/android/TODO | 3 --- drivers/staging/android/ion/compat_ion.c | 17 - drivers/staging/android

Re: [kernel-hardening] Re: [PATCH v5 1/4] siphash: add cryptographically secure PRF

2016-12-16 Thread George Spelvin
An idea I had which mght be useful: You could perhaps save two rounds in siphash_*u64. The final word with the length (called "b" in your implementation) only needs to be there if the input is variable-sized. If every use of a given key is of a fixed-size input, you don't need a length suffix.

Re: [PATCH] acpi: Fix format string type mistakes

2016-12-16 Thread Rafael J. Wysocki
On Fri, Dec 16, 2016 at 10:51 PM, Kees Cook wrote: > From: Emese Revfy > > This adds the missing __printf attribute which allows compile time > format string checking (and will be used by the coming initify gcc > plugin). Additionally, this fixes the warnings exposed by the attribute. > > Signed-

[git pull] Input updates for 4.10-rc0

2016-12-16 Thread Dmitry Torokhov
Hi Linus, Please pull from: git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git for-linus to receive updates for the input subsystem. You will get: - updated support for Synaptics RMI4 devices, including support for SMBus controllers, firmware update support, sensor tuning, a

Re: [PATCH v2 05/11] locking/ww_mutex: Add waiters in stamp order

2016-12-16 Thread Nicolai Hähnle
On 16.12.2016 21:00, Peter Zijlstra wrote: On Fri, Dec 16, 2016 at 07:11:41PM +0100, Nicolai Hähnle wrote: mutex_optimistic_spin() already calls __mutex_trylock, and for the no-spin case, __mutex_unlock_slowpath() only calls wake_up_q() after releasing the wait_lock. mutex_optimistic_spin() is

[PATCH] usb: c67x00: remove unused variable

2016-12-16 Thread Sudip Mukherjee
The pointer urbp was only assigned some address but was never used. Signed-off-by: Sudip Mukherjee --- drivers/usb/c67x00/c67x00-sched.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/c67x00/c67x00-sched.c b/drivers/usb/c67x00/c67x00-sched.c index 7311ed6..0b68cd6 100644 --- a

[PATCH 2/2] KVM: x86: flush pending lapic jump label updates on module unload

2016-12-16 Thread David Matlack
KVM's lapic emulation uses static_key_deferred (apic_{hw,sw}_disabled). These are implemented with delayed_work structs which can still be pending when the KVM module is unloaded. We've seen this cause kernel panics when the kvm_intel module is quickly reloaded. Use the new static_key_deferred_flu

[PATCH 1/2] jump_labels: API for flushing deferred jump label updates

2016-12-16 Thread David Matlack
Modules that use static_key_deferred need a way to synchronize with any delayed work that is still pending when the module is unloaded. Introduce static_key_deferred_flush() which flushes any pending jump label updates. Signed-off-by: David Matlack --- include/linux/jump_label_ratelimit.h | 5 ++

Re: [PATCH v6 1/3] clk: x86: Add Atom PMC platform clocks

2016-12-16 Thread Andy Shevchenko
On Fri, Dec 16, 2016 at 9:19 PM, Darren Hart wrote: > On Fri, Dec 16, 2016 at 08:49:13PM +0200, Andy Shevchenko wrote: >> On Fri, Dec 16, 2016 at 8:36 PM, Darren Hart wrote: >> > On Tue, Dec 13, 2016 at 02:26:21AM +0200, Andy Shevchenko wrote: >> >> On Tue, Dec 13, 2016 at 2:15 AM, Pierre-Louis B

Re: [PATCH v6 3/5] random: use SipHash in place of MD5

2016-12-16 Thread Jason A. Donenfeld
Hi Andy, > Agreed. A simpler contruction would be: > > chaining++; > output = H(chaining, secret); > > And this looks a whole lot like Ted's ChaCha20 construction. In that simpler construction with counter-based secret rekeying and in Ted's ChaCha20 construction, the issue is that every X hits,

Re: [PATCH] fscrypt: Factor out bio specific functions

2016-12-16 Thread Richard Weinberger
On 16.12.2016 23:14, Eric Biggers wrote: > On Fri, Dec 16, 2016 at 09:48:19PM +0100, Richard Weinberger wrote: >> On 16.12.2016 16:37, David Gstir wrote: @@ -349,33 +347,10 @@ int fscrypt_zeroout_range(const struct inode *inode, pgoff_t lblk, err = do_page_crypto(inode, F

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

2016-12-16 Thread Josh Poimboeuf
On Fri, Dec 16, 2016 at 05:55:55PM +0100, Petr Mladek wrote: > On Thu 2016-12-08 12:08:36, Josh Poimboeuf wrote: > > 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 >

Re: [PATCH v4 0/4] Introduce the initify gcc plugin

2016-12-16 Thread Kees Cook
On Fri, Dec 16, 2016 at 2:06 PM, Kees Cook wrote: > Hi, > > This is a continuation of Emese Revfy's initify plugin upstreaming. This > is based on her v3, but updated with various fixes from her github tree. > Additionally, I split off the printf attribute fixes and sent those > separately. > > Th

Re: [PATCH] latent_entropy: fix ARM build error on earlier gcc

2016-12-16 Thread Kees Cook
On Fri, Dec 16, 2016 at 2:17 PM, PaX Team wrote: > On 16 Dec 2016 at 13:06, Kees Cook wrote: > >> This fixes build errors seen on gcc-4.9.3 or gcc-5.3.1 for an ARM: >> >> arm-soc/init/initramfs.c: In function 'error': >> arm-soc/init/initramfs.c:50:1: error: unrecognizable insn: >> } >> ^ >> (in

Re: [PATCH v5 1/4] siphash: add cryptographically secure PRF

2016-12-16 Thread Jason A. Donenfeld
On Fri, Dec 16, 2016 at 11:13 PM, George Spelvin wrote: > Remembering that on "real" machines it's full SipHash, then I'd say that > 64-bit security + rekeying seems reasonable. 64-bit security for an RNG is not reasonable even with rekeying. No no no. Considering we already have a massive speed-

Re: [PATCH] latent_entropy: fix ARM build error on earlier gcc

2016-12-16 Thread PaX Team
On 16 Dec 2016 at 13:06, Kees Cook wrote: > This fixes build errors seen on gcc-4.9.3 or gcc-5.3.1 for an ARM: > > arm-soc/init/initramfs.c: In function 'error': > arm-soc/init/initramfs.c:50:1: error: unrecognizable insn: > } > ^ > (insn 26 25 27 5 (set (reg:SI 111 [ local_entropy.243 ]) >

Re: [PATCH v5 1/4] siphash: add cryptographically secure PRF

2016-12-16 Thread Andy Lutomirski
On Fri, Dec 16, 2016 at 2:13 PM, George Spelvin wrote: >> What should we do with get_random_int() and get_random_long()? In >> some cases it's being used in performance sensitive areas, and where >> anti-DoS protection might be enough. In others, maybe not so much. > > This is tricky. The entir

Re: [PATCH v3 03/15] livepatch: temporary stubs for klp_patch_pending() and klp_update_patch_state()

2016-12-16 Thread Josh Poimboeuf
On Fri, Dec 16, 2016 at 03:41:59PM +0100, Petr Mladek wrote: > On Thu 2016-12-08 12:08:28, Josh Poimboeuf wrote: > > Create temporary stubs for klp_patch_pending() and > > klp_update_patch_state() so we can add TIF_PATCH_PENDING to different > > architectures in separate patches without breaking bu

[PATCH] usb: atm: cxacru: remove impossible condition

2016-12-16 Thread Sudip Mukherjee
The variable index is unsigned and so it can never be less than 0. Signed-off-by: Sudip Mukherjee --- drivers/usb/atm/cxacru.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/atm/cxacru.c b/drivers/usb/atm/cxacru.c index f9fe86b6..d65a64c 100644 --- a/drivers/usb/

Re: [PATCH] fscrypt: Factor out bio specific functions

2016-12-16 Thread Eric Biggers
On Fri, Dec 16, 2016 at 09:48:19PM +0100, Richard Weinberger wrote: > On 16.12.2016 16:37, David Gstir wrote: > >> @@ -349,33 +347,10 @@ int fscrypt_zeroout_range(const struct inode *inode, > >> pgoff_t lblk, > >>err = do_page_crypto(inode, FS_ENCRYPT, lblk, > >>

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

2016-12-16 Thread Josh Poimboeuf
On Fri, Dec 16, 2016 at 03:17:35PM +0100, Petr Mladek wrote: > On Thu 2016-12-08 12:08:27, Josh Poimboeuf wrote: > > 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 surpri

Re: OOM: Better, but still there on 4.9

2016-12-16 Thread Michal Hocko
On Fri 16-12-16 13:15:18, Chris Mason wrote: > On 12/16/2016 02:39 AM, Michal Hocko wrote: [...] > > I believe the right way to go around this is to pursue what I've started > > in [1]. I will try to prepare something for testing today for you. Stay > > tuned. But I would be really happy if somebod

Re: [PATCH v6 3/5] random: use SipHash in place of MD5

2016-12-16 Thread Andy Lutomirski
On Fri, Dec 16, 2016 at 1:45 PM, Jason A. Donenfeld wrote: > Hi Andy, > > On Fri, Dec 16, 2016 at 10:31 PM, Andy Lutomirski wrote: >> I think it would be nice to try to strenghen the PRNG construction. >> FWIW, I'm not an expert in PRNGs, and there's fairly extensive >> literature, but I can at l

Re: [PATCH v5 1/4] siphash: add cryptographically secure PRF

2016-12-16 Thread George Spelvin
> What should we do with get_random_int() and get_random_long()? In > some cases it's being used in performance sensitive areas, and where > anti-DoS protection might be enough. In others, maybe not so much. This is tricky. The entire get_random_int() structure is an abuse of the hash function

Re: [PATCH v6 3/5] random: use SipHash in place of MD5

2016-12-16 Thread Jason A. Donenfeld
Hi Andy, Ted, I've made the requested changes. Keys now rotate and are per-CPU based. The chaining value is now additive instead of replacing. DavidL suggested I lower the velocity of `git-send-email` triggers, so if you'd like to take a look at this before I post v7, you can follow along at my g

[git pull] vfs.git pile 2

2016-12-16 Thread Al Viro
In this pile: * autofs-namespace series * dedupe stuff * more struct path constification One conflict (xfs_reflink.c; resolved by taking this variant). The following changes since commit 3e5de27e940d00d8d504dfb96625fb654f641509: Linux 4.9-rc8 (2016-12-04 12:50:51 -0800)

Re: [PATCH 2/2] mm, oom: do not enfore OOM killer for __GFP_NOFAIL automatically

2016-12-16 Thread Michal Hocko
On Fri 16-12-16 12:31:51, Johannes Weiner wrote: > On Fri, Dec 16, 2016 at 04:58:08PM +0100, Michal Hocko wrote: > > @@ -1013,7 +1013,7 @@ bool out_of_memory(struct oom_control *oc) > > * make sure exclude 0 mask - all other users should have at least > > * ___GFP_DIRECT_RECLAIM to get he

[PATCH] libnvdimm: fix mishandled nvdimm_clear_poison() return value

2016-12-16 Thread Dan Williams
Colin, via static analysis, reports that the length could be negative from nvdimm_clear_poison() in the error case. There was a similar problem with commit 0a3f27b9a6a8 "libnvdimm, namespace: avoid multiple sector calculations" that I noticed when merging the for-4.10/libnvdimm topic branch into li

Re: [TSN RFC v2 5/9] Add TSN header for the driver

2016-12-16 Thread Richard Cochran
On Fri, Dec 16, 2016 at 06:59:09PM +0100, hen...@austad.us wrote: > +/* > + * List of current subtype fields in the common header of AVTPDU > + * > + * Note: AVTPDU is a remnant of the standards from when it was AVB. > + * > + * The list has been updated with the recent values from IEEE 1722, draft

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

2016-12-16 Thread Josh Poimboeuf
On Fri, Dec 16, 2016 at 02:07:39PM +0100, Petr Mladek wrote: > On Thu 2016-12-08 12:08:26, Josh Poimboeuf wrote: > > 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() fu

[PATCH v4 4/4] initify: Mark functions with the __unverified_nocapture attribute

2016-12-16 Thread Kees Cook
From: Emese Revfy This attribute disables the compile data flow verification of the designated nocapture parameters of the function. Use it only on function parameters that are difficult for the plugin to analyze. Signed-off-by: Emese Revfy Signed-off-by: Kees Cook --- include/linux/compiler-

[PATCH v4 1/4] gcc-plugins: Add the initify gcc plugin

2016-12-16 Thread Kees Cook
From: Emese Revfy The kernel already has a mechanism to free up code and data memory that is only used during kernel or module initialization. This plugin will teach the compiler to find more such code and data that can be freed after initialization. The plugin runs in two passes. The first one

[PATCH v4 3/4] initify: Mark functions with the __nocapture attribute

2016-12-16 Thread Kees Cook
From: Emese Revfy The nocapture gcc attribute can be on functions only. The attribute takes zero or more signed integer constants as parameters that specify the function parameters to initify when the passed arguments are of const char* type. A negative attribute parameter value means that the c

[PATCH v4 2/4] util: Move type casts into is_kernel_rodata

2016-12-16 Thread Kees Cook
From: Emese Revfy This moves type casts into the is_kernel_rodata() function itself so that parameters can be marked as "nocapture" in the coming initify gcc plugin. Signed-off-by: Emese Revfy [kees: expanded commit message] Signed-off-by: Kees Cook --- mm/util.c | 10 +- 1 file chang

[PATCH v4 0/4] Introduce the initify gcc plugin

2016-12-16 Thread Kees Cook
Hi, This is a continuation of Emese Revfy's initify plugin upstreaming. This is based on her v3, but updated with various fixes from her github tree. Additionally, I split off the printf attribute fixes and sent those separately. This is the initify gcc plugin. The kernel already has a mechanism

Re: [TSN RFC v2 0/9] TSN driver for the kernel

2016-12-16 Thread Richard Cochran
On Fri, Dec 16, 2016 at 06:59:04PM +0100, hen...@austad.us wrote: > The driver is directed via ConfigFS as we need userspace to handle > stream-reservation (MSRP), discovery and enumeration (IEEE 1722.1) and > whatever other management is needed. I complained about configfs before, but you didn't

Re: Question about regulator API

2016-12-16 Thread Harald Geyer
Mark Brown writes: > On Fri, Dec 16, 2016 at 02:41:42PM +0100, Harald Geyer wrote: > > Mark Brown writes: > > > On Wed, Dec 14, 2016 at 03:52:54PM +0100, Harald Geyer wrote: > > > > This doesn't feel like a regulator API problem exactly, a lot of what > > > you're talking about here seems like you

Re: [RFC] minimum gcc version for kernel: raise to gcc-4.3 or 4.6?

2016-12-16 Thread Arnd Bergmann
On Friday, December 16, 2016 6:00:43 PM CET Sebastian Andrzej Siewior wrote: > On 2016-12-16 11:56:21 [+0100], Arnd Bergmann wrote: > > The original gcc-4.3 release was in early 2008. If we decide to still > > support that, we probably want the first 10 quirks in this series, > > while gcc-4.6 (rel

[PATCH 5/9 v2] xfs: use memalloc_nofs_{save,restore} instead of memalloc_noio*

2016-12-16 Thread Michal Hocko
On Fri 16-12-16 11:38:11, Brian Foster wrote: > On Thu, Dec 15, 2016 at 03:07:11PM +0100, Michal Hocko wrote: [...] > > @@ -459,7 +459,7 @@ _xfs_buf_map_pages( > > break; > > vm_unmap_aliases(); > > } while (retried++ <= 1); > > -

Re: [PATCH 2/9 v2] xfs: introduce and use KM_NOLOCKDEP to silence reclaim lockdep false positives

2016-12-16 Thread Michal Hocko
On Fri 16-12-16 11:37:50, Brian Foster wrote: > On Fri, Dec 16, 2016 at 04:40:41PM +0100, Michal Hocko wrote: > > Updated patch after Mike noticed a BUG_ON when KM_NOLOCKDEP is used. > > --- > > From 1497e713e11639157aef21cae29052cb3dc7ab44 Mon Sep 17 00:00:00 2001 > > From: Michal Hocko > > Date:

Re: [PATCH] ACPI/CPC: Don't try to clean up uninitialized CPC data

2016-12-16 Thread Boris Ostrovsky
On 12/16/2016 04:52 PM, Prakash, Prashanth wrote: > Hi Boris, > > On 12/16/2016 11:35 AM, Boris Ostrovsky wrote: >> If acpi_cppc_processor_probe() had not executed successfully (for >> example, if _CPC object was not found) then cpc_desc_ptr for that >> processor will be invalid. >> >> Signed-off-b

i2c: xiic: Strange clk_prepare_enable() in xiic_i2c_remove()

2016-12-16 Thread Alexey Khoroshilov
Dear Shubhrajyoti, Looking at 36ecbcab84d0 ("i2c: xiic: Implement power management") it is not clear why clk_prepare_enable(i2c->clk) is required in xiic_i2c_remove()? It is enabled in xiic_i2c_probe() and disabled/enabled in cdns_i2c_runtime_suspend()/cdns_i2c_runtime_resume(). Could you please

Re: [PATCH] ACPI/CPC: Don't try to clean up uninitialized CPC data

2016-12-16 Thread Prakash, Prashanth
Hi Boris, On 12/16/2016 11:35 AM, Boris Ostrovsky wrote: > If acpi_cppc_processor_probe() had not executed successfully (for > example, if _CPC object was not found) then cpc_desc_ptr for that > processor will be invalid. > > Signed-off-by: Boris Ostrovsky > --- > drivers/acpi/cppc_acpi.c | 2 ++

[PATCH] acpi: Fix format string type mistakes

2016-12-16 Thread Kees Cook
From: Emese Revfy This adds the missing __printf attribute which allows compile time format string checking (and will be used by the coming initify gcc plugin). Additionally, this fixes the warnings exposed by the attribute. Signed-off-by: Emese Revfy [kees: split scsi/acpi, merged attr and fix

Re: [PATCH] ARM: disallow ARM_THUMB for ARMv4 builds

2016-12-16 Thread Arnd Bergmann
On Friday, December 16, 2016 5:20:22 PM CET Ard Biesheuvel wrote: > > Can't we use the old > > tst lr, #1 > moveq pc, lr > bx lr > > trick? (where bx lr needs to be emitted as a plain opcode to hide it > from the assembler) > Yes, that should work around the specific problem in theory, but bac

[PATCH] scsi: esas2r: Fix format string type mistakes

2016-12-16 Thread Kees Cook
From: Emese Revfy This adds the missing __printf attribute which allows compile time format string checking (and will be used by the coming initify gcc plugin). Additionally, this fixes the warnings exposed by the attribute. Signed-off-by: Emese Revfy [kees: split scsi/acpi, merged attr and fix

RE: [RFC 00/10] implement alternative and much simpler id allocator

2016-12-16 Thread Matthew Wilcox
From: Andrew Morton [mailto:a...@linux-foundation.org] > On Thu, 8 Dec 2016 02:22:55 +0100 Rasmus Villemoes > wrote: > > TL;DR: these patches save 250 KB of memory, with more low-hanging > > fruit ready to pick. > > > > While browsing through the lib/idr.c code, I noticed that the code at > > the

Re: [PATCH v6 3/5] random: use SipHash in place of MD5

2016-12-16 Thread Jason A. Donenfeld
Hi Andy, On Fri, Dec 16, 2016 at 10:31 PM, Andy Lutomirski wrote: > I think it would be nice to try to strenghen the PRNG construction. > FWIW, I'm not an expert in PRNGs, and there's fairly extensive > literature, but I can at least try. In an effort to keep this patchset as initially as uncont

[PATCH] isdn: Constify some function parameters

2016-12-16 Thread Kees Cook
From: Emese Revfy The coming initify gcc plugin expects const pointer types, and caught some __printf arguments that weren't const yet. This fixes those. Signed-off-by: Emese Revfy [kees: expanded commit message] Signed-off-by: Kees Cook --- drivers/isdn/hisax/config.c | 16

[PATCH 2/2] HID: usbhid: add quirk for innomedia INNEX GENESIS/ATARI adapter

2016-12-16 Thread Tomasz Kramkowski
The (1292:4745) Innomedia INNEX GENESIS/ATARI adapter needs HID_QUIRK_MULTI_INPUT to split the device up into two controllers instead of inputs from both being merged into one. This patch depends on patch 1. Signed-off-by: Tomasz Kramkowski --- drivers/hid/usbhid/hid-quirks.c | 1 + 1 file chan

[PATCH 0/2] patches for Innomedia INNEX GENESIS/ATARI adapter

2016-12-16 Thread Tomasz Kramkowski
This is a couple of patches which fix issues with the (1292:4745) Innomedia INNEX GENESIS/ATARI controller USB adapter. I've personally tested these patches against the master of the hid tree. Patch 2 depends on patch 1. I wasn't sure if adding a new config symbol meant I needed to add it to some

[PATCH 1/2] HID: add innomedia INNEX GENESIS/ATARI adapter support

2016-12-16 Thread Tomasz Kramkowski
Add a new module named hid-innomedia which implements support for the (1292:4745) innomedia INNEX GENESIS/ATARI Controller USB adapter. This device mis-reports the X and Y axis on the DPad when up or left are pressed. The value reported is outside the range reported by the report descriptor. The d

RE: thermal zones break with patch "Reimplement IDR and IDA using the radix tree" (mainline+next)

2016-12-16 Thread Matthew Wilcox
From: Heiko Stuebner [mailto:he...@sntech.de] > commit b05bbe3ea2db ("Reimplement IDR and IDA using the radix tree") > seems to > break thermal zone allocation. This happens both on todays mainline and > linux-next-20161216 and produces errors like: > While I haven

[PATCH] [media] bt8xx: fix memory leak

2016-12-16 Thread Sudip Mukherjee
If dvb_attach() fails then we were just printing an error message and exiting but the memory allocated to state was not released. Signed-off-by: Sudip Mukherjee --- drivers/media/pci/bt8xx/dvb-bt8xx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/pci/bt8xx/dvb-bt8xx.c b/driv

Re: [PATCH v6 3/5] random: use SipHash in place of MD5

2016-12-16 Thread Andy Lutomirski
On Thu, Dec 15, 2016 at 7:03 PM, Jason A. Donenfeld wrote: > -static DEFINE_PER_CPU(__u32 [MD5_DIGEST_WORDS], get_random_int_hash) > - __aligned(sizeof(unsigned long)); > +static DEFINE_PER_CPU(u64, get_random_int_chaining); > [...] > unsigned long get_random_long(void) > { > -

Re: [kernel-hardening] Re: [PATCH v5 1/4] siphash: add cryptographically secure PRF

2016-12-16 Thread Jason A. Donenfeld
Hi George, On Fri, Dec 16, 2016 at 10:25 PM, George Spelvin wrote: > But yes, the sequence number is supposed to be (random base) + (timestamp). > In the old days before Canter & Siegel when the internet was a nice place, > people just used a counter that started at boot time. > > But then someon

Re: [PATCH] i2c: i2c-mux-pca954x: only reset last channel on error

2016-12-16 Thread Peter Rosin
On 2016-12-16 22:08, Vivien Didelot wrote: > The current code is selecting the mux channel before each operation and > does not benefit from the cached value (data->last_chan). > > That is because pca954x_select_chan() considers any non-zero values from > pca954x_reg_write() as an error. But this

RE: [RFC 00/10] implement alternative and much simpler id allocator

2016-12-16 Thread Matthew Wilcox
From: Rasmus Villemoes [mailto:li...@rasmusvillemoes.dk] > On Fri, Dec 16 2016, Matthew Wilcox wrote: > > Thanks for your work on this; you've really put some effort into > > proving your work has value. My motivation was purely aesthetic, but > > you've got some genuine savings here (admittedly

Re: [PATCH v5 1/4] siphash: add cryptographically secure PRF

2016-12-16 Thread George Spelvin
Jason A. Donenfeld wrote: > I saw that jiffies addition in there and was wondering what it was all > about. It's currently added _after_ the siphash input, not before, to > keep with how the old algorithm worked. I'm not sure if this is > correct or if there's something wrong with that, as I haven'

Re: [PATCH v10 4/5] x86/cpufeature: enable RING3MWAIT for Knights Landing

2016-12-16 Thread kbuild test robot
Hi Grzegorz, [auto build test WARNING on tip/x86/core] [also build test WARNING on v4.9 next-20161216] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Grzegorz-Andrejczuk/Enabling-Ring-3-MONITOR

Re: RFC: capabilities(7): notes for kernel developers

2016-12-16 Thread John Stultz
On Fri, Dec 16, 2016 at 1:05 PM, Serge E. Hallyn wrote: > Quoting John Stultz (john.stu...@linaro.org): >> On Fri, Dec 16, 2016 at 12:10 PM, Serge E. Hallyn wrote: >> > Quoting Michael Kerrisk (man-pages) (mtk.manpa...@gmail.com): >> >> On 12/16/2016 01:44 AM, Casey Schaufler wrote: >> >> > On 12

Re: [patch] orangefs: cleanup orangefs_debugfs_new_client_string()

2016-12-16 Thread Dan Carpenter
So the story with this patch is that I was looking at the code for unrelated reasons and I was just dorking in my editor and decided to click send at the end. I often muck about and then just decide to move on without hitting send. It's not something I feel strongly about. On Fri, Dec 16, 2016 a

Re: [kernel-hardening] Re: [PATCH v5 1/4] siphash: add cryptographically secure PRF

2016-12-16 Thread Hannes Frederic Sowa
On Fri, Dec 16, 2016, at 22:01, Jason A. Donenfeld wrote: > Yes, on x86-64. But on i386 chacha20 incurs nearly the same kind of > slowdown as siphash, so I expect the comparison to be more or less > equal. There's another thing I really didn't like about your chacha20 > approach which is that it us

thermal zones break with patch "Reimplement IDR and IDA using the radix tree" (mainline+next)

2016-12-16 Thread Heiko Stuebner
Hi, commit b05bbe3ea2db ("Reimplement IDR and IDA using the radix tree") seems to break thermal zone allocation. This happens both on todays mainline and linux-next-20161216 and produces errors like: [9.397201] WARNING: CPU: 1 PID: 165 at ../fs/sysfs/dir.c:31 sysfs_warn_dup

[PATCH] i2c: i2c-mux-pca954x: only reset last channel on error

2016-12-16 Thread Vivien Didelot
The current code is selecting the mux channel before each operation and does not benefit from the cached value (data->last_chan). That is because pca954x_select_chan() considers any non-zero values from pca954x_reg_write() as an error. But this function (via __i2c_transfer) returns either a negati

Re: [kernel-hardening] Re: [PATCH v5 1/4] siphash: add cryptographically secure PRF

2016-12-16 Thread Jason A. Donenfeld
Hi Daniel, On Fri, Dec 16, 2016 at 9:44 PM, Daniel Micay wrote: > On Fri, 2016-12-16 at 11:47 -0800, Tom Herbert wrote: >> >> That's about 3x of jhash speed (7 nsecs). So that might closer >> to a more palatable replacement for jhash. Do we lose any security >> advantages with halfsiphash? > > Ha

[PATCH] latent_entropy: fix ARM build error on earlier gcc

2016-12-16 Thread Kees Cook
This fixes build errors seen on gcc-4.9.3 or gcc-5.3.1 for an ARM: arm-soc/init/initramfs.c: In function 'error': arm-soc/init/initramfs.c:50:1: error: unrecognizable insn: } ^ (insn 26 25 27 5 (set (reg:SI 111 [ local_entropy.243 ]) (rotatert:SI (reg:SI 116 [ local_entropy.243 ])

Re: enabling COMPILE_TEST support for GCC plugins in v4.11

2016-12-16 Thread Kees Cook
On Sat, Dec 10, 2016 at 8:45 AM, Emese Revfy wrote: > On Fri, 9 Dec 2016 11:12:18 -0800 > Kees Cook wrote: > >> On Fri, Dec 9, 2016 at 2:40 AM, Arnd Bergmann wrote: >> > On Thursday, December 8, 2016 11:00:42 AM CET Kees Cook wrote: >> > >> >> If you have a moment, applying 215e2aa6c024[1] and r

Re: RFC: capabilities(7): notes for kernel developers

2016-12-16 Thread Serge E. Hallyn
Quoting John Stultz (john.stu...@linaro.org): > On Fri, Dec 16, 2016 at 12:10 PM, Serge E. Hallyn wrote: > > Quoting Michael Kerrisk (man-pages) (mtk.manpa...@gmail.com): > >> On 12/16/2016 01:44 AM, Casey Schaufler wrote: > >> > On 12/15/2016 4:31 PM, John Stultz wrote: > >> >> On Thu, Dec 15, 20

Re: [kernel-hardening] Re: [PATCH v5 1/4] siphash: add cryptographically secure PRF

2016-12-16 Thread Jason A. Donenfeld
Hi Ted, On Fri, Dec 16, 2016 at 9:43 PM, Theodore Ts'o wrote: > What should we do with get_random_int() and get_random_long()? In > some cases it's being used in performance sensitive areas, and where > anti-DoS protection might be enough. In others, maybe not so much. > > If we rekeyed the sec

Re: Questions on the task isolation patches

2016-12-16 Thread Chris Metcalf
Sorry for the slow response - I have been busy with some other things. On 12/6/2016 4:43 PM, yunhong jiang wrote: On Fri, 2 Dec 2016 13:58:08 -0500 Chris Metcalf wrote: On 12/1/2016 5:28 PM, yunhong jiang wrote: a) If the task isolation need prctl to mark itself as isolated, possibly the vCP

[GIT PULL] arch/tile changes for 4.10

2016-12-16 Thread Chris Metcalf
Linus, Please pull the following changes for 4.10 from: git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile.git master Another grab-bag of miscellaneous changes. Chris Metcalf (2): tile: remove #pragma unroll from finv_buffer_remote() tile: use __ro_after_init inst

Re: [PATCH v5 1/4] siphash: add cryptographically secure PRF

2016-12-16 Thread Tom Herbert
On Fri, Dec 16, 2016 at 12:41 PM, George Spelvin wrote: > Tom Herbert wrote: >> Tested this. Distribution and avalanche effect are still good. Speed >> wise I see about a 33% improvement over siphash (20 nsecs/op versus 32 >> nsecs). That's about 3x of jhash speed (7 nsecs). So that might closer >

[PATCH] gcc-plugins: update gcc-common.h for gcc-7

2016-12-16 Thread Kees Cook
This updates gcc-common.h from Emese Revfy for gcc 7. This fixes issues seen by Kugan and Arnd. Build tested with gcc 5.4 and 7 snapshot. Cc: sta...@vger.kernel.org Signed-off-by: Kees Cook --- scripts/gcc-plugins/gcc-common.h | 86 1 file changed, 86 ins

Re: [PATCH v5 1/4] siphash: add cryptographically secure PRF

2016-12-16 Thread Jason A. Donenfeld
On Fri, Dec 16, 2016 at 9:17 PM, George Spelvin wrote: > My (speaking enerally; I should walk through every hash table you've > converted) opinion is that: > > - Hash tables, even network-facing ones, can all use hsiphash as long > as an attacker can only see collisions, i.e. ((H(x) ^ H(y)) & bi

Re: [PATCH] fscrypt: Factor out bio specific functions

2016-12-16 Thread Richard Weinberger
On 16.12.2016 16:37, David Gstir wrote: >> @@ -349,33 +347,10 @@ int fscrypt_zeroout_range(const struct inode *inode, >> pgoff_t lblk, >> err = do_page_crypto(inode, FS_ENCRYPT, lblk, >> ZERO_PAGE(0), ciphertext_page, >>

Re: [kernel-hardening] Re: [PATCH v5 1/4] siphash: add cryptographically secure PRF

2016-12-16 Thread Daniel Micay
On Fri, 2016-12-16 at 11:47 -0800, Tom Herbert wrote: > > That's about 3x of jhash speed (7 nsecs). So that might closer > to a more palatable replacement for jhash. Do we lose any security > advantages with halfsiphash? Have you tested a lower round SipHash? Probably best to stick with the usual

<    1   2   3   4   5   6   7   8   >