<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/kernel/acct.c, branch v6.6.62</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v6.6.62</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v6.6.62'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2023-08-30T15:17:35Z</updated>
<entry>
<title>Merge tag 'audit-pr-20230829' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit</title>
<updated>2023-08-30T15:17:35Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2023-08-30T15:17:35Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3ea67c4f462e1eab16ced755816143cbd1ebfc7d'/>
<id>urn:sha1:3ea67c4f462e1eab16ced755816143cbd1ebfc7d</id>
<content type='text'>
Pull audit updates from Paul Moore:
 "Six audit patches, the highlights are:

   - Add an explicit cond_resched() call when generating PATH records

     Certain tracefs/debugfs operations can generate a *lot* of audit
     PATH entries and if one has an aggressive system configuration (not
     the default) this can cause a soft lockup in the audit code as it
     works to process all of these new entries.

     This is in sharp contrast to the common case where only one or two
     PATH entries are logged. In order to fix this corner case without
     excessively impacting the common case we're adding a single
     cond_rescued() call between two of the most intensive loops in the
     __audit_inode_child() function.

   - Various minor cleanups

     We removed a conditional header file as the included header already
     had the necessary logic in place, fixed a dummy function's return
     value, and the usual collection of checkpatch.pl noise (whitespace,
     brace, and trailing statement tweaks)"

* tag 'audit-pr-20230829' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit:
  audit: move trailing statements to next line
  audit: cleanup function braces and assignment-in-if-condition
  audit: add space before parenthesis and around '=', "==", and '&lt;'
  audit: fix possible soft lockup in __audit_inode_child()
  audit: correct audit_filter_inodes() definition
  audit: include security.h unconditionally
</content>
</entry>
<entry>
<title>acct: replace all non-returning strlcpy with strscpy</title>
<updated>2023-08-18T17:18:51Z</updated>
<author>
<name>Azeem Shaikh</name>
<email>azeemshaikh38@gmail.com</email>
</author>
<published>2023-07-10T01:17:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4264be505d9f3657de9626f551099e595b2ae7fe'/>
<id>urn:sha1:4264be505d9f3657de9626f551099e595b2ae7fe</id>
<content type='text'>
strlcpy() reads the entire source buffer first.  This read may exceed the
destination size limit.  This is both inefficient and can lead to linear
read overflows if a source string is not NUL-terminated [1].  In an effort
to remove strlcpy() completely [2], replace strlcpy() here with strscpy().
No return values were used, so direct replacement is safe.

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy
[2] https://github.com/KSPP/linux/issues/89

Link: https://lkml.kernel.org/r/20230710011748.3538624-1-azeemshaikh38@gmail.com
Signed-off-by: Azeem Shaikh &lt;azeemshaikh38@gmail.com&gt;
Cc: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>audit: add space before parenthesis and around '=', "==", and '&lt;'</title>
<updated>2023-08-15T22:09:20Z</updated>
<author>
<name>Atul Kumar Pant</name>
<email>atulpant.linux@gmail.com</email>
</author>
<published>2023-08-15T20:45:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=62acadda115a94bffd1f6b36acbb67e3f04811be'/>
<id>urn:sha1:62acadda115a94bffd1f6b36acbb67e3f04811be</id>
<content type='text'>
Fixes following checkpatch.pl issue:
ERROR: space required before the open parenthesis '('
ERROR: spaces required around that '='
ERROR: spaces required around that '&lt;'
ERROR: spaces required around that '=='

Signed-off-by: Atul Kumar Pant &lt;atulpant.linux@gmail.com&gt;
[PM: subject line tweaks]
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
</content>
</entry>
<entry>
<title>acct: fix potential integer overflow in encode_comp_t()</title>
<updated>2022-12-01T00:13:18Z</updated>
<author>
<name>Zheng Yejian</name>
<email>zhengyejian1@huawei.com</email>
</author>
<published>2021-05-15T14:06:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c5f31c655bcc01b6da53b836ac951c1556245305'/>
<id>urn:sha1:c5f31c655bcc01b6da53b836ac951c1556245305</id>
<content type='text'>
The integer overflow is descripted with following codes:
  &gt; 317 static comp_t encode_comp_t(u64 value)
  &gt; 318 {
  &gt; 319         int exp, rnd;
    ......
  &gt; 341         exp &lt;&lt;= MANTSIZE;
  &gt; 342         exp += value;
  &gt; 343         return exp;
  &gt; 344 }

Currently comp_t is defined as type of '__u16', but the variable 'exp' is
type of 'int', so overflow would happen when variable 'exp' in line 343 is
greater than 65535.

Link: https://lkml.kernel.org/r/20210515140631.369106-3-zhengyejian1@huawei.com
Signed-off-by: Zheng Yejian &lt;zhengyejian1@huawei.com&gt;
Cc: Hanjun Guo &lt;guohanjun@huawei.com&gt;
Cc: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: Vlastimil Babka &lt;vbabka@suse.cz&gt;
Cc: Zhang Jinhao &lt;zhangjinhao2@huawei.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>acct: fix accuracy loss for input value of encode_comp_t()</title>
<updated>2022-12-01T00:13:18Z</updated>
<author>
<name>Zheng Yejian</name>
<email>zhengyejian1@huawei.com</email>
</author>
<published>2021-05-15T14:06:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=457139f16ae15d86df1e491fc45a9ea56def57b5'/>
<id>urn:sha1:457139f16ae15d86df1e491fc45a9ea56def57b5</id>
<content type='text'>
Patch series "Fix encode_comp_t()".

Type conversion in encode_comp_t() may look a bit problematic.


This patch (of 2):

See calculation of ac_{u,s}time in fill_ac():
  &gt; ac-&gt;ac_utime = encode_comp_t(nsec_to_AHZ(pacct-&gt;ac_utime));
  &gt; ac-&gt;ac_stime = encode_comp_t(nsec_to_AHZ(pacct-&gt;ac_stime));

Return value of nsec_to_AHZ() is always type of 'u64', but it is handled
as type of 'unsigned long' in encode_comp_t, and accuracy loss would
happen on 32-bit platform when 'unsigned long' value is 32-bit-width.

So 'u64' value of encode_comp_t() may look better.

Link: https://lkml.kernel.org/r/20210515140631.369106-1-zhengyejian1@huawei.com
Link: https://lkml.kernel.org/r/20210515140631.369106-2-zhengyejian1@huawei.com
Signed-off-by: Zheng Yejian &lt;zhengyejian1@huawei.com&gt;
Cc: Hanjun Guo &lt;guohanjun@huawei.com&gt;
Cc: Randy Dunlap &lt;rdunlap@infradead.org&gt; # build-tested
Cc: Vlastimil Babka &lt;vbabka@suse.cz&gt;
Cc: Zhang Jinhao &lt;zhangjinhao2@huawei.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>acct: use VMA iterator instead of linked list</title>
<updated>2022-09-27T02:46:22Z</updated>
<author>
<name>Matthew Wilcox (Oracle)</name>
<email>willy@infradead.org</email>
</author>
<published>2022-09-06T19:48:58Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=160c820023bbfe7c478ed3041cc50604d664f047'/>
<id>urn:sha1:160c820023bbfe7c478ed3041cc50604d664f047</id>
<content type='text'>
The VMA iterator is faster than the linked list.

Link: https://lkml.kernel.org/r/20220906194824.2110408-47-Liam.Howlett@oracle.com
Signed-off-by: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;
Signed-off-by: Liam R. Howlett &lt;Liam.Howlett@Oracle.com&gt;
Acked-by: Vlastimil Babka &lt;vbabka@suse.cz&gt;
Reviewed-by: Davidlohr Bueso &lt;dave@stgolabs.net&gt;
Tested-by: Yu Zhao &lt;yuzhao@google.com&gt;
Cc: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Cc: David Hildenbrand &lt;david@redhat.com&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Cc: SeongJae Park &lt;sj@kernel.org&gt;
Cc: Sven Schnelle &lt;svens@linux.ibm.com&gt;
Cc: Will Deacon &lt;will@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>kernel/acct: move acct sysctls to its own file</title>
<updated>2022-04-06T20:43:44Z</updated>
<author>
<name>tangmeng</name>
<email>tangmeng@uniontech.com</email>
</author>
<published>2022-02-18T10:59:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=801b501439d1b366d524dee4fc1e6b3473a95b9a'/>
<id>urn:sha1:801b501439d1b366d524dee4fc1e6b3473a95b9a</id>
<content type='text'>
kernel/sysctl.c is a kitchen sink where everyone leaves their dirty
dishes, this makes it very difficult to maintain.

To help with this maintenance let's start by moving sysctls to places
where they actually belong.  The proc sysctl maintainers do not want to
know what sysctl knobs you wish to add for your own piece of code, we
just care about the core logic.

All filesystem syctls now get reviewed by fs folks. This commit
follows the commit of fs, move the acct sysctl to its own file,
kernel/acct.c.

Signed-off-by: tangmeng &lt;tangmeng@uniontech.com&gt;
Signed-off-by: Luis Chamberlain &lt;mcgrof@kernel.org&gt;
</content>
</entry>
<entry>
<title>kernel: remove spurious blkdev.h includes</title>
<updated>2021-10-18T12:17:01Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2021-09-20T12:33:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=545c6647d2d9f3bf8a086d5ff47fb85e5c5dca28'/>
<id>urn:sha1:545c6647d2d9f3bf8a086d5ff47fb85e5c5dca28</id>
<content type='text'>
Various files have acquired spurious includes of &lt;linux/blkdev.h&gt; over
time.  Remove them.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Johannes Thumshirn &lt;johannes.thumshirn@wdc.com&gt;
Link: https://lore.kernel.org/r/20210920123328.1399408-7-hch@lst.de
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>kernel/acct.c: use dedicated helper to access rlimit values</title>
<updated>2021-09-08T18:50:26Z</updated>
<author>
<name>Yang Yang</name>
<email>yang.yang29@zte.com.cn</email>
</author>
<published>2021-09-08T02:58:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3c91dda97eea704ac257ddb138d1154adab8db62'/>
<id>urn:sha1:3c91dda97eea704ac257ddb138d1154adab8db62</id>
<content type='text'>
Use rlimit() helper instead of manually writing whole chain from
task to rlimit value. See patch "posix-cpu-timers: Use dedicated
helper to access rlimit values".

Link: https://lkml.kernel.org/r/20210728030822.524789-1-yang.yang29@zte.com.cn
Signed-off-by: Yang Yang &lt;yang.yang29@zte.com.cn&gt;
Reported-by: Zeal Robot &lt;zealci@zte.com.cn&gt;
Cc: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: sh_def@163.com &lt;sh_def@163.com&gt;
Cc: Yang Yang &lt;yang.yang29@zte.com.cn&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>kernel/acct.c: use #elif instead of #end and #elif</title>
<updated>2020-12-16T06:46:15Z</updated>
<author>
<name>Hui Su</name>
<email>sh_def@163.com</email>
</author>
<published>2020-12-16T04:42:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=35189b8ff18ee0c6f7c04f4c674584d1149d5c55'/>
<id>urn:sha1:35189b8ff18ee0c6f7c04f4c674584d1149d5c55</id>
<content type='text'>
Cleanup: use #elif instead of #end and #elif.

Link: https://lkml.kernel.org/r/20201015150736.GA91603@rlk
Signed-off-by: Hui Su &lt;sh_def@163.com&gt;
Reviewed-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
