<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/fs/ntfs3/bitmap.c, branch linux-6.0.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-6.0.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-6.0.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-01-04T10:26:26+00:00</updated>
<entry>
<title>fs/ntfs3: Use __GFP_NOWARN allocation at wnd_init()</title>
<updated>2023-01-04T10:26:26+00:00</updated>
<author>
<name>Tetsuo Handa</name>
<email>penguin-kernel@I-love.SAKURA.ne.jp</email>
</author>
<published>2022-10-02T14:39:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3c6d23a4ce40054083a380f24797e12b863bd1bd'/>
<id>urn:sha1:3c6d23a4ce40054083a380f24797e12b863bd1bd</id>
<content type='text'>
[ Upstream commit 0d0f659bf713662fabed973f9996b8f23c59ca51 ]

syzbot is reporting too large allocation at wnd_init() [1], for a crafted
filesystem can become wnd-&gt;nwnd close to UINT_MAX. Add __GFP_NOWARN in
order to avoid too large allocation warning, than exhausting memory by
using kvcalloc().

Link: https://syzkaller.appspot.com/bug?extid=fa4648a5446460b7b963 [1]
Reported-by: syzot &lt;syzbot+fa4648a5446460b7b963@syzkaller.appspotmail.com&gt;
Signed-off-by: Tetsuo Handa &lt;penguin-kernel@I-love.SAKURA.ne.jp&gt;
Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>fs/ntfs3: Fix slab-out-of-bounds read in ntfs_trim_fs</title>
<updated>2022-12-31T12:26:32+00:00</updated>
<author>
<name>Abdun Nihaal</name>
<email>abdun.nihaal@gmail.com</email>
</author>
<published>2022-10-01T07:00:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7e686013b7071f4c16644cfad8808e76097724c4'/>
<id>urn:sha1:7e686013b7071f4c16644cfad8808e76097724c4</id>
<content type='text'>
[ Upstream commit 557d19675a470bb0a98beccec38c5dc3735c20fa ]

Syzbot reports an out of bound access in ntfs_trim_fs.
The cause of this is using a loop termination condition that compares
window index (iw) with wnd-&gt;nbits instead of wnd-&gt;nwnd, due to which the
index used for wnd-&gt;free_bits exceeds the size of the array allocated.

Fix the loop condition.

Fixes: 3f3b442b5ad2 ("fs/ntfs3: Add bitmap")
Link: https://syzkaller.appspot.com/bug?extid=b892240eac461e488d51
Reported-by: syzbot+b892240eac461e488d51@syzkaller.appspotmail.com
Signed-off-by: Abdun Nihaal &lt;abdun.nihaal@gmail.com&gt;
Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>fs/ntfs3: Remove unused function wnd_bits</title>
<updated>2022-08-10T16:12:48+00:00</updated>
<author>
<name>Jiapeng Chong</name>
<email>jiapeng.chong@linux.alibaba.com</email>
</author>
<published>2022-07-21T03:18:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=96964352e21962f5e51ecad87527ae9b6fec9670'/>
<id>urn:sha1:96964352e21962f5e51ecad87527ae9b6fec9670</id>
<content type='text'>
Since the function wnd_bits is defined but not called in any file, it is
a useless function, and we delete it in view of the brevity of the code.

Remove some warnings found by running scripts/kernel-doc, which is
caused by using 'make W=1'.

fs/ntfs3/bitmap.c:54:19: warning: unused function 'wnd_bits' [-Wunused-function].

Reported-by: Abaci Robot &lt;abaci@linux.alibaba.com&gt;
Signed-off-by: Jiapeng Chong &lt;jiapeng.chong@linux.alibaba.com&gt;
Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</content>
</entry>
<entry>
<title>fs/ntfs3: Added comments to frecord functions</title>
<updated>2022-08-03T15:25:07+00:00</updated>
<author>
<name>Konstantin Komarov</name>
<email>almaz.alexandrovich@paragon-software.com</email>
</author>
<published>2022-07-06T17:01:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=54033c135061b52d4405facba2e49177a5716a31'/>
<id>urn:sha1:54033c135061b52d4405facba2e49177a5716a31</id>
<content type='text'>
Added some comments in frecord.c for more context.
Also changed run_lookup to static because it's an internal function.

Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</content>
</entry>
<entry>
<title>fs/ntfs3: Remove a useless test</title>
<updated>2022-06-07T16:40:14+00:00</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2021-12-23T12:20:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=548744f84456946181ed6dc0ac6be8267f167d28'/>
<id>urn:sha1:548744f84456946181ed6dc0ac6be8267f167d28</id>
<content type='text'>
'new_free' has just been allocated by kmalloc() and is known to be not
NULL.
So this pointer can't be equal to a previous memory allocation.

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</content>
</entry>
<entry>
<title>fs/ntfs3: Use min/max macros instated of ternary operators</title>
<updated>2021-09-16T14:01:37+00:00</updated>
<author>
<name>Kari Argillander</name>
<email>kari.argillander@gmail.com</email>
</author>
<published>2021-09-07T14:28:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6e3331ee34461be37f50912295a2e924a673dbc6'/>
<id>urn:sha1:6e3331ee34461be37f50912295a2e924a673dbc6</id>
<content type='text'>
We can make code little bit more readable by using min/max macros.

These were found with Coccinelle.

Signed-off-by: Kari Argillander &lt;kari.argillander@gmail.com&gt;
Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</content>
</entry>
<entry>
<title>fs/ntfs3: Remove unneeded header files from c files</title>
<updated>2021-09-13T16:41:46+00:00</updated>
<author>
<name>Kari Argillander</name>
<email>kari.argillander@gmail.com</email>
</author>
<published>2021-09-02T16:15:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9c2aadd0fdf88a7ebeebd1e97a9c66b07ad3e14a'/>
<id>urn:sha1:9c2aadd0fdf88a7ebeebd1e97a9c66b07ad3e14a</id>
<content type='text'>
We have lot of unnecessary headers in these files. Remove them so that
we help compiler a little bit.

Signed-off-by: Kari Argillander &lt;kari.argillander@gmail.com&gt;
Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</content>
</entry>
<entry>
<title>fs/ntfs3: Restyle comments to better align with kernel-doc</title>
<updated>2021-08-31T16:07:12+00:00</updated>
<author>
<name>Konstantin Komarov</name>
<email>almaz.alexandrovich@paragon-software.com</email>
</author>
<published>2021-08-31T13:57:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d3624466b56dd5b1886c1dff500525b544c19c83'/>
<id>urn:sha1:d3624466b56dd5b1886c1dff500525b544c19c83</id>
<content type='text'>
Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</content>
</entry>
<entry>
<title>fs/ntfs3: Restyle comments to better align with kernel-doc</title>
<updated>2021-08-30T15:39:14+00:00</updated>
<author>
<name>Kari Argillander</name>
<email>kari.argillander@gmail.com</email>
</author>
<published>2021-08-03T11:57:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e8b8e97f91b80f08a2f1b7ea4f81e7af61b2cc2f'/>
<id>urn:sha1:e8b8e97f91b80f08a2f1b7ea4f81e7af61b2cc2f</id>
<content type='text'>
Capitalize comments and end with period for better reading.

Also function comments are now little more kernel-doc style. This way we
can easily convert them to kernel-doc style if we want. Note that these
are not yet complete with this style. Example function comments start
with /* and in kernel-doc style they start /**.

Use imperative mood in function descriptions.

Change words like ntfs -&gt; NTFS, linux -&gt; Linux.

Use "we" not "I" when commenting code.

Signed-off-by: Kari Argillander &lt;kari.argillander@gmail.com&gt;
Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</content>
</entry>
<entry>
<title>fs/ntfs3: Use kcalloc/kmalloc_array over kzalloc/kmalloc</title>
<updated>2021-08-27T14:05:13+00:00</updated>
<author>
<name>Kari Argillander</name>
<email>kari.argillander@gmail.com</email>
</author>
<published>2021-08-24T18:37:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=345482bc431f6492beb464696341626057f67771'/>
<id>urn:sha1:345482bc431f6492beb464696341626057f67771</id>
<content type='text'>
Use kcalloc/kmalloc_array over kzalloc/kmalloc when we allocate array.
Checkpatch found these after we did not use our own defined allocation
wrappers.

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Kari Argillander &lt;kari.argillander@gmail.com&gt;
Signed-off-by: Konstantin Komarov &lt;almaz.alexandrovich@paragon-software.com&gt;
</content>
</entry>
</feed>
