Add a driver for the Maxim Integrated MAX5432-MAX5435 family of digital
potentiometers.
These potentiometers are connected via I2C and have 32 wiper
positions.
Supported functionality
- set the volatile wiper position
- read the potentiometer scale
Datasheet:
https://datasheets.maximintegrated.c
Add a binding for the Maxim Integrated MAX5432-MAX5435 family of digital
potentiometers.
Signed-off-by: Martin Kaiser
---
changes in v4
- fix the dt bindings
- replace ic20 with i2c
- document the reg property
- add additionalProperties and required
changes in v3
- split dt bindings a
Quoting Will Deacon (2019-07-31 01:40:57)
> On Tue, Jul 30, 2019 at 11:15:32AM -0700, Stephen Boyd wrote:
> > Cc: Mark Rutland
> > Cc: linux-arm-ker...@lists.infradead.org
> > Cc: Greg Kroah-Hartman
> > Signed-off-by: Stephen Boyd
>
> Acked-by: Will Deacon
>
> Please let me know if you'd rath
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/staging/rtl8723bs/hal/odm.c: In function 'odm_RSSIMonitorCheckCE':
drivers/staging/rtl8723bs/hal/odm.c:1258:7: warning:
variable 'FirstConnect' set but not used [-Wunused-but-set-variable]
Reported-by: Hulk Robot
Signed-off-by: YueHaibing
On 7/11/19 16:44, Bjorn Andersson wrote:
> On Tue 25 Jun 09:47 PDT 2019, Jorge Ramirez-Ortiz wrote:
>
>> There is clock controller functionality in the APCS hardware block of
>> qcs404 devices similar to msm8916.
>>
>> Co-developed-by: Niklas Cassel
>> Signed-off-by: Niklas Cassel
>> Signed-off-
Before this change the device tree description of qspi node for
second memory on BK4 board was wrong (applicable to old, removed
fsl-quadspi.c driver).
As a result this memory was not recognized correctly when used
with the new spi-fsl-qspi.c driver.
>From the dt-bindings:
"Required SPI slave no
Alexander Shishkin writes:
> Hi Peter,
No, please disregard this one, it has brainfarts.
Thanks,
--
Alex
On Wed 31-07-19 15:42:53, David Hildenbrand wrote:
> On 31.07.19 15:25, Michal Hocko wrote:
[...]
> > I know we have documented this as an ABI and it is really _sad_ that
> > this ABI didn't get through normal scrutiny any user visible interface
> > should go through but these are sins of the past.
On 7/31/19 9:48 AM, Rik van Riel wrote:
> On Tue, 2019-07-30 at 17:01 -0400, Waiman Long wrote:
>> On 7/29/19 8:26 PM, Rik van Riel wrote:
>>> On Mon, 2019-07-29 at 17:42 -0400, Waiman Long wrote:
>>>
What I have found is that a long running process on a mostly idle
system
with many
On Wed 31-07-19 16:04:10, David Hildenbrand wrote:
> On 31.07.19 15:42, David Hildenbrand wrote:
[...]
> > Powerpc userspace queries it:
> > https://groups.google.com/forum/#!msg/powerpc-utils-devel/dKjZCqpTxus/AwkstV2ABwAJ
>
> FWIW, powerpc-utils also uses the "removable" property - which means
>
Quoting Arnd Bergmann (2019-07-30 11:29:45)
> On Tue, Jul 30, 2019 at 8:16 PM Stephen Boyd wrote:
> >
> > We don't need dev_err() messages when platform_get_irq() fails now that
> > platform_get_irq() prints an error message itself when something goes
> > wrong. Let's remove these prints with a si
On Wed 31-07-19 15:53:06, David Hildenbrand wrote:
> Let's document why the lock is not needed in acpi_scan_init(), right now
> this is not really obvious.
>
> Cc: Rafael J. Wysocki
> Cc: Michal Hocko
> Cc: Oscar Salvador
> Cc: Andrew Morton
> Signed-off-by: David Hildenbrand
Acked-by: Micha
Quoting Douglas Anderson (2019-07-30 16:40:52)
> Some systems (like Chrome OS) may use "split debug" for kernel
> modules. That means that the debug symbols are in a different file
> than the main elf file. Let's handle that by also searching for debug
> symbols that end in ".ko.debug".
>
> Sign
Hi *,
I'm analyzing the linux kernel via phasar static analyzer framework,
it basically takes as input an LLVM IR file.
For debugging reasons, I would like to compile the kernel without
inlined functions. I'm compiling the kernel by clang, so I tried to
specify the following compiler flags:
```
-f
In rtl8192_init_priv_variable allocation for priv->pFirmware may fail,
so a null check is necessary.priv->pFirmware is accessed later in
rtl8192_adapter_start. I added the check and made appropriate changes
to propagate the errno to the caller.
Signed-off-by: Navid Emamdoost
---
Update v2: fixed
Hello, Michel.
>
> Hmmm, I had not thought about that. Agree that this can be useful -
> there is already similar test code in rbtree_test.c and also
> vma_compute_subtree_gap() in mmap.c, ...
>
> With patch 3/3 of this series, the RBCOMPUTE function (typically
> generated through the RB_DECLARE
On 31.07.19 16:14, Michal Hocko wrote:
> On Wed 31-07-19 15:42:53, David Hildenbrand wrote:
>> On 31.07.19 15:25, Michal Hocko wrote:
> [...]
>>> I know we have documented this as an ABI and it is really _sad_ that
>>> this ABI didn't get through normal scrutiny any user visible interface
>>> shoul
On 31. 07. 19 15:06, Nishka Dasgupta wrote:
> On 31/07/19 2:01 PM, Michal Simek wrote:
>> On 09. 07. 19 19:28, Nishka Dasgupta wrote:
>>> Each iteration of for_each_available_child_of_node puts the previous
>>> node, but in the case of a goto from the middle of the loop, there is
>>> no put, thus c
On Wed, Jul 31, 2019 at 03:00:37PM +0200, Michal Hocko wrote:
> On Wed 31-07-19 15:26:32, Mike Rapoport wrote:
> > On Wed, Jul 31, 2019 at 01:40:16PM +0200, Michal Hocko wrote:
> > > On Wed 31-07-19 14:14:22, Mike Rapoport wrote:
> > > > On Wed, Jul 31, 2019 at 10:03:09AM +0200, Michal Hocko wrote:
On 31.07.19 16:15, Michal Hocko wrote:
> On Wed 31-07-19 16:04:10, David Hildenbrand wrote:
>> On 31.07.19 15:42, David Hildenbrand wrote:
> [...]
>>> Powerpc userspace queries it:
>>> https://groups.google.com/forum/#!msg/powerpc-utils-devel/dKjZCqpTxus/AwkstV2ABwAJ
>>
>> FWIW, powerpc-utils also
On Wed, 31 Jul 2019 12:37:15 +0200
Juri Lelli wrote:
> SCHED_DEADLINE inactive timer needs to run in hardirq context (as
> dl_task_timer already does).
>
> Make it HRTIMER_MODE_REL_HARD.
>
> Signed-off-by: Juri Lelli
> ---
> Hi,
>
> Both v4.19-rt and v5.2-rt need this.
>
> Mainline "sched: M
The kvm_create_max_vcpus test has been moved to the main directory,
and sync_regs_test is now available on s390x, too.
Signed-off-by: Thomas Huth
---
tools/testing/selftests/kvm/.gitignore | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/kvm/.gitignor
> -dev_err(...);
What about pr_err, ...?
> While we're here, remove braces on if statements that only have one
> statement (manually).
You can let cocci do this for you, too. From the top of my head:
if (...)
- {
S
- }
with S being a statement and this rule depending on the matching rule.
Dmitry Vyukov wrote:
> Re bisection, I don't know if there are some more subtle things as
> play (you are in the better position to judge that), but bisection log
> looks good, it tracked the target crash throughout and wasn't
> distracted by any unrelated bugs, etc. So I don't see any obvious
>
On 7/11/19 17:16, Bjorn Andersson wrote:
> On Tue 25 Jun 09:47 PDT 2019, Jorge Ramirez-Ortiz wrote:
>
>> When COMMON_CLK_DISABLED_UNUSED is set, in an effort to save power and
>> to keep the software model of the clock in line with reality, the
>> framework transverses the clock tree and disables
In some cases, ordinary (non-AUX) events can generate data for AUX events.
For example, PEBS events can come out as records in the Intel PT stream
instead of their usual DS records, if configured to do so.
One requirement for such events is to consistently schedule together, to
ensure that the dat
Hi Peter,
Fourth attempt at the PEBS-via-PT feature. The previous ones were [1], [2],
[3]. This one addresses review comments in patches 1/7 and 2/7, the tooling
patches are intact, but I'm including them anyway.
The PEBS feature: output to Intel PT stream instead of the DS area. It's
theoretical
If PEBS declares ability to output its data to Intel PT stream, use the
aux_source attribute bit to enable PEBS data output to PT. This requires
a PT event to be present and scheduled in the same context. Unlike the
DS area, the kernel does not extract PEBS records from the PT stream to
generate co
From: Adrian Hunter
Add itrace option 'o' to synthesize events recorded in the AUX area due to
the use of perf record's aux-source config term.
Signed-off-by: Adrian Hunter
Signed-off-by: Alexander Shishkin
---
tools/perf/Documentation/itrace.txt | 2 ++
tools/perf/util/auxtrace.c |
From: Adrian Hunter
Document how to select PEBS via Intel PT and how to display synthesized
PEBS samples.
Signed-off-by: Adrian Hunter
Signed-off-by: Alexander Shishkin
---
tools/perf/Documentation/intel-pt.txt | 15 +++
1 file changed, 15 insertions(+)
diff --git a/tools/perf/Do
From: Adrian Hunter
Process synth_opts.other_events and attr.aux_source to set up for
synthesizing PEBs via Intel PT events.
Signed-off-by: Adrian Hunter
Signed-off-by: Alexander Shishkin
---
tools/perf/arch/x86/util/intel-pt.c | 23 +++
tools/perf/util/intel-pt.c
From: Adrian Hunter
Expose the aux_source attribute flag to the user to configure, by adding a
config term 'aux-source'. For events that support it, selection of
'aux-source' causes the generation of AUX records instead of event records.
This requires that an AUX area event is also provided.
Sig
From: Adrian Hunter
Add aux_source attribute flag to match the kernel's perf_event.h file.
Signed-off-by: Adrian Hunter
Signed-off-by: Alexander Shishkin
---
tools/include/uapi/linux/perf_event.h | 3 ++-
tools/perf/util/evsel.c | 1 +
2 files changed, 3 insertions(+), 1 deletio
Quoting Phil Reid (2019-07-30 23:42:16)
> G'day Stephen,
>
> A comment unrelated to your change.
>
> On 31/07/2019 02:15, Stephen Boyd wrote:
>
>
> > diff --git a/drivers/iio/adc/at91_adc.c b/drivers/iio/adc/at91_adc.c
> > index 32f1c4a33b20..abe99856c823 100644
> > --- a/drivers/iio/adc/at
On Wed 31-07-19 16:21:46, David Hildenbrand wrote:
[...]
> > Thinking about it some more, I believe that we can reasonably provide
> > both APIs controlable by a command line parameter for backwards
> > compatibility. It is the hotplug code to control sysfs APIs. E.g.
> > create one sysfs entry pe
On Wed, 2019-07-31 at 09:42 -0300, Fabio Estevam wrote:
> On Wed, Jul 31, 2019 at 9:38 AM Philippe Schenker
> wrote:
> > Add atmel mxt multitouch controller and TouchRevolution multitouch
>
> You missed to updated the commit log ;-)
Ah, shoot! :-) Thanks.
I will send a v3 then, next week.
On Wed, 31 Jul 2019 at 18:32, Paolo Bonzini wrote:
>
> On 31/07/19 12:55, Naresh Kamboju wrote:
> > selftests kvm test cases need pre-required kernel configs for the test
> > to get pass.
> >
> > Signed-off-by: Naresh Kamboju
>
> Most of these are selected by other items. CONFIG_KVM should be en
On 7/31/19 3:21 PM, Olof Johansson wrote:
On Wed, Jul 31, 2019 at 3:20 PM Olof Johansson wrote:
Hi,
On Wed, Jul 31, 2019 at 8:48 AM Alexandre Torgue
wrote:
Hi Olof
On 7/30/19 7:36 PM, Olof Johansson wrote:
Hi Patrice,
If you cc s...@kernel.org on patches you want us to apply, you'll
On Wed 31-07-19 17:21:29, Mike Rapoport wrote:
> On Wed, Jul 31, 2019 at 03:00:37PM +0200, Michal Hocko wrote:
> > On Wed 31-07-19 15:26:32, Mike Rapoport wrote:
> > > On Wed, Jul 31, 2019 at 01:40:16PM +0200, Michal Hocko wrote:
> > > > On Wed 31-07-19 14:14:22, Mike Rapoport wrote:
> > > > > On W
On 7/31/19 1:55 AM, Hans Verkuil wrote:
> On 7/31/19 6:33 AM, Hans Verkuil wrote:
>> On 7/31/19 6:29 AM, Hans Verkuil wrote:
>>> On 7/31/19 2:08 AM, Helen Koike wrote:
On 7/30/19 5:50 PM, Helen Koike wrote:
>
>
> On 7/30/19 5:15 PM, Hans Verkuil wrote:
>> On 7/30/1
This patch rewrites the pc87413_wdt driver to use the watchdog subsystem. In
doing so, it also addresses a potential race condition owing from the
swc_base_addr variable being used before being set.
Signed-off-by: Mark Balantzyan
---
drivers/watchdog/Kconfig | 1 +
drivers/watchdog/pc87
On Wed, Jul 31, 2019 at 03:32:14PM +0200, Thomas Huth wrote:
> The way we exit from a guest to userspace is very specific to the
> architecture: On x86, we use PIO, on aarch64 we are using MMIO and on
> s390x we're going to use an instruction instead. The possibility to
> select a type via the ucal
Hi Guido,
On Wed, Jul 31, 2019 at 11:35 AM Guido Günther wrote:
> The idea is to have
>
> "%sabling platform clocks", enable ? "en" : "dis");
>
> depending whether clocks are enabled/disabled.
Yes, I understood the idea, but this would print:
ensabling or dissabling :-)
> > Same here. Ple
On 31.07.19 16:37, Michal Hocko wrote:
> On Wed 31-07-19 16:21:46, David Hildenbrand wrote:
> [...]
>>> Thinking about it some more, I believe that we can reasonably provide
>>> both APIs controlable by a command line parameter for backwards
>>> compatibility. It is the hotplug code to control sysf
Hi,
If you have a patch affecting arm64, please Cc LAKML and the arm64
maintainers. I've added them to this sub-thread.
On Wed, Jul 31, 2019 at 05:04:37PM +0800, Jiping Ma wrote:
> The PC of one the frame is matched to the next frame function, rather
> than the function of his frame.
As Steve sa
On Wed, Jul 31, 2019 at 4:30 PM David Howells wrote:
>
> Dmitry Vyukov wrote:
>
> > Re bisection, I don't know if there are some more subtle things as
> > play (you are in the better position to judge that), but bisection log
> > looks good, it tracked the target crash throughout and wasn't
> > d
On Tue 30-07-19 13:24:54, Thomas Gleixner wrote:
> Bit spinlocks are problematic if PREEMPT_RT is enabled, because they
> disable preemption, which is undesired for latency reasons and breaks when
> regular spinlocks are taken within the bit_spinlock locked region because
> regular spinlocks are co
On Tue 30-07-19 13:24:55, Thomas Gleixner wrote:
> Bit spinlocks are problematic if PREEMPT_RT is enabled. They disable
> preemption, which is undesired for latency reasons and breaks when regular
> spinlocks are taken within the bit_spinlock locked region because regular
> spinlocks are converted
Quoting Wolfram Sang (2019-07-31 07:30:11)
> > -dev_err(...);
>
> What about pr_err, ...?
Sure. I haven't tried to find these ones or pr_warn(), etc.
>
> > While we're here, remove braces on if statements that only have one
> > statement (manually).
>
> You can let cocci do this for you, too.
On Wed, Jul 31, 2019 at 08:02:30AM -0400, Qian Cai wrote:
> On Jul 31, 2019, at 5:53 AM, Catalin Marinas wrote:
> > On Tue, Jul 30, 2019 at 04:22:37PM -0400, Qian Cai wrote:
> >> On Tue, 2019-07-30 at 12:57 -0700, Andrew Morton wrote:
> >>> On Sat, 27 Jul 2019 14:23:33 +0100 Catalin Marinas
> >>>
On Wed, Jul 31, 2019 at 03:32:13PM +0200, Thomas Huth wrote:
> Implement the ucall() interface on s390x to be able to use the
> dirty_log_test KVM selftest on s390x, too.
>
> v2:
> - Split up ucall.c into architecture specific files
> - Removed some #ifdef __s390x__ in the dirty_log patch
>
>
On Wed, 2019-07-31 at 09:56 -0300, Fabio Estevam wrote:
> On Wed, Jul 31, 2019 at 9:38 AM Philippe Schenker
> wrote:
> > From: Stefan Agner
> >
> > Add pinmuxing and do not specify voltage restrictions in the
> > module level device tree.
>
> It would be nice to explain the reason for doing thi
On Tue, 2019-07-30 at 21:39 -0700, Luck, Tony wrote:
> Some processors may mispredict an array bounds check and
> speculatively access memory that they should not. With
> a user supplied array index we like to play things safe
> by masking the value with the array size before it is
> used as an ind
On Wed, 2019-07-31 at 15:48 +0100, Catalin Marinas wrote:
> On Wed, Jul 31, 2019 at 08:02:30AM -0400, Qian Cai wrote:
> > On Jul 31, 2019, at 5:53 AM, Catalin Marinas
> > wrote:
> > > On Tue, Jul 30, 2019 at 04:22:37PM -0400, Qian Cai wrote:
> > > > On Tue, 2019-07-30 at 12:57 -0700, Andrew Morton
Uninitialized Kernel memory can leak to USB devices.
Fix by using kzalloc() instead of kmalloc() on the affected buffers.
Signed-off-by: Tomas Bortoli
Reported-by: syzbot+d6a5a1a3657b596ef...@syzkaller.appspotmail.com
Reported-by: syzbot+513e4d0985298538b...@syzkaller.appspotmail.com
---
Crash l
On Wed, Jul 31, 2019 at 03:35:20PM +0200, Geert Uytterhoeven wrote:
> Some TIF_* flags are documented in the comment block at the top, some
> next to their definitions, some in both places.
>
> Move all documentation to the individual definitions for consistency,
> and for easy lookup.
>
> Signed
On Wed, 2019-07-31 at 11:35 +0200, Peter Zijlstra wrote:
> On Tue, Jul 30, 2019 at 11:36:17AM +0200, Peter Zijlstra wrote:
> > On Mon, Jul 22, 2019 at 01:33:43PM -0400, Rik van Riel wrote:
> > > +static bool
> > > +enqueue_entity_groups(struct cfs_rq *cfs_rq, struct sched_entity
> > > *se, int flag
Linus,
Two minor fixes:
- Fix trace event header include guards, as several did not match
the #define to the #ifdef
- Remove a redundant test to ftrace_graph_notrace_addr() that
was accidentally added.
Please pull the latest trace-v5.3-rc2 tree, which can be found at:
git://git.k
__mutex_owner() should only be used by the mutex api's.
So, to put this restiction let's move the __mutex_owner()
function definition from linux/mutex.h to mutex.c file.
There exist functions that uses __mutex_owner() like
mutex_is_locked() and mutex_trylock_recursive(), So
to keep legacy thing in
Use the mutex flag macro instead of hard code value inside
__mutex_owner().
Signed-off-by: Mukesh Ojha
---
Changes in v3:
- no change.
Changes in v2:
- Framed the commit according the changes done in 1/2 of
the patchset.
kernel/locking/mutex.c | 2 +-
1 file changed, 1 insertion(+), 1 del
On Wed, 2019-07-31 at 10:15 -0400, Waiman Long wrote:
> On 7/31/19 9:48 AM, Rik van Riel wrote:
> > On Tue, 2019-07-30 at 17:01 -0400, Waiman Long wrote:
> > > On 7/29/19 8:26 PM, Rik van Riel wrote:
> > > > On Mon, 2019-07-29 at 17:42 -0400, Waiman Long wrote:
> > > >
> > > > > What I have found
When kernel sets up an encrypted page mapping, encryption KeyID is
derived from a VMA. KeyID is going to be part of vma->vm_page_prot and
it will be propagated transparently to page table entry on mk_pte().
But there is an exception: zero page is never encrypted and its mapping
must use KeyID-0, r
Hook up into page allocator to allocate and free encrypted page
properly.
The hardware/CPU does not enforce coherency between mappings of the same
physical page with different KeyIDs or encryption keys.
We are responsible for cache management.
Flush cache on allocating encrypted page and on retur
From: Alison Schofield
encrypt_mprotect() is a new system call to support memory encryption.
It takes the same parameters as legacy mprotect, plus an additional
key serial number that is mapped to an encryption keyid.
Signed-off-by: Alison Schofield
Signed-off-by: Kirill A. Shutemov
---
arch
From: Alison Schofield
Implement memory encryption for MKTME (Multi-Key Total Memory
Encryption) with a new system call that is an extension of the
legacy mprotect() system call.
In encrypt_mprotect the caller must pass a handle to a previously
allocated and programmed MKTME encryption key. The
Icelake Server requires additional check to make sure that MKTME usage
is safe on Linux.
Kernel needs a way to access encrypted memory. There can be different
approaches to this: create a temporary mapping to access the page (using
kmap() interface), modify kernel's direct mapping on allocation of
The kernel needs to have a way to access encrypted memory. We have two
option on how approach it:
- Create temporary mappings every time kernel needs access to encrypted
memory. That's basically brings highmem and its overhead back.
- Create multiple direct mappings, one per-KeyID. In this s
From: Jacob Pan
Replace sme_ code with x86 memory encryption common code such that
Intel MKTME can be supported underneath generic DMA code.
dma_to_phys() & phys_to_dma() results will be runtime modified by
memory encryption code.
Signed-off-by: Jacob Pan
Signed-off-by: Kirill A. Shutemov
---
Rename the option to CONFIG_MEMORY_PHYSICAL_PADDING. It will be used
not only for KASLR.
Signed-off-by: Kirill A. Shutemov
---
arch/x86/Kconfig| 2 +-
arch/x86/mm/kaslr.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 222855cc
From: Alison Schofield
It is a requirement of the Kernel Keys subsystem to provide a
preparse method that validates payloads before key instantiate
methods are called.
Verify that userspace provides valid MKTME options and prepare
the payload for use at key instantiate time.
Create a method to
Zero pages are never encrypted. Keep KeyID-0 for them.
Signed-off-by: Kirill A. Shutemov
---
arch/x86/include/asm/pgtable.h | 19 +++
1 file changed, 19 insertions(+)
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index 0bc530c4eb13..f0dd80a920a9 10
From: Alison Schofield
The ACPI HMAT will be used by the MKTME key service to identify
topologies that support the safe programming of encryption keys.
Those decisions will happen at key creation time and during
hotplug events.
To enable this, we at least need to have the ACPI HMAT present
at in
From: Alison Schofield
The Intel MKTME architecture specification requires an activated
encryption algorithm for all command types.
For commands that actually perform encryption, SET_KEY_DIRECT and
SET_KEY_RANDOM, the user specifies the algorithm when requesting the
key through the MKTME Key Ser
From: Alison Schofield
Instantiate is a Kernel Key Service method invoked when a key is
added (add_key, request_key) by the user.
During instantiation, MKTME allocates an available hardware KeyID
and maps it to the Userspace Key.
Signed-off-by: Alison Schofield
Signed-off-by: Kirill A. Shutemo
page_keyid() is inline funcation that uses lookup_page_ext(). KVM is
going to use page_keyid() and since KVM can be built as a module
lookup_page_ext() has to be exported.
Signed-off-by: Kirill A. Shutemov
---
mm/page_ext.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mm/page_ext.c b/mm
page_ext allows to store additional per-page information without growing
main struct page. The additional space can be requested at boot time.
Store KeyID in bits 31:16 of extended page flags. These bits are unused.
page_keyid() returns zero until page_ext is ready. page_ext initializer
enables a
mktme_nr_keyids() returns the number of KeyIDs available for MKTME,
excluding KeyID zero which used by TME. MKTME KeyIDs start from 1.
mktme_keyid_shift() returns the shift of KeyID within physical address.
mktme_keyid_mask() returns the mask to extract KeyID from physical address.
Signed-off-by
We store KeyID in upper bits for vm_page_prot that match position of
KeyID in PTE. vma_keyid() extracts KeyID from vm_page_prot.
With KeyID in vm_page_prot we don't need to modify any page table helper
to propagate the KeyID to page table entires.
Signed-off-by: Kirill A. Shutemov
---
arch/x86/
We need to know the number of KeyIDs before page_ext is initialized.
We are going to use page_ext to store KeyID and it would be handly to
avoid page_ext allocation if there's no MKMTE in the system.
page_ext initialization happens before full CPU initizliation is complete.
Move detect_tme() call
Store bitmask of the supported encryption algorithms in 'mktme_algs'.
This will be used by key management service.
Signed-off-by: Kirill A. Shutemov
---
arch/x86/include/asm/mktme.h | 2 ++
arch/x86/kernel/cpu/intel.c | 6 +-
arch/x86/mm/mktme.c | 2 ++
3 files changed, 9 insertion
An encrypted VMA will have KeyID stored in vma->vm_page_prot. This way
we don't need to do anything special to setup encrypted page table
entries and don't need to reserve space for KeyID in a VMA.
This patch changes _PAGE_CHG_MASK to include KeyID bits. Otherwise they
are going to be stripped fro
VMAs with different KeyID do not mix together. Only VMAs with the same
KeyID are compatible.
Signed-off-by: Kirill A. Shutemov
---
fs/userfaultfd.c | 7 ---
include/linux/mm.h | 9 -
mm/madvise.c | 2 +-
mm/mempolicy.c | 3 ++-
mm/mlock.c | 2 +-
mm/mmap.c
MKTME claims several upper bits of the physical address in a page table
entry to encode KeyID. It effectively shrinks number of bits for
physical address. We should exclude KeyID bits from physical addresses.
For instance, if CPU enumerates 52 physical address bits and number of
bits claimed for K
For encrypted memory, we need to allocate pages for a specific
encryption KeyID.
There are two cases when we need to allocate a page for encryption:
- Allocation for an encrypted VMA;
- Allocation for migration of encrypted page;
The first case can be covered within alloc_page_vma(). We know
KSM compares plain text. It might try to merge two pages that have the
same plain text but different ciphertext and possibly different
encryption keys. When the kernel encrypted the page, it promised that
it would keep it encrypted with _that_ key. That makes it impossible to
merge two pages enc
For !NUMA khugepaged allocates page in advance, before we found a VMA
for collapse. We don't yet know which KeyID to use for the allocation.
The page is allocated with KeyID-0. Once we know that the VMA is
suitable for collapsing, we prepare the page for KeyID we need, based on
vma_keyid().
Signe
We don't need to have separate implementations of alloc_hugepage_vma()
for NUMA and non-NUMA. Using variant based on alloc_pages_vma() we would
cover both cases.
This is preparation patch for allocation encrypted pages.
alloc_pages_vma() will handle allocation of encrypted pages. With this
change
= Intro =
The patchset brings enabling of Intel Multi-Key Total Memory Encryption.
It consists of changes into multiple subsystems:
* Core MM: infrastructure for allocation pages, dealing with encrypted VMAs
and providing API setup encrypted mappings.
* arch/x86: feature enumeration, program
To run the dirty_log_test on s390x, we have to make sure that we
access the dirty log bitmap with little endian byte ordering and
we have to properly align the memslot of the guest.
Also all dirty bits of a segment are set once on s390x when one
of the pages of a segment are written to for the firs
On 31-07-19, 10:48, Jon Hunter wrote:
>
> On 29/07/2019 07:10, Vinod Koul wrote:
> > On 23-07-19, 11:24, Sameer Pujar wrote:
> >>
> >> On 7/19/2019 10:34 AM, Vinod Koul wrote:
> >>> On 05-07-19, 11:45, Sameer Pujar wrote:
> Hi Vinod,
>
> What are your final thoughts regarding this?
This change adds 3 Kconfig default value tests.
Repost patch v3 (Follow Joe's suggestion in v2)
1. discourage default n cases:
e.g.,
default n
2. discourage default "[ynm]" cases:
e.g.,
arch/powerpc/Kconfig: default "y" if PPC_POWERNV
arch/powerpc/Kconfig: default "y" if PPC_POWERNV
arch/powe
On 7/30/19 8:57 PM, Eric Biggers wrote:
> syzbot finds a lot of security bugs, and security bugs are important. And the
> bugs are still there regardless of whether they're reported by human or bot.
>
> Also, there *are* bugs being fixed because of these reminders; some subsystem
> maintainers ha
From: Alison Schofield
Finally, the keys are programmed into the hardware via each
lead CPU. Every package has to be programmed successfully.
There is no partial success allowed here.
Here a retry scheme is included for two errors that may succeed
on retry: MKTME_DEVICE_BUSY and MKTME_ENTROPY_ER
From: Alison Schofield
Provide an overview of MKTME on Intel Platforms.
Signed-off-by: Alison Schofield
Signed-off-by: Kirill A. Shutemov
---
Documentation/x86/index.rst| 1 +
Documentation/x86/mktme/index.rst | 8 +++
Documentation/x86/mktme/mktme_overview.rst | 57
If all pages in the VMA got unmapped there's no reason to link it into
original anon VMA hierarchy: it cannot possibly share any pages with
other VMA.
Set vma->anon_vma to NULL on unlink_anon_vmas(). With the change VMA
can be reused. The new anon VMA will be allocated on the first fault.
Signed-
From: Alison Schofield
MKTME depends upon at least one online CPU capable of programming
each memory controller in the platform.
An unsafe topology for MKTME is a memory only package or a package
with no online CPUs. Key creation with unsafe topologies will fail
with EINVAL and a warning will be
The function at issue does not always initialize each byte allocated for 'b'
and can therefore leak uninitialized memory to a USB device in the call to
usb_bulk_msg()
Use kzalloc() instead of kmalloc()
Signed-off-by: Tomas Bortoli
Reported-by: syzbot+0522702e9d6714237...@syzkaller.appspotmail.
From: Alison Schofield
Signed-off-by: Alison Schofield
Signed-off-by: Kirill A. Shutemov
---
Documentation/x86/mktme/index.rst | 1 +
Documentation/x86/mktme/mktme_keys.rst | 61 ++
2 files changed, 62 insertions(+)
create mode 100644 Documentation/x86/mktme/mktm
From: Alison Schofield
Memory encryption is only supported for mappings that are ANONYMOUS.
Test the VMA's in an encrypt_mprotect() request to make sure they all
meet that requirement before encrypting any.
The encrypt_mprotect syscall will return -EINVAL and will not encrypt
any VMA's if this c
Dmitry Vyukov wrote:
> Please send a patch for testing that enables this tracing
> unconditionally. This should have the same effect. There is no way to
> hook into a middle of the automated process and arbitrary tune things.
I don't know how to do that off hand. Do you have an example?
Anyway
301 - 400 of 1303 matches
Mail list logo