Re: [PATCH][next] KEYS: trusted: Fix missing null return from kzalloc call

2021-04-12 Thread Sumit Garg
tic struct trusted_key_payload > >> *trusted_payload_alloc(struct key *key) > >> > >> ret = key_payload_reserve(key, sizeof(*p)); > >> if (ret < 0) > >> -return p; > >> +goto err; > >> p = kzalloc(

Re: [PATCH][next] KEYS: trusted: Fix missing null return from kzalloc call

2021-04-12 Thread Sumit Garg
> Ah, it's my bad. Thanks for fixing this issue. Reviewed-by: Sumit Garg -Sumit > diff --git a/security/keys/trusted-keys/trusted_core.c > b/security/keys/trusted-keys/trusted_core.c > index ec3a066a4b42..90774793f0b1 100644 > --- a/security/keys/trusted-keys/trusted_core.c > +

Re: [PATCH v5] arm64: Enable perf events based hard lockup detector

2021-04-12 Thread Sumit Garg
Hi Will, On Tue, 30 Mar 2021 at 18:00, Sumit Garg wrote: > > On Tue, 30 Mar 2021 at 14:07, Lecopzer Chen > wrote: > > > > > > Hi Will, Mark, > > > > > > > > On Fri, 15 Jan 2021 at 17:32, Sumit Garg wrote: > > > > > > >

Re: [PATCH v1 0/3] KEYS: trusted: Introduce support for NXP CAAM-based trusted keys

2021-04-01 Thread Sumit Garg
On Thu, 1 Apr 2021 at 19:29, Richard Weinberger wrote: > > Sumit, > > - Ursprüngliche Mail - > > Von: "Sumit Garg" > > In this case why would one prefer to use CAAM when you have standards > > compliant TPM-Chip which additionally offers sealing to

Re: [PATCH v1 0/3] KEYS: trusted: Introduce support for NXP CAAM-based trusted keys

2021-04-01 Thread Sumit Garg
Hi Richard, On Wed, 31 Mar 2021 at 03:34, Richard Weinberger wrote: > > Ahmad, > > On Wed, Mar 17, 2021 at 3:08 PM Ahmad Fatoum wrote: > > keyctl add trusted $KEYNAME "load $(cat ~/kmk.blob)" @s > > Is there a reason why we can't pass the desired backend name in the > trusted key

Re: [PATCH v1 0/3] KEYS: trusted: Introduce support for NXP CAAM-based trusted keys

2021-04-01 Thread Sumit Garg
On Thu, 1 Apr 2021 at 15:36, Ahmad Fatoum wrote: > > Hello Richard, > > On 31.03.21 21:36, Richard Weinberger wrote: > > James, > > > > - Ursprüngliche Mail - > >> Von: "James Bottomley" > >> Well, yes. For the TPM, there's a defined ASN.1 format for the keys: > >> > >>

Re: [PATCH v1 0/3] KEYS: trusted: Introduce support for NXP CAAM-based trusted keys

2021-04-01 Thread Sumit Garg
On Thu, 1 Apr 2021 at 19:00, Ahmad Fatoum wrote: > > Hello Richard, Sumit, > > On 01.04.21 15:17, Richard Weinberger wrote: > > Sumit, > > > > - Ursprüngliche Mail - > >> Von: "Sumit Garg" > >> IIUC, this would require

Re: [PATCH v5] arm64: Enable perf events based hard lockup detector

2021-03-30 Thread Sumit Garg
On Tue, 30 Mar 2021 at 14:07, Lecopzer Chen wrote: > > > > Hi Will, Mark, > > > > > > On Fri, 15 Jan 2021 at 17:32, Sumit Garg wrote: > > > > > > > > With the recent feature added to enable perf events to use pseudo NMIs > > > >

Re: [PATCH v1 3/3] KEYS: trusted: Introduce support for NXP CAAM-based trusted keys

2021-03-30 Thread Sumit Garg
On Mon, 29 Mar 2021 at 01:07, Jarkko Sakkinen wrote: > > On Sat, Mar 27, 2021 at 01:41:24PM +0100, David Gstir wrote: > > Hi! > > > > > On 25.03.2021, at 06:26, Sumit Garg wrote: > > > > > > On Wed, 24 Mar 2021 at 19:37, Ahmad Fa

Re: [PATCH 1/1] tee: optee: do not check memref size on return from Secure World

2021-03-25 Thread Sumit Garg
e.c | 10 -- > 1 file changed, 10 deletions(-) > Looks good to me. Reviewed-by: Sumit Garg -Sumit > diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c > index 319a1e701163..ddb8f9ecf307 100644 > --- a/drivers/tee/optee/core.c > +++ b/drivers/tee/optee/

Re: [PATCH v1 3/3] KEYS: trusted: Introduce support for NXP CAAM-based trusted keys

2021-03-24 Thread Sumit Garg
On Wed, 24 Mar 2021 at 19:37, Ahmad Fatoum wrote: > > Hello Sumit, > > On 24.03.21 11:47, Sumit Garg wrote: > > On Wed, 24 Mar 2021 at 14:56, Ahmad Fatoum wrote: > >> > >> Hello Mimi, > >> > >> On 23.03.21 19:07, Mimi Zohar wrote: >

Re: [PATCH v1 3/3] KEYS: trusted: Introduce support for NXP CAAM-based trusted keys

2021-03-24 Thread Sumit Garg
On Wed, 24 Mar 2021 at 14:56, Ahmad Fatoum wrote: > > Hello Mimi, > > On 23.03.21 19:07, Mimi Zohar wrote: > > On Tue, 2021-03-23 at 17:35 +0100, Ahmad Fatoum wrote: > >> On 21.03.21 21:48, Horia Geantă wrote: > >>> caam has random number generation capabilities, so it's worth using that > >>> by

Re: [PATCH v1 0/3] KEYS: trusted: Introduce support for NXP CAAM-based trusted keys

2021-03-24 Thread Sumit Garg
On Tue, 23 Mar 2021 at 22:04, Ahmad Fatoum wrote: > > Hello Horia, > > On 21.03.21 21:01, Horia Geantă wrote: > > On 3/16/2021 7:02 PM, Ahmad Fatoum wrote: > >> This patch series builds on top of Sumit's rework to have the CAAM as yet > >> another > >> trusted key backend. > >> > > Shouldn't the

[PATCH v2] kdb: Get rid of custom debug heap allocator

2021-03-23 Thread Sumit Garg
use shared namebuf such that a caller should consume the symbol returned immediately prior to another call to fetch a different symbol. This change has been tested using kgdbtest on arm64 which doesn't show any regressions. Suggested-by: Daniel Thompson Signed-off-by: Sumit Garg --- Changes

Re: [PATCH v3] kdb: Refactor env variables get/set code

2021-03-23 Thread Sumit Garg
Hi Daniel, On Mon, 8 Feb 2021 at 13:32, Sumit Garg wrote: > > Add two new kdb environment access methods as kdb_setenv() and > kdb_printenv() in order to abstract out environment access code > from kdb command functions. > > Also, replace (char *)0 with NULL as an initializ

Re: [PATCH v2] kdb: Get rid of custom debug heap allocator

2021-03-23 Thread Sumit Garg
On Fri, 19 Mar 2021 at 23:05, Daniel Thompson wrote: > > On Mon, Mar 01, 2021 at 11:33:00AM +0530, Sumit Garg wrote: > > On Fri, 26 Feb 2021 at 23:07, Daniel Thompson > > wrote: > > > > > > On Fri, Feb 26, 2021 at 06:12:13PM +0530, Sumit Garg wrote: > >

Re: [PATCH] kdb: Refactor kdb_defcmd implementation

2021-03-23 Thread Sumit Garg
On Fri, 19 Mar 2021 at 22:47, Daniel Thompson wrote: > > On Tue, Mar 09, 2021 at 05:47:47PM +0530, Sumit Garg wrote: > > Switch to use kdbtab_t instead of separate struct defcmd_set since > > now we have kdb_register_table() to register pre-allocated kdb commands. > > Th

Re: [PATCH 0/3] static_call() vs __exit fixes

2021-03-18 Thread Sumit Garg
ss.net > > Since I've reproduced the problem locally, and these patches do seem to fully > cure things, I'll shortly queue them for tip/locking/urgent. > Thanks Peter for these fixes, works fine for me. FWIW: Tested-by: Sumit Garg -Sumit

Re: [PATCH] objtool,static_call: Don't emit static_call_site for .exit.text

2021-03-17 Thread Sumit Garg
On Thu, 18 Mar 2021 at 03:26, Jarkko Sakkinen wrote: > > On Wed, Mar 17, 2021 at 07:07:07PM +0530, Sumit Garg wrote: > > On Wed, 17 Mar 2021 at 18:16, Peter Zijlstra wrote: > > > > > > On Wed, Mar 17, 2021 at 05:25:48PM +0530, Sumit Garg wrote: > > > &g

Re: [PATCH] objtool,static_call: Don't emit static_call_site for .exit.text

2021-03-17 Thread Sumit Garg
On Wed, 17 Mar 2021 at 18:16, Peter Zijlstra wrote: > > On Wed, Mar 17, 2021 at 05:25:48PM +0530, Sumit Garg wrote: > > Thanks Peter for this fix. It does work for me on qemu for x86. Can > > you turn this into a proper fix patch? BTW, feel free to add: > > Per the below,

Re: [PATCH v1 3/3] KEYS: trusted: Introduce support for NXP CAAM-based trusted keys

2021-03-17 Thread Sumit Garg
Hi Richard, On Wed, 17 Mar 2021 at 04:45, Richard Weinberger wrote: > > Ahmad, > > On Tue, Mar 16, 2021 at 6:24 PM Ahmad Fatoum wrote: > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +struct caam_blob_priv *blobifier; > > Who is using this pointer too? >

Re: [RFC PATCH 1/5] rpmb: add Replay Protected Memory Block (RPMB) subsystem

2021-03-12 Thread Sumit Garg
On Fri, 12 Mar 2021 at 01:59, Hector Martin wrote: > > On 11/03/2021 23.31, Linus Walleij wrote: > > I understand your argument, is your position such that the nature > > of the hardware is such that community should leave this hardware > > alone and not try to make use of RPMB for say ordinary

Re: [RFC PATCH 1/5] rpmb: add Replay Protected Memory Block (RPMB) subsystem

2021-03-10 Thread Sumit Garg
On Wed, 10 Mar 2021 at 14:17, Hector Martin wrote: > > On 10/03/2021 14.14, Sumit Garg wrote: > > On Wed, 10 Mar 2021 at 02:47, Hector Martin wrote: > >> > >> On 09/03/2021 01.20, Linus Walleij wrote: > >>> I suppose it would be a bit brutal if the ker

Re: [RFC PATCH 1/5] rpmb: add Replay Protected Memory Block (RPMB) subsystem

2021-03-09 Thread Sumit Garg
On Wed, 10 Mar 2021 at 02:47, Hector Martin wrote: > > On 09/03/2021 01.20, Linus Walleij wrote: > > I suppose it would be a bit brutal if the kernel would just go in and > > appropriate any empty RPMB it finds, but I suspect it is the right way > > to make use of this facility given that so many

Re: [RFC PATCH 1/5] rpmb: add Replay Protected Memory Block (RPMB) subsystem

2021-03-09 Thread Sumit Garg
Hi David, On Tue, 9 Mar 2021 at 22:43, David Howells wrote: > > Linus Walleij wrote: > > > As it seems neither Microsoft nor Apple is paying it much attention > > (+/- new facts) it will be up to the community to define use cases > > for RPMB. I don't know what would make most sense, but the >

[PATCH] kdb: Refactor kdb_defcmd implementation

2021-03-09 Thread Sumit Garg
Thompson Signed-off-by: Sumit Garg --- kernel/debug/kdb/kdb_main.c| 136 +++-- kernel/debug/kdb/kdb_private.h | 7 ++ 2 files changed, 70 insertions(+), 73 deletions(-) diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c index 9d69169582c6

Re: [PATCH v9 0/4] Introduce TEE based Trusted Keys support

2021-03-09 Thread Sumit Garg
On Thu, 4 Mar 2021 at 21:14, Jarkko Sakkinen wrote: > > On Thu, Mar 04, 2021 at 03:30:18PM +0530, Sumit Garg wrote: > > Hi Jarkko, > > > > On Mon, 1 Mar 2021 at 18:41, Sumit Garg wrote: > > > > > > Add support for TEE based trusted keys where TEE provi

Re: [PATCH v5] kdb: Simplify kdb commands registration

2021-03-04 Thread Sumit Garg
Hi Doug, On Tue, 2 Mar 2021 at 00:10, Doug Anderson wrote: > > Hi, > > On Tue, Feb 23, 2021 at 11:08 PM Sumit Garg wrote: > > > > Simplify kdb commands registration via using linked list instead of > > static array for commands storage. > > > > Signed-o

Re: [PATCH v9 0/4] Introduce TEE based Trusted Keys support

2021-03-04 Thread Sumit Garg
Hi Jarkko, On Mon, 1 Mar 2021 at 18:41, Sumit Garg wrote: > > Add support for TEE based trusted keys where TEE provides the functionality > to seal and unseal trusted keys using hardware unique key. Also, this is > an alternative in case platform doesn't possess a TPM device. > &

[PATCH v9 3/4] doc: trusted-encrypted: updates with TEE as a new trust source

2021-03-01 Thread Sumit Garg
including differences specific to a trust source. Co-developed-by: Elaine Palmer Signed-off-by: Elaine Palmer Signed-off-by: Sumit Garg --- .../security/keys/trusted-encrypted.rst | 171 ++ 1 file changed, 138 insertions(+), 33 deletions(-) diff --git a/Documentation

[PATCH v9 4/4] MAINTAINERS: Add entry for TEE based Trusted Keys

2021-03-01 Thread Sumit Garg
Add MAINTAINERS entry for TEE based Trusted Keys framework. Signed-off-by: Sumit Garg Acked-by: Jarkko Sakkinen --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 1d75afad615f..eb1ac9c90f7f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS

[PATCH v9 1/4] KEYS: trusted: Add generic trusted keys framework

2021-03-01 Thread Sumit Garg
at compile time or during boot via aforementioned module parameter. Suggested-by: Jarkko Sakkinen Signed-off-by: Sumit Garg --- .../admin-guide/kernel-parameters.txt | 12 + include/keys/trusted-type.h | 53 +++ include/keys/trusted_tpm.h| 29

[PATCH v9 2/4] KEYS: trusted: Introduce TEE based Trusted Keys

2021-03-01 Thread Sumit Garg
Add support for TEE based trusted keys where TEE provides the functionality to seal and unseal trusted keys using hardware unique key. Refer to Documentation/staging/tee.rst for detailed information about TEE. Signed-off-by: Sumit Garg Tested-by: Jarkko Sakkinen --- include/keys/trusted_tee.h

[PATCH v9 0/4] Introduce TEE based Trusted Keys support

2021-03-01 Thread Sumit Garg
hwork.kernel.org/patch/11091435/ Changes in v2: 1. Add reviewed-by tags for patch #1 and #2. 2. Incorporate comments from Jens for patch #3. 3. Switch to use generic trusted keys framework. Sumit Garg (4): KEYS: trusted: Add generic trusted keys framework KEYS: trusted: Introduce TEE based Tr

Re: [PATCH v2] kdb: Get rid of custom debug heap allocator

2021-02-28 Thread Sumit Garg
On Fri, 26 Feb 2021 at 23:07, Daniel Thompson wrote: > > On Fri, Feb 26, 2021 at 06:12:13PM +0530, Sumit Garg wrote: > > On Fri, 26 Feb 2021 at 16:29, Daniel Thompson > > wrote: > > > > > > On Fri, Feb 26, 2021 at 03:23:06PM +0530, Sumit Garg wrote: > >

Re: [PATCH v2] kdb: Get rid of custom debug heap allocator

2021-02-26 Thread Sumit Garg
On Fri, 26 Feb 2021 at 16:29, Daniel Thompson wrote: > > On Fri, Feb 26, 2021 at 03:23:06PM +0530, Sumit Garg wrote: > > Currently the only user for debug heap is kdbnearsym() which can be > > modified to rather ask the caller to supply a buffer for symbol name. > &g

[PATCH v2] kdb: Get rid of custom debug heap allocator

2021-02-26 Thread Sumit Garg
tested using kgdbtest on arm64 which doesn't show any regressions. Suggested-by: Daniel Thompson Signed-off-by: Sumit Garg --- Changes in v2: - Allocate namebuf statically instead of stack to maintain debugger robustness. kernel/debug/kdb/kdb_debugger.c | 1 - kernel/debug/kdb/kdb_main.c

Re: [PATCH] kgdb: Fix to kill breakpoints on initmem after boot

2021-02-26 Thread Sumit Garg
On Fri, 26 Feb 2021 at 13:01, Greg KH wrote: > > On Fri, Feb 26, 2021 at 12:32:07PM +0530, Sumit Garg wrote: > > + stable ML > > > > On Thu, 25 Feb 2021 at 21:26, Daniel Thompson > > wrote: > > > > > > On Wed, Feb 24, 2021 at 01:46:52PM +0530,

Re: [PATCH] kdb: Get rid of custom debug heap allocator

2021-02-26 Thread Sumit Garg
On Fri, 26 Feb 2021 at 12:54, Sumit Garg wrote: > > On Thu, 25 Feb 2021 at 17:49, Daniel Thompson > wrote: > > > > On Thu, Feb 25, 2021 at 04:52:58PM +0530, Sumit Garg wrote: > > > Currently the only user for debug heap is kdbnearsym() which can be > >

Re: [PATCH] kdb: Get rid of custom debug heap allocator

2021-02-25 Thread Sumit Garg
On Thu, 25 Feb 2021 at 17:49, Daniel Thompson wrote: > > On Thu, Feb 25, 2021 at 04:52:58PM +0530, Sumit Garg wrote: > > Currently the only user for debug heap is kdbnearsym() which can be > > modified to rather ask the caller to supply a buffer for symbol name. > &g

Re: [PATCH] kgdb: Fix to kill breakpoints on initmem after boot

2021-02-25 Thread Sumit Garg
+ stable ML On Thu, 25 Feb 2021 at 21:26, Daniel Thompson wrote: > > On Wed, Feb 24, 2021 at 01:46:52PM +0530, Sumit Garg wrote: > > Currently breakpoints in kernel .init.text section are not handled > > correctly while allowing to remove them even after corresponding pages &

Re: [PATCH] kgdb: Fix to kill breakpoints on initmem after boot

2021-02-25 Thread Sumit Garg
On Wed, 24 Feb 2021 at 23:50, Andrew Morton wrote: > > On Wed, 24 Feb 2021 10:09:25 -0800 Doug Anderson > wrote: > > > On Wed, Feb 24, 2021 at 12:17 AM Sumit Garg wrote: > > > > > > Currently breakpoints in kernel .init.text section are not handled > >

Re: [PATCH] kgdb: Fix to kill breakpoints on initmem after boot

2021-02-25 Thread Sumit Garg
On Wed, 24 Feb 2021 at 23:39, Doug Anderson wrote: > > Hi, > > On Wed, Feb 24, 2021 at 12:17 AM Sumit Garg wrote: > > > > Currently breakpoints in kernel .init.text section are not handled > > correctly while allowing to remove them even after corresponding pages &g

[PATCH] kdb: Get rid of custom debug heap allocator

2021-02-25 Thread Sumit Garg
tested using kgdbtest on arm64 which doesn't show any regressions. Suggested-by: Daniel Thompson Signed-off-by: Sumit Garg --- kernel/debug/kdb/kdb_debugger.c | 1 - kernel/debug/kdb/kdb_main.c | 6 +- kernel/debug/kdb/kdb_private.h | 7 +- kernel/debug/kdb/kdb_support.c | 294

[PATCH] kgdb: Fix to kill breakpoints on initmem after boot

2021-02-24 Thread Sumit Garg
Currently breakpoints in kernel .init.text section are not handled correctly while allowing to remove them even after corresponding pages have been freed. Fix it via killing .init.text section breakpoints just prior to initmem pages being freed. Suggested-by: Doug Anderson Signed-off-by: Sumit

[PATCH v2] kdb: Remove redundant function definitions/prototypes

2021-02-23 Thread Sumit Garg
Cleanup kdb code to get rid of unused function definitions/prototypes. Signed-off-by: Sumit Garg --- Changes in v2: - Keep kdbgetu64arg() the way it was. kernel/debug/kdb/kdb_private.h | 2 -- kernel/debug/kdb/kdb_support.c | 18 -- 2 files changed, 20 deletions(-) diff

[PATCH v5] kdb: Simplify kdb commands registration

2021-02-23 Thread Sumit Garg
Simplify kdb commands registration via using linked list instead of static array for commands storage. Signed-off-by: Sumit Garg --- Changes in v5: - Introduce new method: kdb_register_table() to register static kdb main and breakpoint command tables instead of using statically allocated

Re: [PATCH] kdb: Remove redundant function definitions/prototypes

2021-02-23 Thread Sumit Garg
On Tue, 23 Feb 2021 at 21:39, Doug Anderson wrote: > > Hi, > > On Tue, Feb 23, 2021 at 4:01 AM Sumit Garg wrote: > > > > @@ -103,7 +103,6 @@ extern int kdb_getword(unsigned long *, unsigned long, > > size_t); > > extern int kdb_putword(unsigned long, unsigne

Re: [PATCH] kernel: debug: Handle breakpoints in kernel .init.text section

2021-02-23 Thread Sumit Garg
On Tue, 23 Feb 2021 at 18:24, Daniel Thompson wrote: > > On Tue, Feb 23, 2021 at 02:33:50PM +0530, Sumit Garg wrote: > > Thanks Doug for your comments. > > > > On Tue, 23 Feb 2021 at 05:28, Doug Anderson wrote: > > > > To be clear there is st

[PATCH] kdb: Remove redundant function definitions/prototypes

2021-02-23 Thread Sumit Garg
Cleanup kdb code to get rid of unused function definitions/prototypes. Signed-off-by: Sumit Garg --- kernel/debug/kdb/kdb_main.c| 2 +- kernel/debug/kdb/kdb_private.h | 3 --- kernel/debug/kdb/kdb_support.c | 18 -- 3 files changed, 1 insertion(+), 22 deletions(-) diff

Re: [PATCH] kernel: debug: Handle breakpoints in kernel .init.text section

2021-02-23 Thread Sumit Garg
Thanks Doug for your comments. On Tue, 23 Feb 2021 at 05:28, Doug Anderson wrote: > > Hi, > > On Fri, Feb 19, 2021 at 12:03 AM Sumit Garg wrote: > > > > Currently breakpoints in kernel .init.text section are not handled > > correctly while allowing to remove them

Re: [PATCH v4] kdb: Simplify kdb commands registration

2021-02-22 Thread Sumit Garg
On Mon, 22 Feb 2021 at 19:17, Daniel Thompson wrote: > > On Mon, Feb 22, 2021 at 06:33:18PM +0530, Sumit Garg wrote: > > On Mon, 22 Feb 2021 at 17:35, Daniel Thompson > > wrote: > > > > > > On Thu, Feb 18, 2021 at 05:39:58PM +0530, Sumit Garg wrote: > >

Re: [PATCH v4] kdb: Simplify kdb commands registration

2021-02-22 Thread Sumit Garg
On Mon, 22 Feb 2021 at 17:35, Daniel Thompson wrote: > > On Thu, Feb 18, 2021 at 05:39:58PM +0530, Sumit Garg wrote: > > Simplify kdb commands registration via using linked list instead of > > static array for commands storage. > > > > Signed-off-by: Sumit Garg

Re: [PATCH v8 2/4] KEYS: trusted: Introduce TEE based Trusted Keys

2021-02-21 Thread Sumit Garg
On Tue, 16 Feb 2021 at 12:59, Jarkko Sakkinen wrote: > > On Mon, Feb 15, 2021 at 06:37:00PM +0530, Sumit Garg wrote: > > On Fri, 12 Feb 2021 at 05:04, Jarkko Sakkinen wrote: > > > > > > On Mon, Jan 25, 2021 at 02:47:38PM +0530, Sumit Garg wrote: > > > >

Re: [PATCH v5] arm64: Enable perf events based hard lockup detector

2021-02-19 Thread Sumit Garg
Hi Will, Mark, On Fri, 15 Jan 2021 at 17:32, Sumit Garg wrote: > > With the recent feature added to enable perf events to use pseudo NMIs > as interrupts on platforms which support GICv3 or later, its now been > possible to enable hard lockup detector (or NMI watchdog) on arm64 >

[PATCH] kernel: debug: Handle breakpoints in kernel .init.text section

2021-02-19 Thread Sumit Garg
-by: Sumit Garg --- include/linux/kgdb.h | 3 ++- kernel/debug/debug_core.c | 17 + 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/include/linux/kgdb.h b/include/linux/kgdb.h index 0d6cf64..57b8885 100644 --- a/include/linux/kgdb.h +++ b/include/linux/kgdb.h

[PATCH v4] kdb: Simplify kdb commands registration

2021-02-18 Thread Sumit Garg
Simplify kdb commands registration via using linked list instead of static array for commands storage. Signed-off-by: Sumit Garg --- Changes in v4: - Fix kdb commands memory allocation issue prior to slab being available with an array of statically allocated commands. Now it works fine

Re: [pet...@infradead.org: Re: [PATCH] x86/kgdb: Allow removal of early BPs]

2021-02-17 Thread Sumit Garg
Hi Peter, > On Mon, Dec 14, 2020 at 03:13:12PM +0100, Stefan Saecherl wrote: > > > One thing to consider when doing this is that code can go away during boot > > (e.g. .init.text). Previously kgdb_arch_remove_breakpoint handled this case > > gracefully by just having copy_to_kernel_nofault fail

Re: [PATCH v8 1/4] KEYS: trusted: Add generic trusted keys framework

2021-02-15 Thread Sumit Garg
On Wed, 10 Feb 2021 at 22:30, Jarkko Sakkinen wrote: > > On Tue, Nov 03, 2020 at 09:31:43PM +0530, Sumit Garg wrote: > > + case Opt_new: > > + key_len = payload->key_len; > > + ret = static_call(trusted_k

Re: [PATCH v8 1/4] KEYS: trusted: Add generic trusted keys framework

2021-02-15 Thread Sumit Garg
On Tue, 24 Nov 2020 at 09:12, Jarkko Sakkinen wrote: > > On Tue, Nov 03, 2020 at 09:31:43PM +0530, Sumit Garg wrote: > > Current trusted keys framework is tightly coupled to use TPM device as > > an underlying implementation which makes it difficult for implementations > >

Re: [PATCH v8 2/4] KEYS: trusted: Introduce TEE based Trusted Keys

2021-02-15 Thread Sumit Garg
On Fri, 12 Feb 2021 at 05:04, Jarkko Sakkinen wrote: > > On Mon, Jan 25, 2021 at 02:47:38PM +0530, Sumit Garg wrote: > > Hi Jarkko, > > > > On Fri, 22 Jan 2021 at 23:42, Jarkko Sakkinen wrote: > > > > > > On Thu, Jan 21, 2021 a

Re: DMA direct mapping fix for 5.4 and earlier stable branches

2021-02-09 Thread Sumit Garg
Hi Christoph, On Tue, 9 Feb 2021 at 15:06, Christoph Hellwig wrote: > > On Tue, Feb 09, 2021 at 10:23:12AM +0100, Greg KH wrote: > > > From the view point of ZeroCopy using DMABUF, is 5.4 not > > > mature enough, and is 5.10 enough mature ? > > > This is the most important point for judging

Re: [PATCH v3] kdb: Simplify kdb commands registration

2021-02-09 Thread Sumit Garg
On Mon, 8 Feb 2021 at 19:18, Daniel Thompson wrote: > > On Mon, Feb 08, 2021 at 03:18:19PM +0530, Sumit Garg wrote: > > On Mon, 8 Feb 2021 at 15:13, Daniel Thompson > > wrote: > > > > > > On Fri, Jan 29, 2021 at 03:47:07PM +0530, Sumit Garg wrote: > >

Re: DMA direct mapping fix for 5.4 and earlier stable branches

2021-02-08 Thread Sumit Garg
Thanks Greg for your response. On Tue, 9 Feb 2021 at 12:28, Greg Kroah-Hartman wrote: > > On Tue, Feb 09, 2021 at 11:39:25AM +0530, Sumit Garg wrote: > > Hi Christoph, Greg, > > > > Currently we are observing an incorrect address translation > > corresponding to DMA

DMA direct mapping fix for 5.4 and earlier stable branches

2021-02-08 Thread Sumit Garg
t/commit/?id=34dc0ea6bc960f1f57b2148f01a3f4da23f87013 [2] minimal fix required for 5.4 stable kernel: commit bb0b3ff6e54d78370b6b0c04426f0d9192f31795 Author: Sumit Garg Date: Wed Feb 3 13:08:37 2021 +0530 dma-mapping: Fix common get_sgtable and mmap methods Currently common get_sgtable and

Re: [PATCH v3] kdb: Simplify kdb commands registration

2021-02-08 Thread Sumit Garg
On Mon, 8 Feb 2021 at 15:13, Daniel Thompson wrote: > > On Fri, Jan 29, 2021 at 03:47:07PM +0530, Sumit Garg wrote: > > @@ -1011,25 +1005,17 @@ int kdb_parse(const char *cmdstr) > > ++argv[0]; > > } > > > > - for_each_kdbcmd(tp, i)

[PATCH v3] kdb: Refactor env variables get/set code

2021-02-08 Thread Sumit Garg
Add two new kdb environment access methods as kdb_setenv() and kdb_printenv() in order to abstract out environment access code from kdb command functions. Also, replace (char *)0 with NULL as an initializer for environment variables array. Signed-off-by: Sumit Garg Reviewed-by: Douglas Anderson

Re: [PATCH v2] kdb: Refactor env variables get/set code

2021-02-08 Thread Sumit Garg
Hi Daniel, On Fri, 5 Feb 2021 at 23:06, Daniel Thompson wrote: > > On Thu, Feb 04, 2021 at 03:44:20PM +0530, Sumit Garg wrote: > > @@ -318,6 +318,65 @@ int kdbgetintenv(const char *match, int *value) > > } > > > > /* > > + * kdb_setenv() - Alter an existing

[PATCH v2] kdb: Refactor env variables get/set code

2021-02-04 Thread Sumit Garg
Add two new kdb environment access methods as kdb_setenv() and kdb_printenv() in order to abstract out environment access code from kdb command functions. Also, replace (char *)0 with NULL as an initializer for environment variables array. Signed-off-by: Sumit Garg --- Changes in v2: - Get rid

Re: Migration to trusted keys: sealing user-provided key?

2021-02-03 Thread Sumit Garg
On Wed, 3 Feb 2021 at 19:16, Jan Lübbe wrote: > > On Wed, 2021-02-03 at 17:20 +0530, Sumit Garg wrote: > > On Tue, 2 Feb 2021 at 18:04, Jan Lübbe wrote: > > > > > > On Tue, 2021-02-02 at 17:45 +0530, Sumit Garg wrote: > > > > Hi Jan, > > > >

Re: Migration to trusted keys: sealing user-provided key?

2021-02-03 Thread Sumit Garg
On Tue, 2 Feb 2021 at 18:04, Jan Lübbe wrote: > > On Tue, 2021-02-02 at 17:45 +0530, Sumit Garg wrote: > > Hi Jan, > > > > On Sun, 31 Jan 2021 at 23:40, James Bottomley wrote: > > > > > > On Sun, 2021-01-31 at 15:14 +0100, Jan Lübbe wrote: > > &

Re: Migration to trusted keys: sealing user-provided key?

2021-02-02 Thread Sumit Garg
Hi Jan, On Sun, 31 Jan 2021 at 23:40, James Bottomley wrote: > > On Sun, 2021-01-31 at 15:14 +0100, Jan Lübbe wrote: > > On Sun, 2021-01-31 at 07:09 -0500, Mimi Zohar wrote: > > > On Sat, 2021-01-30 at 19:53 +0200, Jarkko Sakkinen wrote: > > > > On Thu, 2021-01-28 at 18:31 +0100, Ahmad Fatoum

Re: [PATCH] optee: sync OP-TEE headers

2021-02-01 Thread Sumit Garg
drivers/tee/optee/optee_smc.h | 70 +- > drivers/tee/optee/rpc.c | 39 > 4 files changed, 178 insertions(+), 188 deletions(-) > create mode 100644 drivers/tee/optee/optee_rpc_cmd.h > Looks good to me apart from the minor nit below. Reviewed-by: Sumit Garg > di

Re: [PATCH] tee: optee: remove need_resched() before cond_resched()

2021-01-31 Thread Sumit Garg
sleep with cond_resched") > > > Signed-off-by: Jens Wiklander > > > --- > > > drivers/tee/optee/call.c | 3 +-- > > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > Can you please test to see that this works in your setups too? > > Does this work for you? I'd like to get this patch ready for v5.12. It does work for me as well. Tested-by: Sumit Garg -Sumit > > Thanks, > Jens

Re: [PATCH v5] arm64: Enable perf events based hard lockup detector

2021-01-27 Thread Sumit Garg
Hi Will, On Tue, 26 Jan 2021 at 19:48, Will Deacon wrote: > > Hi Sumit, > > On Fri, Jan 15, 2021 at 05:31:41PM +0530, Sumit Garg wrote: > > With the recent feature added to enable perf events to use pseudo NMIs > > as interrupts on platforms which support GICv

Re: [PATCH] kdb: Refactor env variables get/set code

2021-01-27 Thread Sumit Garg
On Mon, 25 Jan 2021 at 22:44, Doug Anderson wrote: > > Hi, > > On Mon, Jan 25, 2021 at 6:30 AM Sumit Garg wrote: > > > > diff --git a/kernel/debug/kdb/kdb_env.c b/kernel/debug/kdb/kdb_env.c > > new file mode 100644 > > index 000..33ab5e6 > > --- /dev

Re: [PATCH] kdb: Refactor env variables get/set code

2021-01-27 Thread Sumit Garg
On Tue, 26 Jan 2021 at 02:13, Daniel Thompson wrote: > > On Mon, Jan 25, 2021 at 07:59:45PM +0530, Sumit Garg wrote: > > Move kdb environment related get/set APIs to a separate file in order > > to provide an abstraction for environment variables access and hence > > e

Re: [PATCH v2] kdb: Simplify kdb commands registration

2021-01-27 Thread Sumit Garg
On Mon, 25 Jan 2021 at 21:32, Doug Anderson wrote: > > Hi, > > On Sun, Jan 24, 2021 at 11:06 PM Sumit Garg wrote: > > > > Simplify kdb commands registration via using linked list instead of > > static array for commands storage. > > > > Signed-off-by:

Re: [PATCH v3] kdb: Make memory allocations more robust

2021-01-27 Thread Sumit Garg
On Mon, 25 Jan 2021 at 13:48, Daniel Thompson wrote: > > On Fri, Jan 22, 2021 at 09:25:44AM -0800, Doug Anderson wrote: > > Hi, > > > > On Fri, Jan 22, 2021 at 3:06 AM Sumit Garg wrote: > > > > > > Currently kdb uses in_interrupt() to determine whether i

[PATCH] kdb: Refactor env variables get/set code

2021-01-25 Thread Sumit Garg
Move kdb environment related get/set APIs to a separate file in order to provide an abstraction for environment variables access and hence enhances code readability. Signed-off-by: Sumit Garg --- kernel/debug/kdb/Makefile | 2 +- kernel/debug/kdb/kdb_env.c | 229

[PATCH v2] kdb: Simplify kdb commands registration

2021-01-24 Thread Sumit Garg
Simplify kdb commands registration via using linked list instead of static array for commands storage. Signed-off-by: Sumit Garg --- Changes in v2: - Remove redundant NULL check for "cmd_name". - Incorporate misc. comment. kernel/debug/kdb/kdb_main.

Re: [PATCH] kdb: Simplify kdb commands registration

2021-01-24 Thread Sumit Garg
Thanks Doug for your review. On Sat, 23 Jan 2021 at 00:12, Doug Anderson wrote: > > Hi, > > On Tue, Jan 19, 2021 at 2:50 AM Sumit Garg wrote: > > > > Simplify kdb commands registration via using linked list instead of > > static array for commands storage. >

Re: [PATCH v3] kdb: Make memory allocations more robust

2021-01-24 Thread Sumit Garg
Thanks Doug for your comments. On Fri, 22 Jan 2021 at 22:55, Doug Anderson wrote: > > Hi, > > On Fri, Jan 22, 2021 at 3:06 AM Sumit Garg wrote: > > > > Currently kdb uses in_interrupt() to determine whether its library > > code has been called from the kgdb trap h

[PATCH v3] kdb: Make memory allocations more robust

2021-01-22 Thread Sumit Garg
sta...@vger.kernel.org Signed-off-by: Sumit Garg --- Changes in v3: - Refined commit description and Cc: sta...@vger.kernel.org. Changes in v2: - Get rid of redundant in_atomic() check. kernel/debug/kdb/kdb_private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/debug/kdb/kdb_privat

Re: [PATCH] kdb: Make memory allocations more robust

2021-01-22 Thread Sumit Garg
On Fri, 22 Jan 2021 at 15:18, Daniel Thompson wrote: > > On Fri, Jan 22, 2021 at 03:08:31PM +0530, Sumit Garg wrote: > > Currently kdb uses in_interrupt() to determine whether it's library > > code has been called from the kgdb trap handler or from a saner calling > > con

[PATCH v2] kdb: Make memory allocations more robust

2021-01-22 Thread Sumit Garg
such as [1]. We can improve this by adding check for in_dbg_master() instead which explicitly determines if we are running in debugger context. [1] $ echo g > /proc/sysrq-trigger Signed-off-by: Sumit Garg --- Changes in v2: - Get rid of redundant in_atomic() check. kernel/debug/kdb/kdb_privat

[PATCH] kdb: Make memory allocations more robust

2021-01-22 Thread Sumit Garg
> /proc/sysrq-trigger Signed-off-by: Sumit Garg --- kernel/debug/kdb/kdb_private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/debug/kdb/kdb_private.h b/kernel/debug/kdb/kdb_private.h index 7a4a181..7a9ebd9 100644 --- a/kernel/debug/kdb/kdb_private.h +++ b/kernel/de

Re: [PATCH v8 2/4] KEYS: trusted: Introduce TEE based Trusted Keys

2021-01-19 Thread Sumit Garg
On Wed, 20 Jan 2021 at 07:01, Jarkko Sakkinen wrote: > > On Tue, Jan 19, 2021 at 12:30:42PM +0200, Jarkko Sakkinen wrote: > > On Fri, Jan 15, 2021 at 11:32:31AM +0530, Sumit Garg wrote: > > > On Thu, 14 Jan 2021 at 07:35, Jarkko Sakkinen wrote: > > > > > >

[PATCH] kdb: Simplify kdb commands registration

2021-01-19 Thread Sumit Garg
Simplify kdb commands registration via using linked list instead of static array for commands storage. Signed-off-by: Sumit Garg --- kernel/debug/kdb/kdb_main.c| 78 ++ kernel/debug/kdb/kdb_private.h | 1 + 2 files changed, 20 insertions(+), 59

[PATCH v5] arm64: Enable perf events based hard lockup detector

2021-01-15 Thread Sumit Garg
lockup detector is initialized just after the early initcalls but PMU on arm64 comes up much later as device_initcall(). So we need to re-initialize lockup detection once PMU has been initialized. Signed-off-by: Sumit Garg --- Changes in v5: - Fix lockup_detector_init() invocation to be rather invoked

Re: [PATCH v8 2/4] KEYS: trusted: Introduce TEE based Trusted Keys

2021-01-14 Thread Sumit Garg
On Thu, 14 Jan 2021 at 07:35, Jarkko Sakkinen wrote: > > On Wed, Jan 13, 2021 at 04:47:00PM +0530, Sumit Garg wrote: > > Hi Jarkko, > > > > On Mon, 11 Jan 2021 at 22:05, Jarkko Sakkinen wrote: > > > > > > On Tue, Nov 03, 2020 at 09:31:44PM +0530, Sum

Re: [PATCH v8 2/4] KEYS: trusted: Introduce TEE based Trusted Keys

2021-01-13 Thread Sumit Garg
Hi Jarkko, On Mon, 11 Jan 2021 at 22:05, Jarkko Sakkinen wrote: > > On Tue, Nov 03, 2020 at 09:31:44PM +0530, Sumit Garg wrote: > > Add support for TEE based trusted keys where TEE provides the functionality > > to seal and unseal trusted keys using hardware unique

Re: [PATCH v2] arm64: perf: Fix access percpu variables in preemptible context

2021-01-08 Thread Sumit Garg
0x18/0x24 > lockup_detector_init+0x44/0xa8 > armv8_pmu_driver_init+0x54/0x78 > do_one_initcall+0x184/0x43c > kernel_init_freeable+0x368/0x380 > kernel_init+0x1c/0x1cc > ret_from_fork+0x10/0x30 > > > Fixes: 367c820ef08082 ("arm64: Enable per

Re: [PATCH v7 0/7] arm64: Add framework to turn an IPI as NMI

2021-01-05 Thread Sumit Garg
Hi Marc, On Mon, 2 Nov 2020 at 17:15, Sumit Garg wrote: > > With pseudo NMIs support available its possible to configure SGIs to be > triggered as pseudo NMIs running in NMI context. And kernel features > such as: > - NMI backtrace can leverage IPI turned as NMI to get a b

Re: [PATCH v7 4/7] nmi: backtrace: Allow runtime arch specific override

2021-01-05 Thread Sumit Garg
Hello arch maintainers, On Mon, 2 Nov 2020 at 17:16, Sumit Garg wrote: > > Add a boolean return to arch_trigger_cpumask_backtrace() to support a > use-case where a particular architecture detects at runtime if it supports > NMI backtrace or it would like to fallback to default im

Re: [PATCH] tee: optee: replace might_sleep with cond_resched

2021-01-04 Thread Sumit Garg
fd7383c5..83b73b1d52f0 100644 > > --- a/drivers/tee/optee/call.c > > +++ b/drivers/tee/optee/call.c > > @@ -8,6 +8,7 @@ > > #include > > #include > > #include > > +#include > > #include > > #include > > #in

Re: [PATCH v8 0/4] Introduce TEE based Trusted Keys support

2020-12-08 Thread Sumit Garg
Hi Jarkko, Apologies for the delay in my response as I was busy with other high priority work. On Fri, 4 Dec 2020 at 10:46, Jarkko Sakkinen wrote: > > On Fri, Nov 06, 2020 at 04:52:52PM +0200, Jarkko Sakkinen wrote: > > On Fri, Nov 06, 2020 at 03:02:41PM +0530, Sumit Garg wrote: >

Re: [PATCH v8 0/4] Introduce TEE based Trusted Keys support

2020-11-06 Thread Sumit Garg
On Thu, 5 Nov 2020 at 10:37, Jarkko Sakkinen wrote: > > On Tue, Nov 03, 2020 at 09:31:42PM +0530, Sumit Garg wrote: > > Add support for TEE based trusted keys where TEE provides the functionality > > to seal and unseal trusted keys using hardware unique key. Also, this is

Re: [PATCH v7 1/7] arm64: Add framework to turn IPI as NMI

2020-11-04 Thread Sumit Garg
On Mon, 2 Nov 2020 at 21:03, Masayoshi Mizuma wrote: > > On Mon, Nov 02, 2020 at 05:14:41PM +0530, Sumit Garg wrote: > > Introduce framework to turn an IPI as NMI using pseudo NMIs. The main > > motivation for this feature is to have an IPI that can be leveraged to > &

Re: [PATCH v4 3/3,RESEND 2] KEYS: trusted: Reserve TPM for seal and unseal operations

2020-11-03 Thread Sumit Garg
19e10131a0 ("KEYS: trusted: Move TPM2 trusted keys code") > Reported-by: "James E.J. Bottomley" > Cc: sta...@vger.kernel.org > Cc: David Howells > Cc: Mimi Zohar > Cc: Sumit Garg > Signed-off-by: Jarkko Sakkinen > Reported-by: kernel test ro

  1   2   3   4   5   >