Re: [PATCH v2 1/4] crypto x86/sha1_mb: Fix load failure

2016-02-02 Thread Rui Wang
On Monday, February 1, 2016 4:18 PM, Herbert Xu wrote: > > On Wed, Jan 27, 2016 at 05:08:35PM +0800, Rui Wang wrote: >> >> +static int sha1_mb_async_import(struct ahash_request *req, const void >> +*in) { >> +struct ahash_request *mcryptd_req = ahash_re

Re: [PATCH v2 4/4] crypto: testmgr - Add a test case for import()/export()

2016-02-02 Thread Rui Wang
On Mon, Feb 1, 2016 4:22 PM Herbert Xu wrote: > > On Wed, Jan 27, 2016 at 05:08:38PM +0800, Rui Wang wrote: > > > > diff --git a/crypto/testmgr.h b/crypto/testmgr.h index > > da0a8fd..451e7eb 100644 > > --- a/crypto/testmgr.h > > +++ b/crypto/testmgr.h >

Re: [PATCH v2 4/4] crypto: testmgr - Add a test case for import()/export()

2016-02-02 Thread Rui Wang
On Tue, Feb 2, 2016 10:45 PM Herbert Xu wrote: > > On Tue, Feb 02, 2016 at 10:16:34PM +0800, Rui Wang wrote: > > > > I initially made it unconditional, but then I found that it can easily > > hang the machine during boot due to any import/export bug in any of > > th

[PATCH v2 0/4] Fix sha1_mb failure and testing import()/export()

2016-01-27 Thread Rui Wang
sha1_mb. patch04 adds a test case for import() and export(). A hash algo's import()/export() can be tested by simply adding .partial = 1 to its corresponding struct hash_testvec where .np > 1. v2: Leverage template[i].np in the test case as suggested by Tim Chen. Rui Wang (4): crypto x86

[PATCH v2 1/4] crypto x86/sha1_mb: Fix load failure

2016-01-27 Thread Rui Wang
modprobe sha1_mb fails with the following message: modprobe: ERROR: could not insert 'sha1_mb': No such device It is because it needs to set its statesize and implement its import() and export() interface. Signed-off-by: Rui Wang --- arch/x86/crypto/sha-mb/sha1

[PATCH v2 2/4] crypto: mcryptd - Fix load failure

2016-01-27 Thread Rui Wang
mcryptd_create_hash() fails by returning -EINVAL, causing any driver using mcryptd to fail to load. It is because it needs to set its statesize properly. Signed-off-by: Rui Wang --- crypto/mcryptd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/crypto/mcryptd.c b/crypto/mcryptd.c index

[PATCH v2 3/4] crypto: algif_hash - wait for crypto_ahash_init() to complete

2016-01-27 Thread Rui Wang
hash_sendmsg/sendpage() need to wait for the completion of crypto_ahash_init() otherwise it can cause panic. Signed-off-by: Rui Wang --- crypto/algif_hash.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crypto/algif_hash.c b/crypto/algif_hash.c index b4c24fe..83dc095

[PATCH v2 4/4] crypto: testmgr - Add a test case for import()/export()

2016-01-27 Thread Rui Wang
Modify __test_hash() so that hash import/export can be tested from within the kernel by simply adding .partial = 1 to a hash algo's struct hash_testvec where .np > 1. v2: Leverage template[i].np as suggested by Tim Chen Signed-off-by: Rui Wang --- crypto/testmgr

[PATCH v3 4/4] crypto: testmgr - Add a test case for import()/export()

2016-02-03 Thread Rui Wang
Modify __test_hash() so that hash import/export can be tested from within the kernel. The test is unconditionally done when a struct hash_testvec has its .np > 1. v3: make the test unconditional v2: Leverage template[i].np as suggested by Tim Chen Signed-off-by: Rui Wang --- crypto/testmg

[PATCH] x86/mpx/selftests: Fix wrong bounds with old _sigfault

2017-12-18 Thread Rui Wang
adow bounds for register 0 Fix it by using the correct offset of _lower/_upper in _sigfault. RHEL needs this patch to work. Fixes: e754aedc26ef ("x86/mpx, selftests: Add MPX self test") Signed-off-by: Rui Wang --- tools/testing/selftests/x86/mpx-mini-test.c | 27 ++

584c5c422f6c ("x86/ioapic: Support hot-removal of IOAPICs present during boot")

2016-09-09 Thread Rui Wang
On Saturday, September 10, 2016 6:07 AM, Borislav Petkov wrote: > > Hi, > > commit in $Subject from tip breaks booting on my SNB test box, it freezes > somewhere very early during boot. When I revert the aforementioned > commit ontop of Linus' master + tip/master from today, it boots fine. > > A

Re: 584c5c422f6c ("x86/ioapic: Support hot-removal of IOAPICs present during boot")

2016-09-10 Thread Rui Wang
On Sat, Sep 10, 2016 7:28 PM, Borislav Petkov wrote: > > 8143ef50 : > 8143ef50: e8 6b 16 42 00 callq 818605c0 > <__fentry__> > 8143ef55: 55 push %rbp > 8143ef56: 48 89 e5mov%rsp,%rbp > f

Re: 584c5c422f6c ("x86/ioapic: Support hot-removal of IOAPICs present during boot")

2016-09-10 Thread Rui Wang
On Sat, Sep 10, 2016 10:31 PM, Borislav Petkov wrote: > > On Sat, Sep 10, 2016 at 09:11:30PM +0800, Rui Wang wrote: > > Thanks for the analysis. Looks like acpi_gbl_root_node == 0. It is > > Is ACPI_HANDLE(root_bus->bridge) == ACPI_ROOT_OBJECT? > > Because this is wha

[PATCH] x86/ioapic: Ignore root bridges without a companion ACPI device

2016-09-10 Thread Rui Wang
Some PCI root bridges don't have a corresponding ACPI device. This can be the case on some old platforms. Don't call acpi_ioapic_add() on these bridges because they can't support ioapic hotplug. v2: Per Boris's review, removed the unnecessary local var; refined comment Sig

[PATCH v3 0/5] Fixing a set of bugs for ioapic hotplug

2016-08-16 Thread Rui Wang
On Wed, Aug 17, 2016 8:36 AM Rafael J. Wysocki wrote: > On Wednesday, August 10, 2016 12:01:53 PM Rui Wang wrote: > > A set of patches fixing bugs found while testing IOAPIC hotplug. > > This should have been posted to the x...@kernel.org list too for the benefit > of the mai

[PATCH v4 3/5] x86/ioapic: Fix setup_res() failing to get resource

2016-08-17 Thread Rui Wang
acpi_dev_filter_resource_type() returns 0 on success, and 1 on failure. A return value of zero means there's a matching resource, so we should continue within setup_res() to get the resource. Signed-off-by: Rui Wang --- drivers/acpi/ioapic.c | 2 +- 1 file changed, 1 insertion(+), 1 del

[PATCH v4 0/5] Fixing a set of bugs for ioapic hotplug

2016-08-17 Thread Rui Wang
ch so they wouldn't obscure the meat of the change, i.e., the addition of calls to acpi_ioapic_add()." * Removed acpi_ioapic_add() as an exported symbol. * Fixed some typos, and s/acpi/ACPI/, s/ioapic/IOAPIC/ throughout. * Fixed a warning from 0-day testing. Rui Wang (5): x8

[PATCH v4 5/5] x86/ioapic: Fix ioapic failing to request resource

2016-08-17 Thread Rui Wang
ecf). Fix it by using insert_resource() which can request resources by taking the conflicting resource as the parent. Signed-off-by: Rui Wang --- drivers/acpi/ioapic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/ioapic.c b/drivers/acpi/ioapic.c inde

[PATCH v4 1/5] x86/ioapic: Change prototype of acpi_ioapic_add()

2016-08-17 Thread Rui Wang
Change the argument of acpi_ioapic_add() to a generic ACPI handle, and move its prototype from drivers/acpi/internal.h to include/linux/acpi.h so that it can be called from outside the pci_root driver. Signed-off-by: Rui Wang --- drivers/acpi/internal.h | 2 -- drivers/acpi/ioapic.c | 6

[PATCH v4 2/5] x86/ioapic: Support hot-removal of IOAPICs present during boot

2016-08-17 Thread Rui Wang
IOAPICs present during system boot aren't added to ioapic_list, thus are unable to be hot-removed. Fix it by calling acpi_ioapic_add() during root bus enumeration. Signed-off-by: Rui Wang Acked-by: Bjorn Helgaas --- drivers/acpi/pci_root.c | 10 ++ drivers/pci/setup-bus.c | 5 +++

[PATCH v4 4/5] x86/ioapic: Fix lost IOAPIC resource after hot-removal and hotadd

2016-08-17 Thread Rui Wang
appears in "_CRS" of each IOAPIC device. Both ranges should be claimed from /proc/iomem for exclusive use. Signed-off-by: Rui Wang --- drivers/acpi/ioapic.c | 36 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/drivers/acpi/ioapic.c

[tip:x86/urgent] x86/ioapic: Fix wrong pointers in ioapic_setup_resources()

2016-06-10 Thread tip-bot for Rui Wang
Commit-ID: 0e1c672041819474181a41ce07e4734750789170 Gitweb: http://git.kernel.org/tip/0e1c672041819474181a41ce07e4734750789170 Author: Rui Wang AuthorDate: Wed, 8 Jun 2016 14:59:52 +0800 Committer: Thomas Gleixner CommitDate: Fri, 10 Jun 2016 11:41:47 +0200 x86/ioapic: Fix wrong

[tip:x86/apic] x86/ioapic: Simplify ioapic_setup_resources()

2016-06-10 Thread tip-bot for Rui Wang
Commit-ID: 0286d538082b854b4e1f05b29c23556fa344e145 Gitweb: http://git.kernel.org/tip/0286d538082b854b4e1f05b29c23556fa344e145 Author: Rui Wang AuthorDate: Wed, 8 Jun 2016 14:59:53 +0800 Committer: Thomas Gleixner CommitDate: Fri, 10 Jun 2016 11:43:52 +0200 x86/ioapic: Simplify

[tip:x86/apic] x86/ioapic: Fix incorrect pointers in ioapic_setup_resources()

2016-06-10 Thread tip-bot for Rui Wang
Commit-ID: 3d98217b6726e0c342ac6363346bd9751fd61ec9 Gitweb: http://git.kernel.org/tip/3d98217b6726e0c342ac6363346bd9751fd61ec9 Author: Rui Wang AuthorDate: Wed, 8 Jun 2016 14:59:52 +0800 Committer: Ingo Molnar CommitDate: Fri, 10 Jun 2016 13:55:03 +0200 x86/ioapic: Fix incorrect

[tip:x86/urgent] x86/ioapic: Fix incorrect pointers in ioapic_setup_resources()

2016-06-10 Thread tip-bot for Rui Wang
Commit-ID: 9d98bcec731756b8688b59ec998707924d716d7b Gitweb: http://git.kernel.org/tip/9d98bcec731756b8688b59ec998707924d716d7b Author: Rui Wang AuthorDate: Wed, 8 Jun 2016 14:59:52 +0800 Committer: Ingo Molnar CommitDate: Fri, 10 Jun 2016 14:45:54 +0200 x86/ioapic: Fix incorrect

[tip:x86/apic] x86/ioapic: Simplify ioapic_setup_resources()

2016-06-10 Thread tip-bot for Rui Wang
Commit-ID: 4855531eb8582a98cb905d2baf86021254d7a675 Gitweb: http://git.kernel.org/tip/4855531eb8582a98cb905d2baf86021254d7a675 Author: Rui Wang AuthorDate: Wed, 8 Jun 2016 14:59:53 +0800 Committer: Ingo Molnar CommitDate: Fri, 10 Jun 2016 14:48:18 +0200 x86/ioapic: Simplify

[tip:x86/urgent] x86/PCI: Implement pcibios_release_device to release IRQ from IOAPIC

2017-03-01 Thread tip-bot for Rui Wang
Commit-ID: 153654dbe595a68845ba14d5b0bfe299fa6a7e99 Gitweb: http://git.kernel.org/tip/153654dbe595a68845ba14d5b0bfe299fa6a7e99 Author: Rui Wang AuthorDate: Tue, 28 Feb 2017 21:34:28 +0800 Committer: Thomas Gleixner CommitDate: Wed, 1 Mar 2017 10:51:41 +0100 x86/PCI: Implement

[tip:x86/urgent] x86/ioapic: Split IOAPIC hot-removal into two steps

2017-03-01 Thread tip-bot for Rui Wang
Commit-ID: f2ae5da726172fcf82f7be801489dd585f6a38eb Gitweb: http://git.kernel.org/tip/f2ae5da726172fcf82f7be801489dd585f6a38eb Author: Rui Wang AuthorDate: Tue, 28 Feb 2017 21:34:29 +0800 Committer: Thomas Gleixner CommitDate: Wed, 1 Mar 2017 10:51:41 +0100 x86/ioapic: Split IOAPIC

[tip:x86/apic] x86/ioapic: Change prototype of acpi_ioapic_add()

2016-08-18 Thread tip-bot for Rui Wang
Commit-ID: fe7bd58f5d25d5d655b1da4a084cc4ef6f085fee Gitweb: http://git.kernel.org/tip/fe7bd58f5d25d5d655b1da4a084cc4ef6f085fee Author: Rui Wang AuthorDate: Wed, 17 Aug 2016 16:00:33 +0800 Committer: Ingo Molnar CommitDate: Thu, 18 Aug 2016 11:45:18 +0200 x86/ioapic: Change prototype

[tip:x86/apic] x86/ioapic: Fix lost IOAPIC resource after hot-removal and hotadd

2016-08-18 Thread tip-bot for Rui Wang
Commit-ID: 162b83bd5f1d7124e21da78bcf2685b9824d9ef0 Gitweb: http://git.kernel.org/tip/162b83bd5f1d7124e21da78bcf2685b9824d9ef0 Author: Rui Wang AuthorDate: Wed, 17 Aug 2016 16:00:36 +0800 Committer: Ingo Molnar CommitDate: Thu, 18 Aug 2016 11:45:18 +0200 x86/ioapic: Fix lost IOAPIC

[tip:x86/apic] x86/ioapic: Fix setup_res() failing to get resource

2016-08-18 Thread tip-bot for Rui Wang
Commit-ID: 6ab7eba5db93c11d61f6f7fbe21edbc875b26c1a Gitweb: http://git.kernel.org/tip/6ab7eba5db93c11d61f6f7fbe21edbc875b26c1a Author: Rui Wang AuthorDate: Wed, 17 Aug 2016 16:00:35 +0800 Committer: Ingo Molnar CommitDate: Thu, 18 Aug 2016 11:45:18 +0200 x86/ioapic: Fix setup_res

[tip:x86/apic] x86/ioapic: Fix IOAPIC failing to request resource

2016-08-18 Thread tip-bot for Rui Wang
Commit-ID: 624cad9d2907a0788b56e3ca664c5d7d02645ed4 Gitweb: http://git.kernel.org/tip/624cad9d2907a0788b56e3ca664c5d7d02645ed4 Author: Rui Wang AuthorDate: Wed, 17 Aug 2016 16:00:37 +0800 Committer: Ingo Molnar CommitDate: Thu, 18 Aug 2016 11:45:19 +0200 x86/ioapic: Fix IOAPIC failing

[tip:x86/apic] x86/ioapic: Support hot-removal of IOAPICs present during boot

2016-08-18 Thread tip-bot for Rui Wang
Commit-ID: 584c5c422f6c749ced1e0bc3c6837f650f64e1e1 Gitweb: http://git.kernel.org/tip/584c5c422f6c749ced1e0bc3c6837f650f64e1e1 Author: Rui Wang AuthorDate: Wed, 17 Aug 2016 16:00:34 +0800 Committer: Ingo Molnar CommitDate: Thu, 18 Aug 2016 11:45:18 +0200 x86/ioapic: Support hot

[tip:x86/pti] selftests/x86/mpx: Fix incorrect bounds with old _sigfault

2018-02-14 Thread tip-bot for Rui Wang
Commit-ID: 961888b1d76d84efc66a8f5604b06ac12ac2f978 Gitweb: https://git.kernel.org/tip/961888b1d76d84efc66a8f5604b06ac12ac2f978 Author: Rui Wang AuthorDate: Mon, 18 Dec 2017 16:34:10 +0800 Committer: Ingo Molnar CommitDate: Thu, 15 Feb 2018 01:15:52 +0100 selftests/x86/mpx: Fix

[tip:x86/pti] selftests/x86/mpx: Fix incorrect bounds with old _sigfault

2018-02-13 Thread tip-bot for Rui Wang
Commit-ID: d101567aec6653cc372af3b9b957299fee06cca8 Gitweb: https://git.kernel.org/tip/d101567aec6653cc372af3b9b957299fee06cca8 Author: Rui Wang AuthorDate: Mon, 18 Dec 2017 16:34:10 +0800 Committer: Ingo Molnar CommitDate: Tue, 13 Feb 2018 19:20:05 +0100 selftests/x86/mpx: Fix

[tip:x86/apic] x86/ioapic: Ignore root bridges without a companion ACPI device

2016-09-10 Thread tip-bot for Rui Wang
Commit-ID: d9c149d6ce1a94de578a4e323f6881fcb6b986ab Gitweb: http://git.kernel.org/tip/d9c149d6ce1a94de578a4e323f6881fcb6b986ab Author: Rui Wang AuthorDate: Sat, 10 Sep 2016 23:40:45 +0800 Committer: Ingo Molnar CommitDate: Sat, 10 Sep 2016 20:30:31 +0200 x86/ioapic: Ignore root

<    1   2