When vfio passthroughs a PCI device of which MMIO BARs are
smaller than PAGE_SIZE, guest will not handle the mmio
accesses to the BARs which leads to mmio emulations in host.
This is because vfio will not allow to passthrough one BAR's
mmio page which may be shared with other BARs. Otherwise,
ther
When using resource_alignment kernel parameter, the current implement
reassigns the alignment by expanding resources' size. So there exists two
kinds of *size* for one PCI BAR. One is the hardware size, the other is
the allocated size. Currently pci_resource_len() used by drivers return
the allocat
We would call pci_reassigndev_resource_alignment() before
pci_init_capabilities(). So the requested alignment would
never work for IOV BARs.
Furthermore, it's meaningless to request additional alignment
for IOV BARs, the IOV BAR alignment is only determined by the
VF BAR size.
Signed-off-by: Yong
This series introduces a way for PCI resource allocator to force
MMIO BARs not to share PAGE_SIZE. This would make sense to VFIO
driver. Because current VFIO implementation disallows to mmap
sub-page(size < PAGE_SIZE) MMIO BARs which may share the same page
with other BARs for security reasons. Thu
> I think you really could have squashed patches 1-3 into a single patch
> that returns directly after any failure.
Thanks for your constructive feedback.
I have got software development concerns around such patch squashing.
> At this point you might as well remove that label and move the kfree
Hari Bathini writes:
> Get rid of multiple definitions of append_elf_note() & final_note()
> functions. Reuse these functions compiled under CONFIG_CRASH_CORE
> Also, define Elf_Word and use it instead of generic u32 or the more
> specific Elf64_Word.
>
> Signed-off-by: Hari Bathini
> ---
>
> Ch
On 01/19/2017 08:56 AM, SF Markus Elfring wrote:
> From: Markus Elfring
> Date: Thu, 19 Jan 2017 15:55:36 +0100
>
> A local variable was set to an error code before a concrete error situation
> was detected. Thus move the corresponding assignment into an if branch
> to indicate a software failure
On 01/19/2017 12:33 PM, SF Markus Elfring wrote:
> From: Markus Elfring
> Date: Thu, 19 Jan 2017 21:20:09 +0100
>
> A local variable was set to an error code before a concrete error situation
> was detected. Thus move the corresponding assignment into an if branch
> to indicate a software failure
From: Markus Elfring
Date: Thu, 19 Jan 2017 21:20:09 +0100
A local variable was set to an error code before a concrete error situation
was detected. Thus move the corresponding assignment into an if branch
to indicate a software failure there.
This issue was detected by using the Coccinelle soft
On Thu, Jan 19, 2017 at 1:22 AM, Ard Biesheuvel
wrote:
>>
>> Your genksyms.c change is not exactly obvious. I looked at it, and my
>> brain just shut down. Why both the
>>
>> LONG(0x%08lx);
>>
>> _and_ the
>>
>> "%s__crc_%s = 0x%08lx;\n"
>>
>> in the linker script? I'm sure there's a good reas
From: Markus Elfring
Date: Thu, 19 Jan 2017 15:22:56 +0100
* Return directly after an inappropriate input parameter was detected.
* Delete an initialisation for the variable "tmp" at the beginning
and an assignment for the variable "ret" which became unnecessary
with this refactoring.
Signe
From: Markus Elfring
Date: Thu, 19 Jan 2017 16:50:31 +0100
Return directly after a call of the function "kmalloc" failed here.
Signed-off-by: Markus Elfring
---
arch/powerpc/kernel/nvram_64.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/kernel/nvram_64
From: Markus Elfring
Date: Thu, 19 Jan 2017 17:27:37 +0100
A local variable was set to an error code before a concrete error situation
was detected. Thus move the corresponding assignment into an if branch
to indicate a software failure there.
Signed-off-by: Markus Elfring
---
arch/powerpc/ker
From: Markus Elfring
Date: Thu, 19 Jan 2017 17:15:30 +0100
Replace the specification of data structures by references for local
variables as the parameter for the operator "sizeof" to make
the corresponding size determination a bit safer.
Signed-off-by: Markus Elfring
---
arch/powerpc/kernel/n
From: Markus Elfring
Date: Thu, 19 Jan 2017 15:55:36 +0100
A local variable was set to an error code before a concrete error situation
was detected. Thus move the corresponding assignment into an if branch
to indicate a software failure there.
This issue was detected by using the Coccinelle soft
From: Markus Elfring
Date: Thu, 19 Jan 2017 16:12:48 +0100
* Return directly after an inappropriate input parameter was detected.
* Delete an initialisation for the variable "tmp" at the beginning
which became unnecessary with this refactoring.
Signed-off-by: Markus Elfring
---
arch/powerpc
From: Markus Elfring
Date: Thu, 19 Jan 2017 15:44:03 +0100
Return directly after a call of the function "kmalloc" failed here.
Signed-off-by: Markus Elfring
---
arch/powerpc/kernel/nvram_64.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/powerpc/kernel/nvram_64.c
From: Markus Elfring
Date: Thu, 19 Jan 2017 16:56:46 +0100
The script "checkpatch.pl" pointed information out like the following.
WARNING: Possible unnecessary 'out of memory' message
Thus fix affected source code places.
Signed-off-by: Markus Elfring
---
arch/powerpc/kernel/nvram_64.c | 12
From: Ard Biesheuvel
> Sent: 18 January 2017 13:53
..
> It turns out that this odd treatment of absolute symbols (i.e.,
> symbols having section number SHN_ABS) is a known issue in GNU ld
>
> https://sourceware.org/ml/binutils/2012-05/msg00019.html
...
Jeepers - that is truly f*cked.
I've even
On 19 January 2017 at 16:55, Ard Biesheuvel wrote:
> On 19 January 2017 at 12:02, Ard Biesheuvel wrote:
>> The modversion symbol CRCs are emitted as ELF symbols, which allows us to
>> easily populate the kcrctab sections by relying on the linker to associate
>> each kcrctab slot with the correct
From: Markus Elfring
Date: Thu, 19 Jan 2017 17:41:23 +0100
Some update suggestions were taken into account
from static source code analysis.
Markus Elfring (8):
Return directly after a failed parameter validation in dev_nvram_write()
Return directly after a failed kmalloc() in dev_nvram_writ
On 19 January 2017 at 12:02, Ard Biesheuvel wrote:
> The modversion symbol CRCs are emitted as ELF symbols, which allows us to
> easily populate the kcrctab sections by relying on the linker to associate
> each kcrctab slot with the correct value.
>
> This has a couple of downsides:
> - On archite
From: Miroslav Benes
Currently we do not allow patch module to unload since there is no
method to determine if a task is still running in the patched code.
The consistency model gives us the way because when the unpatching
finishes we know that all tasks were marked as safe to call an original
f
Expose the per-task patch state value so users can determine which tasks
are holding up completion of a patching operation.
Signed-off-by: Josh Poimboeuf
Reviewed-by: Petr Mladek
Reviewed-by: Miroslav Benes
---
Documentation/filesystems/proc.txt | 18 ++
fs/proc/base.c
Change livepatch to use a basic per-task consistency model. This is the
foundation which will eventually enable us to patch those ~10% of
security patches which change function or data semantics. This is the
biggest remaining piece needed to make livepatch more generally useful.
This code stems
For the consistency model we'll need to know the sizes of the old and
new functions to determine if they're on the stacks of any tasks.
Signed-off-by: Josh Poimboeuf
Acked-by: Miroslav Benes
Reviewed-by: Petr Mladek
Reviewed-by: Kamalesh Babulal
---
include/linux/livepatch.h | 3 +++
kernel/
The sysfs enabled value is a boolean, so kstrtobool() is a better fit
for parsing the input string since it does the range checking for us.
Suggested-by: Petr Mladek
Signed-off-by: Josh Poimboeuf
Acked-by: Miroslav Benes
Reviewed-by: Petr Mladek
---
kernel/livepatch/core.c | 13 +
Move functions related to the actual patching of functions and objects
into a new patch.c file.
Signed-off-by: Josh Poimboeuf
Acked-by: Miroslav Benes
Reviewed-by: Petr Mladek
Reviewed-by: Kamalesh Babulal
---
kernel/livepatch/Makefile | 2 +-
kernel/livepatch/core.c | 202 +--
klp_patch_object()'s callers already ensure that the object is loaded,
so its call to klp_is_object_loaded() is unnecessary.
This will also make it possible to move the patching code into a
separate file.
Signed-off-by: Josh Poimboeuf
Acked-by: Miroslav Benes
Reviewed-by: Petr Mladek
Reviewed-
Once we have a consistency model, patches and their objects will be
enabled and disabled at different times. For example, when a patch is
disabled, its loaded objects' funcs can remain registered with ftrace
indefinitely until the unpatching operation is complete and they're no
longer in use.
It'
From: Miroslav Benes
Update a task's patch state when returning from a system call or user
space interrupt, or after handling a signal.
This greatly increases the chances of a patch operation succeeding. If
a task is I/O bound, it can be patched when returning from a system
call. If a task is
From: Jiri Slaby
Group the TIF thread flag bits by their inclusion in the _TIF_WORK and
_TIF_TRACE macros.
Signed-off-by: Jiri Slaby
Signed-off-by: Josh Poimboeuf
Reviewed-by: Miroslav Benes
---
arch/s390/include/asm/thread_info.h | 22 ++
1 file changed, 14 insertions(+)
Add the TIF_PATCH_PENDING thread flag to enable the new livepatch
per-task consistency model for powerpc. The bit getting set indicates
the thread has a pending patch which needs to be applied when the thread
exits the kernel.
The bit is included in the _TIF_USER_WORK_MASK macro so that
do_notify
Add the TIF_PATCH_PENDING thread flag to enable the new livepatch
per-task consistency model for x86_64. The bit getting set indicates
the thread has a pending patch which needs to be applied when the thread
exits the kernel.
The bit is placed in the _TIF_ALLWORK_MASK macro, which results in
exit
Create temporary stubs for klp_update_patch_state() so we can add
TIF_PATCH_PENDING to different architectures in separate patches without
breaking build bisectability.
Signed-off-by: Josh Poimboeuf
Reviewed-by: Petr Mladek
---
include/linux/livepatch.h | 5 -
kernel/livepatch/core.c | 3
The _TIF_ALLWORK_MASK macro automatically includes the least-significant
16 bits of the thread_info flags, which is less than obvious and tends
to create confusion and surprises when reading or modifying the code.
Define the flags explicitly.
Signed-off-by: Josh Poimboeuf
Reviewed-by: Petr Mlade
For live patching and possibly other use cases, a stack trace is only
useful if it can be assured that it's completely reliable. Add a new
save_stack_trace_tsk_reliable() function to achieve that.
Note that if the target task isn't the current task, and the target task
is allowed to run, then it
Here's v4, based on linux-next/master. Mostly minor changes this time,
primarily due to Petr's v3 comments.
v4:
- add warnings for "impossible" scenarios in __save_stack_trace_reliable()
- sort _TIF_ALLWORK_MASK flags
- move klp_transition_work to transition.c. This resulted in the following
On 19/01/17 21:50, Greg Kurz wrote:
The kernel API does not use anything from this header file.
Signed-off-by: Greg Kurz
Reviewed-by: Andrew Donnellan
--
Andrew Donnellan OzLabs, ADL Canberra
andrew.donnel...@au1.ibm.com IBM Australia Limited
The modversion symbol CRCs are emitted as ELF symbols, which allows us to
easily populate the kcrctab sections by relying on the linker to associate
each kcrctab slot with the correct value.
This has a couple of downsides:
- On architectures that support runtime relocation, a R__RELATIVE
relocat
The kernel API does not use anything from this header file.
Signed-off-by: Greg Kurz
---
drivers/misc/cxl/api.c |1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/misc/cxl/api.c b/drivers/misc/cxl/api.c
index 1b35e33d2434..bcc030eacab7 100644
--- a/drivers/misc/cxl/api.c
+++ b/drivers
On Mon, Jan 16, 2017 at 02:41:22PM -0600, Rob Herring wrote:
> The modalias sysfs attr is lacking a newline for DT aliases on platform
> devices. The macio and ibmebus correctly add the newline, but open code it.
> Introduce a new function, of_device_modalias(), that fills the buffer with
> the mod
On 19 January 2017 at 00:15, Linus Torvalds
wrote:
> On Wed, Jan 18, 2017 at 2:37 PM, Ard Biesheuvel
> wrote:
>>
>> For a ballpark number of 10,000 CRCs in the core kernel, this would
>> increase the size of the image by 40 KB for 32-bit architectures (and
>> if saving 40 KB is essential, chances
43 matches
Mail list logo