Re: [PATCH 2/5] UML: remove unused cmd_vdso_install

2023-10-09 Thread Richard Weinberger
> , "richard" , > "tglx" > Gesendet: Montag, 9. Oktober 2023 14:42:07 > Betreff: [PATCH 2/5] UML: remove unused cmd_vdso_install > You cannot run this code because arch/um/Makefile does not define the > vdso_install target. > > It appears that this code was blindly copied from another architecture. > > Remove the dead code. > > Signed-off-by: Masahiro Yamada Acked-by: Richard Weinberger Thanks, //richard

Re: [PATCH 00/13] [RFC] Rust support

2021-04-17 Thread Richard Weinberger
On Thu, Apr 15, 2021 at 2:41 AM wrote: > Regarding compilers, we support Clang-built kernels as well as > `LLVM=1` builds where possible (i.e. as long as supported by > the ClangBuiltLinux project). We also maintain some configurations > of GCC-built kernels working, but they are not intended to

[GIT PULL] MTD fixes for 5.12-rc7

2021-04-13 Thread Richard Weinberger
Linus, The following changes since commit a38fd8748464831584a19438cbb3082b5a2dab15: Linux 5.12-rc2 (2021-03-05 17:33:41 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git tags/fixes-for-5.12-rc7 for you to fetch changes up to

Re: [PATCH] ubifs: default to zstd compression

2021-04-08 Thread Richard Weinberger
On Mon, Apr 5, 2021 at 5:36 PM Rui Salvaterra wrote: > > Compared to lzo and zlib, zstd is the best all-around performer, both in terms > of speed and compression ratio. Set it as the default, if available. I was about to NACK this patch but by looking at the diff I realized that you change the

Re: [PATCH 4/6] fs/jffs2: Delete obsolete TODO file

2021-04-07 Thread Richard Weinberger
On Tue, Mar 30, 2021 at 9:07 AM Wang Qing wrote: > > The TODO file here has not been updated for 14 years, and the function > development described in the file have been implemented or abandoned. > > Its existence will mislead developers seeking to view outdated information. Did you check

Re: [PATCH] ubifs: fix read fail but return ok

2021-04-07 Thread Richard Weinberger
On Wed, Mar 31, 2021 at 8:29 AM wangfangpeng wrote: > do_readpage() may return err, but ubifs_readpage() always return ok. > The vfs will ignore the err happen in ubifs. Are you sure about that? In case of an error UBIFS sets the error flag of the page and does not mark it as uptodate, so vfs

Re: [PATCH v1 1/1] ubifs: only check replay with inode type to judge if inode linked

2021-04-07 Thread Richard Weinberger
On Tue, Mar 16, 2021 at 10:00 AM wrote: > > From: Guochun Mao > > Conside the following case, it just write a big file into flash, > when complete writing, delete the file, and then power off promptly. > Next time power on, we'll get a replay list like: > ... > LEB 1105:211344 len 4144 deletion

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

2021-04-01 Thread Richard Weinberger
Sumit, - Ursprüngliche Mail - > Von: "Sumit Garg" > IIUC, this would require support for multiple trusted keys backends at > runtime but currently the trusted keys subsystem only supports a > single backend which is selected via kernel module parameter during > boot. > > So the trusted

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

2021-04-01 Thread Richard Weinberger
Ahmad, - Ursprüngliche Mail - > Von: "Ahmad Fatoum" >> But using LUKS would mean that cryptsetup has access to the plain disc >> encryption key material? >> This would be a no-go for many systems out there, key material must not >> accessible to userspace. >> I know, distrusting

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

2021-04-01 Thread Richard Weinberger
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 specific PCR > (integrity measurement) values. I don't think we can dictate what good/sane solutions are

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

2021-04-01 Thread Richard Weinberger
Ahmad, - Ursprüngliche Mail - > Von: "Ahmad Fatoum" >> I don't want you to force to use cryptsetup. > > I'd love to use cryptsetup with LUKS and trusted keys eventually. I'll take But using LUKS would mean that cryptsetup has access to the plain disc encryption key material? This

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

2021-04-01 Thread Richard Weinberger
Ahmad, - Ursprüngliche Mail - > Do you mean systemd-cryptsetup? It looks to me like it's just a way to supply > the keyphrase. With trusted keys and a keyphrase unknown to userspace, this > won't work. Nah, I meant existing scripts/service Files. > I don't (yet) see the utility of it

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

2021-04-01 Thread Richard Weinberger
Ahmad, - Ursprüngliche Mail - > Von: "Ahmad Fatoum" >> I'm pretty sure with minimal changes it will work with your recent approach >> too. > > I am using dmsetup directly in my project. I am not familiar with cryptsetup > plain. What benefits do you see with this over direct dmsetup?

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

2021-04-01 Thread Richard Weinberger
Ahmad, - Ursprüngliche Mail - > Von: "Ahmad Fatoum" >> That way existing blobs can also be used with this implementation. >> IIRC the NXP vendor tree uses "SECURE_KEY" as default modifier. > > Being binary compatible with other implementations is not an objective > for this patch set.

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

2021-03-31 Thread Richard Weinberger
James, - Ursprüngliche Mail - > Von: "James Bottomley" > Well, yes. For the TPM, there's a defined ASN.1 format for the keys: > > https://git.kernel.org/pub/scm/linux/kernel/git/jejb/openssl_tpm2_engine.git/tree/tpm2-asn.h > > and part of the design of the file is that it's

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

2021-03-31 Thread Richard Weinberger
James, - Ursprüngliche Mail - > Von: "James Bottomley" >> 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? >> e.g.

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

2021-03-31 Thread Richard Weinberger
Ahmad, On Tue, Mar 16, 2021 at 6:24 PM Ahmad Fatoum wrote: > +#define KEYMOD "kernel:trusted" why is the CAAM key modifier hard coded? I'd love to have way to pass my own modifier. That way existing blobs can also be used with this implementation. IIRC the NXP vendor tree uses "SECURE_KEY" as

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

2021-03-30 Thread Richard Weinberger
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? e.g. keyctl add trusted $KEYNAME "backendtype caam load $(cat ~/kmk.blob)" @s --

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

2021-03-30 Thread Richard Weinberger
Ahmad, On Wed, Mar 17, 2021 at 3:08 PM Ahmad Fatoum wrote: > TABLE="0 $BLOCKS crypt $ALGO :32:trusted:$KEYNAME 0 $DEV 0 1 > allow_discards" > echo $TABLE | dmsetup create mydev > echo $TABLE | dmsetup load mydev Do you also plan to add support for this to cryptsetup? David and I

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

2021-03-30 Thread Richard Weinberger
Ahmad, On Wed, Mar 17, 2021 at 3:03 PM Ahmad Fatoum wrote: > > I didn't closely follow the previous discussions, but is a module > > parameter really the right approach? > > Is there also a way to set it via something like device tree? > > Compiled-on sources are considered in the order: tpm,

Re: [PATCH] mtd: require write permissions for locking and badblock ioctls

2021-03-22 Thread Richard Weinberger
ioctls for permissions") >> Signed-off-by: Michael Walle > > Should be fine for OpenWrt tools to my best knowledge (and quick testing). > > Acked-by: Rafał Miłecki Nice! Acked-by: Richard Weinberger Thanks, //richard

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

2021-03-17 Thread Richard Weinberger
Sumit, - Ursprüngliche Mail - >> > module_param_named(source, trusted_key_source, charp, 0); >> > -MODULE_PARM_DESC(source, "Select trusted keys source (tpm or tee)"); >> > +MODULE_PARM_DESC(source, "Select trusted keys source (tpm, tee or caam)"); >> >> I didn't closely follow the

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

2021-03-16 Thread Richard Weinberger
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? Otherwise I'd suggest marking it static. > module_param_named(source, trusted_key_source, charp,

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

2021-03-16 Thread Richard Weinberger
Ahmad, On Tue, Mar 16, 2021 at 6:24 PM Ahmad Fatoum wrote: > > The Cryptographic Acceleration and Assurance Module (CAAM) is an IP core > built into many newer i.MX and QorIQ SoCs by NXP. > > Its blob mechanism can AES encrypt/decrypt user data using a unique > never-disclosed device-specific

Re: [PATCH] mtd: require write permissions for locking and badblock ioctls

2021-03-03 Thread Richard Weinberger
- Ursprüngliche Mail - >>> Thanks for auditing the rest of these from my original patch. If this >>> is ok with userspace tools, it's fine with me, but I don't even have >>> this hardware to test with :) >> >> That's my fear. Michael, did you verify? > > I don't know any tools except

Re: [PATCH] mtd: require write permissions for locking and badblock ioctls

2021-03-03 Thread Richard Weinberger
Michael, - Ursprüngliche Mail - > Von: "Greg Kroah-Hartman" > An: "Michael Walle" > CC: "linux-mtd" , "linux-kernel" > , "Miquel Raynal" > , "richard" , "Vignesh > Raghavendra" > Gesendet: Mittwoch, 3. März 2021 17:08:56 > Betreff: Re: [PATCH] mtd: require write permissions for

[GIT PULL] JFFS2/UBIFS and UBI changes for 5.12

2021-02-21 Thread Richard Weinberger
Linus, The following changes since commit 92bf22614b21a2706f4993b278017e437f7785b3: Linux 5.11-rc7 (2021-02-07 13:57:38 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs.git tags/for-linus-5.12-rc1 for you to fetch changes up to

[GIT PULL] UML changes for 5.12

2021-02-21 Thread Richard Weinberger
Linus, The following changes since commit 92bf22614b21a2706f4993b278017e437f7785b3: Linux 5.11-rc7 (2021-02-07 13:57:38 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml.git tags/for-linux-5.12-rc1 for you to fetch changes up to

[GIT PULL] MTD changes for 5.12

2021-02-21 Thread Richard Weinberger
binding for BCM4908 partitions Richard Weinberger (2): Merge tag 'nand/for-5.12' of git://git.kernel.org/.../mtd/linux into mtd/next Merge tag 'spi-nor/for-5.12' of git://git.kernel.org/.../mtd/linux into mtd/next Takahiro Kuwano (4): mtd: spi-nor: sfdp: Fix wrong erase type

Re: [PATCH] mtd: use refcount to prevent corruption

2021-02-15 Thread Richard Weinberger
On Sat, Feb 13, 2021 at 6:12 PM Winkler, Tomas wrote: > > Well, the trick in glubi (and other MTDs with "hotplug" support) is not to > > reject removal of the sub-device. ->_put_device() is of return type void. > > The key is grabbing a reference on the sub-device in ->_get_device() such > > that

Re: [PATCH] fs: ubifs: set s_uuid in super block to support ima/evm uuid options

2021-02-13 Thread Richard Weinberger
- Ursprüngliche Mail - >> Hmm, I didn't know that helper. >> The only user in fs/ seems to be zonefs, all other filesystems do a plain >> memcpy(). >> Do you want me do a patch that converts all users in fs/ to import_uuid()? > Not sure about all fs, but in new code, like here I think it

Re: [PATCH] fs: ubifs: set s_uuid in super block to support ima/evm uuid options

2021-02-12 Thread Richard Weinberger
Andy, - Ursprüngliche Mail - >> + memcpy(>s_uuid, >uuid, sizeof(c-> > Shouldn’t it be `import_uuid()`? Hmm, I didn't know that helper. The only user in fs/ seems to be zonefs, all other filesystems do a plain memcpy(). Do you want me do a patch that converts all users in fs/ to

Re: [PATCH] fs: ubifs: set s_uuid in super block to support ima/evm uuid options

2021-02-12 Thread Richard Weinberger
On Tue, Feb 2, 2021 at 1:55 PM Juergen Borleis wrote: > > From: Steffen Trumtrar > > This is required to provide uuid based integrity functionality for: > ima_policy (fsuuid option) and the 'evmctl' command ('--uuid' option). > > Signed-off-by: Steffen Trumtrar > Signed-off-by: Oleksij Rempel

Re: [PATCH 0/8] MUSE: Userspace backed MTD v3

2021-02-10 Thread Richard Weinberger
- Ursprüngliche Mail - >> By single request we meant FUSE op-codes. The NAND simulator in Userspace >> will see just one call. My plan is to abstract it in libfuse. > > If libfuse abstracts it, as long as MTD only sees a single request I'm > fine :) :-) I'll prototype that in the next

Re: [PATCH 0/8] MUSE: Userspace backed MTD v3

2021-02-10 Thread Richard Weinberger
Miquel, - Ursprüngliche Mail - >> Does in-band and OOB data need to be handled together? > > Short answer: yes. > >> If so, then two requests is not a good option. > > More detailed answer: > > There is a type of MTD device (NAND devices) which are composed, for > each page, of X

Re: [PATCH 0/8] MUSE: Userspace backed MTD v3

2021-02-10 Thread Richard Weinberger
On Wed, Feb 10, 2021 at 11:18 AM Miklos Szeredi wrote: > > Does this more or less what you had in mind? > > Just moving the whole internal header file is not nice. I did a > mechanical public/private separation of the interface based on what > CUSE uses. Incremental patch attached. > > But

Re: [PATCH 0/8] MUSE: Userspace backed MTD v3

2021-02-10 Thread Richard Weinberger
On Wed, Feb 10, 2021 at 11:22 AM Miklos Szeredi wrote: > > In MUSE one use case would be attaching two distinct (variable length) > > buffers to a > > single FUSE request, in both directions. > > If I read fuse_do_ioctl() correctly, it attaches always a single buffer per > > request > > but

Re: [PATCH 0/8] MUSE: Userspace backed MTD v3

2021-02-09 Thread Richard Weinberger
Miklos, - Ursprüngliche Mail - > If you look at fuse_do_ioctl() it does variable length input and > output at the same time. I guess you need something similar to that. I'm not sure whether I understand correctly. In MUSE one use case would be attaching two distinct (variable length)

Re: [PATCH 0/8] MUSE: Userspace backed MTD v3

2021-02-09 Thread Richard Weinberger
Miklos, - Ursprüngliche Mail - >> I do wonder if MUSE should go to drivers/mtd/ instead. Long term >> goal would be move CUSE to drivers/char and move the transport part of >> fuse into net/fuse leaving only the actual filesystems (fuse and >> virtiofs) under fs/. >> >> But for now

Re: [fuse-devel] [PATCH 0/8] MUSE: Userspace backed MTD v3

2021-02-09 Thread Richard Weinberger
- Ursprüngliche Mail - > On 09/02/21 17:29, Richard Weinberger wrote: >> The mmap() call itself. Of course you need to touch code. >> Maybe just cuse_lowlevel.c, maybe kernel too. > > A patch had been submitted some years ago, more than once, asking for >

Re: [fuse-devel] [PATCH 0/8] MUSE: Userspace backed MTD v3

2021-02-09 Thread Richard Weinberger
- Ursprüngliche Mail - >> A simple (but ugly!) approach would be redirecting mmap() requests on CUSE >> devices to /dev/mem. >> hmm? > > what requests are you talking about given that at the moment the CUSE > client interface (cuse_lowlevel_ops) does not expose mmap? The mmap() call

Re: [fuse-devel] [PATCH 0/8] MUSE: Userspace backed MTD v3

2021-02-09 Thread Richard Weinberger
- Ursprüngliche Mail - > for example, many existing video applications use mmap() to map the > device memory to userspace memory. Adding support for mmap() to CUSE > would allow these apps to work without any modifications with CUSE-based > device drivers other than kernel drivers. So

Re: [fuse-devel] [PATCH 0/8] MUSE: Userspace backed MTD v3

2021-02-09 Thread Richard Weinberger
> a bit OT probably: is there any chance for you to also implement mmap() > for CUSE? That would be much appreciated. What exactly do you have in mind? I wonder about the use case. mmap() between a FUSE server and a client is more or less shared memory in userspace. Thanks, //richard

Re: [PATCH 0/8] MUSE: Userspace backed MTD v3

2021-02-09 Thread Richard Weinberger
Miklos, - Ursprüngliche Mail - >> The core goal of MUSE is having the complexity on the userspace side and >> only a small MTD driver in kernelspace. >> While playing with different approaches I realized that FUSE offers >> everything >> we need. So MUSE is a little like CUSE except that

Re: [PATCH v2] mtd: convert sysfs sprintf/snprintf family to sysfs_emit

2021-02-09 Thread Richard Weinberger
On Sun, Feb 7, 2021 at 8:54 AM Jiapeng Chong wrote: > > Fix the following coccicheck warning: > > convert sysfs snprintf family to sysfs_emit in 'mtdcore.c'. The patch still does not explain why this is needed and what it fixes. :-( "A bot told me to change that line of code" is not a valid

Re: [PATCH 0/3] fs/efs: Follow kernel style guide

2021-02-05 Thread Richard Weinberger
On Fri, Feb 5, 2021 at 11:26 PM Amy Parker wrote: > > On Fri, Feb 5, 2021 at 5:1 AM David Sterba wrote: > > > > On Thu, Feb 04, 2021 at 08:52:14PM -0800, Amy Parker wrote: > > > As the EFS driver is old and non-maintained, > > > > Is anybody using EFS on current kernels? There's not much point

Re: [PATCH] drivers: mtd: Better word replace a not so good word in the file mtd_blkdevs.c

2021-02-05 Thread Richard Weinberger
- Ursprüngliche Mail - > Von: "Bhaskar Chowdhury" > An: "Miquel Raynal" > CC: "richard" , "Vignesh Raghavendra" , > "linux-mtd" , > "linux-kernel" , "Randy Dunlap" > > Gesendet: Freitag, 5. Februar 2021 14:36:39 > Betreff: Re: [PATCH] drivers: mtd: Better word replace a not so good

Re: [PATCH] mtd: convert sysfs sprintf/snprintf family to sysfs_emit

2021-02-04 Thread Richard Weinberger
- Ursprüngliche Mail - >> Fix the following coccicheck warning: >> >> ./drivers/mtd/mtdcore.c: WARNING: use scnprintf or sprintf. > > That's not what you do in the below change :) Well, sysfs_emit() is the sysfs equivalent of scnprintf(). But the patch fails to explain *why* it is

[GIT PULL] UML fixes for 5.11-rc7

2021-02-03 Thread Richard Weinberger
Linus, The following changes since commit 4992eb41ab1b5d08479193afdc94f9678e5ded13: Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm (2021-01-26 11:10:14 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml.git

Re: [PATCH printk-rework 09/12] um: synchronize kmsg_dumper

2021-02-01 Thread Richard Weinberger
John, - Ursprüngliche Mail - >>> The line was previously synchronized for the kmsg_dump_get_line() >>> call. But yes, it was not synchronized after the call, which is a bug if >>> the dump is triggered on multiple CPUs simultaneously. The commit >>> message should also mention that it is

Re: [PATCH printk-rework 09/12] um: synchronize kmsg_dumper

2021-02-01 Thread Richard Weinberger
r" , "richard" > Gesendet: Montag, 1. Februar 2021 17:51:14 > Betreff: Re: [PATCH printk-rework 09/12] um: synchronize kmsg_dumper > (Added CC: Thomas Meyer, Richard Weinberger) > > On 2021-02-01, Petr Mladek wrote: >>> In preparation for removing prin

Re: [PATCH 0/8] MUSE: Userspace backed MTD v3

2021-02-01 Thread Richard Weinberger
*friendly FUSE maintainer ping* :-) On Mon, Jan 25, 2021 at 12:24 AM Richard Weinberger wrote: > > I'm happy to announce the first non-RFC version of this patch set. > Over the xmas holidays I found some time to experiment with various userspace > implementations of MTDs and gave the

Re: [PATCH] mtd: use refcount to prevent corruption

2021-01-28 Thread Richard Weinberger
Tomas, - Ursprüngliche Mail - >> As Richard was saying, we are really open to enhance MTD refcounting. >> >> However, the issue you are facing is, IMHO, not related to MTD but to MFD. >> There should be a way to avoid MFD to vanish by taking a reference of it >> through

Re: [PATCH] jffs2: check the validity of dstlen in jffs2_zlib_compress()

2021-01-28 Thread Richard Weinberger
- Ursprüngliche Mail - > Von: "Joakim Tjernlund" > An: "menglong8 dong" , "David Woodhouse" > > CC: "yang yang29" , "stable" > , "linux-kernel" > , "richard" , "linux-mtd" > > Gesendet: Donnerstag, 28. Januar 2021 12:17:34 > Betreff: Re: [PATCH] jffs2: check the validity of dstlen in

Re: [PATCH] mtd: use refcount to prevent corruption

2021-01-27 Thread Richard Weinberger
Tomas, - Ursprüngliche Mail - >> >> Can you please explain a little more what devices are involved? >> >> Does it implement _get_device() and _put_device()? >> > No this is not connected to those handlers of the underlying device >> > and those won't help. >> > I have a spi device

Re: [PATCH] mtd: use refcount to prevent corruption

2021-01-27 Thread Richard Weinberger
- Ursprüngliche Mail - >> > When underlying device is removed mtd core will crash in case user >> > space is still holding an open handle to a mtd device node. >> > A proper refcounting is needed so device is release only when a >> > partition has no active users. The current simple

Re: [PATCH] mtd: use refcount to prevent corruption

2021-01-27 Thread Richard Weinberger
Tomas, - Ursprüngliche Mail - > Von: "Tomas Winkler" > An: "Miquel Raynal" , "richard" , > "Vignesh Raghavendra" , > "linux-mtd" , "linux-kernel" > > CC: "Tomas Winkler" > Gesendet: Mittwoch, 27. Januar 2021 21:03:19 > Betreff: [PATCH] mtd: use refcount to prevent corruption > When

Re: [PATCH 3/4] ubifs: Update directory size when creating whiteouts

2021-01-24 Thread Richard Weinberger
On Mon, Jan 25, 2021 at 2:12 AM Zhihao Cheng wrote: > > 在 2021/1/23 10:45, Zhihao Cheng 写道: > > >> @@ -430,6 +433,7 @@ static int do_tmpfile(struct inode *dir, struct > >> dentry *dentry, > >> return 0; > >> out_cancel: > Still one question: > > Does this need a judgment? Like this, The

[PATCH 7/8] fuse: Implement MUSE - MTD in userspace

2021-01-24 Thread Richard Weinberger
types of flashes can be implemented in userspace such that the complexity is in userspace. Furthermore at some point we can depricate ad-hoc in-kernel MTD simulators such as nandsim. Signed-off-by: Richard Weinberger --- Documentation/ABI/testing/sysfs-class-mtd |8 + fs/fuse/Kconfig

[PATCH 6/8] fuse: Add MUSE specific defines FUSE interface

2021-01-24 Thread Richard Weinberger
a block as bad MUSE_ISBAD: Checks whether a block is bad MUSE_SYNC: Flushes all cached data Signed-off-by: Richard Weinberger --- include/uapi/linux/fuse.h | 76 +++ 1 file changed, 76 insertions(+) diff --git a/include/uapi/linux/fuse.h b/include/uapi/linux

[PATCH 1/8] fuse: Export fuse_simple_request

2021-01-24 Thread Richard Weinberger
MUSE will use this function to issue requests, so export it. Signed-off-by: Richard Weinberger --- fs/fuse/dev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 588f8d1240aa..8b7209537683 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -522,6 +522,7

[PATCH 8/8] MAINTAINERS: Add entry for MUSE

2021-01-24 Thread Richard Weinberger
Since MUSE lives in fs/fuse/, make sure that linux-mtd@ is CC'ed on patches such that MTD related aspects of changes can be reviewed. Signed-off-by: Richard Weinberger --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index f79ec98bbb29

[PATCH 4/8] mtd: Add MTD_MUSE flag

2021-01-24 Thread Richard Weinberger
This flag will be set if an MTD is implemeted in userspace using MUSE. Signed-off-by: Richard Weinberger --- include/uapi/mtd/mtd-abi.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/mtd/mtd-abi.h b/include/uapi/mtd/mtd-abi.h index 65b9db936557..2ad2217e3a96 100644

[PATCH 5/8] mtd: Allow passing a custom cmdline to cmdline line parser

2021-01-24 Thread Richard Weinberger
. Signed-off-by: Richard Weinberger --- drivers/mtd/parsers/cmdlinepart.c | 73 --- include/linux/mtd/partitions.h| 2 + 2 files changed, 58 insertions(+), 17 deletions(-) diff --git a/drivers/mtd/parsers/cmdlinepart.c b/drivers/mtd/parsers/cmdlinepart.c index

[PATCH 2/8] fuse: Export IO helpers

2021-01-24 Thread Richard Weinberger
MUSE will use this functions in its IO path, so export them. Signed-off-by: Richard Weinberger --- fs/fuse/file.c | 16 +++- fs/fuse/fuse_i.h | 16 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 8cccecb55fb8

[PATCH 3/8] fuse: Make cuse_parse_one a common helper

2021-01-24 Thread Richard Weinberger
This function will be used by MUSE too, let's share it. Signed-off-by: Richard Weinberger --- fs/fuse/Kconfig | 4 +++ fs/fuse/Makefile | 1 + fs/fuse/cuse.c | 58 +-- fs/fuse/fuse_i.h | 2 ++ fs/fuse/helper.c | 70

[PATCH 0/8] MUSE: Userspace backed MTD v3

2021-01-24 Thread Richard Weinberger
processing simple for MUSE. - Support for bad blocks. - No more (ab)use of FUSE ops such as FUSE_FSYNC. - Major code cleanup. This series can also be found at: git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc.git muse_v3 Richard Weinberger (8): fuse: Export fuse_simple_request fuse: Export

Re: [PATCH] mtd: rawnand: Fix an error handling path in 'ebu_dma_start()'

2021-01-24 Thread Richard Weinberger
On Sun, Jan 24, 2021 at 9:13 PM Markus Elfring wrote: > > > If 'dmaengine_prep_slave_single()' fails, we must undo a previous > > 'dma_map_single()' call, as already done in all the other error handling > > paths of this function. > > Would you ever like to use an imperative wording for the

Re: [PATCH 3/4] ubifs: Update directory size when creating whiteouts

2021-01-23 Thread Richard Weinberger
- Ursprüngliche Mail - > Von: "chengzhihao1" > An: "richard" , "linux-mtd" > CC: "david" , "linux-kernel" > , "stable" > Gesendet: Samstag, 23. Januar 2021 03:45:15 > Betreff: Re: [PATCH 3/4] ubifs: Update di

[PATCH 4/4] ubifs: Harden ubifs_jnl_write_inode()

2021-01-22 Thread Richard Weinberger
Make sure that ubifs_jnl_write_inode() cannot be abused and will not write less data then expected. Signed-off-by: Richard Weinberger --- fs/ubifs/journal.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/ubifs/journal.c b/fs/ubifs/journal.c index 03410ae0813a

Re: [PATCH 3/3] mtd: parsers: ofpart: support BCM4908 fixed partitions

2021-01-22 Thread Richard Weinberger
On Tue, Jan 19, 2021 at 5:01 PM Miquel Raynal wrote: > > Signed-off-by: Rafał Miłecki > > The approach looks fine by me, let's see what other maintainers think. Same, looks good to me! :-) -- Thanks, //richard

[PATCH 2/4] ubifs: Don't add fscrypt context to xattrs

2021-01-22 Thread Richard Weinberger
In UBIFS xattrs are inodes too, make sure that these inodes don't get a fscrypt context. Otherwise we will end up with undeletable xattrs which will waste memory on the flash. Cc: sta...@vger.kernel.org Fixes: d475a507457b ("ubifs: Add skeleton for fscrypto") Signed-off-by: Richard

[PATCH 1/4] ubifs: Correctly set inode size in ubifs_link()

2021-01-22 Thread Richard Weinberger
ement encrypted filenames") Signed-off-by: Richard Weinberger --- fs/ubifs/dir.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c index 9a6b8660425a..04912dedca48 100644 --- a/fs/ubifs/dir.c +++ b/fs/ubifs/dir.c @@ -693,7 +693,7 @@

[PATCH 3/4] ubifs: Update directory size when creating whiteouts

2021-01-22 Thread Richard Weinberger
Although whiteouts are unlinked files they will get re-linked later, therefore the size of the parent directory needs to be updated too. Cc: sta...@vger.kernel.org Fixes: 9e0a1fff8db5 ("ubifs: Implement RENAME_WHITEOUT") Signed-off-by: Richard Weinberger --- fs/ubifs/dir.c | 4 ++

[PATCH 0/4] Assorted UBIFS fixes

2021-01-22 Thread Richard Weinberger
I'm currently hunting down a filesystem corruption, while reviewing various parts of UBIFS I've found some other bugs. This patches fix these bugs. In another series I'll add a feature to be able to remove stale fscrypt contexts and wrong directory size counters. Richard Weinberger (4): ubifs

Re: ARC no console output (was Re: [PATCH 1/2] init/console: Use ttynull as a fallback when there is no console)

2021-01-07 Thread Richard Weinberger
[CC'in linux-um since there is a similar issue] On Thu, Jan 7, 2021 at 12:38 AM Vineet Gupta wrote: > > +CC Buildroot folks > > Hi Petr, > > On 11/11/20 5:54 AM, Petr Mladek wrote: > > stdin, stdout, and stderr standard I/O stream are created for the init > > process. They are not available

Re: linux.git is broken on a case-insensitive filesystem

2020-12-26 Thread Richard Weinberger
Theodore, On Sat, Dec 26, 2020 at 11:41 PM Theodore Dubois wrote: > > I'm currently hacking on Linux trying to run a sort of UML-style thing on > macOS (please don't question my sanity :), and I've run into various issues > stemming from macOS having a case-insensitive filesystem. Sounds

Re: [PATCH v2] ubifs: Fix read out-of-bounds in ubifs_jnl_write_inode()

2020-12-23 Thread Richard Weinberger
Chengsong Ke, - Ursprüngliche Mail - > The memory area allocated in ubifs_jnl_write_inode() is not aligned with 8 > bytes: > ino_start = ino = kmalloc(write_len, GFP_NOFS); > > When ino_start passed into write_head -> ubifs_wbuf_write_nolock: >n = aligned_len >> c->max_write_shift; >

Re: [PATCH -next] ubi: eba: Delete useless kfree code

2020-12-23 Thread Richard Weinberger
On Wed, Dec 16, 2020 at 2:13 PM Zheng Yongjun wrote: > > The parameter of kfree function is NULL, so kfree code is useless, delete it. > > Signed-off-by: Zheng Yongjun > --- > drivers/mtd/ubi/eba.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/mtd/ubi/eba.c

Re: [PATCH] ubifs: Fix read out-of-bounds in ubifs_jnl_write_inode()

2020-12-23 Thread Richard Weinberger
Chengsong Ke, - Ursprüngliche Mail - > The memory area allocated in ubifs_jnl_write_inode() is not aligned with 8 > bytes: > ino_start = ino = kmalloc(write_len, GFP_NOFS); > > When ino_start passed into write_head -> ubifs_wbuf_write_nolock: >n = aligned_len >> c->max_write_shift; >

Re: [PATCH] ubi: remove dead code in validate_vid_hdr()

2020-12-20 Thread Richard Weinberger
On Sat, Dec 19, 2020 at 1:52 PM Jubin Zhong wrote: > > data_size is already checked against zero when vol_type matches > UBI_VID_STATIC. Remove the following dead code. > > Signed-off-by: Jubin Zhong > --- > drivers/mtd/ubi/io.c | 7 +-- > 1 file changed, 1 insertion(+), 6 deletions(-) > >

[GIT PULL] JFFS2, UBI and UBIFS updates for 5.11-rc1

2020-12-17 Thread Richard Weinberger
ody warnings Richard Weinberger (1): ubifs: wbuf: Don't leak kernel memory to flash Tom Rix (1): jffs2: remove trailing semicolon in macro definition Wang ShaoBo (1): ubifs: Fix error return code in ubifs_init_authentication() Zhe Li (1): jffs2: Fix GC exit abnormally Zhihao Ch

[GIT PULL] UML updates for 5.11-rc1

2020-12-17 Thread Richard Weinberger
Linus, The following changes since commit b65054597872ce3aefbc6a666385eabdf9e288da: Linux 5.10-rc6 (2020-11-29 15:50:50 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml.git tags/for-linus-5.11-rc1 for you to fetch changes up to

Re: [PATCH] ext4: Don't leak old mountpoint samples

2020-12-17 Thread Richard Weinberger
2fsprogs already assumes that in the case of a 64+ byte mount >>path, that s_last_mounted will not be NUL terminated. >> >>Reported-by: Richard Weinberger >>Signed-off-by: Theodore Ts'o > > Color me confused, but I don't see how this change makes any difference? &g

Re: [PATCH v3 1/3] UBI: Do not zero out EC and VID on ECC-ed NOR flashes

2020-12-13 Thread Richard Weinberger
On Tue, Dec 8, 2020 at 7:17 PM Pratyush Yadav wrote: > > Richard, > > On 01/12/20 03:57PM, Pratyush Yadav wrote: > > For NOR flashes EC and VID are zeroed out before an erase is issued to > > make sure UBI does not mistakenly treat the PEB as used and associate it > > with an LEB. > > > > But on

Re: [PATCH] mtd: remove redundant assignment to pointer eb

2020-12-13 Thread Richard Weinberger
On Fri, Sep 11, 2020 at 5:59 PM Miquel Raynal wrote: > > Hi Colin, > > Colin King wrote on Fri, 11 Sep 2020 > 11:23:21 +0100: > > > From: Colin Ian King > > > > Pointer eb is being assigned a value that is never read, the assignment > > is redundant and can be removed. > > > >

Re: linux-next: Fixes tag needs some work in the uml tree

2020-12-13 Thread Richard Weinberger
Stephen, On Fri, Dec 11, 2020 at 11:21 AM Stephen Rothwell wrote: > > Hi all, > > In commit > > 1aa1cfc19405 ("um: Remove use of asprinf in umid.c") > > Fixes tag > > Fixes: 492edce1306f (um: remove uses of variable length arrays) > > has these problem(s): > > - Target SHA1 does not exist

Re: [PATCH v2] mtd:ubi: Remove useless code in bytes_str_to_int

2020-12-13 Thread Richard Weinberger
On Fri, Dec 11, 2020 at 4:38 AM Chengsong Ke wrote: > > I just send the v1 with the wrong module name 'ubifs'. > > [PATCH] ubifs: Remove useless code in bytes_str_to_int > > :-) > > Thanks, > > //Chengsong Ke > ping Both patches are in my next tree and should appear soon on linux-next. Thanks

Re: BUG: Invalid wait context with KMEMLEAK and KASAN enabled

2020-12-06 Thread Richard Weinberger
Boqun, - Ursprüngliche Mail - >> Does this ring a bell? >> >> [2.298447] = >> [2.298971] [ BUG: Invalid wait context ] >> [2.298971] 5.10.0-rc6+ #388 Not tainted >> [2.298971] - >> [2.298971] ksoftirqd/1/15 is

BUG: Invalid wait context with KMEMLEAK and KASAN enabled

2020-12-06 Thread Richard Weinberger
Hi! With both KMEMLEAK and KASAN enabled, I'm facing the following lockdep splat at random times on Linus' tree as of today. Sometimes it happens at bootup, sometimes much later when userspace has started. Does this ring a bell? [2.298447] = [2.298971] [ BUG:

[PATCH] mtd: core: Fix refcounting for unpartitioned MTDs

2020-12-06 Thread Richard Weinberger
Apply changes to usecount also the the master partition. Otherwise we have no refcounting at all if an MTD has no partitions. Cc: sta...@vger.kernel.org Fixes: 46b5889cc2c5 ("mtd: implement proper partition handling") Signed-off-by: Richard Weinberger --- drivers/mtd/mtdcore.c | 4 ++

Re: [PATCH v2] phram: Allow the user to set the erase page size.

2020-12-04 Thread Richard Weinberger
On Wed, Nov 25, 2020 at 8:14 AM Guohua Zhong wrote: > > Permit the user to specify the erase page size as a parameter. > This solves two problems: > > - phram can access images made by mkfs.jffs2. mkfs.jffs2 won't > create images with erase sizes less than 8KiB; many architectures > define

[PATCH] ext4: Don't leak old mountpoint samples

2020-12-01 Thread Richard Weinberger
he super block of a filesystem used in production... Fix this by clearing the string buffer before writing to it, Signed-off-by: Richard Weinberger --- fs/ext4/file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/ext4/file.c b/fs/ext4/file.c index 3ed8c048fb12..dba521250d01 100644 ---

Re: [PATCH v2 0/3] mtd: Make sure UBIFS does not do multi-pass page programming on flashes that don't support it

2020-11-27 Thread Richard Weinberger
On Tue, Nov 24, 2020 at 2:58 PM Pratyush Yadav wrote: > > Hi, > > On 18/11/20 11:54PM, Pratyush Yadav wrote: > > Hi, > > > > The Cypress Semper S28 flash family uses 2-bit ECC by default. Under > > this ECC scheme, multi-pass page programs result in a program error. > > This means that unlike

[PATCH 4/7] mtd: Add MTD_MUSE flag

2020-11-26 Thread Richard Weinberger
This flag will get set if an MTD is implemeted in userspace using MUSE. Signed-off-by: Richard Weinberger --- include/uapi/mtd/mtd-abi.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/mtd/mtd-abi.h b/include/uapi/mtd/mtd-abi.h index 65b9db936557..2ad2217e3a96 100644

[PATCH 1/7] fuse: Export fuse_simple_request

2020-11-26 Thread Richard Weinberger
MUSE will use this function to issue requests, so export it. Signed-off-by: Richard Weinberger --- fs/fuse/dev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 588f8d1240aa..8b7209537683 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -522,6 +522,7

[PATCH 2/7] fuse: Export IO helpers

2020-11-26 Thread Richard Weinberger
MUSE will use this functions in its IO path, so export them. Signed-off-by: Richard Weinberger --- fs/fuse/file.c | 16 +++- fs/fuse/fuse_i.h | 16 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/fs/fuse/file.c b/fs/fuse/file.c index c03034e8c152

[PATCH 0/7] [RFC] MUSE: Userspace backed MTD v2

2020-11-26 Thread Richard Weinberger
. This series can also be found at: git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc.git muse_v2 Richard Weinberger (7): fuse: Export fuse_simple_request fuse: Export IO helpers fuse: Make cuse_parse_one a common helper mtd: Add MTD_MUSE flag fuse: Add MUSE specific defines FUSE interface

[PATCH 5/7] fuse: Add MUSE specific defines FUSE interface

2020-11-26 Thread Richard Weinberger
is bad MUSE_SYNC: Flush all cached data Signed-off-by: Richard Weinberger --- include/uapi/linux/fuse.h | 73 ++- 1 file changed, 72 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/fuse.h b/include/uapi/linux/fuse.h index 7233502ea991

[PATCH 6/7] fuse: Implement MUSE: MTD in userspace

2020-11-26 Thread Richard Weinberger
of flashes can be implemented in userspace. Signed-off-by: Richard Weinberger --- fs/fuse/Kconfig | 11 + fs/fuse/Makefile | 1 + fs/fuse/muse.c | 730 +++ 3 files changed, 742 insertions(+) create mode 100644 fs/fuse/muse.c diff --git a/fs/fuse

  1   2   3   4   5   6   7   8   9   10   >