lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <e7232f59a3e6ab536c5bda8b4e74820d54649b7e.1b61be8b.e5fb.4fe7.8016.bcbdf32ff1ea@bytedance.com>
Date: Mon, 13 Jan 2025 11:30:29 +0800
From: 朱晓辉 <zhuxiaohui.400@...edance.com>
To: "Hongbo Li" <lihongbo22@...wei.com>
Cc: "zhuxiaohui" <zhuxiaohui400@...il.com>, <muchun.song@...ux.dev>, 
	<rostedt@...dmis.org>, <mhiramat@...nel.org>, <linux-mm@...ck.org>, 
	<linux-kernel@...r.kernel.org>, <linux-trace-kernel@...r.kernel.org>
Subject: Re: [External] Re: [PATCH] hugetlbfs: check dir in trace_hugetlbfs_alloc_inode

Got it, thanks

> From: "Hongbo Li"<lihongbo22@...wei.com>
> Date:  Mon, Jan 13, 2025, 11:29
> Subject:  [External] Re: [PATCH] hugetlbfs: check dir in trace_hugetlbfs_alloc_inode
> To: "zhuxiaohui"<zhuxiaohui400@...il.com>, <muchun.song@...ux.dev>, <rostedt@...dmis.org>, <mhiramat@...nel.org>, <linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>, <linux-trace-kernel@...r.kernel.org>
> Cc: "Xiaohui Zhu"<zhuxiaohui.400@...edance.com>
> On 2025/1/13 11:07, zhuxiaohui wrote:

> > From: Xiaohui Zhu <zhuxiaohui.400@...edance.com>

> > 

> > Anonymous huge page has no corresponding directory inode,

> > which cause a null pointer crash when access dir with the stack

> > 

> >    trace_hugetlbfs_alloc_inode

> >    hugetlbfs_get_inode

> >    hugetlb_file_setup

> >    ksys_mmap_pgoff

> > 

> > Signed-off-by: Xiaohui Zhu <zhuxiaohui.400@...edance.com>

> > ---

> >   include/trace/events/hugetlbfs.h | 4 +++-

> >   1 file changed, 3 insertions(+), 1 deletion(-)

> > 

> > diff --git a/include/trace/events/hugetlbfs.h b/include/trace/events/hugetlbfs.h

> > index 8331c904a9ba..5daa52053edc 100644

> > --- a/include/trace/events/hugetlbfs.h

> > +++ b/include/trace/events/hugetlbfs.h

> > @@ -23,7 +23,9 @@ TRACE_EVENT(hugetlbfs_alloc_inode,

> >           TP_fast_assign(

> >                   __entry->dev                = inode->i_sb->s_dev;

> >                   __entry->ino                = inode->i_ino;

> > -                __entry->dir                = dir->i_ino;

> > +                __entry->dir                = 0;

> > +                if (dir)

> > +                        __entry->dir        = dir->i_ino;

> It has been fixed in [1] by Muchun.

> Thanks,

> Hongbo

> 
> [1] 

> https://lore.kernel.org/lkml/20250106033118.4640-1-songmuchun@bytedance.com/T/

> >                   __entry->mode                = mode;

> >           ),

> >
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ