"plugged" virtually by a managing system
(BMC) is considered a physical attack or a remote attack in the context of
UEFI Secure Boot.
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center
Am Freitag, 15 Juli 2016, 18:03:35 schrieb Thiago Jung Bauermann:
> Am Freitag, 15 Juli 2016, 22:26:09 schrieb Arnd Bergmann:
> > However, the powerpc specific RTAS runtime services provide a similar
> > interface to the UEFI runtime support and allow to call into
> > binary
Am Freitag, 22 Juli 2016, 12:54:28 schrieb Michael Ellerman:
> Thiago Jung Bauermann writes:
> > So even if not ideal, the solution above is desirable for powerpc. We
> > would like to preserve the ability of allowing userspace to pass
> > parameters to the OS via the DTB, e
rmail/linuxppc-dev/2016-September/148898.html
elf_util_64.o is only built if CONFIG_WORD_SIZE=64. This is affects the
bisectabilty of many patches in the kexec_file_load series. Should I post a
new version rebased on powerpc/next?
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center
should fix it?
>
> I think I'd actually prefer it if purgatory didn't redefine the CFLAGS
> from scratch, so I'll see if Thiago can do that and send a new version.
I could move the purgatory inside arch/powerpc/boot and use its BOOTCFLAGS.
The needs of the purgatory and the boot wrapper are very similar. Would that
be better?
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center
Am Montag, 20 Juni 2016, 10:26:05 schrieb Dave Young:
> kexec_buf should go within #ifdef for kexec file like struct
> purgatory_info
>
> Other than that it looks good.
Great! Here it is.
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center
kexec_file: Generalize
This shows how kernel code can use the kexec buffer passing mechanism
to pass information to the next kernel.
This patch is not intended to be committed.
Signed-off-by: Thiago Jung Bauermann
---
include/linux/ima.h | 11 +
kernel/kexec_file.c | 4
The buffer hand-over mechanism allows the currently running kernel to pass
data to kernel that will be kexec'd via a kexec segment. The second kernel
can check whether the previous kernel sent data and retrieve it.
This is the architecture-specific part.
Signed-off-by: Thiago Jung Baue
Make kimage_load_normal_segment and kexec_update_segment share code
which they currently duplicate.
Signed-off-by: Thiago Jung Bauermann
---
kernel/kexec_core.c | 159 +++-
1 file changed, 95 insertions(+), 64 deletions(-)
diff --git a/kernel
kexec_update_segment allows a given segment in kexec_image to have
its contents updated. This is useful if the current kernel wants to
send information to the next kernel that is up-to-date at the time of
reboot.
Signed-off-by: Thiago Jung Bauermann
---
include/linux/kexec.h | 2 ++
kernel
rg/pipermail/kexec/2016-June/016078.html
Thiago Jung Bauermann (6):
kexec_file: Add buffer hand-over support for the next kernel
powerpc: kexec_file: Add buffer hand-over support for the next kernel
kexec_file: Allow skipping checksum calculation for some segments.
kexec_file: Add mechanis
purgatory checksum verification to fail
when the machine is rebooted.
As a bonus, we don't need to special-case the purgatory segment anymore
to avoid checksumming it.
Adjust call sites for the new argument.
Signed-off-by: Thiago Jung Bauermann
---
arch/powerpc/kernel/kexec_elf_64.c
hiago Jung Bauermann
---
include/linux/kexec.h | 40 ++
kernel/kexec_file.c | 79 +++
2 files changed, 119 insertions(+)
diff --git a/include/linux/kexec.h b/include/linux/kexec.h
index a08cd986b5a1..72db95c623b3 100644
purgatory.
Signed-off-by: Thiago Jung Bauermann
Cc: ke...@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
arch/powerpc/include/asm/elf_util.h | 1 +
arch/powerpc/include/asm/kexec_elf_64.h | 10 +
arch/powerpc/kernel/Makefile| 5 +-
arch/powerpc/kernel/elf_util_64.c
ating the ELF structs. These functions will be used in the next
patch in the series.
Signed-off-by: Thiago Jung Bauermann
Cc: ke...@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
arch/powerpc/include/asm/elf_util.h | 19 ++
arch/powerpc/kernel/Makefile| 2 +-
arch/powerpc/k
A-256 implementation.
Also, some formatting warnings found by checkpatch.pl were fixed.
Signed-off-by: Thiago Jung Bauermann
Cc: ke...@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
arch/powerpc/Makefile | 4 +
arch/powerpc/purgatory/.gitignore | 2 +
arch/po
the other adding kexec_locate_mem_hole.
- Patch "powerpc: Implement kexec_file_load.":
- Moved relocation changes and the arch_kexec_walk_mem implementation
to the next patch in the series.
- Removed pr_fmt from machine_kexec_64.c, since the patch doesn't add
any
kexec_locate_mem_hole will be used by the PowerPC kexec_file_load
implementation to find free memory for the purgatory stack.
Signed-off-by: Thiago Jung Bauermann
Cc: Eric Biederman
Cc: Dave Young
Cc: ke...@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
include/linux/kexec.h | 4
kexec_add_buffer uses kexec_buf.buffer and kexec_buf.bufsz to pass along
its own arguments buffer and bufsz, but since they aren't used anywhere
else, it's pointless.
Signed-off-by: Thiago Jung Bauermann
Cc: Eric Biederman
Cc: ke...@lists.infradead.org
Cc: linux-kernel@vger.kernel.or
et at its final location by adding an addr_base argument
to specify the address at which the section will be loaded, and rela,
loc_base and syms_base to point to the sections' contents.
Signed-off-by: Thiago Jung Bauermann
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Michael Ellerman
Cc:
Adds the basic machinery needed by kexec_file_load.
Signed-off-by: Josh Sklar
Signed-off-by: Thiago Jung Bauermann
Cc: ke...@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
arch/powerpc/Kconfig | 13 +
arch/powerpc/include/asm/systbl.h | 1 +
arch
Allow architectures to specify different memory walking functions for
kexec_add_buffer. Intel uses iomem to track reserved memory ranges,
but PowerPC uses the memblock subsystem.
Signed-off-by: Thiago Jung Bauermann
Cc: Eric Biederman
Cc: Dave Young
Cc: ke...@lists.infradead.org
Cc: linux
alled from
elf64_apply_relocate_add.
local_entry_offset and squash_toc_save_inst were only used by
apply_rellocate_add, so they were moved to elf_util_64.c as well.
Signed-off-by: Thiago Jung Bauermann
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Michael Ellerman
Cc: Torsten Duwe
C
Hello Eric,
Am Dienstag, 20 September 2016, 11:07:29 schrieb Eric W. Biederman:
> Thiago Jung Bauermann writes:
> > Am Samstag, 17 September 2016, 00:17:37 schrieb Eric W. Biederman:
> >> Thiago Jung Bauermann writes:
> > Is this what you had in mind?
>
> Sort of.
ARM, then. I verified that kexec_load
kept working on ppc64le with a kexec binary compiled with the original
struct kexec_segment definition, but apparently I got lucky.
I'll prepare a new version of the kexec buffer hand-over series which
doesn't touch struct kexec_segment.
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center
pth review of the change.
No UAPI header is touched by this patch series. That is because there are
two definitions of struct kexec_segment, one in include/linux/kexec.h and
the other one in include/uapi/linux/kexec.h. My patch changed the former.
I was unaware of the second definition in t
Am Mittwoch, 07 September 2016, 09:19:40 schrieb Eric W. Biederman:
> ebied...@xmission.com (Eric W. Biederman) writes:
> > Thiago Jung Bauermann writes:
> >> Hello,
> >>
> >> The purpose of this new version of the series is to fix a small issue
> &g
hiago Jung Bauermann
---
include/linux/kexec.h | 31 +++
kernel/kexec_file.c | 68 +++
2 files changed, 99 insertions(+)
diff --git a/include/linux/kexec.h b/include/linux/kexec.h
index 2a96292ee544..768245aa76bf 100644
--- a/in
This shows how kernel code can use the kexec buffer passing mechanism
to pass information to the next kernel.
This patch is not intended to be committed.
[a...@linux-foundation.org: coding-style fixes]
Signed-off-by: Thiago Jung Bauermann
Signed-off-by: Andrew Morton
Signed-off-by: Thiago
e use CONFIG_ARCH_MODIFIES_KEXEC_PURGATORY to
allow the powerpc purgatory to be protected by the checksum while still
preserving x86 behavior.
Signed-off-by: Thiago Jung Bauermann
---
arch/powerpc/purgatory/purgatory.c | 4 +-
arch/x86/Kconfig | 6 +++
arch/x86/purgatory/purgatory.c
is updated the checksum is recalculated and updated in the
kexec image.
Suggested-by: Mimi Zohar
Signed-off-by: Thiago Jung Bauermann
---
include/linux/kexec.h | 2 +
kernel/kexec_core.c | 5 -
kernel/kexec_file.c | 331
kernel
Patch "kexec_file: Add mechanism to update kexec segments.":
- Removed unnecessary "#include " in kexec_file.c.
- Round up memsz argument to PAGE_SIZE.
- Check if kexec_image is NULL in kexec_update_segment.
- Patch "IMA: Demonstration code for kexec buffer passing."
-
The buffer hand-over mechanism allows the currently running kernel to pass
data to kernel that will be kexec'd via a kexec segment. The second kernel
can check whether the previous kernel sent data and retrieve it.
This is the architecture-specific part.
Signed-off-by: Thiago Jung Baue
ORY
> > + bool
> > +
>
> The above should probably be in arch/Kconfig (with an appropriately
> changed comment) since it is used in generic code.
Thanks for your quick response! I'll make that change tomorrow and send an
updated version of just this patch.
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center
ORY
> > + bool
> > +
>
> The above should probably be in arch/Kconfig (with an appropriately
> changed comment) since it is used in generic code.
Here is the new version, with that change.
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center
Subject: [PAT
ould be static.
Also, since both places calling it are guarded by
CONFIG_PPC_TRANSACTIONAL_MEM, wouldn't it be cleaner if the #ifdef was here
instead and the #else block defined an empty static inline function? Then
the call sites wouldn't need to be guarded.
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center
Hi,
Am Dienstag, 26 Juli 2016, 21:24:29 schrieb Thiago Jung Bauermann:
> Notes:
> This is a new version of the last patch in this series which adds
> a function where each architecture can verify if the DTB is safe
> to load:
>
> int __weak arch_kexec_
mitation, cc'ing him
>
> I don't think it's ever worked so I wouldn't worry too much about
> supporting it. Fixing kexec-into-zImage and fixing the 32bit wrapper
> on 64bit BE kernel problem has been on my TODO list for a while, but
> it's not a priority.
Ok, thanks for your input.
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center
to free a NULL pointer.
Signed-off-by: Thiago Jung Bauermann
---
kernel/kexec_file.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
index 503bc2d348e5..037c321c5618 100644
--- a/kernel/kexec_file.c
+++ b/kernel/kexec_file.c
@@ -887,7 +887,10 @@ i
heck if kexec_image is NULL in kexec_update_segment.
- Patch "IMA: Demonstration code for kexec buffer passing."
- Avoid registering reboot notifier again if kexec_file_load is called
more than once.
Thiago Jung Bauermann (5):
kexec_file: Add buffer hand-over support for the next kernel
kexec_update_segment allows a given segment in kexec_image to have
its contents updated. This is useful if the current kernel wants to
send information to the next kernel that is up-to-date at the time of
reboot.
Signed-off-by: Thiago Jung Bauermann
---
include/linux/kexec.h | 2 ++
kernel
nated initializers. Therefore,
there is no behavior change with this patch and all segments except the
purgatory are checksummed.
Signed-off-by: Thiago Jung Bauermann
---
include/linux/kexec.h | 23 ++-
kernel/kexec_file.c | 15 +++
2 files changed, 21 insertions(+
hiago Jung Bauermann
---
include/linux/kexec.h | 31 +++
kernel/kexec_file.c | 68 +++
2 files changed, 99 insertions(+)
diff --git a/include/linux/kexec.h b/include/linux/kexec.h
index d419d0e51fe5..16561e96a6d7 100644
--- a/in
This shows how kernel code can use the kexec buffer passing mechanism
to pass information to the next kernel.
This patch is not intended to be committed.
Signed-off-by: Thiago Jung Bauermann
---
include/linux/ima.h | 11 +
kernel/kexec_file.c | 4
ce the "ima: carry the
> measurement list across kexec" series has stabilised, I should drop the
> demo patch and also grab those? If so, pelase start cc'ing me.
I'm not sure how Mimi is planning to upstream that series.
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center
The buffer hand-over mechanism allows the currently running kernel to pass
data to kernel that will be kexec'd via a kexec segment. The second kernel
can check whether the previous kernel sent data and retrieve it.
This is the architecture-specific part.
Signed-off-by: Thiago Jung Baue
://patchwork.ozlabs.org/patch/771293/
Signed-off-by: Thiago Jung Bauermann
---
Notes:
This patch applies on tip/smp/hotplug, it should probably be carried there.
arch/powerpc/include/asm/topology.h | 6 ++
arch/powerpc/kernel/rtasd.c | 2 +-
arch/powerpc/mm/numa.c | 22
Hello Mimi,
Thanks for your review, and for queuing the other patches in this series.
Mimi Zohar writes:
> On Wed, 2017-06-07 at 22:49 -0300, Thiago Jung Bauermann wrote:
>> This patch introduces the modsig keyword to the IMA policy syntax to
>> specify that a given hook should
Michael Ellerman writes:
> Thiago Jung Bauermann writes:
>
>> Calling arch_update_cpu_topology from a CPU hotplug state machine callback
>> hits a deadlock because the function tries to get a read lock on
>> cpu_hotplug_lock while the state machine still holds a write
This patch actually implements the appraise_type=modsig option, allowing
IMA to read and verify modsig signatures
Signed-off-by: Thiago Jung Bauermann
---
security/integrity/ima/ima.h | 17 +++--
security/integrity/ima/ima_appraise.c | 119 --
security
validate_module_signature without having to depend on
CONFIG_MODULE_SIG.
Signed-off-by: Thiago Jung Bauermann
---
include/linux/module.h | 3 --
include/linux/module_signature.h | 47 +
init/Kconfig | 6 +++-
kernel/Makefile | 2 +-
kernel
g verification fails.
- Pass NULL xattr_value to evm_verifyxattr even in the case of xattr
signature in ima_appraise_measurement (suggested by Mimi Zohar).
- Use switch statement provided by Mimi Zohar to check result of
evm_verifyxattr.
- If the modsig verification succeeds, copy the
because the actual modsig implementation
will be introduced in a separate patch.
Suggested-by: Mimi Zohar
Signed-off-by: Thiago Jung Bauermann
---
Documentation/ABI/testing/ima_policy | 6 +-
security/integrity/ima/Kconfig | 10 +
security/integrity/ima/Makefile | 1
that it can be easily
dropped if the churn and conflict potential is deemed not worth it.
Confirmed that the patch is correct by comparing the object files from
before and after the patch. They are identical.
Signed-off-by: Thiago Jung Bauermann
---
security/integrity/evm/evm_crypto.c
, since in most places the array
doesn't hold a digest.
A separate struct evm_xattr is introduced, with the original definition of
evm_ima_xattr_data to be used in the places that actually expect that
definition.
Signed-off-by: Thiago Jung Bauermann
---
security/integrity/evm/evm_
ima_read_modsig will need it so that it can show an error message.
Signed-off-by: Thiago Jung Bauermann
---
security/integrity/ima/ima.h| 2 ++
security/integrity/ima/ima_policy.c | 12 ++--
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/security/integrity/ima
This avoids a dependency cycle in CONFIG_IMA_APPRAISE_MODSIG (introduced by
a later patch in this series): it will select CONFIG_MODULE_SIG_FORMAT
which in turn selects CONFIG_KEYS. Kconfig then complains that
CONFIG_INTEGRITY_SIGNATURE depends on CONFIG_KEYS.
Signed-off-by: Thiago Jung Bauermann
then the measure step was already
completed and would need to be done again in case the template includes the
signature.
To avoid this problem, do the appraisal first so that the correct signature
is stored by the template in the measure step.
Suggested-by: Mimi Zohar
Signed-off-by: Thiago
Add modsig support for templates which require the contents of the file
signature to be included in the measurement list.
Suggested-by: Mimi Zohar
Signed-off-by: Thiago Jung Bauermann
---
security/integrity/ima/ima.h | 8
security/integrity/ima/ima_api.c | 8
correct by comparing the object file from
before and after the patch. They are identical.
Signed-off-by: Thiago Jung Bauermann
---
security/integrity/ima/ima_appraise.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/security/integrity/ima/ima_appraise.c
b/security/integrity
The "goto out" statement doesn't have any purpose since there's no cleanup
to be done when returning early, so remove it. This also makes the rc
variable unnecessary so remove it as well.
Also, the xattr_len and fmt variables are redundant so remove them as well.
Signed
This is the code needed by IMA-appraise to work with modsig signatures.
It will be used by the next patch.
Signed-off-by: Thiago Jung Bauermann
---
security/integrity/ima/Kconfig | 3 +
security/integrity/ima/ima.h| 34 +++
security/integrity/ima/ima_modsig.c | 119
IMA will need to obtain the keyring used to verify file signatures so that
it can verify the module-style signature appended to files.
Signed-off-by: Thiago Jung Bauermann
---
security/integrity/digsig.c| 28 +++-
security/integrity/integrity.h | 1 +
2 files
verify_pkcs7_message_signature which takes a struct
pkcs7_message for verification instead of the raw bytes that
verify_pkcs7_signature takes.
Signed-off-by: Thiago Jung Bauermann
---
certs/system_keyring.c| 60 +--
crypto/asymmetric_keys/pkcs7_parser.c | 12
Replace nested ifs in the EVM xattr verification logic with a switch
statement, making the code easier to understand.
Also, add comments to the if statements in the out section.
Signed-off-by: Mimi Zohar
Signed-off-by: Thiago Jung Bauermann
---
security/integrity/ima/ima.h | 5
d not actually required, just don't do it.
Suggested-by: Mimi Zohar
Signed-off-by: Thiago Jung Bauermann
---
security/integrity/ima/ima_appraise.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/security/integrity/ima/ima_appraise.c
b/security/integrity/ima/ima_apprai
.
Confirmed that the patch is correct by comparing the object files from
before and after the patch. They are identical.
Signed-off-by: Thiago Jung Bauermann
---
security/integrity/ima/ima_appraise.c | 11 +--
security/integrity/ima/ima_template_lib.c | 2 +-
2 files changed, 6
object files from
before and after the patch. They are identical.
Signed-off-by: Thiago Jung Bauermann
---
security/integrity/evm/evm_posix_acl.c | 8
security/integrity/ima/ima_fs.c| 6 +++---
security/integrity/ima/ima_queue.c | 6 +++---
3 files changed, 10 insertions
Hello Mimi,
Thanks for your review.
Mimi Zohar writes:
> On Tue, 2017-10-17 at 22:53 -0200, Thiago Jung Bauermann wrote:
>
>> diff --git a/security/integrity/ima/ima_main.c
>> b/security/integrity/ima/ima_main.c
>> index 6a2d960fbd92..0d3390de7432 100644
>>
Mimi Zohar writes:
> On Tue, 2017-10-17 at 22:53 -0200, Thiago Jung Bauermann wrote:
>> IMA will use the module_signature format for append signatures, so export
>> the relevant definitions and factor out the code which verifies that the
>> appended signature trailer
ivery: UFFDIO_API: Invalid argument
testing events (fork, remap, remove): userfaults: 160
# echo $?
0
While at it, also improve the error message of the ioctl(UFFDIO_API) call.
Signed-off-by: Thiago Jung Bauermann
---
tools/testing/selftests/vm/userfaultfd.c
at feature.
Signed-off-by: Thiago Jung Bauermann
---
tools/testing/selftests/vm/userfaultfd.c | 36 +++-
1 file changed, 31 insertions(+), 5 deletions(-)
diff --git a/tools/testing/selftests/vm/userfaultfd.c
b/tools/testing/selftests/vm/userfaultfd.c
index c8
tfd anon 30 1
nr_pages: 480, nr_pages_per_cpu: 120
userfaultfd syscall not available in this kernel
Signed-off-by: Thiago Jung Bauermann
---
tools/testing/selftests/vm/userfaultfd.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/vm/userfaultf
e if shmem doesn't support zeropage"
- Ignore lack of UFFDIO_ZEROPAGE in userfaultfd_events_test() and
userfaultfd_stress().
- Make userfaultfd_zeropage_test() return KSFT_SKIP if UFFDIO_ZEROPAGE
isn't supported.
Thiago Jung Bauermann (4):
userfaultfd: selftest: Fix checking of
After:
# ./userfaultfd shmem 10 10
nr_pages: 160, nr_pages_per_cpu: 40
userfaultfd syscall not available in this kernel: Function not implemented
# echo $?
4
Suggested-by: Mike Rapoport
Signed-off-by: Thiago Jung Bauermann
---
tools/testing/selftests/vm/userfaultfd.c | 8 +---
1 file ch
Shuah Khan writes:
> On 07/24/2018 08:57 PM, Thiago Jung Bauermann wrote:
>> Commit 3c07aaef6598 ("selftests: kselftest: change KSFT_SKIP=4 instead of
>> KSFT_PASS") reverted commit 11867a77eb85 ("selftests: kselftest framework:
>> change skip exit code to
Hello Mike,
Mike Rapoport writes:
> Hi,
>
> On Fri, Aug 03, 2018 at 07:00:46PM -0300, Thiago Jung Bauermann wrote:
>> If userfaultfd runs on a system that doesn't support UFFDIO_ZEROPAGE for
>> shared memory, it currently ends with error code 1 which
tfd anon 30 1
nr_pages: 480, nr_pages_per_cpu: 120
userfaultfd syscall not available in this kernel
Signed-off-by: Thiago Jung Bauermann
Reviewed-by: Mike Rapoport
---
tools/testing/selftests/vm/userfaultfd.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/to
memory
areas.
Signed-off-by: Mike Rapoport
Signed-off-by: Thiago Jung Bauermann
---
tools/testing/selftests/vm/userfaultfd.c | 63 +---
1 file changed, 34 insertions(+), 29 deletions(-)
diff --git a/tools/testing/selftests/vm/userfaultfd.c
b/tools/testing/selftests/vm
After:
# ./userfaultfd shmem 10 10
nr_pages: 160, nr_pages_per_cpu: 40
userfaultfd syscall not available in this kernel: Function not implemented
# echo $?
4
Suggested-by: Mike Rapoport
Signed-off-by: Thiago Jung Bauermann
Acked-by: Mike Rapoport
---
tools/testing/selftests/vm/userfaultfd.
ivery: UFFDIO_API: Invalid argument
testing events (fork, remap, remove): userfaults: 160
# echo $?
0
While at it, also improve the error message of the ioctl(UFFDIO_API) call.
Signed-off-by: Thiago Jung Bauermann
Acked-by: Mike Rapoport
---
tools/testing/selftests/vm/userfaultfd.c
oport (1):
userfaultfd: selftest: make supported range ioctl verification more
robust
Thiago Jung Bauermann (3):
userfaultfd: selftest: Fix checking of userfaultfd_open() result
userfaultfd: selftest: Skip test if userfaultfd() syscall not
supported
userfaultfd: selftest: Skip te
> return dfa;
>
> -fail:
> aa_put_dfa(dfa);
> return ERR_PTR(-EPROTO);
> }
Shouldn't the two lines after the label be removed as well? IIUC they're
unreachable now.
--
Thiago Jung Bauermann
IBM Linux Technology Center
Hello Mike,
Thanks for promptly reviewing the patches.
Mike Rapoport writes:
> Hi,
>
> On Tue, Jul 24, 2018 at 11:42:07PM -0300, Thiago Jung Bauermann wrote:
>> If the userfaultfd test is run on a kernel with CONFIG_USERFAULTFD=n, it
>> will report that the system call
Mike Rapoport writes:
> Hi,
>
> On Tue, Jul 24, 2018 at 11:42:08PM -0300, Thiago Jung Bauermann wrote:
>> If userfaultfd runs on a system that doesn't support some feature it is
>> trying to test, it currently ends with error code 1 which indicates
>> test f
Mike Rapoport writes:
> Hi,
>
> On Tue, Jul 24, 2018 at 11:42:09PM -0300, Thiago Jung Bauermann wrote:
>> If userfaultfd runs on a system that doesn't support UFFDIO_ZEROPAGE for
>> shared memory, it currently ends with error code 1 which indicates test
>>
le at it, also improve the error message of the ioctl(UFFDIO_API) call.
Signed-off-by: Thiago Jung Bauermann
---
tools/testing/selftests/vm/userfaultfd.c | 41 ++--
1 file changed, 29 insertions(+), 12 deletions(-)
diff --git a/tools/testing/selftests/vm/userfaultfd
emory
# echo $?
1
This is a real failure, but expected so signal that to the test harness:
# ./userfaultfd shmem 10 10
nr_pages: 160, nr_pages_per_cpu: 80
bounces: 9, mode: rnd poll, UFFDIO_ZEROPAGE unsupported in shmem VMAs
# echo $?
2
Signed-off-by: Thiago Jung Bauermann
---
tools/te
Hello,
A tester ran the upstream selftest on a distro kernel and sounded the alarm when
it reported failures for features which aren't included in that kernel.
This patch set improves the test behavior in that scenario.
Thiago Jung Bauermann (3):
userfaultfd: selftest: Fix checki
tfd anon 30 1
nr_pages: 480, nr_pages_per_cpu: 120
userfaultfd syscall not available in this kernel
Signed-off-by: Thiago Jung Bauermann
---
tools/testing/selftests/vm/userfaultfd.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/vm/userfaultf
Commit 3c07aaef6598 ("selftests: kselftest: change KSFT_SKIP=4 instead of
KSFT_PASS") reverted commit 11867a77eb85 ("selftests: kselftest framework:
change skip exit code to 0") but missed removing the comment which that
commit added, so do that now.
Signed-off-by: T
ubmitting these tests
separately from the one coming from x86 so here they are.
Thiago Jung Bauermann (2):
selftests/powerpc: Add ptrace tests for Protection Key registers
selftests/powerpc: Add core file test for Protection Key registers
tools/testing/selftests/powerpc/include/reg.h
This test verifies that the AMR, IAMR and UAMOR are being written to a
process' core file.
Signed-off-by: Thiago Jung Bauermann
---
tools/testing/selftests/powerpc/ptrace/Makefile| 5 +-
tools/testing/selftests/powerpc/ptrace/core-pkey.c | 460 +
2 files changed
This test exercises read and write access to the AMR, IAMR and UAMOR.
Signed-off-by: Thiago Jung Bauermann
---
tools/testing/selftests/powerpc/include/reg.h | 1 +
tools/testing/selftests/powerpc/ptrace/Makefile| 5 +-
tools/testing/selftests/powerpc/ptrace/child.h | 130
- dprintf4("read_pkey_reg(line=%d) pkey_reg: %016lx shadow: %016lx\n",
+ dprintf4("read_pkey_reg(line=%d) pkey_reg: "PKEY_REG_FMT
+ " shadow: "PKEY_REG_FMT"\n",
line, pkey_reg, shadow_pkey_reg);
assert(pkey_reg == shadow_pkey_reg);
--
Thiago Jung Bauermann
IBM Linux Technology Center
Ram Pai writes:
> On Wed, Apr 04, 2018 at 06:41:01PM -0300, Thiago Jung Bauermann wrote:
>>
>> Hello Ram,
>>
>> Ram Pai writes:
>>
>> > Applications need the ability to associate an address-range with some
>> > key and latter rever
gt; an architecture-defined kexec_file_ops array. So let's factor them out.
>>
>> Signed-off-by: AKASHI Takahiro
>> Cc: Dave Young
>> Cc: Vivek Goyal
>> Cc: Baoquan He
>> Cc: Michael Ellerman
>> Cc: Thiago Jung Bauermann
>> ---
>> arch
loop in pseries_cpu_die() a bit fragile. I describe
the race in the patch description.
My solution to make the race less tight is to make the CPU driving the
unplug to only start the busy loop only after the CPU being unplugged is
in the CPU_STATE_OFFLINE state. At that point, we know that it ei
0003a4a84800 (unreliable)
> [c61aba20] [c001e24c] __switch_to+0x2dc/0x430
> [c61aba80] [c0e5fb94] __schedule+0x3d4/0xa20
> [c61abb50] [c0e6022c] schedule+0x4c/0xc0
> [c61abb80] [c0e64ffc] schedule_timeout+0x1dc/0x4e0
> [c61abc80] [c01af40c] rcu_gp_kthread+0xc3c/0x11f0
> [c61abdb0] [c013c7c8] kthread+0x168/0x1b0
> [c61abe20] [c000b658] ret_from_kernel_thread+0x5c/0x64
I don't know what to make of CPU 72. :-) Perhaps it's the one making
the other "rogue" RTAS call interfering with stop-self in CPU 105?
It must be some RTAS call made with rtas_call_unlocked, because CPU 88
is holding the RTAS lock.
-- Thiago Jung Bauermann
IBM Linux Technology Center
This test verifies that the AMR, IAMR and UAMOR are being written to a
process' core file.
Signed-off-by: Thiago Jung Bauermann
---
tools/testing/selftests/powerpc/ptrace/Makefile| 5 +-
tools/testing/selftests/powerpc/ptrace/core-pkey.c | 461 +
2 files changed
1 - 100 of 674 matches
Mail list logo