Re: [PATCH] ubifs: CONFIG_UBIFS_FS_AUTHENTICATION should depend on UBIFS_FS

2018-11-07 Thread Sascha Hauer
rt") > Signed-off-by: Geert Uytterhoeven > --- > fs/ubifs/Kconfig | 15 +++ > 1 file changed, 7 insertions(+), 8 deletions(-) I would have sent a similar patch with taking the easier way out of just adding another "depends on UBIFS_FS". This one is nicer though.

Re: fs/ubifs/auth.c:249:2: error: implicit declaration of function 'request_key'

2018-11-07 Thread Sascha Hauer
On Wed, Nov 07, 2018 at 02:25:10AM +0800, kbuild test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > master > head: 8053e5b93eca9b011f7b79bb019bf1eeaaf96c4b > commit: d8a22773a12c6d78ee758c9e530f3a488bb7cb29 ubifs: Enable authentication > support >

Re: [PATCH v10 4/5] clk: imx: add imx composite clock

2018-10-09 Thread Sascha Hauer
On Tue, Oct 09, 2018 at 10:56:14PM +, Leonard Crestez wrote: > On Tue, 2018-10-09 at 08:37 +, Abel Vesa wrote: > > +struct clk *imx_clk_composite_8m_flags(const char *name, > > + const char **parent_names, > > + int

Re: [PATCH v9 4/5] clk: imx: add imx composite clock

2018-09-26 Thread Sascha Hauer
On Tue, Sep 25, 2018 at 01:42:12PM -0300, Fabio Estevam wrote: > Hi Abel, > > On Mon, Sep 24, 2018 at 7:39 AM, Abel Vesa wrote: > > > +static long imx_clk_composite_divider_round_rate(struct clk_hw *hw, > > + unsigned long rate, > > +

Re: [PATCH v8 4/5] clk: imx: add imx composite clock

2018-09-24 Thread Sascha Hauer
same time and > therefore we add the imx_clk_composite_divider_ops and register the composite > clock with those. > > Signed-off-by: Abel Vesa > Suggested-by: Sascha Hauer > --- > drivers/clk/imx/Makefile| 1 + > driv

[PATCH 10/25] ubifs: add separate functions to init/crc a node

2018-09-07 Thread Sascha Hauer
When adding authentication support we will embed a HMAC into some nodes. To prepare these nodes we have to first initialize the nodes, then add a HMAC and finally add a CRC. To accomplish this add separate ubifs_init_node/ubifs_crc_node functions. Signed-off-by: Sascha Hauer --- fs/ubifs/io.c

[PATCH 03/25] ubifs: pass ubifs_zbranch to try_read_node()

2018-09-07 Thread Sascha Hauer
that we do not have to add another argument. Signed-off-by: Sascha Hauer --- fs/ubifs/tnc.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/fs/ubifs/tnc.c b/fs/ubifs/tnc.c index bf416e512743..8502c07c1e0a 100644 --- a/fs/ubifs/tnc.c +++ b/fs/ubifs/tnc.c @@ -35,7 +35,7

[PATCH 01/25] ARM: imx_v6_v7_defconfig: update

2018-09-07 Thread Sascha Hauer
Signed-off-by: Sascha Hauer --- arch/arm/configs/imx_v6_v7_defconfig | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig index 7eca43ff69bb..2ce9626e213b 100644 --- a/arch/arm/configs

[PATCH 07/25] ubifs: drop write_node

2018-09-07 Thread Sascha Hauer
write_node() is used only once and can easily be replaced with calls to ubifs_prepare_node()/write_head() which makes the code a bit shorter. Signed-off-by: Sascha Hauer --- fs/ubifs/journal.c | 39 +-- 1 file changed, 5 insertions(+), 34 deletions(-) diff

[PATCH 02/25] ubifs: refactor create_default_filesystem()

2018-09-07 Thread Sascha Hauer
with authentication support we'll need the contents of some nodes when creating other nodes. Signed-off-by: Sascha Hauer --- fs/ubifs/sb.c | 95 +-- 1 file changed, 47 insertions(+), 48 deletions(-) diff --git a/fs/ubifs/sb.c b/fs/ubifs/sb.c index

[PATCH v2 00/25] UBIFS authentication support

2018-09-07 Thread Sascha Hauer
on bad-hash report handler - fix various comments - Add missing ubifs_add_dirt() in the garbage collectors move_nodes() function - add ubifs_add_auth_dirt() to add dirt for an authentication node /Sascha Sascha Hauer (25): ARM: imx_v6_v7_defconfig: update ubifs: refactor create_default_file

[PATCH 05/25] ubifs: export pnode_lookup as ubifs_pnode_lookup

2018-09-07 Thread Sascha Hauer
ubifs_lpt_lookup could be implemented using pnode_lookup. To make that possible move pnode_lookup from lpt.c to lpt_commit.c. Rename it to ubifs_pnode_lookup since it's now exported. Signed-off-by: Sascha Hauer --- fs/ubifs/lpt.c| 32 fs/ubifs

[PATCH 17/25] ubifs: authenticate replayed journal

2018-09-07 Thread Sascha Hauer
the authentication node for them. These nodes have to be discarded during replay. Signed-off-by: Sascha Hauer --- fs/ubifs/replay.c | 146 +- 1 file changed, 144 insertions(+), 2 deletions(-) diff --git a/fs/ubifs/replay.c b/fs/ubifs/replay.c index

[PATCH 21/25] ubifs: authentication: Authenticate super block node

2018-09-07 Thread Sascha Hauer
This adds a HMAC covering the super block node and adds the logic that decides if a filesystem shall be mounted unauthenticated or authenticated. Signed-off-by: Sascha Hauer --- fs/ubifs/sb.c | 70 ++- 1 file changed, 69 insertions(+), 1 deletion

[PATCH 04/25] ubifs: pass ubifs_zbranch to read_znode()

2018-09-07 Thread Sascha Hauer
do not have to add another argument. Signed-off-by: Sascha Hauer --- fs/ubifs/tnc_misc.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/fs/ubifs/tnc_misc.c b/fs/ubifs/tnc_misc.c index d90ee01076a9..6ce75999f273 100644 --- a/fs/ubifs/tnc_misc.c +++ b/fs/ubifs

[PATCH 22/25] ubifs: Add hashes and HMACs to default filesystem

2018-09-07 Thread Sascha Hauer
This patch calculates the necessary hashes and HMACs for the default filesystem so that the dynamically created default fs can be authenticated. Signed-off-by: Sascha Hauer --- fs/ubifs/sb.c | 34 +++--- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git

[PATCH 12/25] ubifs: Create functions to embed a HMAC in a node

2018-09-07 Thread Sascha Hauer
fields in the node, then calculate the HMAC (not covering the CRC) and finally calculate the CRC. Signed-off-by: Sascha Hauer --- fs/ubifs/io.c| 72 fs/ubifs/ubifs.h | 4 +++ 2 files changed, 70 insertions(+), 6 deletions(-) diff --git a/fs/ubifs

[PATCH 25/25] Documentation: ubifs: Add authentication whitepaper

2018-09-07 Thread Sascha Hauer
Signed-off-by: Sascha Hauer --- .../filesystems/ubifs-authentication.md | 426 ++ 1 file changed, 426 insertions(+) create mode 100644 Documentation/filesystems/ubifs-authentication.md diff --git a/Documentation/filesystems/ubifs-authentication.md b/Documentation

[PATCH 24/25] ubifs: Enable authentication support

2018-09-07 Thread Sascha Hauer
the hashing algorithm used for this FS. Passing these options make authentication mandatory and only UBIFS images that can be authenticated with the given key are allowed. Signed-off-by: Sascha Hauer --- Documentation/filesystems/ubifs.txt | 7 ++ fs/ubifs/Kconfig| 10

[PATCH 09/25] ubifs: Format changes for authentication support

2018-09-07 Thread Sascha Hauer
in this patch, nevertheless explained here: * hashes over the referenced child nodes in each branch of a index node Signed-off-by: Sascha Hauer --- fs/ubifs/debug.c | 6 ++ fs/ubifs/super.c | 1 + fs/ubifs/ubifs-media.h | 46 +++--- 3 files changed

[PATCH 14/25] ubifs: authentication: Add hashes to index nodes

2018-09-07 Thread Sascha Hauer
node cache. This means the nodes must previously be authenticated by other means. This is done in a later patch. Signed-off-by: Sascha Hauer --- fs/ubifs/master.c | 3 +++ fs/ubifs/misc.h | 5 +++-- fs/ubifs/replay.c | 29 ++--- fs/ubifs/tnc.c| 12

[PATCH 20/25] ubifs: Create hash for default LPT

2018-09-07 Thread Sascha Hauer
During creation of the default filesystem on an empty flash the default LPT is created. With this patch a hash over the default LPT is calculated which can be added to the default filesystems master node. Signed-off-by: Sascha Hauer --- fs/ubifs/lpt.c | 21 - fs/ubifs/sb.c

[PATCH 11/25] ubifs: add helper functions for authentication support

2018-09-07 Thread Sascha Hauer
to be called with disabled authentication. Signed-off-by: Sascha Hauer --- fs/ubifs/Kconfig | 1 + fs/ubifs/Makefile | 1 + fs/ubifs/auth.c | 502 ++ fs/ubifs/ubifs.h | 218 4 files changed, 722 insertions(+) create mode 100644

[PATCH 16/25] ubifs: Add auth nodes to garbage collector journal head

2018-09-07 Thread Sascha Hauer
To be able to authenticate the garbage collector journal head add authentication nodes to the buds the garbage collector creates. Signed-off-by: Sascha Hauer --- fs/ubifs/gc.c | 46 +++--- 1 file changed, 43 insertions(+), 3 deletions(-) diff --git a/fs

[PATCH 06/25] ubifs: implement ubifs_lpt_lookup using ubifs_pnode_lookup

2018-09-07 Thread Sascha Hauer
ubifs_lpt_lookup() starts by looking up the nth pnode in the LPT. We already have this functionality in ubifs_pnode_lookup(). Use this function rather than open coding its functionality. Signed-off-by: Sascha Hauer --- fs/ubifs/lpt.c | 20 ++-- 1 file changed, 2 insertions

[PATCH 19/25] ubfis: authentication: authenticate master node

2018-09-07 Thread Sascha Hauer
The master node contains hashes over the root index node and the LPT. This patch adds a HMAC to authenticate the master node itself. Signed-off-by: Sascha Hauer --- fs/ubifs/master.c | 61 - fs/ubifs/recovery.c | 9 --- fs/ubifs/ubifs.h| 1

[PATCH 13/25] ubifs: Add hashes to the tree node cache

2018-09-07 Thread Sascha Hauer
of these functions which actually prepare the nodes. With this patch all the leaf nodes of the index tree get hashes, but currently nothing is done with these hashes, this is left for a later patch. Signed-off-by: Sascha Hauer --- fs/ubifs/journal.c | 144

[PATCH 23/25] ubifs: do not update inode size in-place in authenticated mode

2018-09-07 Thread Sascha Hauer
may lose some data written right before the first powercut. This is why we only do this in authenticated mode and leave the behaviour for unauthenticated mode untouched. Signed-off-by: Sascha Hauer --- fs/ubifs/recovery.c | 111 +--- fs/ubifs/super.c

[PATCH 15/25] ubifs: Add authentication nodes to journal

2018-09-07 Thread Sascha Hauer
uggests the auth nodes themselves are not hashed. With this it is possible for an offline attacker to cut each journal head or to drop the last reference node(s), but not to skip any journal heads or to reorder any operations. Signed-off-by: Sascha Hauer --- fs/ubifs/gc.c |

[PATCH 18/25] ubifs: authentication: authenticate LPT

2018-09-07 Thread Sascha Hauer
the complete LPT. Signed-off-by: Sascha Hauer --- fs/ubifs/lpt.c| 129 ++ fs/ubifs/lpt_commit.c | 4 ++ fs/ubifs/ubifs.h | 1 + 3 files changed, 134 insertions(+) diff --git a/fs/ubifs/lpt.c b/fs/ubifs/lpt.c index 5f57af224b8f..ee18305a6152

[PATCH 08/25] ubifs: Store read superblock node

2018-09-07 Thread Sascha Hauer
the superblock node, but also have to authenticate it, which is easier if we do it once during initialization. Signed-off-by: Sascha Hauer --- fs/ubifs/sb.c| 19 +-- fs/ubifs/super.c | 8 +--- fs/ubifs/ubifs.h | 3 ++- 3 files changed, 8 insertions(+), 22 deletions(-) diff --git

Re: [PATCH 13/25] ubifs: authentication: Add hashes to index nodes

2018-09-07 Thread Sascha Hauer
On Mon, Aug 27, 2018 at 09:36:56PM +0200, Richard Weinberger wrote: > > diff --git a/fs/ubifs/tnc.c b/fs/ubifs/tnc.c > > index a47fced47823..a00809d4fe6f 100644 > > --- a/fs/ubifs/tnc.c > > +++ b/fs/ubifs/tnc.c > > @@ -488,6 +488,12 @@ static int try_read_node(const struct ubifs_info *c, > > void

Re: [PATCH 15/25] ubifs: Add auth nodes to garbage collector journal head

2018-08-30 Thread Sascha Hauer
On Mon, Aug 27, 2018 at 10:51:56PM +0200, Richard Weinberger wrote: > Am Mittwoch, 4. Juli 2018, 14:41:27 CEST schrieb Sascha Hauer: > > To be able to authenticate the garbage collector journal head add > > authentication nodes to the buds the garbage collector creates. >

Re: [PATCH 14/25] ubifs: Add authentication nodes to journal

2018-08-30 Thread Sascha Hauer
On Wed, Aug 29, 2018 at 04:54:30PM +0200, Richard Weinberger wrote: > Am Mittwoch, 29. August 2018, 16:38:34 CEST schrieb Sascha Hauer: > > On Mon, Aug 27, 2018 at 10:48:26PM +0200, Richard Weinberger wrote: > > > > release_head(c, BASEHD); >

Re: [PATCH 14/25] ubifs: Add authentication nodes to journal

2018-08-29 Thread Sascha Hauer
On Mon, Aug 27, 2018 at 10:48:26PM +0200, Richard Weinberger wrote: > Am Mittwoch, 4. Juli 2018, 14:41:26 CEST schrieb Sascha Hauer: > > Nodes that are written to flash can only be authenticated through the > > index after the next commit. When a journal replay is necessar

Re: [PATCH 12/25] ubifs: Add hashes to the tree node cache

2018-08-29 Thread Sascha Hauer
On Mon, Aug 27, 2018 at 09:18:25PM +0200, Richard Weinberger wrote: > Am Mittwoch, 4. Juli 2018, 14:41:24 CEST schrieb Sascha Hauer: > > As part of the UBIFS authentication support every branch in the index > > gets a hash covering the referenced node. To make that happen the tree

Re: [PATCH 10/25] ubifs: add helper functions for authentication support

2018-08-29 Thread Sascha Hauer
Hi Richard, On Mon, Aug 27, 2018 at 02:50:37PM +0200, Richard Weinberger wrote: > Am Mittwoch, 4. Juli 2018, 14:41:22 CEST schrieb Sascha Hauer: > > This patch adds the various helper functions needed for authentication > > support. We need functions to hash nodes, to embed HM

Re: [PATCH v6 5/5] clk: imx: add clock driver for i.MX8MQ CCM

2018-08-24 Thread Sascha Hauer
On Wed, Aug 22, 2018 at 04:48:23PM +0300, Abel Vesa wrote: > From: Lucas Stach > > Add driver for the Clock Control Module found on i.MX8MQ. > > This is largely based on the downstream driver from Anson Huang and > Bai Ping at NXP, with only some small adaptions to mainline from me. It's time

Re: [PATCH v6 4/5] clk: imx: add imx composite clock

2018-08-24 Thread Sascha Hauer
t; therefore we add the imx_clk_composite_divider_ops and register the composite > clock with those. > > Signed-off-by: Abel Vesa > Suggested-by: Sascha Hauer > --- > drivers/clk/imx/Makefile| 1 + > drivers/clk/imx/clk-composite.c | 157 > +++

Re: [PATCH v6 3/5] clk: imx: add SCCG PLL type

2018-08-24 Thread Sascha Hauer
+Cc Andrey Smirnov who made me aware of this issue. On Wed, Aug 22, 2018 at 04:48:21PM +0300, Abel Vesa wrote: > From: Lucas Stach > > The SCCG is a new PLL type introduced on i.MX8. Add support for this. > The driver currently misses the PLL lock check, as the preliminary > documentation

Re: [PATCH] ARM: dts: imx6ull: correct machine model name

2018-08-23 Thread Sascha Hauer
Hi Anson, The board name should be in the subject to let the reader know this is no generic i.MX6ull change. Sascha On Thu, Aug 23, 2018 at 02:30:49PM +0800, Anson Huang wrote: > i.MX6ULL is a lite version of i.MX6UL, its full name > is i.MX6 UltraLiteLite, NOT UlltraLite. > > Signed-off-by:

Re: [RESEND v5 4/5] clk: imx: add imx composite clock

2018-08-21 Thread Sascha Hauer
> outside of the SoC specific clock driver. > > Signed-off-by: Abel Vesa > Suggested-by: Sascha Hauer > --- > drivers/clk/imx/Makefile| 1 + > drivers/clk/imx/clk-composite.c | 126 > > drivers/clk/imx/clk.h

Re: [PATCH v4 4/5] clk: imx: add imx composite clock

2018-08-17 Thread Sascha Hauer
Hi Abel, On Thu, Aug 16, 2018 at 06:27:15PM +0300, Abel Vesa wrote: > Since a lot of clocks on imx8 are formed by a mux, gate, predivider and > divider, the idea here is to combine all of those into one more complex > clock type, therefore moving the complexity inside the composite clock and >

Re: [PATCH 05/25] ubifs: implement ubifs_lpt_lookup using ubifs_pnode_lookup

2018-08-13 Thread Sascha Hauer
On Mon, Aug 13, 2018 at 08:34:00AM +0200, Richard Weinberger wrote: > Am Montag, 13. August 2018, 08:31:27 CEST schrieb Sascha Hauer: > > On Wed, Jul 04, 2018 at 02:41:17PM +0200, Sascha Hauer wrote: > > > ubifs_lpt_lookup() starts by looking up the nth pnode in the LPT. We

Re: [PATCH 05/25] ubifs: implement ubifs_lpt_lookup using ubifs_pnode_lookup

2018-08-13 Thread Sascha Hauer
On Wed, Jul 04, 2018 at 02:41:17PM +0200, Sascha Hauer wrote: > ubifs_lpt_lookup() starts by looking up the nth pnode in the LPT. We > already have this functionality in ubifs_pnode_lookup(). Use this > function rather than open coding its functionality. > > Signed-off-b

Re: [PATCH v3 0/4] Add i.MX8MQ clock driver

2018-08-10 Thread Sascha Hauer
Hi Abel, On Thu, Aug 09, 2018 at 05:45:37PM +0300, Abel Vesa wrote: > This is basically just a resend of the following patchset: > > https://www.spinics.net/lists/linux-clk/msg23141.html > > I've just updated the patchset and implemented Shawn's > and Aisheng's comments. > > I hope I haven't

Re: [PATCH RESEND 2/5] spi: imx: Use dynamic bursts only when bits_per_word is 8, 16 or 32

2018-08-06 Thread Sascha Hauer
, so we don't need to mask out the remaining > parts of the words. > > Signed-off-by: Maxime Chevallier Reviewed-by: Sascha Hauer Sascha > --- > drivers/spi/spi-imx.c | 23 +-- > 1 file changed, 9 insertions(+), 14 deletions(-) > > diff --git a/drivers/spi/

Re: [PATCH RESEND 3/5] spi: imx: Use correct number of bytes per words

2018-08-06 Thread Sascha Hauer
ction to return the > correct number of bytes. > > This also allows to get rid of unnecessary checks in the can_dma > function, since the SPI core validates that we always have a transfer > length that is a multiple of the number of bytes per word. > > Signed-off-by: Maxime Ch

Re: [PATCH RESEND 4/5] spi: imx: remove unnecessary check in spi_imx_can_dma

2018-08-06 Thread Sascha Hauer
an't never have a case where the transfer size isn't divsiible by 1. s/can't never/can never/ s/divsiible/divisible/ Otherwise: Reviewed-by: Sascha Hauer Sascha > > Remove the extra check for the wml being different than 0. > > Signed-off-by: Maxime Chevallier > --- > d

Re: [PATCH RESEND 1/5] spi: imx: Remove duplicate variable assignments

2018-08-06 Thread Sascha Hauer
eletions(-) Reviewed-by: Sascha Hauer Sascha > > diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c > index d3b21faf6b1f..d75153c995af 100644 > --- a/drivers/spi/spi-imx.c > +++ b/drivers/spi/spi-imx.c > @@ -1106,8 +1106,6 @@ static int spi_imx_setupxfer(stru

Re: [PATCH v2 2/3] dmaengine: imx-sdma: add memcpy interface

2018-08-06 Thread Sascha Hauer
On Fri, Jul 20, 2018 at 09:40:51AM +, Robin Gong wrote: > > -Original Message- > > From: Sascha Hauer [mailto:s.ha...@pengutronix.de] > > Sent: 2018年7月13日 14:16 > > To: Robin Gong > > Cc: vk...@kernel.org; dan.j.willi...@intel.com; shawn...@kern

Re: [PATCH v2 2/3] dmaengine: imx-sdma: add memcpy interface

2018-07-13 Thread Sascha Hauer
On Fri, Jul 13, 2018 at 09:08:46PM +0800, Robin Gong wrote: > Add MEMCPY capability for imx-sdma driver. > > Signed-off-by: Robin Gong > --- > drivers/dma/imx-sdma.c | 95 > -- > 1 file changed, 92 insertions(+), 3 deletions(-) > > @@ -1318,6

Re: [PATCH V4 3/5] mailbox: imx: add imx mu support

2018-07-11 Thread Sascha Hauer
On Wed, Jul 11, 2018 at 07:29:38AM +, A.s. Dong wrote: > Hi Sascha, > > > -Original Message- > > From: Sascha Hauer [mailto:s.ha...@pengutronix.de] > > Sent: Tuesday, July 10, 2018 10:20 PM > > To: A.s. Dong > > Cc: linux-arm-ker...@lists.infradead

Re: [PATCH v1 1/4] dmaengine: imx-sdma: add memcpy interface

2018-07-11 Thread Sascha Hauer
On Wed, Jul 11, 2018 at 07:05:23AM +, Robin Gong wrote: > > > > -Original Message- > > From: Sascha Hauer [mailto:s.ha...@pengutronix.de] > > Sent: 2018年7月11日 15:01 > > To: Robin Gong > > Cc: vk...@kernel.org; dan.j.willi...@intel.com; shawn..

Re: [PATCH v1 1/4] dmaengine: imx-sdma: add memcpy interface

2018-07-11 Thread Sascha Hauer
On Wed, Jul 11, 2018 at 06:56:18AM +, Robin Gong wrote: > > > -Original Message- > > From: Sascha Hauer [mailto:s.ha...@pengutronix.de] > > Sent: 2018年7月11日 14:25 > > To: Robin Gong > > Cc: vk...@kernel.org; dan.j.willi...@intel.com; shawn...@k

Re: [PATCH v1 2/4] dmaengine: imx-sdma: add check_bd_buswidth() to kill the dulicated code

2018-07-11 Thread Sascha Hauer
On Wed, Jul 11, 2018 at 12:23:11AM +0800, Robin Gong wrote: > Add check_bd_buswidth() to minimize the code size. > > Signed-off-by: Robin Gong > --- > drivers/dma/imx-sdma.c | 64 > +++--- > 1 file changed, 29 insertions(+), 35 deletions(-) > > diff

Re: [PATCH v1 1/4] dmaengine: imx-sdma: add memcpy interface

2018-07-11 Thread Sascha Hauer
On Wed, Jul 11, 2018 at 12:23:10AM +0800, Robin Gong wrote: > Add MEMCPY support, meanwhile, add SDMA_BD_MAX_CNT instead > of '0x'. > > Signed-off-by: Robin Gong > --- > +static struct dma_async_tx_descriptor *sdma_prep_memcpy( > + struct dma_chan *chan, dma_addr_t dma_dst, > +

Re: [PATCH V4 3/5] mailbox: imx: add imx mu support

2018-07-10 Thread Sascha Hauer
Hi, On Sun, Jul 08, 2018 at 10:56:55PM +0800, Dong Aisheng wrote: > This is used for i.MX multi core communication. > e.g. A core to SCU firmware(M core) on MX8. > > Tx is using polling mode while Rx is interrupt driven and > schedule a hrtimer to receive remain words if have more than > 4

[PATCH 06/25] ubifs: drop write_node

2018-07-04 Thread Sascha Hauer
write_node() is used only once and can easily be replaced with calls to ubifs_prepare_node()/write_head() which makes the code a bit shorter. Signed-off-by: Sascha Hauer --- fs/ubifs/journal.c | 39 +-- 1 file changed, 5 insertions(+), 34 deletions(-) diff

[PATCH 01/25] ubifs: refactor create_default_filesystem()

2018-07-04 Thread Sascha Hauer
with authentication support we'll need the contents of some nodes when creating other nodes. Signed-off-by: Sascha Hauer --- fs/ubifs/sb.c | 95 +-- 1 file changed, 47 insertions(+), 48 deletions(-) diff --git a/fs/ubifs/sb.c b/fs/ubifs/sb.c index

[PATCH 19/25] ubifs: Create hash for default LPT

2018-07-04 Thread Sascha Hauer
During creation of the default filesystem on an empty flash the default LPT is created. With this patch a hash over the default LPT is calculated which can be added to the default filesystems master node. Signed-off-by: Sascha Hauer --- fs/ubifs/lpt.c | 13 - fs/ubifs/sb.c| 3

[PATCH 09/25] ubifs: add separate functions to init/crc a node

2018-07-04 Thread Sascha Hauer
When adding authentication support we will embed a HMAC into some nodes. To prepare these nodes we have to first initialize the nodes, then add a HMAC and finally add a CRC. To accomplish this add separate ubifs_init_node/ubifs_crc_node functions. Signed-off-by: Sascha Hauer --- fs/ubifs/io.c

[PATCH 04/25] ubifs: export pnode_lookup as ubifs_pnode_lookup

2018-07-04 Thread Sascha Hauer
ubifs_lpt_lookup could be implemented using pnode_lookup. To make that possible move pnode_lookup from lpt.c to lpt_commit.c. Rename it to ubifs_pnode_lookup since it's now exported. Signed-off-by: Sascha Hauer --- fs/ubifs/lpt.c| 32 fs/ubifs

[PATCH 12/25] ubifs: Add hashes to the tree node cache

2018-07-04 Thread Sascha Hauer
of these functions which actually prepare the nodes. With this patch all the leaf nodes of the index tree get hashes, but currently nothing is done with these hashes, this is left for a later patch. Signed-off-by: Sascha Hauer --- fs/ubifs/journal.c | 93

[PATCH 14/25] ubifs: Add authentication nodes to journal

2018-07-04 Thread Sascha Hauer
uggests the auth nodes themselves are not hashed. With this it is possible for an offline attacker to cut each journal head or to drop the last reference node(s), but not to skip any journal heads or to reorder any operations. Signed-off-by: Sascha Hauer --- fs/ubifs/gc.c |

[PATCH 08/25] ubifs: Format changes for authentication support

2018-07-04 Thread Sascha Hauer
in this patch, nevertheless explained here: * hashes over the referenced child nodes in each branch of a index node Signed-off-by: Sascha Hauer --- fs/ubifs/debug.c | 6 ++ fs/ubifs/super.c | 1 + fs/ubifs/ubifs-media.h | 46 +++--- 3 files changed

[PATCH 16/25] ubifs: authenticate replayed journal

2018-07-04 Thread Sascha Hauer
the authentication node for them. These nodes have to be discarded during replay. Signed-off-by: Sascha Hauer --- fs/ubifs/replay.c | 116 +- 1 file changed, 114 insertions(+), 2 deletions(-) diff --git a/fs/ubifs/replay.c b/fs/ubifs/replay.c index

[PATCH 24/25] ubifs: support offline signed images

2018-07-04 Thread Sascha Hauer
, the signature is no longer required or even present on the filesystem. Signed-off-by: Sascha Hauer --- fs/ubifs/Kconfig | 1 + fs/ubifs/auth.c| 76 ++ fs/ubifs/master.c | 11 -- fs/ubifs/sb.c | 22 fs/ubifs/super.c

[PATCH 20/25] ubifs: authentication: Authenticate super block node

2018-07-04 Thread Sascha Hauer
This adds a HMAC covering the super block node and adds the logic that decides if a filesystem shall be mounted unauthenticated or authenticated. Signed-off-by: Sascha Hauer --- fs/ubifs/sb.c | 63 ++- 1 file changed, 62 insertions(+), 1 deletion

[PATCH 15/25] ubifs: Add auth nodes to garbage collector journal head

2018-07-04 Thread Sascha Hauer
To be able to authenticate the garbage collector journal head add authentication nodes to the buds the garbage collector creates. Signed-off-by: Sascha Hauer --- fs/ubifs/gc.c | 37 ++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/fs/ubifs

[PATCH 21/25] ubifs: Add hashes and HMACs to default filesystem

2018-07-04 Thread Sascha Hauer
This patch calculates the necessary hashes and HMACs for the default filesystem so that the dynamically created default fs can be authenticated. Signed-off-by: Sascha Hauer --- fs/ubifs/sb.c | 32 +--- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/fs

[PATCH 00/25] UBIFS authentication support

2018-07-04 Thread Sascha Hauer
and if possible try to break it yourself. This patchset is based on v4.18-rc3 and can be obtained here: git://git.pengutronix.de/sha/linux ubifs-authentication-v1 /Sascha Sascha Hauer (25): ubifs: refactor create_default_filesystem() ubifs: pass ubifs_zbranch to try_read_node() ubifs: pass

[PATCH 17/25] ubifs: authentication: authenticate LPT

2018-07-04 Thread Sascha Hauer
the complete LPT. Signed-off-by: Sascha Hauer --- fs/ubifs/lpt.c| 127 ++ fs/ubifs/lpt_commit.c | 4 ++ fs/ubifs/ubifs.h | 1 + 3 files changed, 132 insertions(+) diff --git a/fs/ubifs/lpt.c b/fs/ubifs/lpt.c index cde7b9484157..2c440bb31d69

[PATCH 25/25] Documentation: ubifs: Add authentication whitepaper

2018-07-04 Thread Sascha Hauer
Signed-off-by: Sascha Hauer --- .../filesystems/ubifs-authentication.md | 426 ++ 1 file changed, 426 insertions(+) create mode 100644 Documentation/filesystems/ubifs-authentication.md diff --git a/Documentation/filesystems/ubifs-authentication.md b/Documentation

[PATCH 18/25] ubfis: authentication: authenticate master node

2018-07-04 Thread Sascha Hauer
The master node contains hashes over the root index node and the LPT. This patch adds a HMAC to authenticate the master node itself. Signed-off-by: Sascha Hauer --- fs/ubifs/master.c | 61 - fs/ubifs/recovery.c | 7 +++--- fs/ubifs/ubifs.h| 1

[PATCH 23/25] ubifs: Enable authentication support

2018-07-04 Thread Sascha Hauer
the hashing algorithm used for this FS. Passing these options make authentication mandatory and only UBIFS images that can be authenticated with the given key are allowed. Signed-off-by: Sascha Hauer --- Documentation/filesystems/ubifs.txt | 7 ++ fs/ubifs/Kconfig| 10

[PATCH 13/25] ubifs: authentication: Add hashes to index nodes

2018-07-04 Thread Sascha Hauer
node cache. This means the nodes must previously be authenticated by other means. This is done in a later patch. Signed-off-by: Sascha Hauer --- fs/ubifs/master.c | 3 +++ fs/ubifs/misc.h | 5 +++-- fs/ubifs/replay.c | 29 ++--- fs/ubifs/tnc.c| 13

[PATCH 02/25] ubifs: pass ubifs_zbranch to try_read_node()

2018-07-04 Thread Sascha Hauer
that we do not have to add another argument. Signed-off-by: Sascha Hauer --- fs/ubifs/tnc.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/fs/ubifs/tnc.c b/fs/ubifs/tnc.c index 4a21e7f75e7a..2c42d1a1842a 100644 --- a/fs/ubifs/tnc.c +++ b/fs/ubifs/tnc.c @@ -35,7 +35,7

[PATCH 05/25] ubifs: implement ubifs_lpt_lookup using ubifs_pnode_lookup

2018-07-04 Thread Sascha Hauer
ubifs_lpt_lookup() starts by looking up the nth pnode in the LPT. We already have this functionality in ubifs_pnode_lookup(). Use this function rather than open coding its functionality. Signed-off-by: Sascha Hauer --- fs/ubifs/lpt.c | 20 ++-- 1 file changed, 2 insertions

[PATCH 10/25] ubifs: add helper functions for authentication support

2018-07-04 Thread Sascha Hauer
to be called with disabled authentication. Signed-off-by: Sascha Hauer --- fs/ubifs/Kconfig | 1 + fs/ubifs/Makefile | 1 + fs/ubifs/auth.c | 413 ++ fs/ubifs/ubifs.h | 187 + 4 files changed, 602 insertions(+) create mode

[PATCH 22/25] ubifs: do not update inode size in-place in authenticated mode

2018-07-04 Thread Sascha Hauer
may lose some data written right before the first powercut. This is why we only do this in authenticated mode and leave the behaviour for unauthenticated mode untouched. Signed-off-by: Sascha Hauer --- fs/ubifs/recovery.c | 111 +--- fs/ubifs/super.c

[PATCH 03/25] ubifs: pass ubifs_zbranch to read_znode()

2018-07-04 Thread Sascha Hauer
do not have to add another argument. Signed-off-by: Sascha Hauer --- fs/ubifs/tnc_misc.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/fs/ubifs/tnc_misc.c b/fs/ubifs/tnc_misc.c index 93f5b7859e6f..7e18d459906c 100644 --- a/fs/ubifs/tnc_misc.c +++ b/fs/ubifs

[PATCH 07/25] ubifs: Store read superblock node

2018-07-04 Thread Sascha Hauer
the superblock node, but also have to authenticate it, which is easier if we do it once during initialization. Signed-off-by: Sascha Hauer --- fs/ubifs/sb.c| 19 +-- fs/ubifs/super.c | 8 +--- fs/ubifs/ubifs.h | 3 ++- 3 files changed, 8 insertions(+), 22 deletions(-) diff --git

[PATCH 11/25] ubifs: Create functions to embed a HMAC in a node

2018-07-04 Thread Sascha Hauer
fields in the node, then calculate the HMAC (not covering the CRC) and finally calculate the CRC. Signed-off-by: Sascha Hauer --- fs/ubifs/io.c| 58 +++- fs/ubifs/ubifs.h | 4 2 files changed, 56 insertions(+), 6 deletions(-) diff --git a/fs

Re: [PATCH v5 0/7] add virt-dma support for imx-sdma

2018-06-22 Thread Sascha Hauer
: imx-sdma: remove the maximum limitation for bd numbers > dmaengine: imx-sdma: add sdma_transfer_init to decrease code overlap > dmaengine: imx-sdma: alloclate bd memory from dma pool > > Sascha Hauer (1): > dmaengine: imx-sdma: factor out a struct sdma_desc from struct >

Re: [PATCH v3 5/6] dmaengine: imx-sdma: remove the maximum limation for bd numbers

2018-06-13 Thread Sascha Hauer
In the subject: s/limation/limitation/ Sascha On Mon, Jun 11, 2018 at 10:59:32PM +0800, Robin Gong wrote: > No this limitation now after virtual dma used since bd is allocated > dynamically instead of static. > > Signed-off-by: Robin Gong > --- > drivers/dma/imx-sdma.c | 14 -- >

Re: [PATCH v3 4/6] dmaengine: imx-sdma: remove usless lock

2018-06-13 Thread Sascha Hauer
On Mon, Jun 11, 2018 at 10:59:31PM +0800, Robin Gong wrote: > No need anymore for 'lock' now since virtual dma will provide > the common lock instead. This can be merged into the last patch, maybe rephrasing the commit message from "revert..." to what is being done. To me "revert" sounds like the

Re: [PATCH v2 0/5] add virt-dma support for imx-sdma

2018-06-08 Thread Sascha Hauer
- > 2 files changed, 227 insertions(+), 166 deletions(-) Please put the attached patch in front of your series. It makes the virt-dma support patch smaller and thus easier to review. Sascha --------8<-- >From a70ccdf780cc6fc

Re: [PATCH v2 1/5] dmaengine: imx-sdma: add virt-dma support

2018-06-08 Thread Sascha Hauer
On Fri, Jun 08, 2018 at 09:44:46PM +0800, Robin Gong wrote: > The legacy sdma driver has below limitations or drawbacks: > 1. Hardcode the max BDs number as "PAGE_SIZE / sizeof(*)", and alloc > one page size for one channel regardless of only few BDs needed > most time. But in few

Re: [PATCH] mtd: rawnand: mxc: set spare area size register explicitly

2018-06-04 Thread Sascha Hauer
offset 0x10 on v1 controllers is > different from the register on v21 controllers. > > Signed-off-by: Martin Kaiser > Cc: sta...@vger.kernel.org Reviewed-by: Sascha Hauer Sascha > --- > drivers/mtd/nand/raw/mxc_nand.c | 5 - > 1 file changed, 4 insertions(+), 1

Re: [PATCH v1] dma: imx-sdma: add virt-dma support

2018-05-22 Thread Sascha Hauer
Hi Robin, Several comments inside. Sascha On Fri, Mar 23, 2018 at 12:18:19AM +0800, Robin Gong wrote: > The legacy sdma driver has below limitations or drawbacks: > 1. Hardcode the max BDs number as "PAGE_SIZE / sizeof(*)", and alloc > one page size for one channel regardless of only few

v4.4-stable: GPMI nand controller broken

2018-05-04 Thread Sascha Hauer
The following went into v4.4.120: 197190bc5c48 mtd: nand: gpmi: Fix failure when a erased page has a bitflip at BBM This patch was backported to far for the stable tree. It only makes sense (and only works) together with: bd2e778c9ee3 gpmi-nand: Handle ECC Errors in erased pages which first

Re: [RFC] UBIFS authentication

2018-04-10 Thread Sascha Hauer
On Mon, Apr 09, 2018 at 05:23:05PM +0200, David Gstir wrote: > Hi Sascha, > > > On 09.04.2018, at 11:59, Sascha Hauer <s.ha...@pengutronix.de> wrote: > > > > Hi David, > > > > On Wed, Jan 17, 2018 at 04:19:14PM +0100, David Gstir wrote: > >>

Re: [RFC] UBIFS authentication

2018-04-09 Thread Sascha Hauer
Hi David, On Wed, Jan 17, 2018 at 04:19:14PM +0100, David Gstir wrote: > Hi everybody! > > ### Index Authentication > > Through UBIFS' concept of a wandering tree, it already takes care of only > updating and persisting changed parts from leaf node up to the root node > of the full B+ tree.

Re: [PATCH 0/4] ARM: imx: use device properties for at24 eeprom

2018-04-06 Thread Sascha Hauer
4): > ARM: imx: vpr200: drop at24_platform_data > ARM: imx: pcm043: use device properties for at24 eeprom > ARM: imx: pca100: use device properties for at24 eeprom > ARM: imx: pcm037: use device properties for at24 eeprom For what it's worth: Acked-by: Sascha Hauer <s.ha...

Re: [PATCH] ARM: dts: tpc: Device tree description of the TPC board

2018-03-02 Thread Sascha Hauer
On Fri, Mar 02, 2018 at 02:25:37PM +0100, Lukasz Majewski wrote: > Hi Sascha, > > > Hi Lukasz, > > > > On Fri, Mar 02, 2018 at 01:17:50PM +0100, Lukasz Majewski wrote: > > > This commit adds device tree description of K+P's TPC board. > > > > Can we get a hint what this board is? I assume

Re: [PATCH] ARM: dts: tpc: Device tree description of the TPC board

2018-03-02 Thread Sascha Hauer
Hi Lukasz, On Fri, Mar 02, 2018 at 01:17:50PM +0100, Lukasz Majewski wrote: > This commit adds device tree description of K+P's TPC board. Can we get a hint what this board is? I assume this one: Technologic Systems' Full i.MX6 Portfolio Including SBC, COM, and Touch Panel PCs Anyway, future

[tip:sched/core] sched/headers: Constify object_is_on_stack()

2017-12-06 Thread tip-bot for Sascha Hauer
Commit-ID: 00ef0ef2cccb0350eae368e565c98453a9305b05 Gitweb: https://git.kernel.org/tip/00ef0ef2cccb0350eae368e565c98453a9305b05 Author: Sascha Hauer <s.ha...@pengutronix.de> AuthorDate: Tue, 5 Dec 2017 11:44:15 +0100 Committer: Ingo Molnar <mi...@kernel.org> CommitDate: Wed

Re: [PATCH v2 5/5] rtc: add mxc driver for i.MX53 SRTC

2017-12-06 Thread Sascha Hauer
On Wed, Dec 06, 2017 at 10:17:06AM +, Patrick Brünn wrote: > >From: Sascha Hauer [mailto:s.ha...@pengutronix.de] > >Sent: Mittwoch, 6. Dezember 2017 09:36 > >On Tue, Dec 05, 2017 at 03:06:46PM +0100, linux-kernel-...@beckhoff.com > >wrote: > >> +static int mx

Re: [PATCH v2 5/5] rtc: add mxc driver for i.MX53 SRTC

2017-12-06 Thread Sascha Hauer
S) > Cc: linux-...@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM) > Cc: devicet...@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE > TREE BINDINGS) > Cc: linux-kernel@vger.kernel.org (open list) > Cc: Fabio Estevam <fabio.este...@nxp.com> >

  1   2   3   4   5   6   7   8   9   10   >