Re: [Part2 PATCH v4.1 07/29] crypto: ccp: Add Secure Encrypted Virtualization (SEV) command support

2017-10-03 Thread P J P
+-- On Mon, 2 Oct 2017, Brijesh Singh wrote --+ | +static int sev_cmd_buffer_len(int cmd) | +{ | + switch (cmd) { | + case SEV_CMD_INIT: return sizeof(struct sev_data_init); | + case SEV_CMD_PLATFORM_STATUS: return sizeof(struct sev_data_status); | + case SEV_CMD_PEK_

Re: [PATCH v2 9/9] ARM: dts: aspeed: Clean up UART nodes

2017-10-03 Thread Joel Stanley
On Wed, Oct 4, 2017 at 4:19 PM, Joel Stanley wrote: > diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi > b/arch/arm/boot/dts/aspeed-g5.dtsi > index 61cc2d25143a..cef51dcc1002 100644 > --- a/arch/arm/boot/dts/aspeed-g5.dtsi > +++ b/arch/arm/boot/dts/aspeed-g5.dtsi > @@ -297,9 +297,9 @@ >

[PATCH v2 6/9] ARM: dts: aspeed-ast2500: Add I2C devices

2017-10-03 Thread Joel Stanley
Enable the buses that are in use and the devices that are attached. Currently that includes temperature measurement and EEPROM. Reviewed-by: Brendan Higgins Reviewed-by: Andrew Jeffery Signed-off-by: Joel Stanley --- arch/arm/boot/dts/aspeed-ast2500-evb.dts | 19 +++ 1 file cha

[PATCH v2 9/9] ARM: dts: aspeed: Clean up UART nodes

2017-10-03 Thread Joel Stanley
- Shorten size of reg property so it covers only the implemented registers - Add VUART compatible, and change node name to serial@ - Remove outdated current-speed property. Different bootloaders use different speeds, so this is no longer helpful Signed-off-by: Joel Stanley --- v2: - move

[PATCH] powerpc/perf: Fix for core/nest imc call trace on cpuhotplug

2017-10-03 Thread Anju T Sudhakar
Nest/core pmu units are enabled only when it is used. A reference count is maintained for the events which uses the nest/core pmu units. Currently in *_imc_counters_release function a WARN() is used for notification of any underflow of ref count.

Re: [PATCH v3 00/20] Speculative page faults

2017-10-03 Thread Laurent Dufour
On 25/09/2017 18:27, Alexei Starovoitov wrote: > On Mon, Sep 18, 2017 at 12:15 AM, Laurent Dufour > wrote: >> Despite the unprovable lockdep warning raised by Sergey, I didn't get any >> feedback on this series. >> >> Is there a chance to get it moved upstream ? > > what is the status ? > We're e

[PATCH v2 5/9] ARM: dts: aspeed-palmetto: Add I2C devices

2017-10-03 Thread Joel Stanley
Enable the buses that are in use and the devices that are attached. Currently that includes the battery backed RTC, temperature measurement and EEPROM. Some of these buses are for hotplugged cards, such as PCIe cards. Others do not yet have upstream drivers, so there are no devices attached. Revi

[PATCH v2 7/9] ARM: dts: aspeed: Add aliases for UARTs

2017-10-03 Thread Joel Stanley
Existing userspace expects the console (UART5) to be at /dev/ttyS4. To ensure the UARTs show up where users expect them, we give them fixed aliases starting at 0. Reviewed-by: Andrew Jeffery Signed-off-by: Joel Stanley --- arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts | 4 arch/arm/boot/d

[PATCH v2 8/9] ARM: dts: aspeed: Correctly order UART nodes

2017-10-03 Thread Joel Stanley
Order them all by address. Signed-off-by: Joel Stanley --- arch/arm/boot/dts/aspeed-g4.dtsi | 48 +++ arch/arm/boot/dts/aspeed-g5.dtsi | 61 2 files changed, 54 insertions(+), 55 deletions(-) diff --git a/arch/arm/boot/dts/asp

[PATCH v2 4/9] ARM: dts: aspeed-romulus: Add I2C devices

2017-10-03 Thread Joel Stanley
Enable the buses that are in use and the devices that are attached. Currently that is just the battery backed RTC. Some of these buses are for hotplugged cards, such as PCIe cards. Others do not yet have upstream drivers, so there are no devices attached. Reviewed-by: Brendan Higgins Signed-off-

[PATCH v2 2/9] ARM: dts: aspeed: Reorder ADC node

2017-10-03 Thread Joel Stanley
We try to keep the nodes in address order. The ADC node was out of place. Signed-off-by: Joel Stanley --- v2: - Don't introduce new clk bindings --- arch/arm/boot/dts/aspeed-g4.dtsi | 16 arch/arm/boot/dts/aspeed-g5.dtsi | 16 2 files changed, 16 insertions(+)

Re: [alsa-devel] [PATCH RESEND1 00/12] ALSA: vsnd: Add Xen para-virtualized frontend driver

2017-10-03 Thread Oleksandr Andrushchenko
gentle reminder On 09/26/2017 02:35 PM, Oleksandr Andrushchenko wrote: Clemens, Sakamoto-san, could you please review the below if you by chance have a minute? Thank you, Oleksandr On 09/19/2017 11:57 AM, Oleksandr Andrushchenko wrote: Hi, all! We did some work on implementing the idea with

[PATCH v2 0/9] ARM: dts: aspeed: Device tree updates

2017-10-03 Thread Joel Stanley
This series adds support for the i2c buses and vuart in the ASPEED device trees, as well as making a few cleanups. v2 fixes issues pointed out by Andrew's reivew, and adds Brendan's acks. Thanks for the review both of you! There's one more patch than v1 to seperate out fixing the UARTs from chang

[PATCH v2 3/9] ARM: dts: aspeed: Add I2C buses

2017-10-03 Thread Joel Stanley
Now with an upstream i2c bus driver, we can add the 14 i2c buses that exist in ASPEED G4 and G5 generation SoCs. It also adds aliases for the 14 built-in I2C busses to ensure userspace sees the numbering staring from zero and counting up. Acked-by: Andrew Jeffery Reviewed-by: Brendan Higgins S

[PATCH v2 1/9] ARM: dts: aspeed: Move pinctrl subnodes to improve readability

2017-10-03 Thread Joel Stanley
From: Andrew Jeffery Moving the subnodes out of the pinctrl node declaration to a reference allows easier access to the remaining parts of the devicetree. Signed-off-by: Andrew Jeffery Reviewed-by: Xo Wang Acked-by: Andrew Jeffery Signed-off-by: Joel Stanley --- arch/arm/boot/dts/aspeed-g4.

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

2017-10-03 Thread Mika Westerberg
On Tue, Oct 03, 2017 at 12:00:49PM -0500, 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 platforms [1][2] with broken BIOS which > hardcodes Linux IRQ nu

Re: [PATCH V10 0/3] PM / Domains: Performance state support

2017-10-03 Thread Viresh Kumar
On 03-10-17, 09:52, Ulf Hansson wrote: > We sorted out things at LPC! > > However, the last weeks discussions at Linaro connect, raised a couple > of more concerns with the current approach. Let me summarize them > here. > > 1) > The ->dev_get_performance_state(), which currently translates > fre

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

2017-10-03 Thread Mika Westerberg
On Tue, Oct 03, 2017 at 08:54:30PM +0300, Andy Shevchenko wrote: > I'm not sure about this approach. It might be some other broken BIOS > discovered with some other driver (like pinctrl-baytrail.c as an > hypothetical example). Let's deal that separately if it ever happens. > Alternative is to de

[PATCH 6/7] phy: samsung: Remove dependency on obsolete SoC support

2017-10-03 Thread Marek Szyprowski
Support for Exynos4212 SoCs has been removed by commit bca9085e0ae9 ("ARM: dts: exynos: remove Exynos4212 support (dead code)"), so there is no need to keep remaining dead code related to this SoC version. Signed-off-by: Marek Szyprowski --- drivers/phy/samsung/Kconfig | 2 +- 1 file changed, 1

Re: [Part2 Patch v4.2] crypto: ccp: Add Platform Security Processor (PSP) device support

2017-10-03 Thread P J P
+-- On Mon, 2 Oct 2017, Brijesh Singh wrote --+ | +int psp_dev_init(struct sp_device *sp) | +{ | + struct device *dev = sp->dev; | + struct psp_device *psp; | + int ret; | + | + ret = -ENOMEM; | + psp = psp_alloc_struct(sp); | + if (!psp) | + goto e_err; | + | +

Re: [PATCH v2] nvme-pci: Use PCI bus address for data/queues in CMB

2017-10-03 Thread Christoph Hellwig
On Mon, Oct 02, 2017 at 11:21:29AM -0600, Keith Busch wrote: > Yah, calling this a DMA address was a misnomer and confusing. Abhishek, can you test if this works for you?

Re: [PATCH] block: drop "sending ioctl to a partition" message

2017-10-03 Thread Christoph Hellwig
On Tue, Oct 03, 2017 at 06:22:23PM +0200, Paolo Bonzini wrote: > On 21/09/2017 16:49, Paolo Bonzini wrote: > > After the first few months, the message has not led to many bug reports. > > It's been almost five years now, and in practice the main source of > > it seems to be MTIOCGET that someone is

Re: [PATCH 3/4] staging: bcm2835-camera: pr_err() strings should end with newlines

2017-10-03 Thread Stefan Wahren
Am 03.10.2017 um 13:43 schrieb Arvind Yadav: > pr_err() messages should end with a new-line to avoid other messages > being concatenated. > > Signed-off-by: Arvind Yadav Acked-by: Stefan Wahren > --- > drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 2 +- > 1 file changed, 1 insert

Re: [BUGFIX PATCH] kprobes/x86: Remove IRQ disabling from jprobe handlers

2017-10-03 Thread Masami Hiramatsu
On Tue, 3 Oct 2017 19:11:00 +0200 Ingo Molnar wrote: > > * Masami Hiramatsu wrote: > > > On Tue, 3 Oct 2017 11:33:44 +0200 > > Ingo Molnar wrote: > > > > > > > > * Masami Hiramatsu wrote: > > > > > > > Jprobe actually doesn't need to disable IRQs while calling > > > > handlers, because Do

Re: [PATCH] fix security_release_secctx seems broken

2017-10-03 Thread James Morris
On Tue, 19 Sep 2017, Casey Schaufler wrote: > Subject: [PATCH] fix security_release_secctx seems broken > > security_inode_getsecurity() provides the text string value > of a security attribute. It does not provide a "secctx". > The code in xattr_getsecurity() that calls security_inode_getsecurit

Re: [PATCH RESEND net 0/9] Fixes, cleanup and modernization for some legacy ethernet NIC drivers

2017-10-03 Thread Finn Thain
On Tue, 3 Oct 2017, David Miller wrote: > From: Finn Thain > Date: Mon, 2 Oct 2017 21:07:17 -0400 (EDT) > > > This patch series fixes some logging bugs and adds some missing > > message severity levels. > > > > There are also cleanup patches for dead code and some Kconfig cruft. > > > > Cust

[RFC] perf callchain: Compare dsos (as well) for CCKEY_FUNCTION

2017-10-03 Thread Ravi Bangoria
Two functions from different binaries can have same start address. Thus, comparing only start address in match_chain() leads to inconsistent callchains. Fix this by adding a check for dsos as well. Ex, https://www.spinics.net/lists/linux-perf-users/msg04067.html Reported-by: Alexander Pozdneev S

Re: usb/sound/bcd2000: warning in bcd2000_init_device

2017-10-03 Thread Takashi Iwai
On Tue, 03 Oct 2017 19:42:21 +0200, Greg Kroah-Hartman wrote: > > On Tue, Oct 03, 2017 at 12:50:08PM -0400, Alan Stern wrote: > > On Tue, 3 Oct 2017, Takashi Iwai wrote: > > > > > > It's a dev_WARN because it indicates a potentially serious error in the > > > > driver: The driver has submitted a

Re: [RFC 5/5] pm: remove kernel thread freezing

2017-10-03 Thread Hannes Reinecke
On 10/03/2017 08:53 PM, Luis R. Rodriguez wrote: > Now that all filesystems which used to rely on kthread > freezing have been converted to filesystem freeze/thawing > we can remove the kernel kthread freezer. > > Signed-off-by: Luis R. Rodriguez > --- > Documentation/power/freezing-of-tasks.txt

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

2017-10-03 Thread Viresh Kumar
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.3+ # 4.3+ Signed-off-by: Tobias Jordan [ VK: Improved c

Re: [PATCHv3] mm: Account pud page tables

2017-10-03 Thread Vlastimil Babka
On 10/02/2017 10:04 AM, Kirill A. Shutemov wrote: > On machine with 5-level paging support a process can allocate > significant amount of memory and stay unnoticed by oom-killer and > memory cgroup. The trick is to allocate a lot of PUD page tables. > We don't account PUD page tables, only PMD and

Re: [PATCH 8/8] ARM: dts: aspeed: Clean up UART nodes

2017-10-03 Thread Joel Stanley
On Wed, Oct 4, 2017 at 2:58 PM, Andrew Jeffery wrote: > On Thu, 2017-09-28 at 17:21 +0930, Joel Stanley wrote: >> - uart6: serial@1e787000 { >> - compatible = "ns16550a"; >> - reg = <0x1e787000 0x1000>; >> +

Re: [patch V2 22/29] lockup_detector: Make watchdog_nmi_reconfigure() two stage

2017-10-03 Thread Michael Ellerman
Thomas Gleixner writes: > On Tue, 3 Oct 2017, Thomas Gleixner wrote: >> On Tue, 3 Oct 2017, Thomas Gleixner wrote: >> > On Tue, 3 Oct 2017, Michael Ellerman wrote: >> > > Hmm, I tried that patch, it makes the warning go away. But then I >> > > triggered a deliberate hard lockup and got nothing. >

[PATCH] kconfig: Document the 'symbol' struct

2017-10-03 Thread Ulf Magnusson
Visibility and choices in particular might be a bit tricky to figure out. Also fix existing comment to point out that P_MENU is also used for menus. Signed-off-by: Ulf Magnusson --- scripts/kconfig/expr.h | 45 - 1 file changed, 44 insertions(+), 1 de

Re: [PATCH 8/8] ARM: dts: aspeed: Clean up UART nodes

2017-10-03 Thread Andrew Jeffery
On Thu, 2017-09-28 at 17:21 +0930, Joel Stanley wrote: >  - Shorten size of reg property so it covers only the implemented >  registers >  >  - Add VUART compatible >  >  - Move stray uart1 in g5 definition >  >  - Remove outdated current-speed property. Different bootloaders use >  different speed

Re: [PATCH 4/8] ARM: dts: aspeed-romulus: Add I2C devices

2017-10-03 Thread Joel Stanley
On Wed, Oct 4, 2017 at 2:32 PM, Andrew Jeffery wrote: > On Thu, 2017-09-28 at 17:21 +0930, Joel Stanley wrote: >> Enable the buses that are in use and the devices that are attached. >> Currently that is just the battery backed RTC. >> >> Some of these buses are for hotplugged cards, such as PCIe c

Re: [PATCH 2/8] ARM: dts: aspeed: Reorder ADC node

2017-10-03 Thread Andrew Jeffery
On Wed, 2017-10-04 at 14:43 +0930, Joel Stanley wrote: > > > > > > + adc: adc@1e6e9000 { > > > + compatible = "aspeed,ast2500-adc"; > > > + reg = <0x1e6e9000 0xb0>; > > > > Did you intend to change the size cell value here

Re: [PATCH 2/8] ARM: dts: aspeed: Reorder ADC node

2017-10-03 Thread Joel Stanley
On Wed, Oct 4, 2017 at 1:05 PM, Andrew Jeffery wrote: > On Thu, 2017-09-28 at 17:21 +0930, Joel Stanley wrote: >> --- a/arch/arm/boot/dts/aspeed-g4.dtsi >> +++ b/arch/arm/boot/dts/aspeed-g4.dtsi >> @@ -129,6 +129,14 @@ >> }; >> }; >> >> +

Re: [PATCH 7/8] ARM: dts: aspeed: Add aliases for UARTs

2017-10-03 Thread Andrew Jeffery
On Thu, 2017-09-28 at 17:21 +0930, Joel Stanley wrote: > Existing userspace expects the console (UART5) to be at /dev/ttyS4.  To > ensure the UARTs show up where users expect them, we give them fixed > aliases starting at 0. >  > Signed-off-by: Joel Stanley Reviewed-by: Andrew Jeffery > --- >  

Re: [PATCH 6/8] ARM: dts: aspeed-ast2500: Add I2C devices

2017-10-03 Thread Andrew Jeffery
On Thu, 2017-09-28 at 17:21 +0930, Joel Stanley wrote: > Enable the buses that are in use and the devices that are attached. > Currently that includes temperature measurement and EEPROM. >  > Signed-off-by: Joel Stanley Reviewed-by: Andrew Jeffery > --- >  arch/arm/boot/dts/aspeed-ast2500-evb.d

Re: [PATCH 5/8] ARM: dts: aspeed-palmetto: Add I2C devices

2017-10-03 Thread Andrew Jeffery
On Thu, 2017-09-28 at 17:21 +0930, Joel Stanley wrote: > Enable the buses that are in use and the devices that are attached. > Currently that includes the battery backed RTC, temperature > measurement > and EEPROM. > > Some of these buses are for hotplugged cards, such as PCIe cards. > Others do n

Re: [PATCH 4/8] ARM: dts: aspeed-romulus: Add I2C devices

2017-10-03 Thread Andrew Jeffery
On Thu, 2017-09-28 at 17:21 +0930, Joel Stanley wrote: > Enable the buses that are in use and the devices that are attached. > Currently that is just the battery backed RTC. >  > Some of these buses are for hotplugged cards, such as PCIe cards. Others > do not yet have upstream drivers, so there ar

Re: [PATCH] kbuild: comments cleanup in Makefile.lib

2017-10-03 Thread Masahiro Yamada
Hi Cao, 2017-09-19 20:36 GMT+09:00 Cao jin : > It has: > 1. Move comments close to what it want to comment. > 2. Comments cleanup & improvement. > > Signed-off-by: Cao jin > --- > scripts/Makefile.lib | 19 ++- > 1 file changed, 6 insertions(+), 13 deletions(-) > > diff --git a/

Re: [PATCH RESEND net 0/9] Fixes, cleanup and modernization for some legacy ethernet NIC drivers

2017-10-03 Thread David Miller
From: Finn Thain Date: Mon, 2 Oct 2017 21:07:17 -0400 (EDT) > This patch series fixes some logging bugs and adds some missing message > severity levels. > > There are also cleanup patches for dead code and some Kconfig cruft. > > Custom debug message logging is converted to netif_* calls to re

Re: [PATCH] fsl/fman: remove of_node

2017-10-03 Thread David Miller
From: Madalin-cristian Bucur Date: Tue, 3 Oct 2017 08:49:31 + > My patch removes the of_node that was set to a device that was not an > of_device, preventing duplicated probing of both the real of_device > and the "fake" one created through this assignment. > > I understand that the DSA issu

Re: [PATCH 3/8] ARM: dts: aspeed: Add I2C buses

2017-10-03 Thread Andrew Jeffery
On Thu, 2017-09-28 at 17:21 +0930, Joel Stanley wrote: > Now with an upstream i2c bus driver, we can add  the 14 i2c buses that > exist in ASPEED G4 and G5 generation SoCs. > > It also adds aliases for the 14 built-in I2C busses to ensure userspace > sees the numbering staring from zero and counti

Re: [PATCH 3/8] ARM: dts: aspeed: Add I2C buses

2017-10-03 Thread Andrew Jeffery
On Thu, 2017-09-28 at 11:35 -0700, Brendan Higgins wrote: > > On Thu, Sep 28, 2017 at 12:51 AM, Joel Stanley wrote: > > Now with an upstream i2c bus driver, we can add  the 14 i2c buses that > > exist in ASPEED G4 and G5 generation SoCs. > >  > > It also adds aliases for the 14 built-in I2C busses

[PATCH] kbuild: fix dependency of dtbs targets

2017-10-03 Thread Masahiro Yamada
The target "dtbs" should depend on "scripts" because it needs to build dtc. The "prepare" target is unneeded here. Signed-off-by: Masahiro Yamada --- arch/arm/Makefile | 2 +- arch/arm64/Makefile | 2 +- arch/nios2/Makefile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git

Re: [RFC PATCH 1/2] kbuild: Add a cache for generated variables

2017-10-03 Thread Masahiro Yamada
Hi Douglas, 2017-09-27 2:55 GMT+09:00 Douglas Anderson : > While timing a "no-op" build of the kernel (incrementally building the > kernel even though nothing changed) in the Chrome OS build system I > found that it was much slower than I expected. > > Digging into things a bit, I found that quit

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

2017-10-03 Thread Guenter Roeck
On Tue, Oct 3, 2017 at 8:20 PM, Masahiro Yamada wrote: > 2017-10-04 5:48 GMT+09:00 Douglas Anderson : >> The main Linux Makefiles and the tools sub-Makefiles have different >> conventions for passing in CC / CFLAGS. >> >> Here's brief summary for the kernel: >> * CC: target C compiler (must be pas

Re: [PATCH net] RDS: IB: Limit the scope of has_fr/has_fmr variables

2017-10-03 Thread David Miller
From: Santosh Shilimkar Date: Tue, 3 Oct 2017 17:42:39 -0700 > Hi Dave, > > On 10/2/2017 1:30 PM, Santosh Shilimkar wrote: >> On 10/1/2017 10:56 PM, David Miller wrote: >>> From: David Miller > [...] > >>> >>> Actually, reverted, this breaks the build. >>> >>> net/rds/rdma_transport.c:38:10: f

[PATCH v9 01/29] x86/mm: Relocate page fault error codes to traps.h

2017-10-03 Thread Ricardo Neri
Up to this point, only fault.c used the definitions of the page fault error codes. Thus, it made sense to keep them within such file. Other portions of code might be interested in those definitions too. For instance, the User- Mode Instruction Prevention emulation code will use such definitions to

[PATCH v9 10/29] x86/insn-eval: Do not BUG on invalid register type

2017-10-03 Thread Ricardo Neri
We are not in a critical failure path. The invalid register type is caused when trying to decode invalid instruction bytes from a user-space program. Thus, simply print an error message. To prevent this warning from being abused from user space programs, use the rate-limited variant of pr_err(). al

[PATCH v9 00/29] x86: Enable User-Mode Instruction Prevention

2017-10-03 Thread Ricardo Neri
This is v9 of this series. The seven previous submissions can be found here [1], here [2], here[3], here[4], here[5], here[6], here[7] and here[8]. This version addresses the feedback comments from Borislav Petkov received on v7. Please see details in the change log. === What is UMIP? User-Mode I

[PATCH v9 02/29] x86/boot: Relocate definition of the initial state of CR0

2017-10-03 Thread Ricardo Neri
Both head_32.S and head_64.S utilize the same value to initialize the control register CR0. Also, other parts of the kernel might want to access this initial definition (e.g., emulation code for User-Mode Instruction Prevention uses this state to provide a sane dummy value for CR0 when emulating th

[PATCH v9 08/29] x86/mpx: Do not use SIB.base if its value is 101b and ModRM.mod = 0

2017-10-03 Thread Ricardo Neri
Section 2.2.1.2 of the Intel 64 and IA-32 Architectures Software Developer's Manual volume 2A states that if a SIB byte is used and SIB.base is 101b and ModRM.mod is zero, then the base part of the base part of the effective address computation is null. To signal this situation, a -EDOM error is re

[PATCH v9 09/29] x86/mpx, x86/insn: Relocate insn util functions to a new insn-eval file

2017-10-03 Thread Ricardo Neri
Other kernel submodules can benefit from using the utility functions defined in mpx.c to obtain the addresses and values of operands contained in the general purpose registers. An instance of this is the emulation code used for instructions protected by the Intel User-Mode Instruction Prevention fe

[PATCH v9 07/29] x86/mpx: Do not use SIB.index if its value is 100b and ModRM.mod is not 11b

2017-10-03 Thread Ricardo Neri
Section 2.2.1.2 of the Intel 64 and IA-32 Architectures Software Developer's Manual volume 2A states that when ModRM.mod !=11b and ModRM.rm = 100b indexed register-indirect addressing is used. In other words, a SIB byte follows the ModRM byte. In the specific case of SIB.index = 100b, the scale*ind

[PATCH v9 06/29] x86/mpx: Use signed variables to compute effective addresses

2017-10-03 Thread Ricardo Neri
Even though memory addresses are unsigned, the operands used to compute the effective address do have a sign. This is true for ModRM.rm, SIB.base, SIB.index as well as the displacement bytes. Thus, signed variables shall be used when computing the effective address from these operands. Once the sig

[PATCH v9 11/29] x86/insn-eval: Add a utility function to get register offsets

2017-10-03 Thread Ricardo Neri
The function get_reg_offset() returns the offset to the register the argument specifies as indicated in an enumeration of type offset. Callers of this function would need the definition of such enumeration. This is not needed. Instead, add helper functions for this purpose. These functions are usef

[PATCH v9 15/29] x86/insn-eval: Add utility functions to get segment descriptor base address and limit

2017-10-03 Thread Ricardo Neri
With segmentation, the base address of the segment is needed to compute a linear address. This base address is obtained from the applicable segment descriptor. Such segment descriptor is referenced from a segment selector. These new functions obtain the segment base and limit of the segment selecto

[PATCH v9 14/29] x86/insn-eval: Add utility function to get segment descriptor

2017-10-03 Thread Ricardo Neri
The segment descriptor contains information that is relevant to how linear addresses need to be computed. It contains the default size of addresses as well as the base address of the segment. Thus, given a segment selector, we ought to look at segment descriptor to correctly calculate the linear ad

[PATCH v9 12/29] x86/insn-eval: Add utility function to identify string instructions

2017-10-03 Thread Ricardo Neri
String instructions are special because, in protected mode, the linear address is always obtained via the ES segment register in operands that use the (E)DI register; the DS segment register in operands that use the (E)SI register. Furthermore, segment override prefixes are ignored when calculating

[PATCH v9 04/29] uprobes/x86: Use existing definitions for segment override prefixes

2017-10-03 Thread Ricardo Neri
Rather than using hard-coded values of the segment override prefixes, leverage the existing definitions provided in inat.h. Suggested-by: Borislav Petkov Cc: Andy Lutomirski Cc: Andrew Morton Cc: Borislav Petkov Cc: Masami Hiramatsu Cc: Denys Vlasenko Cc: Srikar Dronamraju Cc: Ravi V. Shank

[PATCH v9 13/29] x86/insn-eval: Add utility functions to get segment selector

2017-10-03 Thread Ricardo Neri
When computing a linear address and segmentation is used, we need to know the base address of the segment involved in the computation. In most of the cases, the segment base address will be zero as in USER_DS/USER32_DS. However, it may be possible that a user space program defines its own segments

[PATCH v9 21/29] x86/insn-eval: Handle 32-bit address encodings in virtual-8086 mode

2017-10-03 Thread Ricardo Neri
It is possible to utilize 32-bit address encodings in virtual-8086 mode via an address override instruction prefix. However, the range of the effective address is still limited to [0x-0x]. In such a case, return error. Also, linear addresses in virtual-8086 mode are limited to 20 bits. Enforce

[PATCH v9 22/29] x86/insn-eval: Add support to resolve 16-bit addressing encodings

2017-10-03 Thread Ricardo Neri
Tasks running in virtual-8086 mode, in protected mode with code segment descriptors that specify 16-bit default address sizes via the D bit, or via an address override prefix will use 16-bit addressing form encodings as described in the Intel 64 and IA-32 Architecture Software Developer's Manual Vo

[PATCH v9 18/29] x86/insn-eval: Incorporate segment base in linear address computation

2017-10-03 Thread Ricardo Neri
insn_get_addr_ref() returns the effective address as defined by the section 3.7.5.1 Vol 1 of the Intel 64 and IA-32 Architectures Software Developer's Manual. In order to compute the linear address, we must add to the effective address the segment base address as set in the segment descriptor. The

[PATCH v9 17/29] x86/insn-eval: Indicate a 32-bit displacement if ModRM.mod is 0 and ModRM.rm is 101b

2017-10-03 Thread Ricardo Neri
Section 2.2.1.3 of the Intel 64 and IA-32 Architectures Software Developer's Manual volume 2A states that when ModRM.mod is zero and ModRM.rm is 101b, a 32-bit displacement follows the ModRM byte. This means that none of the registers are used in the computation of the effective address. A return v

[PATCH v9 16/29] x86/insn-eval: Add function to get default params of code segment

2017-10-03 Thread Ricardo Neri
Obtain the default values of the address and operand sizes as specified in the D and L bits of the the segment descriptor selected by the register CS. The function can be used for both protected and long modes. For virtual-8086 mode, the default address and operand sizes are always 2 bytes. The re

[PATCH v9 25/29] x86/umip: Force a page fault when unable to copy emulated result to user

2017-10-03 Thread Ricardo Neri
fixup_umip_exception() will be called from do_general_protection(). If the former returns false, the latter will issue a SIGSEGV with SEND_SIG_PRIV. However, when emulation is successful but the emulated result cannot be copied to user space memory, it is more accurate to issue a SIGSEGV with SEGV_

[PATCH 3/4] kbuild: re-order the code to not parse unnecessary variables

2017-10-03 Thread Masahiro Yamada
The top Makefile is divided into some sections such as mixed targets, config targets, build targets, etc. When we build mixed targets, Kbuild just invokes submake to process them one by one. In this case, compiler-related variables like CC, KBUILD_CFLAGS, etc. are unneeded. Check what kind of ta

[PATCH 2/4] kbuild: move "_all" target out of $(KBUILD_SRC) conditional

2017-10-03 Thread Masahiro Yamada
The first "_all" occurrence around line 120 is only visible when KBUILD_SRC is unset. If O=... is specified, the working directory is relocated, then the only second occurrence around line 193 is visible, that is not set to PHONY. Move the first one to an always visible place. This clarifies "_a

[PATCH 1/4] kbuild: replace $(hdr-arch) with $(SRCARCH)

2017-10-03 Thread Masahiro Yamada
Since commit 5e53879008b9 ("sparc,sparc64: unify Makefile"), hdr-arch and SRCARCH always match. Signed-off-by: Masahiro Yamada --- Makefile | 21 + scripts/Makefile.headersinst | 2 +- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/Make

[PATCH v9 23/29] x86/cpufeature: Add User-Mode Instruction Prevention definitions

2017-10-03 Thread Ricardo Neri
User-Mode Instruction Prevention is a security feature present in new Intel processors that, when set, prevents the execution of a subset of instructions if such instructions are executed in user mode (CPL > 0). Attempting to execute such instructions causes a general protection exception. The sub

[RFC PATCH 4/4] kbuild: evaluate cc-option and friends only when building kernel

2017-10-03 Thread Masahiro Yamada
$(call cc-option,...) is costly because it invokes the C compiler. Given that only some targets need compiler flags, it is pointless to compute them all the time. The variable no-dot-config-targets lists the targets we can run without the .config file, such as "make clean", "make help", etc. My

[PATCH v9 24/29] x86: Add emulation code for UMIP instructions

2017-10-03 Thread Ricardo Neri
The feature User-Mode Instruction Prevention present in recent Intel processor prevents a group of instructions (sgdt, sidt, sldt, smsw, and str) from being executed with CPL > 0. Otherwise, a general protection fault is issued. Rather than relaying to the user space the general protection fault c

[PATCH v9 05/29] x86/mpx: Simplify handling of errors when computing linear addresses

2017-10-03 Thread Ricardo Neri
When errors occur in the computation of the linear address, -1L is returned. Rather than having a separate return path for errors, the variable used to return the computed linear address can be initialized with the error value. Hence, only one return path is needed. This makes the function easier t

[PATCH v9 26/29] x86: Enable User-Mode Instruction Prevention

2017-10-03 Thread Ricardo Neri
User-Mode Instruction Prevention (UMIP) is enabled by setting/clearing a bit in %cr4. It makes sense to enable UMIP at some point while booting, before user spaces come up. Like SMAP and SMEP, is not critical to have it enabled very early during boot. This is because UMIP is relevant only when the

[PATCH v9 27/29] x86/traps: Fixup general protection faults caused by UMIP

2017-10-03 Thread Ricardo Neri
If the User-Mode Instruction Prevention CPU feature is available and enabled, a general protection fault will be issued if the instructions sgdt, sldt, sidt, str or smsw are executed from user-mode context (CPL > 0). If the fault was caused by any of the instructions protected by UMIP, fixup_umip_e

[PATCH v9 29/29] selftests/x86: Add tests for instruction str and sldt

2017-10-03 Thread Ricardo Neri
The instructions str and sldt are not recognized when running on virtual- 8086 mode and generate an invalid operand exception. These two instructions are protected by the Intel User-Mode Instruction Prevention (UMIP) security feature. In protected mode, if UMIP is enabled, these instructions genera

[PATCH v9 28/29] selftests/x86: Add tests for User-Mode Instruction Prevention

2017-10-03 Thread Ricardo Neri
Certain user space programs that run on virtual-8086 mode may utilize instructions protected by the User-Mode Instruction Prevention (UMIP) security feature present in new Intel processors: SGDT, SIDT and SMSW. In such a case, a general protection fault is issued if UMIP is enabled. When such a fau

[PATCH v9 03/29] ptrace,x86: Make user_64bit_mode() available to 32-bit builds

2017-10-03 Thread Ricardo Neri
In its current form, user_64bit_mode() can only be used when CONFIG_X86_64 is selected. This implies that code built with CONFIG_X86_64=n cannot use it. If a piece of code needs to be built for both CONFIG_X86_64=y and CONFIG_X86_64=n and wants to use this function, it needs to wrap it in an #ifdef

[PATCH v9 19/29] x86/insn-eval: Add support to resolve 32-bit address encodings

2017-10-03 Thread Ricardo Neri
32-bit and 64-bit address encodings are identical. Thus, the same logic could be used to resolve the effective address. However, there are two key differences: address size and enforcement of segment limits. If running a 32-bit process on a 64-bit kernel, it is best to perform the address calculat

[PATCH v9 20/29] x86/insn-eval: Add wrapper function for 32 and 64-bit addresses

2017-10-03 Thread Ricardo Neri
The function insn_get_addr_ref() is capable of handling only 64-bit addresses. A previous commit introduced a function to handle 32-bit addresses. Invoke these two functions from a third wrapper function that calls the appropriate routine based on the address size specified in the instruction struc

[PATCH] kconfig: Document the 'menu' struct

2017-10-03 Thread Ulf Magnusson
Understanding what it represents helps a lot when reading the code, and it's not obvious, so document it. The ROOT_MENU flag is only set and tested by the gconf and qconf front ends, so leave it undocumented here. The obvious guess for what it means is correct. Signed-off-by: Ulf Magnusson ---

Re: [PATCH 2/8] ARM: dts: aspeed: Reorder ADC node

2017-10-03 Thread Andrew Jeffery
On Thu, 2017-09-28 at 17:21 +0930, Joel Stanley wrote: > We try to keep the nodes in address order. The ADC node was out of > place. >  > Signed-off-by: Joel Stanley > --- >  arch/arm/boot/dts/aspeed-g4.dtsi | 16 >  arch/arm/boot/dts/aspeed-g5.dtsi | 16 >  2 files

Re: [PATCH 1/8] ARM: dts: aspeed: Move pinctrl subnodes to improve readability

2017-10-03 Thread Andrew Jeffery
On Thu, 2017-09-28 at 17:21 +0930, Joel Stanley wrote: > > From: Andrew Jeffery > > Moving the subnodes out of the pinctrl node declaration to a reference > allows easier access to the remaining parts of the devicetree. > > > Signed-off-by: Andrew Jeffery > > Reviewed-by: Xo Wang > > Signed-of

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

2017-10-03 Thread Masahiro Yamada
2017-10-04 5:48 GMT+09:00 Douglas Anderson : > The main Linux Makefiles and the tools sub-Makefiles have different > conventions for passing in CC / CFLAGS. > > Here's brief summary for the kernel: > * CC: target C compiler (must be passed as an argument to make to > override) > * HOSTCC: host C

Re: [PATCH 5/7] gpio: brcmstb: enable masking of interrupts when changing type

2017-10-03 Thread Gregory Fong
On Tue, Oct 3, 2017 at 7:22 PM, Doug Berger wrote: > On 10/03/2017 07:10 PM, Gregory Fong wrote: >> Hi Doug, >> >> On Fri, Sep 29, 2017 at 8:40 PM, Doug Berger wrote: >>> Mask the GPIO interrupt while its type is being changed, just in case >>> it can prevent a spurious interrupt. >> >> "Just in

Re: [PATCH 4.13 103/110] platform/x86: fujitsu-laptop: Dont oops when FUJ02E3 is not presnt

2017-10-03 Thread Jonathan Woithe
On Tue, Oct 03, 2017 at 05:27:25PM -0700, Darren Hart wrote: > On Wed, Oct 04, 2017 at 08:39:34AM +1030, Jonathan Woithe wrote: > > : > > Reviewed-by: Jonathan Woithe > > Thanks for the due diligence here Jonathan, but for stable backport > announcements, you don't need to speak up unless you hav

Re: [PATCH 2/7] gpio: brcmstb: release the bgpio lock during irq handlers

2017-10-03 Thread Gregory Fong
On Tue, Oct 3, 2017 at 7:09 PM, Doug Berger wrote: > On 10/03/2017 06:55 PM, Gregory Fong wrote: >> Hi Doug, >> >> On Fri, Sep 29, 2017 at 8:40 PM, Doug Berger wrote: >>> The basic memory-mapped GPIO controller lock must be released >>> before calling the registered GPIO interrupt handlers to all

[PATCH v2] tools/kvm_stat: Add Python 3 support to kvm_stat

2017-10-03 Thread Jeremy Cline
Make kvm_stat support Python 3 by changing the use of "print" to a function rather than a statement, switching from "iteritems" and "iterkeys" (removed in Python 3) to "items" and "keys" respectively, and decoding bytes to strings when dealing with text. With this change, kvm_stat is usable with P

Re: [RFC PATCH 2/2] tools build: Take CC, AS, and LD from the command line

2017-10-03 Thread Guenter Roeck
On Tue, Oct 3, 2017 at 1:48 PM, Douglas Anderson wrote: > If the top-level tools build is called to build a tool and is passed > CC, AS, or LD on the command line then someone wants to use a > different compiler, assembler, or linker. Let's honor that. > > This together with the change ("kbuild:

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

2017-10-03 Thread Guenter Roeck
On Tue, Oct 3, 2017 at 1:48 PM, Douglas Anderson wrote: > The main Linux Makefiles and the tools sub-Makefiles have different > conventions for passing in CC / CFLAGS. > > Here's brief summary for the kernel: > * CC: target C compiler (must be passed as an argument to make to > override) > * HOS

Re: [PATCH 6/7] gpio: brcmstb: consolidate interrupt domains

2017-10-03 Thread Gregory Fong
Hi Doug, On Fri, Sep 29, 2017 at 8:40 PM, Doug Berger wrote: > The GPIOLIB IRQ chip helpers were very appealing, but badly broke > the 1:1 mapping between a GPIO controller's device_node and its > interrupt domain. Out of curiosity, what sort of problems have you seen from this? > > This commit

Re: [PATCH] KVM: VMX: check match table

2017-10-03 Thread Nick Desaulniers
- avi I think an extra `did not` made it in to that last email...sorry! On Tue, Oct 3, 2017 at 7:54 PM, Nick Desaulniers wrote: > On Tue, Oct 03, 2017 at 11:42:18AM +0200, Paolo Bonzini wrote: >> On 01/10/2017 01:22, Nick Desaulniers wrote: >> > I don't follow (but I also don't know what any of

Re: [PATCH] KVM: VMX: check match table

2017-10-03 Thread Nick Desaulniers
On Tue, Oct 03, 2017 at 11:42:18AM +0200, Paolo Bonzini wrote: > On 01/10/2017 01:22, Nick Desaulniers wrote: > > I don't follow (but I also don't know what any of these three letter > > acryonyms acronyms stand for), does svm depend on vmx or vice-versa? > Neither, one is Intel (VMX), the other is

[PATCH v3] sched/deadline: make it configurable

2017-10-03 Thread Nicolas Pitre
On most small systems, the deadline scheduler class is a luxury that rarely gets used if at all. It is preferable to have the ability to configure it out to reduce the kernel size in that case. Before: $ size -t kernel/sched/built-in.o textdata bss dec hex filename [...] 2443

Re: e4dace3615 ("lib: add test module for CONFIG_DEBUG_VIRTUAL"): [ 10.185572] kernel BUG at arch/x86/mm/physaddr.c:75!

2017-10-03 Thread Fengguang Wu
On Tue, Oct 03, 2017 at 07:09:37PM -0700, Florian Fainelli wrote: Hi Fengguang, On 10/03/2017 07:24 AM, Fengguang Wu wrote: Hi Florian, FYI we see this BUG in latest RC kernel and linux-next. Have it been fixed somewhere else? The purpose of the test module is to make tests for CONFIG_DEBUG_

  1   2   3   4   5   6   7   8   9   10   >