Re: [PATCH v6 2/8] debugfs: prevent access to removed files' private data

2017-03-19 Thread Arkady
Nicolai, Regarding the debugfs_create_file() which ignores .mmap field in the struct file_operations. The patch is a part of the kernel 4.8 in the Ubuntu 16.10 and breaks quite a few online code examples of mmap drivers. Is is acceptable to replace the debugfs_create_file() by a macro and fail

Re: [PATCH v6 2/8] debugfs: prevent access to removed files' private data

2017-03-19 Thread Arkady
Nicolai, Regarding the debugfs_create_file() which ignores .mmap field in the struct file_operations. The patch is a part of the kernel 4.8 in the Ubuntu 16.10 and breaks quite a few online code examples of mmap drivers. Is is acceptable to replace the debugfs_create_file() by a macro and fail

Re: [PATCH v6 2/8] debugfs: prevent access to removed files' private data

2016-05-22 Thread Nicolai Stange
Nicolai Stange writes: > Sasha Levin writes: > >> On 05/18/2016 12:05 PM, Greg Kroah-Hartman wrote: >>> On Wed, May 18, 2016 at 11:18:16AM -0400, Sasha Levin wrote: On 05/18/2016 11:01 AM, Nicolai Stange wrote: > Thanks a million for

Re: [PATCH v6 2/8] debugfs: prevent access to removed files' private data

2016-05-22 Thread Nicolai Stange
Nicolai Stange writes: > Sasha Levin writes: > >> On 05/18/2016 12:05 PM, Greg Kroah-Hartman wrote: >>> On Wed, May 18, 2016 at 11:18:16AM -0400, Sasha Levin wrote: On 05/18/2016 11:01 AM, Nicolai Stange wrote: > Thanks a million for reporting! > > 1.) Do you have lockdep

Re: [PATCH v6 2/8] debugfs: prevent access to removed files' private data

2016-05-21 Thread Nicolai Stange
Sasha Levin writes: > On 05/18/2016 12:05 PM, Greg Kroah-Hartman wrote: >> On Wed, May 18, 2016 at 11:18:16AM -0400, Sasha Levin wrote: >>> On 05/18/2016 11:01 AM, Nicolai Stange wrote: Thanks a million for reporting! 1.) Do you have lockdep enabled? >>>

Re: [PATCH v6 2/8] debugfs: prevent access to removed files' private data

2016-05-21 Thread Nicolai Stange
Sasha Levin writes: > On 05/18/2016 12:05 PM, Greg Kroah-Hartman wrote: >> On Wed, May 18, 2016 at 11:18:16AM -0400, Sasha Levin wrote: >>> On 05/18/2016 11:01 AM, Nicolai Stange wrote: Thanks a million for reporting! 1.) Do you have lockdep enabled? >>> >>> Yup, nothing there.

Re: [PATCH v6 2/8] debugfs: prevent access to removed files' private data

2016-05-20 Thread Sasha Levin
On 05/18/2016 12:05 PM, Greg Kroah-Hartman wrote: > On Wed, May 18, 2016 at 11:18:16AM -0400, Sasha Levin wrote: >> On 05/18/2016 11:01 AM, Nicolai Stange wrote: >>> Thanks a million for reporting! >>> >>> 1.) Do you have lockdep enabled? >> >> Yup, nothing there. >> >>> 2.) Does this happen

Re: [PATCH v6 2/8] debugfs: prevent access to removed files' private data

2016-05-20 Thread Sasha Levin
On 05/18/2016 12:05 PM, Greg Kroah-Hartman wrote: > On Wed, May 18, 2016 at 11:18:16AM -0400, Sasha Levin wrote: >> On 05/18/2016 11:01 AM, Nicolai Stange wrote: >>> Thanks a million for reporting! >>> >>> 1.) Do you have lockdep enabled? >> >> Yup, nothing there. >> >>> 2.) Does this happen

Re: [PATCH v6 2/8] debugfs: prevent access to removed files' private data

2016-05-20 Thread Sasha Levin
On 05/18/2016 12:32 PM, Nicolai Stange wrote: > Sasha Levin writes: > >> On 05/18/2016 11:01 AM, Nicolai Stange wrote: >>> Thanks a million for reporting! >>> >>> 1.) Do you have lockdep enabled? >> >> Yup, nothing there. >> >>> 2.) Does this happen before or after

Re: [PATCH v6 2/8] debugfs: prevent access to removed files' private data

2016-05-20 Thread Sasha Levin
On 05/18/2016 12:32 PM, Nicolai Stange wrote: > Sasha Levin writes: > >> On 05/18/2016 11:01 AM, Nicolai Stange wrote: >>> Thanks a million for reporting! >>> >>> 1.) Do you have lockdep enabled? >> >> Yup, nothing there. >> >>> 2.) Does this happen before or after userspace init has been

Re: [PATCH v6 2/8] debugfs: prevent access to removed files' private data

2016-05-18 Thread Nicolai Stange
Sasha Levin writes: > On 05/18/2016 11:01 AM, Nicolai Stange wrote: >> Thanks a million for reporting! >> >> 1.) Do you have lockdep enabled? > > Yup, nothing there. > >> 2.) Does this happen before or after userspace init has been spawned, >> i.e. does the lockup

Re: [PATCH v6 2/8] debugfs: prevent access to removed files' private data

2016-05-18 Thread Nicolai Stange
Sasha Levin writes: > On 05/18/2016 11:01 AM, Nicolai Stange wrote: >> Thanks a million for reporting! >> >> 1.) Do you have lockdep enabled? > > Yup, nothing there. > >> 2.) Does this happen before or after userspace init has been spawned, >> i.e. does the lockup happen at debugfs file

Re: [PATCH v6 2/8] debugfs: prevent access to removed files' private data

2016-05-18 Thread Greg Kroah-Hartman
On Wed, May 18, 2016 at 11:18:16AM -0400, Sasha Levin wrote: > On 05/18/2016 11:01 AM, Nicolai Stange wrote: > > Thanks a million for reporting! > > > > 1.) Do you have lockdep enabled? > > Yup, nothing there. > > > 2.) Does this happen before or after userspace init has been spawned, > >

Re: [PATCH v6 2/8] debugfs: prevent access to removed files' private data

2016-05-18 Thread Greg Kroah-Hartman
On Wed, May 18, 2016 at 11:18:16AM -0400, Sasha Levin wrote: > On 05/18/2016 11:01 AM, Nicolai Stange wrote: > > Thanks a million for reporting! > > > > 1.) Do you have lockdep enabled? > > Yup, nothing there. > > > 2.) Does this happen before or after userspace init has been spawned, > >

Re: [PATCH v6 2/8] debugfs: prevent access to removed files' private data

2016-05-18 Thread Sasha Levin
On 05/18/2016 11:01 AM, Nicolai Stange wrote: > Thanks a million for reporting! > > 1.) Do you have lockdep enabled? Yup, nothing there. > 2.) Does this happen before or after userspace init has been spawned, > i.e. does the lockup happen at debugfs file creation time or > possibly at

Re: [PATCH v6 2/8] debugfs: prevent access to removed files' private data

2016-05-18 Thread Sasha Levin
On 05/18/2016 11:01 AM, Nicolai Stange wrote: > Thanks a million for reporting! > > 1.) Do you have lockdep enabled? Yup, nothing there. > 2.) Does this happen before or after userspace init has been spawned, > i.e. does the lockup happen at debugfs file creation time or > possibly at

Re: [PATCH v6 2/8] debugfs: prevent access to removed files' private data

2016-05-18 Thread Nicolai Stange
Hi Sasha, Sasha Levin writes: > On 03/22/2016 09:11 AM, Nicolai Stange wrote: >> Upon return of debugfs_remove()/debugfs_remove_recursive(), it might >> still be attempted to access associated private file data through >> previously opened struct file objects. If that

Re: [PATCH v6 2/8] debugfs: prevent access to removed files' private data

2016-05-18 Thread Nicolai Stange
Hi Sasha, Sasha Levin writes: > On 03/22/2016 09:11 AM, Nicolai Stange wrote: >> Upon return of debugfs_remove()/debugfs_remove_recursive(), it might >> still be attempted to access associated private file data through >> previously opened struct file objects. If that data has been freed by >>

Re: [PATCH v6 2/8] debugfs: prevent access to removed files' private data

2016-05-18 Thread Sasha Levin
On 03/22/2016 09:11 AM, Nicolai Stange wrote: > Upon return of debugfs_remove()/debugfs_remove_recursive(), it might > still be attempted to access associated private file data through > previously opened struct file objects. If that data has been freed by > the caller of debugfs_remove*() in the

Re: [PATCH v6 2/8] debugfs: prevent access to removed files' private data

2016-05-18 Thread Sasha Levin
On 03/22/2016 09:11 AM, Nicolai Stange wrote: > Upon return of debugfs_remove()/debugfs_remove_recursive(), it might > still be attempted to access associated private file data through > previously opened struct file objects. If that data has been freed by > the caller of debugfs_remove*() in the

[PATCH v6 2/8] debugfs: prevent access to removed files' private data

2016-03-22 Thread Nicolai Stange
Upon return of debugfs_remove()/debugfs_remove_recursive(), it might still be attempted to access associated private file data through previously opened struct file objects. If that data has been freed by the caller of debugfs_remove*() in the meanwhile, the reading/writing process would either

[PATCH v6 2/8] debugfs: prevent access to removed files' private data

2016-03-22 Thread Nicolai Stange
Upon return of debugfs_remove()/debugfs_remove_recursive(), it might still be attempted to access associated private file data through previously opened struct file objects. If that data has been freed by the caller of debugfs_remove*() in the meanwhile, the reading/writing process would either