Re: XFS patches for stable

2018-12-03 Thread Richard Weinberger
On Sun, Dec 2, 2018 at 9:09 PM Greg KH wrote: > > On Sun, Dec 02, 2018 at 08:10:16AM -0800, Christoph Hellwig wrote: > > As someone who has done xfs stable backports for a while I really don't > > think the autoselection is helpful at all. > > autoselection for xfs patches has been turned off for

Re: [PATCH] ubi: fastmap: Check each mapping only once

2018-12-02 Thread Richard Weinberger
Sasha, Am Sonntag, 2. Dezember 2018, 15:35:43 CET schrieb Sasha Levin: > On Sun, Dec 02, 2018 at 11:50:33AM +, Sudip Mukherjee wrote: > >> > Now queued up for 4.14.y, thanks. > >> > >> can you *please* slow a little down? > > > >True. It will really help if you can have some sort of fixed

Re: [PATCH] ubi: fastmap: Check each mapping only once

2018-12-02 Thread Richard Weinberger
Greg, Am Donnerstag, 29. November 2018, 09:09:23 CET schrieb Greg KH: > On Mon, Nov 26, 2018 at 11:38:42AM +0100, Martin Kepplinger wrote: > > From: Richard Weinberger > > > > [ Upstream commit 34653fd8c46e771585fce5975e4243f8fd401914 ] > > > > This co

Re: [PATCH RFC 09/15] mtd: replace **** with a hug

2018-12-01 Thread Richard Weinberger
On Fri, Nov 30, 2018 at 8:28 PM Jarkko Sakkinen wrote: > > In order to comply with the CoC, replace with a hug. Please explain in detail why the CoC forces us to avoid this word. Your patch seems more like self-censorship. -- Thanks, //richard

Re: [PING 2] [PATCH] jffs2: Fix use of uninitialized delayed_work, lockdep breakage

2018-11-24 Thread Richard Weinberger
On Sat, Nov 24, 2018 at 4:32 PM Daniel Santos wrote: > > Ping 2! > > On 11/05/2018 03:38 PM, Daniel Santos wrote: > > Ping. > > > > Daniel > > > > On 10/21/2018 07:32 PM, Hou Tao wrote: > >> On 2018/10/19 16:30, Daniel Santos wrote: > >>> jffs2_sync_fs makes the assumption that if

Re: [PATCH] ubifs: fix memory leak on error condition

2018-11-15 Thread Richard Weinberger
Am Donnerstag, 15. November 2018, 21:38:50 CET schrieb Garry McNulty: > If the call to ubifs_read_nnode() fails in ubifs_lpt_calc_hash() an > error is returned without freeing the memory allocated to 'buf'. > Jump to 'out' label to free allocated memory and return the error code. > > Detected by

Re: [PATCH 2/2] ubi: Expose the bitrot interface

2018-11-08 Thread Richard Weinberger
Am Donnerstag, 8. November 2018, 15:26:42 CET schrieb Boris Brezillon: > On Wed, 7 Nov 2018 23:16:19 +0100 > Richard Weinberger wrote: > > > +/** > > + * ubi_bitflip_check - Check an eraseblock for bitflips and scrub it if > > needed. > > + * @ubi: UBI device

[PATCH 2/2] ubi: Expose the bitrot interface

2018-11-07 Thread Richard Weinberger
Using UBI_IOCRPEB and UBI_IOCSPEB userspace can force reading and scrubbing of PEBs. In case of bitflips UBI will automatically take action and move data to a different PEB. This interface allows a daemon to foster your NAND. Signed-off-by: Richard Weinberger --- drivers/mtd/ubi/cdev.c

[PATCH 1/2] ubi: Introduce in_pq()

2018-11-07 Thread Richard Weinberger
This function works like in_wl_tree() but checks whether an ubi_wl_entry is currently in the protection queue. We need this function to query the current state of an ubi_wl_entry. Signed-off-by: Richard Weinberger --- drivers/mtd/ubi/wl.c | 30 +++--- 1 file changed, 23

[PATCH v2] ubifs: Handle re-linking of inodes correctly while recovery

2018-11-07 Thread Richard Weinberger
c: Russell Senior Cc: Rafał Miłecki Reported-by: Russell Senior Reported-by: Rafał Miłecki Signed-off-by: Richard Weinberger --- fs/ubifs/replay.c | 37 + 1 file changed, 37 insertions(+) diff --git a/fs/ubifs/replay.c b/fs/ubifs/replay.c index 75

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

2018-11-07 Thread Richard Weinberger
On Wed, Nov 7, 2018 at 9:07 AM Sascha Hauer wrote: > > On Mon, Nov 05, 2018 at 09:25:40AM +0100, Geert Uytterhoeven wrote: > > Instead of adding yet another dependency on UBIFS_FS, wrap the whole > > block of ubifs config options in a single "if UBIFS_FS". > > > > Fixes: d8a22773a12c6d78 ("ubifs:

Re: [PATCH] jffs2: implement mount option to configure endianness

2018-11-07 Thread Richard Weinberger
On Wed, Nov 7, 2018 at 7:05 PM Nikunj Kela (nkela) wrote: > I had tried to use configs to start with via the following patch however I > was advised to have a mount option: > http://lists.infradead.org/pipermail/linux-mtd/2018-November/085126.html Just show performance numbers on how your

Re: [GIT PULL] UBIFS updates for 4.20-rc1

2018-11-04 Thread Richard Weinberger
Am Sonntag, 4. November 2018, 23:45:50 CET schrieb Linus Torvalds: > On Sun, Nov 4, 2018 at 11:25 AM Richard Weinberger > wrote: > > > > I'm sorry to pester you a second time. > > The first ping had you only in CC, > > let's hope this mail passes your spam filter. &g

Re: [PATCH] Make JFFS2 endianness configurable

2018-11-02 Thread Richard Weinberger
Am Freitag, 2. November 2018, 22:14:44 CET schrieb Daniel Walker: > > Make it a mount option and store the endianness mode in the super block. > > It's actually a mkfs option currently. I'm not sure how that factors in, > > from the mkfs.jffs2 man page, > >-l, --little-endian >

Re: [PATCH] ubifs: replay: fix high stack usage

2018-11-02 Thread Richard Weinberger
Am Freitag, 2. November 2018, 16:39:24 CET schrieb Arnd Bergmann: > Having two shash descriptors on the stack cause a very significant kernel > stack usage that can cross the warning threshold: > > fs/ubifs/replay.c: In function 'authenticate_sleb': > fs/ubifs/replay.c:633:1: error: the frame

Re: [PATCH] Make JFFS2 endianness configurable

2018-11-02 Thread Richard Weinberger
On Fri, Nov 2, 2018 at 3:04 PM Daniel Walker wrote: > Do you have any thought on how to implement it ? I was think abstracting the > endian functions in the nodelist.h Yes, see what UFS does. > static inline jint16_t cpu_to_je16(jint16_t x) { > if (check_big_endian()) { >

Re: [PATCH] ubifs: auth: add CONFIG_KEYS dependency

2018-11-02 Thread Richard Weinberger
Am Freitag, 2. November 2018, 12:11:22 CET schrieb Arnd Bergmann: > The new authentication support causes a build failure > when CONFIG_KEYS is disabled, so add a dependency. > > fs/ubifs/auth.c: In function 'ubifs_init_authentication': > fs/ubifs/auth.c:249:16: error: implicit declaration of

Re: [PATCH] Make JFFS2 endianness configurable

2018-11-02 Thread Richard Weinberger
On Fri, Nov 2, 2018 at 9:46 AM Joakim Tjernlund wrote: > > On Thu, 2018-11-01 at 15:56 -0700, Nikunj Kela wrote: > > CAUTION: This email originated from outside of the organization. Do not > > click links or open attachments unless you recognize the sender and know > > the content is safe. > >

Re: [GIT PULL] UBIFS updates for 4.20-rc1

2018-11-01 Thread Richard Weinberger
Linus, On Wed, Oct 31, 2018 at 10:22 PM Richard Weinberger wrote: > The following changes since commit 84df9525b0c27f3ebc2ebb1864fa62a97fdedb7d: > > Linux 4.19 (2018-10-22 07:37:37 +0100) > > are available in the Git repository at: > > git://git.infradead.org/linu

[PATCH] um: Update maintainers file entry

2018-11-01 Thread Richard Weinberger
- Remove stale fs/hppfs/ reference - Point to our patchwork queue Signed-off-by: Richard Weinberger --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index b91bbec94f98..3779bbab1715 100644 --- a/MAINTAINERS +++ b/MAINTAINERS

Re: [PATCH] ubifs: Handle re-linking of inodes correctly while recovery

2018-11-01 Thread Richard Weinberger
Am Donnerstag, 1. November 2018, 09:55:53 CET schrieb Rafał Miłecki: > On Sun, 28 Oct 2018 at 22:44, Richard Weinberger wrote: > > UBIFS's recovery code strictly assumes that a deleted inode will never > > come back, therefore it removes all data which belongs to that inode >

Re: [GIT PULL] UML changes for 4.20-rc1

2018-10-31 Thread Richard Weinberger
Am Mittwoch, 31. Oktober 2018, 23:48:07 CET schrieb Linus Torvalds: > On Wed, Oct 31, 2018 at 2:22 PM Richard Weinberger wrote: > > > > - Removal of old and dead code > > - A bug fix for our tty driver > > - Other minor cleanups across the code base > > Pull

[GIT PULL] UML changes for 4.20-rc1

2018-10-31 Thread Richard Weinberger
Anton Ivanov (1): um: Make line/tty semantics use true write IRQ Christoph Hellwig (1): um: remove unused AIO code Colin Ian King (1): um: trap: fix spelling mistake, EACCESS -> EACCES Richard Weinberger (3): um: Drop own definit

[GIT PULL] UBIFS updates for 4.20-rc1

2018-10-31 Thread Richard Weinberger
Linus, The following changes since commit 84df9525b0c27f3ebc2ebb1864fa62a97fdedb7d: Linux 4.19 (2018-10-22 07:37:37 +0100) are available in the Git repository at: git://git.infradead.org/linux-ubifs.git tags/tags/upstream-4.20-rc1 for you to fetch changes up to

Re: [PATCH][next] ubifs: authentication: fix memory leak on error exit path

2018-10-29 Thread Richard Weinberger
Am Dienstag, 30. Oktober 2018, 00:21:46 CET schrieb Colin King: > From: Colin Ian King > > Currently a failure when calling ubifs_read_nnode results in a leak > of desc and buf because of a direct return. Fix this by exiting via > label 'out' that performs the necessary free'ing of the

[PATCH] ubifs: Handle re-linking of inodes correctly while recovery

2018-10-28 Thread Richard Weinberger
g Reported-by: Russell Senior Reported-by: Rafał Miłecki Signed-off-by: Richard Weinberger --- Russel, Rafał, please give this patch another testing. I'll also run it on different test systems before merging. Thanks, //richard --- fs/ubifs/replay.c | 33 + 1 file c

[PATCH v2] ubd: remove use of blk_rq_map_sg

2018-10-18 Thread Richard Weinberger
From: Christoph Hellwig There is no good reason to create a scatterlist in the ubd driver, it can just iterate the request directly. Signed-off-by: Christoph Hellwig [rw: Folded in improvements as discussed with hch and jens] Signed-off-by: Richard Weinberger --- arch/um/drivers/ubd_kern.c

Re: Bad MAINTAINERS pattern in section 'USER-MODE LINUX (UML)'

2018-10-17 Thread Richard Weinberger
Joe, On Sat, Sep 29, 2018 at 12:06 AM Joe Perches wrote: > > Please fix this defect appropriately. Care to send a patch? -- Thanks, //richard

Re: [PATCH] jffs2: free jffs2_sb_info through jffs2_kill_sb()

2018-10-16 Thread Richard Weinberger
int jffs2_fill_super(struct super_block *sb, > > void *data, int silent) > > sb->s_fs_info = c; > > > > ret = jffs2_parse_options(c, data); > > - if (ret) { > > - kfree(c); > > + if (ret) > > return -EINVAL; > > - } Reviewed-by: Richard Weinberger We can carry this via the MTD tree. -- Thanks, //richard

Re: ubifs: WARNINGs

2018-10-13 Thread Richard Weinberger
Randy, On Sat, Oct 13, 2018 at 3:48 AM Randy Dunlap wrote: > > Hi, > > Linux 4.19-rc7, x86_64 laptop. > > I don't have an ubifs filesystem. When I just modprobe ubifs and then > rmmod ubifs, I get 2 WARNINGs from these 2 lines: > > static void __exit ubifs_exit(void) > { >

[PATCH] ubifs: Fix WARN_ON logic in exit path

2018-10-13 Thread Richard Weinberger
n two ubifs_assert() into a WARN_ON()") Signed-off-by: Richard Weinberger --- Greg, can you please take this patch directly? It fixes a brown paper bug which was introduced in rc1, I'd like to avoid having it in a release and going the -stable path. Thanks, //richard --- fs/ubifs/super.c | 4 ++

Re: [PATCH AUTOSEL 3.18 6/6] ubifs: Check for name being NULL while mounting

2018-10-05 Thread Richard Weinberger
Sasha, Am Freitag, 5. Oktober 2018, 18:17:50 CEST schrieb Sasha Levin: > From: Richard Weinberger > > [ Upstream commit 37f31b6ca4311b94d985fb398a72e5399ad57925 ] > > The requested device name can be NULL or an empty string. > Check for that and refuse to continu

Re: [PATCH] kernel/sysctl.c: remove duplicated include

2018-10-04 Thread Richard Weinberger
index cc02050fd0c4..523cb36b72eb 100644 > --- a/kernel/sysctl.c > +++ b/kernel/sysctl.c > @@ -66,7 +66,6 @@ > #include > #include > #include > -#include > > #include > #include Reviewed-by: Richard Weinberger -- Thanks, //richard

Re: Future of dosfstools project (FAT)

2018-10-01 Thread Richard Weinberger
On Mon, Oct 1, 2018 at 10:01 PM Andreas Dilger wrote: > If the current dosfstools maintainer is non-responsive, you could always > fork the project in GitHub, land the critical patches into your branch, > and make a release on your own. If the maintainer surfaces again, then > they can pull in

Re: [PATCH TRIVIAL] Punctuation fixes

2018-09-25 Thread Richard Weinberger
Am Dienstag, 25. September 2018, 02:09:20 CEST schrieb Diego Viola: > > Diego, I know you can do better. :-) > > How about running linux-next and hunting down regressions? > > I think we suggested this already on IRC. > > OK. I'll do that after I'm done with the documentation. By the definition

Re: [PATCH 4.9 069/101] ubi: fastmap: Correctly handle interrupted erasures in EBA

2018-09-24 Thread Richard Weinberger
Lars, Am Sonntag, 23. September 2018, 15:49:42 CEST schrieb Lars Persson: > Hi Richard > > Sorry, I assumed this omission from -stable was a mistake. > > The timing for our boot increased from 45 seconds to 55 seconds on one > chip and 42 seconds to 48 seconds on another chip. The regression

Re: [PATCH 4.9 069/101] ubi: fastmap: Correctly handle interrupted erasures in EBA

2018-09-23 Thread Richard Weinberger
Lars, Am Sonntag, 23. September 2018, 14:49:23 CEST schrieb Lars Persson: > On Sun, Jul 1, 2018 at 6:27 PM Greg Kroah-Hartman > wrote: > > > > 4.9-stable review patch. If anyone has any objections, please let me know. > > > > ---------- > > > >

Re: [PATCH TRIVIAL] Punctuation fixes

2018-09-23 Thread Richard Weinberger
On Sun, Sep 23, 2018 at 3:00 AM Miguel Ojeda wrote: > > Hi Diego, > > A few things, since it looks like this is your first patch. git log... > On Sat, Sep 22, 2018 at 5:56 PM, Diego Viola wrote: > > On Wed, Sep 12, 2018 at 12:54 AM Diego Viola wrote: > >> > >> Signed-off-by: Diego Viola > >>

Re: [GIT PULL] UBIFS fixes for 4.19-rc4

2018-09-21 Thread Richard Weinberger
Am Freitag, 21. September 2018, 15:53:42 CEST schrieb Greg KH: > On Fri, Sep 21, 2018 at 11:33:15AM +0200, Richard Weinberger wrote: > > Greg, > > > > The following changes since commit ae596de1a0c8c2c924dc99d23c026259372ab234: > > > > Compiler Attributes: nake

[GIT PULL] UBIFS fixes for 4.19-rc4

2018-09-21 Thread Richard Weinberger
for a NULL pointer deref in mount code - Revert of a bad fix for xattrs -------- Richard Weinberger (2): ubifs: Check for name being NULL while mounting Revert "ubifs: xattr: Don't operate on deleted inodes" Sascha Hauer (1

Re: [PATCH] Revert "ubifs: xattr: Don't operate on deleted inodes"

2018-09-21 Thread Richard Weinberger
Am Freitag, 21. September 2018, 03:42:25 CEST schrieb Joel Stanley: > On Thu, 20 Sep 2018 at 16:40, Richard Weinberger wrote: > > > > Am Donnerstag, 20. September 2018, 04:30:41 CEST schrieb Joel Stanley: > > > On Mon, 17 Sep 2018 at 07:30, Richard Weinberger wrote: >

Re: [PATCH] Don't hardcode path as it is architecture dependent

2018-09-20 Thread Richard Weinberger
Am Donnerstag, 20. September 2018, 08:26:38 CEST schrieb Ritesh Raj Sarraf: > The current code fails to run on amd64 because of hardcoded reference to > i386 > > Signed-off-by: Ritesh Raj Sarraf Thanks for spotting this! > --- > arch/um/drivers/port_user.c | 2 +- > 1 file changed, 1

Re: [PATCH] Revert "ubifs: xattr: Don't operate on deleted inodes"

2018-09-20 Thread Richard Weinberger
Am Donnerstag, 20. September 2018, 04:30:41 CEST schrieb Joel Stanley: > On Mon, 17 Sep 2018 at 07:30, Richard Weinberger wrote: > > > > This reverts commit 11a6fc3dc743e22fb50f2196ec55bee5140d3c52. > > UBIFS wants to assert that xattr operations are only issued on files &

Re: [PATCH] Round UBI average erase count up to next integer

2018-09-18 Thread Richard Weinberger
Andrew, Am Dienstag, 18. September 2018, 15:05:21 CEST schrieb Andrew Worsley: > Use a slightly larger than average EC so these PEBs will be > reinitialised with erase counts that make them less likely to > be reused than other (perhaps less worn or error-prone) PEBs > > We have more frequent

Re: [PATCH] samples: disable CONFIG_SAMPLES for UML

2018-09-18 Thread Richard Weinberger
Am Dienstag, 18. September 2018, 05:58:33 CEST schrieb Masahiro Yamada: > Some samples require headers installation, so commit 3fca1700c4c3 > ("kbuild: make samples really depend on headers_install") added > such dependency in the top Makefile. However, UML fails to build > with CONFIG_SAMPLES=y

[PATCH] Revert "ubifs: xattr: Don't operate on deleted inodes"

2018-09-16 Thread Richard Weinberger
xattr operations are perfectly fine on unlinked files. Instead the assertions need to be fixed/removed. Cc: Fixes: 11a6fc3dc743 ("ubifs: xattr: Don't operate on deleted inodes") Reported-by: Koen Vandeputte Signed-off-by: Richard Weinberger --- fs/ubifs/xattr.c | 24 --

Re: 答复: [PATCH] arm64/ptrace: add PTRACE_SYSEMU and PTRACE_SYSEMU_SINGLESTEP support

2018-09-04 Thread Richard Weinberger
Am Dienstag, 4. September 2018, 04:11:07 CEST schrieb Haibo Xu (Arm Technology China): > Hi Richard, > > What do you mean by done it in the core? moving macro definition to > include/uapi/linux/ptrace.h? > The patch is strictly follow x86's sematic on PTRACE_SYSEMU/SINGLESTEP > support. Well,

[PATCH] ubifs: Check for name being NULL while mounting

2018-09-03 Thread Richard Weinberger
865e5c6379...@syzkaller.appspotmail.com Signed-off-by: Richard Weinberger --- fs/ubifs/super.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index 23e7042666a7..87d08f738632 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c @@ -1954,6 +1954,9 @@ sta

Re: [PATCH] arm64/ptrace: add PTRACE_SYSEMU and PTRACE_SYSEMU_SINGLESTEP support

2018-09-03 Thread Richard Weinberger
Am Montag, 3. September 2018, 18:31:03 CEST schrieb Will Deacon: > On Mon, Sep 03, 2018 at 02:23:17PM +0800, Haibo.Xu wrote: > > Add PTRACE_SYSEMU and PTRACE_SYSEMU_SINGLESTEP support on ARM64. > > This copies the x86 semantics for invoking ptrace hooks, and have > > been verified on ARM64

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

2018-09-02 Thread Richard Weinberger
Am Mittwoch, 29. August 2018, 16:38:34 CEST schrieb Sascha Hauer: > I assumed that make_reservation would align len anyway. I can't find the > place that led me to that assumption anymore and even if this is true > it's probably safer to just stick to the original len for the > non-authenticated

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

2018-08-29 Thread Richard Weinberger
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); > > > kfree(dent); > > > + ubifs_add_dirt(c, lnum, ubifs_auth_node_sz(c)); > > > >

Reminder: Alpine Linux Persistence and Storage Summit happens soon

2018-08-29 Thread Richard Weinberger
to attend but didn't send an mail yet, please do it now, only few seats are left! Thank you on behalf of the program committee: Stephen Bates Sagi Grimberg Christoph Hellwig Johannes Thumshirn Richard Weinberger [1] http://www.tyrol.com/things-to-do/sports/hiking/refuge-huts

Re: [PATCH 16/25] ubifs: authenticate replayed journal

2018-08-27 Thread Richard Weinberger
Am Mittwoch, 4. Juli 2018, 14:41:28 CEST schrieb Sascha Hauer: > Make sure that during replay all buds can be authenticated. To do > this we calculate the hash chain until we find an authentication > node and check the HMAC in that node against the current status > of the hash chain. > > After a

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

2018-08-27 Thread Richard Weinberger
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. > > Signed-off-by: Sascha Hauer > --- > fs/ubifs/gc.c | 37 ++--- >

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

2018-08-27 Thread Richard Weinberger
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 necessary the > nodes are not yet referenced by the index and thus can't be > authenticated. > > This

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

2018-08-27 Thread Richard Weinberger
Am Mittwoch, 4. Juli 2018, 14:41:25 CEST schrieb Sascha Hauer: > With this patch the hashes over the index nodes stored in the tree node > cache are written to flash and are checked when read back from flash. > The hash of the root index node is stored in the master node. > > During journal

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

2018-08-27 Thread Richard Weinberger
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 > node cache needs hashes over the nodes. This patch adds a hash argument > to

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

2018-08-27 Thread Richard Weinberger
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 HMACs into a node and > to compare hashes and HMACs. Most functions first check if this > filesystem is

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

2018-08-27 Thread Richard Weinberger
Am Mittwoch, 4. Juli 2018, 14:41:19 CEST schrieb Sascha Hauer: > The superblock node is read/modified/written several times throughout > the UBIFS code. Instead of reading it from the device each time just > keep a copy in memory and write back the modified copy when necessary. > This patch helps

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

2018-08-26 Thread Richard Weinberger
On Mon, Aug 13, 2018 at 8:31 AM Sascha Hauer wrote: > > 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

[GIT PULL] UBIFS fix for 4.19-rc1

2018-08-25 Thread Richard Weinberger
Richard Weinberger (1): ubifs: Remove empty file.h fs/ubifs/file.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 fs/ubifs/file.h

[PATCH] ubifs: Remove empty file.h

2018-08-24 Thread Richard Weinberger
This empty file sneaked into the tree by mistake. Remove it. Fixes: 6eb61d587f45 ("ubifs: Pass struct ubifs_info to ubifs_assert()") Signed-off-by: Richard Weinberger --- fs/ubifs/file.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 fs/ubifs/file.h diff

[GIT PULL] UBI/UBIFS updates for 4.19-rc1

2018-08-22 Thread Richard Weinberger
. Silva (1): ubifs: use swap macro in swap_dirty_idx Quentin Schulz (2): ubi: provide a way to skip CRC checks ubi: expose the volume CRC check skip flag Richard Weinberger (15): ubifs: Fix directory size calculation for symlinks ubifs: Fix synced_i_size calculation

Re: [PATCH] ubifs: remove unnecessary check in ubifs_log_start_commit

2018-08-21 Thread Richard Weinberger
Am Dienstag, 21. August 2018, 08:57:44 CEST schrieb liu.son...@zte.com.cn: > Hi Richard, > > In ubifs_log_start_commit, the value of c->lhead_offs is zero or set to zero > by code bellow > 409 /* Switch to the next log LEB */ > 410 if (c->lhead_offs) { > 411

Re: [PATCH] ubifs: remove unnecessary check in ubifs_log_start_commit

2018-08-21 Thread Richard Weinberger
Liu Song, Am Dienstag, 21. August 2018, 05:17:22 CEST schrieb Liu Song: > The value of c->lhead_offs cannot exceed max_len which much > smaller than c->leb_size. So the check will never be true. > Just remove it. Please explain in more detail why this case is never ever possible. Removing such

Re: [PATCH] mtd/ubi: Make sure to read volume record from LEB 0 or LEB 1

2018-08-20 Thread Richard Weinberger
Lui Song, Am Montag, 20. August 2018, 08:09:05 CEST schrieb Liu Song: > From: fishland Please use your real name. 1st Signed-off-by and patch author should match. > Even though we protect on-flash data by CRC checksums, > we still don't trust the media. If lnum is not 0 or 1, > access exceed

Re: Merge branch 'l1tf-final' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

2018-08-16 Thread Richard Weinberger
On Thu, Aug 16, 2018 at 2:58 PM Sedat Dilek wrote: > > Hi Linus, > > I am here on Linux v4.18 and tried first to merge the l1tf-final Git-branch. > Unfortunately, this is no more available in the tip Git-tree. > > Then I saw Linux v4.18.1 which includes all the above stuff. > > I tried to 'git

[PATCH] ubifs: Add comment on c->commit_sem

2018-08-13 Thread Richard Weinberger
Every single time I come across that code, I get confused because it looks like a possible dead lock. Help myself by adding a comment. Signed-off-by: Richard Weinberger --- fs/ubifs/journal.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/ubifs/journal.c b/fs/ubifs/journal.c index

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

2018-08-13 Thread Richard Weinberger
Am Montag, 13. August 2018, 10:12:38 CEST schrieb Sascha Hauer: > > Can you please add a helper function for that? These shift games are > > always confusing and not easy to spot. > > Do you have a suggestion for a helper function? lpt.c is full of rather > non obvious arithmetic operations and I

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

2018-08-13 Thread Richard Weinberger
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 > > already have this functionality in ubifs_pnode_lookup(). Use this > > function rather than

Re: [PATCH 0/3] Kbuild: fix and clean-up arch/um/Makefile

2018-08-06 Thread Richard Weinberger
to kbuild tree. > Ack from UML folks are appreciated. Nice to see this fixed, Masahiro! :-) Acked-by: Richard Weinberger Thanks, //richard

Re: [PATCH 0/2] um: switch to NO_BOOTMEM

2018-07-31 Thread Richard Weinberger
e Rapoport (2): > > um: setup_physmem: stop using global variables > > um: switch to NO_BOOTMEM > > > > arch/um/Kconfig.common | 2 ++ > > arch/um/kernel/physmem.c | 22 ++---- > > 2 files changed, 12 insertions(+), 12 deletions(-) Acked-by: Richard Weinberger Thanks, //richard

Re: [PATCH 4.4 15/47] ubi: fastmap: Correctly handle interrupted erasures in EBA

2018-07-27 Thread Richard Weinberger
Ben, Am Samstag, 28. Juli 2018, 03:28:58 CEST schrieb Ben Hutchings: > > > Isn't there a risk here, that a read error leads to erasing data that > > > might be recoverable if the read is retried? > > > > Well, read error means that already something went very wrong. At other > > places > > in

Re: [PATCH 4.4 15/47] ubi: fastmap: Correctly handle interrupted erasures in EBA

2018-07-26 Thread Richard Weinberger
Ben, Am Donnerstag, 26. Juli 2018, 04:12:54 CEST schrieb Ben Hutchings: > On Tue, 2018-07-10 at 20:24 +0200, Greg Kroah-Hartman wrote: > > 4.4-stable review patch. If anyone has any objections, please let me know. > > > > -- > > > > From: Ri

Re: include architecture Kconfig files from top-level Kconfig v2

2018-07-23 Thread Richard Weinberger
- various fixes from Randy > - various UML patches to be able to use the common Kconfig For the UML bits, Acked-by: Richard Weinberger Thanks, //richard

Re: [PATCH 0/2] Secure deletion under JFFS2

2018-07-22 Thread Richard Weinberger
On Fri, Jul 20, 2018 at 1:50 AM, Theuns Verwoerd wrote: > Security certifications such as FIPS require the capability to securely > delete files, which is problematic under JFFS2's log-based model. We can Can you please be a little more specific about the certifications? These days secure

Re: [PATCH 2/2] jffs2: Provide jffs2_sync files to track gc POLL progress

2018-07-22 Thread Richard Weinberger
[fixing CC list] On Fri, Jul 20, 2018 at 2:54 AM, Theuns Verwoerd wrote: > > On 07/20/2018 12:04 PM, Al Viro wrote: >> On Fri, Jul 20, 2018 at 11:50:12AM +1200, Theuns Verwoerd wrote: >> >>> +ssize_t jffs2_sync_file_read(struct file *f, >>> + char __user *b, size_t len, loff_t *ofs) >>>

[PATCH 1/5] ubifs: Turn two ubifs_assert() into a WARN_ON()

2018-07-12 Thread Richard Weinberger
We are going to pass struct ubifs_info to ubifs_assert() but while unloading the UBIFS module we don't have the info struct anymore. Therefore replace the asserts by a regular WARN_ON(). Signed-off-by: Richard Weinberger --- fs/ubifs/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH 2/5] ubifs: Pass struct ubifs_info to ubifs_assert()

2018-07-12 Thread Richard Weinberger
This allows us to have more context in ubifs_assert() and take different actions depending on the configuration. Signed-off-by: Richard Weinberger --- fs/ubifs/budget.c | 68 - fs/ubifs/commit.c | 8 +-- fs/ubifs/crypto.c | 4 +- fs/ubifs/debug.c

[PATCH 3/5] ubifs: Rework ubifs_assert()

2018-07-12 Thread Richard Weinberger
and go on. - read-only: Switch to read-only mode. - panic: shoot the kernel in the head. Signed-off-by: Richard Weinberger --- fs/ubifs/debug.c | 22 ++ fs/ubifs/debug.h | 10 ++ fs/ubifs/ubifs.h | 14 ++ 3 files changed, 42 insertions(+), 4 deletions

[PATCH 5/5] ubifs: Set default assert action to read-only

2018-07-12 Thread Richard Weinberger
will not write possible bad data to the MTD and gives users the chance to collect debugging information. Signed-off-by: Richard Weinberger --- fs/ubifs/super.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index 524122da7868..4b9890e54a78 100644 --- a/fs

[PATCH 4/5] ubifs: Allow setting assert action as mount parameter

2018-07-12 Thread Richard Weinberger
Expose our three options to userspace. Signed-off-by: Richard Weinberger --- fs/ubifs/misc.c | 11 +++ fs/ubifs/misc.h | 2 ++ fs/ubifs/super.c | 24 3 files changed, 37 insertions(+) diff --git a/fs/ubifs/misc.c b/fs/ubifs/misc.c index 586fd5b578a7

[PATCH 0/5] ubifs: Rework assert code

2018-07-12 Thread Richard Weinberger
-only mode >From now on the default action is read-only. Richard Weinberger (5): ubifs: Turn two ubifs_assert() into a WARN_ON() ubifs: Pass struct ubifs_info to ubifs_assert() ubifs: Rework ubifs_assert() ubifs: Allow setting assert action as mount parameter ubifs: Set default assert a

[PATCH] ubifs: xattr: Don't operate on deleted inodes

2018-07-08 Thread Richard Weinberger
xattr operations can race with unlink and the following assert triggers: UBIFS assert failed in ubifs_jnl_change_xattr at 1606 (pid 6256) Fix this by checking i_nlink before working on the host inode. Cc: Fixes: 1e51764a3c2a ("UBIFS: add new flash file system") Signed-off-by: Richard

[PATCH] ubifs: gc: Fix typo

2018-07-08 Thread Richard Weinberger
UBIFS operates on LEBs, not PEBs. Signed-off-by: Richard Weinberger --- fs/ubifs/gc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ubifs/gc.c b/fs/ubifs/gc.c index 11c09ce3c795..a57be0b698b5 100644 --- a/fs/ubifs/gc.c +++ b/fs/ubifs/gc.c @@ -483,7 +483,7 @@ int

Re: [PATCH] mtd: stm32-quadspi: replace "%p" with "%pK"

2018-07-06 Thread Richard Weinberger
Am Freitag, 6. Juli 2018, 16:47:32 CEST schrieb Boris Brezillon: > On Fri, 06 Jul 2018 16:44:44 +0200 > Richard Weinberger wrote: > > > Am Freitag, 6. Juli 2018, 15:05:25 CEST schrieb Benjamin Gaignard: > > > The format specifier "%p" can leak kernel

Re: [PATCH] mtd: stm32-quadspi: replace "%p" with "%pK"

2018-07-06 Thread Richard Weinberger
Am Freitag, 6. Juli 2018, 15:05:25 CEST schrieb Benjamin Gaignard: > The format specifier "%p" can leak kernel addresses. > Use "%pK" instead. Does %pK really make sense for dev_dbg()? When the driver is being debugged "leaking" is on purpose. :) Thanks, //richard > Signed-off-by: Benjamin

[PATCH] ubifs: Handle LPT corruption better in ubifs_garbage_collect_leb()

2018-07-04 Thread Richard Weinberger
Signed-off-by: Richard Weinberger --- fs/ubifs/gc.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fs/ubifs/gc.c b/fs/ubifs/gc.c index a03a47cf880d..11c09ce3c795 100644 --- a/fs/ubifs/gc.c +++ b/fs/ubifs/gc.c @@ -513,7 +513,13 @@ int ubifs_garbage_collect_leb(struct ubi

[PATCH] ubifs: log: Don't leak kernel memory to the MTD

2018-07-04 Thread Richard Weinberger
...@vger.kernel.org Fixes: 1e51764a3c2a ("UBIFS: add new flash file system") Signed-off-by: Richard Weinberger --- fs/ubifs/log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ubifs/log.c b/fs/ubifs/log.c index 7cffa120a750..60d49c6dd470 100644 --- a/fs/ubifs/log.c +++

Re: [PATCH 0/2] x86/build/vdso: a little more Makefile cleanups

2018-07-03 Thread Richard Weinberger
Am Dienstag, 3. Juli 2018, 09:35:33 CEST schrieb Ingo Molnar: > > * Richard Weinberger wrote: > > > Masahiro, > > > > Am Dienstag, 3. Juli 2018, 03:50:12 CEST schrieb Masahiro Yamada: > > > > > > At first, I sent the first patch to UML ML, > &

Re: [PATCH] ubifs: tnc: use monotonic znode timestamp

2018-07-03 Thread Richard Weinberger
Am Montag, 2. Juli 2018, 16:24:15 CEST schrieb Richard Weinberger: > Arnd, > > Am Mittwoch, 20. Juni 2018, 10:29:11 CEST schrieb Arnd Bergmann: > > The tnc uses get_seconds() based timestamps to check the age of a znode, > > which has two problems: on 32-bit architectu

Re: [PATCH 0/2] x86/build/vdso: a little more Makefile cleanups

2018-07-03 Thread Richard Weinberger
Masahiro, Am Dienstag, 3. Juli 2018, 03:50:12 CEST schrieb Masahiro Yamada: > > At first, I sent the first patch to UML ML, > but they did not pick it up. > Instead, I was able to get Acked-by from Richard, > one of the UML maintainers. > > https://patchwork.kernel.org/patch/10399787/ > > I am

[PATCH] ubifs: Use kmalloc_array()

2018-07-02 Thread Richard Weinberger
Since commit 6da2ec56059c ("treewide: kmalloc() -> kmalloc_array()") we use kmalloc_array() for kmalloc() that computes the length with a multiplication. Cc: Kees Cook Suggested-by: Kees Cook Signed-off-by: Richard Weinberger --- fs/ubifs/journal.c | 2 +- 1 file changed, 1 in

Re: [PATCH 1/2] Revert "UBIFS: Fix potential integer overflow in allocation"

2018-07-02 Thread Richard Weinberger
Am Montag, 2. Juli 2018, 20:27:00 CEST schrieb Kees Cook: > > Let's queue another patch for the next merge window which converts > > kmalloc() -> kmalloc_array(). > > I'd prefer to leave it as-is for 4.18 because it would be the only > unconverted kmalloc()-with-multiplication in the entire tree.

Re: [PATCH 1/2] Revert "UBIFS: Fix potential integer overflow in allocation"

2018-07-02 Thread Richard Weinberger
Am Montag, 2. Juli 2018, 18:00:05 CEST schrieb Kees Cook: > On Sun, Jul 1, 2018 at 2:20 PM, Richard Weinberger wrote: > > This reverts commit 353748a359f1821ee934afc579cf04572406b420. > > It bypassed the linux-mtd review process and fixes the issue not as it > > should. >

Re: [PATCH v3 1/2] ubi: provide a way to skip CRC checks

2018-07-02 Thread Richard Weinberger
Am Montag, 2. Juli 2018, 09:51:21 CEST schrieb Boris Brezillon: > Hi Artem, > > On Mon, 02 Jul 2018 10:30:25 +0300 > Artem Bityutskiy wrote: > > > Hi, > > > > On Thu, 2018-06-28 at 09:40 +0200, Quentin Schulz wrote: > > > diff --git a/drivers/mtd/ubi/kapi.c b/drivers/mtd/ubi/kapi.c > > > index

Re: [PATCH v3 1/2] ubi: provide a way to skip CRC checks

2018-07-02 Thread Richard Weinberger
Artem, Am Montag, 2. Juli 2018, 09:30:25 CEST schrieb Artem Bityutskiy: > Hi, > > On Thu, 2018-06-28 at 09:40 +0200, Quentin Schulz wrote: > > diff --git a/drivers/mtd/ubi/kapi.c b/drivers/mtd/ubi/kapi.c > > index d4b2e87..e9e9ecb 100644 > > --- a/drivers/mtd/ubi/kapi.c > > +++

Re: [PATCH v3 2/2] ubi: expose the volume CRC check skip flag

2018-07-02 Thread Richard Weinberger
Am Montag, 2. Juli 2018, 08:52:27 CEST schrieb Boris Brezillon: > On Mon, 2 Jul 2018 08:44:33 +0200 > Quentin Schulz wrote: > > > Hi Richard, Boris, > > > > On Sun, Jul 01, 2018 at 10:50:41PM +0200, Richard Weinberger wrote: > > > Am Sonntag, 1. Juli 2018, 2

[PATCH 2/2] ubifs: Check data node size before truncate

2018-07-01 Thread Richard Weinberger
Check whether the size is within bounds before using it. If the size is not correct, abort and dump the bad data node. Cc: Kees Cook Cc: Silvio Cesare Cc: sta...@vger.kernel.org Fixes: 1e51764a3c2ac ("UBIFS: add new flash file system") Reported-by: Silvio Cesare Signed-off-b

[PATCH 1/2] Revert "UBIFS: Fix potential integer overflow in allocation"

2018-07-01 Thread Richard Weinberger
This reverts commit 353748a359f1821ee934afc579cf04572406b420. It bypassed the linux-mtd review process and fixes the issue not as it should. Cc: Kees Cook Cc: Silvio Cesare Cc: sta...@vger.kernel.org Signed-off-by: Richard Weinberger --- fs/ubifs/journal.c | 5 ++--- 1 file changed, 2

  1   2   3   4   5   6   7   8   9   10   >