Re: [RESEND PATCH] tee: add kernel internal client interface

2018-07-13 Thread Sumit Garg
TA to collect Entropy using thermal noise from these sensors. After using the interface provided by this patch, I am able to write "hw_random" char driver for Developerbox to get Entropy from OP-TEE static TA which could be further used by user-space daemon (rngd). Reviewed-by:

Re: [RFC PATCH 0/2] allow optee to be exposed on ACPI systems

2019-01-01 Thread Sumit Garg
ng that introduce > new attributes. > > What remains to be discussed is how to expose OP-TEE pseudo devices, > e.g., Sumit's RNG implementation on SynQuacer which we would like to > bind a Linux driver to. > > Cc: Jens Wiklander > Cc: Sumit Garg > Cc: Graeme Gregory >

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: [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 v5 4/4] hwrng: add OP-TEE based rng driver

2019-01-27 Thread Sumit Garg
Hi Herbert, On Thu, 24 Jan 2019 at 11:25, Sumit Garg wrote: > > On ARM SoC's with TrustZone enabled, peripherals like entropy sources > might not be accessible to normal world (linux in this case) and rather > accessible to secure world (OP-TEE in this case) only. So this

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] 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

[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
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 still

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

[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

[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] 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

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 bu

[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 with

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

2021-02-19 Thread Sumit Garg
ff-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/k

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 >

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: [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] 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: 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 wro

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, > > > >

[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

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: 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

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-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 m

[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

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

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
+ 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] 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] 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 > > &g

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, Su

[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_m

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

Re: [PATCH v4 4/4] kdb: Switch to use safer dbg_io_ops over console APIs

2020-05-31 Thread Sumit Garg
; [if your patch is applied to the wrong git tree, please drop us a note to help > improve the system. BTW, we also suggest to use '--base' option to specify the > base tree in git format-patch, please see > https://stackoverflow.com/a/37406982] > > url: > https://

Re: [Tee-dev] [PATCH v2] drivers: optee: allow op-tee to access devices on the i2c bus

2020-05-31 Thread Sumit Garg
Hi Jorge, On Mon, 1 Jun 2020 at 04:41, Jorge Ramirez-Ortiz wrote: > > Some secure elements like NXP's SE050 sit on I2C buses. For OP-TEE to > control this type of cryptographic devices it needs coordinated access > to the bus, so collisions and RUNTIME_PM dont get in the way. > > This trampoline

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

2020-06-01 Thread Sumit Garg
On Mon, 1 Jun 2020 at 07:30, Jarkko Sakkinen wrote: > > On Wed, May 06, 2020 at 03:10:14PM +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 v4 1/4] KEYS: trusted: Add generic trusted keys framework

2020-06-01 Thread Sumit Garg
On Mon, 1 Jun 2020 at 07:41, Jarkko Sakkinen wrote: > > On Wed, May 06, 2020 at 03:10:14PM +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: [PATCHv5 2/3] optee: use uuid for sysfs driver entry

2020-06-01 Thread Sumit Garg
> M: Jens Wiklander > L: tee-...@lists.linaro.org > S: Maintained > +F: Documentation/ABI/testing/sysfs-bus-optee-devices > F: drivers/tee/optee/ > > + Unnecessary blank line. -Sumit > OP-TEE RANDOM NUMBER GENERATOR (RNG) DRIVER > M: Su

Re: [PATCHv5 1/3] optee: do drivers initialization before and after tee-supplicant run

2020-06-01 Thread Sumit Garg
, and after tee-supplicant run probe other > drivers. > > Signed-off-by: Maxim Uvarov > Suggested-by: Sumit Garg > Suggested-by: Arnd Bergmann > --- > drivers/tee/optee/core.c | 24 +--- > drivers/tee/optee/device.c| 17 +++-- &g

Re: [PATCHv5 3/3] tpm_ftpm_tee: register driver on TEE bus

2020-06-01 Thread Sumit Garg
e once fTPM device is registered on the bus which is only true after the tee-supplicant is up and running. Additionally, TEE bus provides auto device enumeration. With that, implementation looks good to me. So feel free to add: Reviewed-by: Sumit Garg -Sumit > > Signed-off-by: Ma

Re: [PATCH 0/3] arm64: perf: Add support for Perf NMI interrupts

2020-05-18 Thread Sumit Garg
On Mon, 18 May 2020 at 19:49, Mark Rutland wrote: > > On Mon, May 18, 2020 at 07:39:23PM +0530, Sumit Garg wrote: > > On Mon, 18 May 2020 at 16:47, Alexandru Elisei > > wrote: > > > On 5/18/20 11:45 AM, Mark Rutland wrote: > > > > On Mon, May 18, 2020 a

Re: [PATCH 06/11] irqchip/gic-v3: Configure SGIs as standard interrupts

2020-05-20 Thread Sumit Garg
Hi Marc, On Tue, 19 May 2020 at 21:48, Marc Zyngier wrote: > > Change the way we deal with GICv3 SGIs by turning them into proper > IRQs, and calling into the arch code to register the interrupt range > instead of a callback. > > Signed-off-by: Marc Zyngier > --- > drivers/irqchip/irq-gic-v3.c

[PATCH v2 0/4] arm64: Introduce new IPI as IPI_CALL_NMI_FUNC

2020-05-20 Thread Sumit Garg
lkml/2020/4/24/328 [2] https://lkml.org/lkml/2020/5/19/710 [3] https://lkml.org/lkml/2020/5/20/418 Sumit Garg (4): arm64: smp: Introduce a new IPI as IPI_CALL_NMI_FUNC irqchip/gic-v3: Enable support for SGIs to act as NMIs arm64: smp: Setup IPI_CALL_NMI_FUNC as a pseudo NMI arm64: kgdb: Ro

[PATCH v2 1/4] arm64: smp: Introduce a new IPI as IPI_CALL_NMI_FUNC

2020-05-20 Thread Sumit Garg
platforms which incorporates GICv3 or later version of interrupt controller. In case a particular platform doesn't support pseudo NMIs, IPI_CALL_NMI_FUNC will act as a normal IPI which can still be used to invoke special handlers. Signed-off-by: Sumit Garg --- arch/arm64/include/asm/hardirq.h

[PATCH v2 3/4] arm64: smp: Setup IPI_CALL_NMI_FUNC as a pseudo NMI

2020-05-20 Thread Sumit Garg
Setup IPI_CALL_NMI_FUNC as a pseudo NMI using generic interrupt framework APIs. In case a plarform doesn't provide support for pseudo NMIs, switch back to IPI_CALL_NMI_FUNC being a normal interrupt. Signed-off-by: Sumit Garg --- arch/arm64/kernel/smp.c

[PATCH v2 2/4] irqchip/gic-v3: Enable support for SGIs to act as NMIs

2020-05-20 Thread Sumit Garg
. Signed-off-by: Sumit Garg --- drivers/irqchip/irq-gic-v3.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c index 82095b8..ceef63b 100644 --- a/drivers/irqchip/irq-gic-v3.c +++ b/drivers/irqchip/irq-gic-v3.c

[PATCH v2 4/4] arm64: kgdb: Round up cpus using IPI_CALL_NMI_FUNC

2020-05-20 Thread Sumit Garg
arm64 platform doesn't supports pseudo NMIs, IPI_CALL_NMI_FUNC will act as a normal IPI which maintains existing kgdb functionality. Signed-off-by: Sumit Garg --- arch/arm64/include/asm/kgdb.h | 8 arch/arm64/kernel/kgdb.c | 21 + arch/arm64/kernel/smp.c

Re: [PATCH v2 00/17] arm/arm64: Turning IPIs into normal interrupts

2020-08-11 Thread Sumit Garg
Hi Marc, On Thu, 25 Jun 2020 at 01:28, Marc Zyngier wrote: > > For as long as SMP ARM has existed, IPIs have been handled as > something special. The arch code and the interrupt controller exchange > a couple of hooks (one to generate an IPI, another to handle it). > > Although this is perfectly

Re: [RFC 0/5] Introduce NMI aware serial drivers

2020-08-11 Thread Sumit Garg
On Tue, 21 Jul 2020 at 17:40, Sumit Garg wrote: > > Make it possible for UARTs to trigger magic sysrq from an NMI. With the > advent of pseudo NMIs on arm64 it became quite generic to request serial > device interrupt as an NMI rather than IRQ. And having NMI driven serial > RX w

Re: [RFC 0/5] Introduce NMI aware serial drivers

2020-08-11 Thread Sumit Garg
Hi Greg, Thanks for your comments. On Tue, 11 Aug 2020 at 19:27, Greg Kroah-Hartman wrote: > > On Tue, Aug 11, 2020 at 07:20:26PM +0530, Sumit Garg wrote: > > On Tue, 21 Jul 2020 at 17:40, Sumit Garg wrote: > > > > > > Make it possible for UARTs to trigger mag

Re: [RFC 0/5] Introduce NMI aware serial drivers

2020-08-11 Thread Sumit Garg
On Tue, 11 Aug 2020 at 20:28, Greg Kroah-Hartman wrote: > > On Tue, Aug 11, 2020 at 07:59:24PM +0530, Sumit Garg wrote: > > Hi Greg, > > > > Thanks for your comments. > > > > On Tue, 11 Aug 2020 at 19:27, Greg Kroah-Hartman > > wrote: > > > &g

Re: [RFC 0/5] Introduce NMI aware serial drivers

2020-08-12 Thread Sumit Garg
Hi Doug, On Tue, 11 Aug 2020 at 22:46, Doug Anderson wrote: > > Hi, > > On Tue, Aug 11, 2020 at 7:58 AM Greg Kroah-Hartman > wrote: > > > > On Tue, Aug 11, 2020 at 07:59:24PM +0530, Sumit Garg wrote: > > > Hi Greg, > > > > > > Thanks for y

Re: [PATCHv2 2/2] hwrng: optee: fix wait use case

2020-08-05 Thread Sumit Garg
Apologies for my delayed response as I was busy with some other tasks along with holidays. On Fri, 24 Jul 2020 at 19:53, Jorge Ramirez-Ortiz, Foundries wrote: > > On 24/07/20, Sumit Garg wrote: > > On Thu, 23 Jul 2020 at 14:16, Jorge Ramirez-Ortiz > > wrote: > > > &

Re: [PATCHv2 2/2] hwrng: optee: fix wait use case

2020-08-05 Thread Sumit Garg
On Thu, 6 Aug 2020 at 02:08, Jorge Ramirez-Ortiz, Foundries wrote: > > On 05/08/20, Sumit Garg wrote: > > Apologies for my delayed response as I was busy with some other tasks > > along with holidays. > > no pb! was just making sure this wasnt falling through some cracks.

Re: [PATCHv2 2/2] hwrng: optee: fix wait use case

2020-08-05 Thread Sumit Garg
On Thu, 6 Aug 2020 at 12:00, Jorge Ramirez-Ortiz, Foundries wrote: > > On 06/08/20, Sumit Garg wrote: > > On Thu, 6 Aug 2020 at 02:08, Jorge Ramirez-Ortiz, Foundries > > wrote: > > > > > > On 05/08/20, Sumit Garg wrote: > > > > Apologies for m

Re: [PATCHv2 2/2] hwrng: optee: fix wait use case

2020-08-06 Thread Sumit Garg
On Thu, 6 Aug 2020 at 13:44, Jorge Ramirez-Ortiz, Foundries wrote: > > On 06/08/20, Sumit Garg wrote: > > On Thu, 6 Aug 2020 at 12:00, Jorge Ramirez-Ortiz, Foundries > > wrote: > > > > > > On 06/08/20, Sumit Garg wrote: > > > > On Thu, 6 A

Re: [RFC 2/5] serial: core: Add framework to allow NMI aware serial drivers

2020-08-18 Thread Sumit Garg
On Mon, 17 Aug 2020 at 19:58, Daniel Thompson wrote: > > On Mon, Aug 17, 2020 at 05:57:03PM +0530, Sumit Garg wrote: > > On Fri, 14 Aug 2020 at 19:43, Daniel Thompson > > wrote: > > > On Fri, Aug 14, 2020 at 04:47:11PM +0530, Sumit Garg wrote: > > > Does it

Re: [RFC 2/5] serial: core: Add framework to allow NMI aware serial drivers

2020-08-18 Thread Sumit Garg
On Mon, 17 Aug 2020 at 20:02, Daniel Thompson wrote: > > On Mon, Aug 17, 2020 at 07:53:55PM +0530, Sumit Garg wrote: > > On Mon, 17 Aug 2020 at 19:27, Doug Anderson wrote: > > > > > > Hi, > > > > > > On Mon, Aug 17, 2020 at 5:27 AM Sumit Garg w

Re: [RFC 1/5] tty/sysrq: Make sysrq handler NMI aware

2020-08-18 Thread Sumit Garg
On Mon, 17 Aug 2020 at 22:49, Doug Anderson wrote: > > Hi, > > On Mon, Aug 17, 2020 at 7:08 AM Sumit Garg wrote: > > > > On Fri, 14 Aug 2020 at 20:27, Doug Anderson wrote: > > > > > > Hi, > > > > > > On Fri, Aug 14, 2020 at 12

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 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 key

[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

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 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

[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 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 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 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] kdb: Refactor kdb_defcmd implementation

2021-03-22 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 v2] kdb: Get rid of custom debug heap allocator

2021-03-22 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 v3] kdb: Refactor env variables get/set code

2021-03-22 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

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

2021-03-22 Thread Sumit Garg
fully 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 ---

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

2021-03-23 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

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. &

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 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 Fatoum > > &

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][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][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 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 supp

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: > >> > >> https://git.kerne

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 parameters?

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 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? > Othe

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] 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: > > > > T

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 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 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 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: > >

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

2021-03-01 Thread Sumit Garg
https://patchwork.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: Introdu

[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
table 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

[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 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

  1   2   3   4   >