<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in fs.c</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>fbd126f5 - gcov: annotate struct gcov_iterator with __counted_by</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/kernel/gcov/fs.c#fbd126f5</link>
        <description>gcov: annotate struct gcov_iterator with __counted_byPrepare for the coming implementation by GCC and Clang of the __counted_byattribute.  Flexible array members annotated with __counted_by can havetheir accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS(for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-familyfunctions).As found with Coccinelle[1], add __counted_by for struct gcov_iterator.[1] https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocciLink: https://lkml.kernel.org/r/20230922175220.work.327-kees@kernel.orgSigned-off-by: Kees Cook &lt;keescook@chromium.org&gt;Reviewed-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;Reviewed-by: Peter Oberparleiter &lt;oberpar@linux.ibm.com&gt;Cc: Nathan Chancellor &lt;nathan@kernel.org&gt;Cc: Nick Desaulniers &lt;ndesaulniers@google.com&gt;Cc: Tom Rix &lt;trix@redhat.com&gt;Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;

            List of files:
            /linux-6.15/kernel/gcov/fs.c</description>
        <pubDate>Fri, 22 Sep 2023 17:52:20 +0000</pubDate>
        <dc:creator>Kees Cook &lt;keescook@chromium.org&gt;</dc:creator>
    </item>
<item>
        <title>1391efa9 - gcov: use kvmalloc()</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/kernel/gcov/fs.c#1391efa9</link>
        <description>gcov: use kvmalloc()Using vmalloc() in gcov is really quite wasteful, many of the objectsallocated are really small (e.g.  I&apos;ve seen 24 bytes.) Use kvmalloc() toautomatically pick the better of kmalloc() or vmalloc() depending on thesize.[johannes.berg@intel.com: fix clang-11+ build]  Link: https://lkml.kernel.org/r/20210412214210.6e1ecca9cdc5.I24459763acf0591d5e6b31c7e3a59890d802f79c@changeidLink: https://lkml.kernel.org/r/20210315235453.799e7a9d627d.I741d0db096c6f312910f7f1bcdfde0fda20801a4@changeidSigned-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;Reviewed-by: Nick Desaulniers &lt;ndesaulniers@google.com&gt;Tested-by: Nick Desaulniers &lt;ndesaulniers@google.com&gt;Cc: Peter Oberparleiter &lt;oberpar@linux.ibm.com&gt;Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;

            List of files:
            /linux-6.15/kernel/gcov/fs.c</description>
        <pubDate>Fri, 07 May 2021 01:04:51 +0000</pubDate>
        <dc:creator>Johannes Berg &lt;johannes.berg@intel.com&gt;</dc:creator>
    </item>
<item>
        <title>3180c44f - gcov: simplify buffer allocation</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/kernel/gcov/fs.c#3180c44f</link>
        <description>gcov: simplify buffer allocationUse just a single vmalloc() with struct_size() instead of a separatekmalloc() for the iter struct.Link: https://lkml.kernel.org/r/20210315235453.b6de4a92096e.Iac40a5166589cefbff8449e466bd1b38ea7a17af@changeidSigned-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;Cc: Peter Oberparleiter &lt;oberpar@linux.ibm.com&gt;Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;

            List of files:
            /linux-6.15/kernel/gcov/fs.c</description>
        <pubDate>Fri, 07 May 2021 01:04:48 +0000</pubDate>
        <dc:creator>Johannes Berg &lt;johannes.berg@intel.com&gt;</dc:creator>
    </item>
<item>
        <title>7a1d55b9 - gcov: combine common code</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/kernel/gcov/fs.c#7a1d55b9</link>
        <description>gcov: combine common codeThere&apos;s a lot of duplicated code between gcc and clang implementations,move it over to fs.c to simplify the code, there&apos;s no reason to believethat for small data like this one would not just implement the simpleconvert_to_gcda() function.Link: https://lkml.kernel.org/r/20210315235453.e3fbb86e99a0.I08a3ee6dbe47ea3e8024956083f162884a958e40@changeidSigned-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;Acked-by: Peter Oberparleiter &lt;oberpar@linux.ibm.com&gt;Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;

            List of files:
            /linux-6.15/kernel/gcov/fs.c</description>
        <pubDate>Fri, 07 May 2021 01:04:45 +0000</pubDate>
        <dc:creator>Johannes Berg &lt;johannes.berg@intel.com&gt;</dc:creator>
    </item>
<item>
        <title>f4d74ef6 - kernel/gcov/fs.c: gcov_seq_next() should increase position index</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/kernel/gcov/fs.c#f4d74ef6</link>
        <description>kernel/gcov/fs.c: gcov_seq_next() should increase position indexIf seq_file .next function does not change position index, read aftersome lseek can generate unexpected output.https://bugzilla.kernel.org/show_bug.cgi?id=206283Signed-off-by: Vasily Averin &lt;vvs@virtuozzo.com&gt;Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;Acked-by: Peter Oberparleiter &lt;oberpar@linux.ibm.com&gt;Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;Cc: Davidlohr Bueso &lt;dave@stgolabs.net&gt;Cc: Ingo Molnar &lt;mingo@redhat.com&gt;Cc: Manfred Spraul &lt;manfred@colorfullife.com&gt;Cc: NeilBrown &lt;neilb@suse.com&gt;Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;Cc: Waiman Long &lt;longman@redhat.com&gt;Link: http://lkml.kernel.org/r/f65c6ee7-bd00-f910-2f8a-37cc67e4ff88@virtuozzo.comSigned-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;

            List of files:
            /linux-6.15/kernel/gcov/fs.c</description>
        <pubDate>Fri, 10 Apr 2020 21:34:10 +0000</pubDate>
        <dc:creator>Vasily Averin &lt;vvs@virtuozzo.com&gt;</dc:creator>
    </item>
<item>
        <title>6524d794 - kernel/gcov/fs.c: replace zero-length array with flexible-array member</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/kernel/gcov/fs.c#6524d794</link>
        <description>kernel/gcov/fs.c: replace zero-length array with flexible-array memberThe current codebase makes use of the zero-length array language extensionto the C90 standard, but the preferred mechanism to declarevariable-length types such as these ones is a flexible array member[1][2],introduced in C99:struct foo {        int stuff;        struct boo array[];};By making use of the mechanism above, we will get a compiler warning incase the flexible array does not occur last in the structure, which willhelp us prevent some kind of undefined behavior bugs from beinginadvertently introduced[3] to the codebase from now on.Also, notice that, dynamic memory allocations won&apos;t be affected by thischange:&quot;Flexible array members have incomplete type, and so the sizeof operatormay not be applied.  As a quirk of the original implementation ofzero-length arrays, sizeof evaluates to zero.&quot;[1]This issue was found with the help of Coccinelle.[1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html[2] https://github.com/KSPP/linux/issues/21[3] commit 76497732932f (&quot;cxgb3/l2t: Fix undefined behaviour&quot;)Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;Cc: Peter Oberparleiter &lt;oberpar@linux.ibm.com&gt;Link: http://lkml.kernel.org/r/20200302224851.GA26467@embeddedorSigned-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;

            List of files:
            /linux-6.15/kernel/gcov/fs.c</description>
        <pubDate>Tue, 07 Apr 2020 03:11:58 +0000</pubDate>
        <dc:creator>Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;</dc:creator>
    </item>
<item>
        <title>1c769fc4 - gcov: no need to check return value of debugfs_create functions</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/kernel/gcov/fs.c#1c769fc4</link>
        <description>gcov: no need to check return value of debugfs_create functionsWhen calling debugfs functions, there is no need to ever check thereturn value.  The function can work or not, but the code logic shouldnever do something different based on this.Also delete the dentry variable as it is never needed.Acked-by: Peter Oberparleiter &lt;oberpar@linux.ibm.com&gt;Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

            List of files:
            /linux-6.15/kernel/gcov/fs.c</description>
        <pubDate>Tue, 22 Jan 2019 15:21:48 +0000</pubDate>
        <dc:creator>Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;</dc:creator>
    </item>
<item>
        <title>b2441318 - License cleanup: add SPDX GPL-2.0 license identifier to files with no license</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/kernel/gcov/fs.c#b2441318</link>
        <description>License cleanup: add SPDX GPL-2.0 license identifier to files with no licenseMany source files in the tree are missing licensing information, whichmakes it harder for compliance tools to determine the correct license.By default all files without license information are under the defaultlicense of the kernel, which is GPL version 2.Update the files which contain no license information with the &apos;GPL-2.0&apos;SPDX license identifier.  The SPDX identifier is a legally bindingshorthand, which can be used instead of the full boiler plate text.This patch is based on work done by Thomas Gleixner and Kate Stewart andPhilippe Ombredanne.How this work was done:Patches were generated and checked against linux-4.14-rc6 for a subset ofthe use cases: - file had no licensing information it it. - file was a */uapi/* one with no licensing information in it, - file was a */uapi/* one with existing licensing information,Further patches will be generated in subsequent months to fix up caseswhere non-standard license headers were used, and references to licensehad to be inferred by heuristics based on keywords.The analysis to determine which SPDX License Identifier to be applied toa file was done in a spreadsheet of side by side results from of theoutput of two independent scanners (ScanCode &amp; Windriver) producing SPDXtag:value files created by Philippe Ombredanne.  Philippe prepared thebase worksheet, and did an initial spot review of a few 1000 files.The 4.13 kernel was the starting point of the analysis with 60,537 filesassessed.  Kate Stewart did a file by file comparison of the scannerresults in the spreadsheet to determine which SPDX license identifier(s)to be applied to the file. She confirmed any determination that was notimmediately clear with lawyers working with the Linux Foundation.Criteria used to select files for SPDX license identifier tagging was: - Files considered eligible had to be source code files. - Make and config files were included as candidates if they contained &gt;5   lines of source - File already had some variant of a license header in it (even if &lt;5   lines).All documentation files were explicitly excluded.The following heuristics were used to determine which SPDX licenseidentifiers to apply. - when both scanners couldn&apos;t find any license traces, file was   considered to have no license information in it, and the top level   COPYING file license applied.   For non */uapi/* files that summary was:   SPDX license identifier                            # files   ---------------------------------------------------|-------   GPL-2.0                                              11139   and resulted in the first patch in this series.   If that file was a */uapi/* path one, it was &quot;GPL-2.0 WITH   Linux-syscall-note&quot; otherwise it was &quot;GPL-2.0&quot;.  Results of that was:   SPDX license identifier                            # files   ---------------------------------------------------|-------   GPL-2.0 WITH Linux-syscall-note                        930   and resulted in the second patch in this series. - if a file had some form of licensing information in it, and was one   of the */uapi/* ones, it was denoted with the Linux-syscall-note if   any GPL family license was found in the file or had no licensing in   it (per prior point).  Results summary:   SPDX license identifier                            # files   ---------------------------------------------------|------   GPL-2.0 WITH Linux-syscall-note                       270   GPL-2.0+ WITH Linux-syscall-note                      169   ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21   ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17   LGPL-2.1+ WITH Linux-syscall-note                      15   GPL-1.0+ WITH Linux-syscall-note                       14   ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5   LGPL-2.0+ WITH Linux-syscall-note                       4   LGPL-2.1 WITH Linux-syscall-note                        3   ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3   ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1   and that resulted in the third patch in this series. - when the two scanners agreed on the detected license(s), that became   the concluded license(s). - when there was disagreement between the two scanners (one detected a   license but the other didn&apos;t, or they both detected different   licenses) a manual inspection of the file occurred. - In most cases a manual inspection of the information in the file   resulted in a clear resolution of the license that should apply (and   which scanner probably needed to revisit its heuristics). - When it was not immediately clear, the license identifier was   confirmed with lawyers working with the Linux Foundation. - If there was any question as to the appropriate license identifier,   the file was flagged for further research and to be revisited later   in time.In total, over 70 hours of logged manual review was done on thespreadsheet to determine the SPDX license identifiers to apply to thesource files by Kate, Philippe, Thomas and, in some cases, confirmationby lawyers working with the Linux Foundation.Kate also obtained a third independent scan of the 4.13 code base fromFOSSology, and compared selected files where the other two scannersdisagreed against that SPDX file, to see if there was new insights.  TheWindriver scanner is based on an older version of FOSSology in part, sothey are related.Thomas did random spot checks in about 500 files from the spreadsheetsfor the uapi headers and agreed with SPDX license identifier in thefiles he inspected. For the non-uapi files Thomas did random spot checksin about 15000 files.In initial set of patches against 4.14-rc6, 3 files were found to havecopy/paste license identifier errors, and have been fixed to reflect thecorrect identifier.Additionally Philippe spent 10 hours this week doing a detailed manualinspection and review of the 12,461 patched files from the initial patchversion early this week with: - a full scancode scan run, collecting the matched texts, detected   license ids and scores - reviewing anything where there was a license detected (about 500+   files) to ensure that the applied SPDX license was correct - reviewing anything where there was no detection but the patch license   was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied   SPDX license was correctThis produced a worksheet with 20 files needing minor correction.  Thisworksheet was then exported into 3 different .csv files for thedifferent types of files to be modified.These .csv files were then reviewed by Greg.  Thomas wrote a script toparse the csv files and add the proper SPDX tag to the file, in theformat that the file expected.  This script was further refined by Gregbased on the output to detect more types of files automatically and todistinguish between header and source .c files (which need differentcomment types.)  Finally Greg ran the script using the .csv files togenerate the patches.Reviewed-by: Kate Stewart &lt;kstewart@linuxfoundation.org&gt;Reviewed-by: Philippe Ombredanne &lt;pombredanne@nexb.com&gt;Reviewed-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

            List of files:
            /linux-6.15/kernel/gcov/fs.c</description>
        <pubDate>Wed, 01 Nov 2017 14:07:57 +0000</pubDate>
        <dc:creator>Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;</dc:creator>
    </item>
<item>
        <title>834b18b2 - kernel/gcov/fs.c: remove unnecessary null test before debugfs_remove</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/kernel/gcov/fs.c#834b18b2</link>
        <description>kernel/gcov/fs.c: remove unnecessary null test before debugfs_removeThis fixes checkpatch warning:  WARNING: debugfs_remove(NULL) is safe this check is probably not requiredSigned-off-by: Fabian Frederick &lt;fabf@skynet.be&gt;Cc: Peter Oberparleiter &lt;oberpar@linux.vnet.ibm.com&gt;Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;

            List of files:
            /linux-6.15/kernel/gcov/fs.c</description>
        <pubDate>Fri, 08 Aug 2014 21:22:20 +0000</pubDate>
        <dc:creator>Fabian Frederick &lt;fabf@skynet.be&gt;</dc:creator>
    </item>
<item>
        <title>1931d433 - gcov: reuse kbasename helper</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/kernel/gcov/fs.c#1931d433</link>
        <description>gcov: reuse kbasename helperTo get name of the file from a pathname let&apos;s use kbasename() helper.Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;Cc: Jingoo Han &lt;jg1.han@samsung.com&gt;Cc: Peter Oberparleiter &lt;peter.oberparleiter@de.ibm.com&gt;Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;

            List of files:
            /linux-6.15/kernel/gcov/fs.c</description>
        <pubDate>Tue, 12 Nov 2013 23:11:31 +0000</pubDate>
        <dc:creator>Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;</dc:creator>
    </item>
<item>
        <title>a5ebb875 - kernel/gcov/fs.c: use pr_warn()</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/kernel/gcov/fs.c#a5ebb875</link>
        <description>kernel/gcov/fs.c: use pr_warn()pr_warning() is deprecated in favor of pr_warn()Cc: Andy Gospodarek &lt;agospoda@redhat.com&gt;Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;Cc: Frantisek Hrbata &lt;fhrbata@redhat.com&gt;Cc: Jan Stancek &lt;jstancek@redhat.com&gt;Cc: Kees Cook &lt;keescook@chromium.org&gt;Cc: Peter Oberparleiter &lt;peter.oberparleiter@de.ibm.com&gt;Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;

            List of files:
            /linux-6.15/kernel/gcov/fs.c</description>
        <pubDate>Tue, 12 Nov 2013 23:11:29 +0000</pubDate>
        <dc:creator>Andrew Morton &lt;akpm@linux-foundation.org&gt;</dc:creator>
    </item>
<item>
        <title>8cbce376 - gcov: move gcov structs definitions to a gcc version specific file</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/kernel/gcov/fs.c#8cbce376</link>
        <description>gcov: move gcov structs definitions to a gcc version specific fileSince also the gcov structures(gcov_info, gcov_fn_info, gcov_ctr_info) canchange between gcc releases, as shown in gcc 4.7, they cannot be definedin a common header and need to be moved to a specific gcc implementionfile.  This also requires to make the gcov_info structure opaque for thecommon code and to introduce simple helpers for accessing data insidegcov_info.Signed-off-by: Frantisek Hrbata &lt;fhrbata@redhat.com&gt;Cc: Jan Stancek &lt;jstancek@redhat.com&gt;Cc: Kees Cook &lt;keescook@chromium.org&gt;Acked-by: Peter Oberparleiter &lt;peter.oberparleiter@de.ibm.com&gt;Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;Cc: Andy Gospodarek &lt;agospoda@redhat.com&gt;Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;

            List of files:
            /linux-6.15/kernel/gcov/fs.c</description>
        <pubDate>Tue, 12 Nov 2013 23:11:24 +0000</pubDate>
        <dc:creator>Frantisek Hrbata &lt;fhrbata@redhat.com&gt;</dc:creator>
    </item>
<item>
        <title>6072ddc8 - kernel: replace strict_strto*() with kstrto*()</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/kernel/gcov/fs.c#6072ddc8</link>
        <description>kernel: replace strict_strto*() with kstrto*()The usage of strict_strto*() is not preferred, because strict_strto*() isobsolete.  Thus, kstrto*() should be used.Signed-off-by: Jingoo Han &lt;jg1.han@samsung.com&gt;Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;

            List of files:
            /linux-6.15/kernel/gcov/fs.c</description>
        <pubDate>Thu, 12 Sep 2013 22:14:07 +0000</pubDate>
        <dc:creator>Jingoo Han &lt;jg1.han@samsung.com&gt;</dc:creator>
    </item>
<item>
        <title>6038f373 - llseek: automatically add .llseek fop</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/kernel/gcov/fs.c#6038f373</link>
        <description>llseek: automatically add .llseek fopAll file_operations should get a .llseek operation so we can makenonseekable_open the default for future file operations without a.llseek pointer.The three cases that we can automatically detect are no_llseek, seq_lseekand default_llseek. For cases where we can we can automatically prove thatthe file offset is always ignored, we use noop_llseek, which maintainsthe current behavior of not returning an error from a seek.New drivers should normally not use noop_llseek but instead use no_llseekand call nonseekable_open at open time.  Existing drivers can be convertedto do the same when the maintainer knows for certain that no user coderelies on calling seek on the device file.The generated code is often incorrectly indented and right now containscomments that clarify for each added line why a specific variant waschosen. In the version that gets submitted upstream, the comments willbe gone and I will manually fix the indentation, because there does notseem to be a way to do that using coccinelle.Some amount of new code is currently sitting in linux-next that should getthe same modifications, which I will do at the end of the merge window.Many thanks to Julia Lawall for helping me learn to write a semanticpatch that does all this.===== begin semantic patch =====// This adds an llseek= method to all file operations,// as a preparation for making no_llseek the default.//// The rules are// - use no_llseek explicitly if we do nonseekable_open// - use seq_lseek for sequential files// - use default_llseek if we know we access f_pos// - use noop_llseek if we know we don&apos;t access f_pos,//   but we still want to allow users to call lseek//@ open1 exists @identifier nested_open;@@nested_open(...){&lt;+...nonseekable_open(...)...+&gt;}@ open exists@identifier open_f;identifier i, f;identifier open1.nested_open;@@int open_f(struct inode *i, struct file *f){&lt;+...(nonseekable_open(...)|nested_open(...))...+&gt;}@ read disable optional_qualifier exists @identifier read_f;identifier f, p, s, off;type ssize_t, size_t, loff_t;expression E;identifier func;@@ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off){&lt;+...(   *off = E|   *off += E|   func(..., off, ...)|   E = *off)...+&gt;}@ read_no_fpos disable optional_qualifier exists @identifier read_f;identifier f, p, s, off;type ssize_t, size_t, loff_t;@@ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off){... when != off}@ write @identifier write_f;identifier f, p, s, off;type ssize_t, size_t, loff_t;expression E;identifier func;@@ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off){&lt;+...(  *off = E|  *off += E|  func(..., off, ...)|  E = *off)...+&gt;}@ write_no_fpos @identifier write_f;identifier f, p, s, off;type ssize_t, size_t, loff_t;@@ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off){... when != off}@ fops0 @identifier fops;@@struct file_operations fops = { ...};@ has_llseek depends on fops0 @identifier fops0.fops;identifier llseek_f;@@struct file_operations fops = {... .llseek = llseek_f,...};@ has_read depends on fops0 @identifier fops0.fops;identifier read_f;@@struct file_operations fops = {... .read = read_f,...};@ has_write depends on fops0 @identifier fops0.fops;identifier write_f;@@struct file_operations fops = {... .write = write_f,...};@ has_open depends on fops0 @identifier fops0.fops;identifier open_f;@@struct file_operations fops = {... .open = open_f,...};// use no_llseek if we call nonseekable_open////////////////////////////////////////////@ nonseekable1 depends on !has_llseek &amp;&amp; has_open @identifier fops0.fops;identifier nso ~= &quot;nonseekable_open&quot;;@@struct file_operations fops = {...  .open = nso, ...+.llseek = no_llseek, /* nonseekable */};@ nonseekable2 depends on !has_llseek @identifier fops0.fops;identifier open.open_f;@@struct file_operations fops = {...  .open = open_f, ...+.llseek = no_llseek, /* open uses nonseekable */};// use seq_lseek for sequential files/////////////////////////////////////@ seq depends on !has_llseek @identifier fops0.fops;identifier sr ~= &quot;seq_read&quot;;@@struct file_operations fops = {...  .read = sr, ...+.llseek = seq_lseek, /* we have seq_read */};// use default_llseek if there is a readdir///////////////////////////////////////////@ fops1 depends on !has_llseek &amp;&amp; !nonseekable1 &amp;&amp; !nonseekable2 &amp;&amp; !seq @identifier fops0.fops;identifier readdir_e;@@// any other fop is used that changes posstruct file_operations fops = {... .readdir = readdir_e, ...+.llseek = default_llseek, /* readdir is present */};// use default_llseek if at least one of read/write touches f_pos/////////////////////////////////////////////////////////////////@ fops2 depends on !fops1 &amp;&amp; !has_llseek &amp;&amp; !nonseekable1 &amp;&amp; !nonseekable2 &amp;&amp; !seq @identifier fops0.fops;identifier read.read_f;@@// read fops use offsetstruct file_operations fops = {... .read = read_f, ...+.llseek = default_llseek, /* read accesses f_pos */};@ fops3 depends on !fops1 &amp;&amp; !fops2 &amp;&amp; !has_llseek &amp;&amp; !nonseekable1 &amp;&amp; !nonseekable2 &amp;&amp; !seq @identifier fops0.fops;identifier write.write_f;@@// write fops use offsetstruct file_operations fops = {... .write = write_f, ...+	.llseek = default_llseek, /* write accesses f_pos */};// Use noop_llseek if neither read nor write accesses f_pos///////////////////////////////////////////////////////////@ fops4 depends on !fops1 &amp;&amp; !fops2 &amp;&amp; !fops3 &amp;&amp; !has_llseek &amp;&amp; !nonseekable1 &amp;&amp; !nonseekable2 &amp;&amp; !seq @identifier fops0.fops;identifier read_no_fpos.read_f;identifier write_no_fpos.write_f;@@// write fops use offsetstruct file_operations fops = {... .write = write_f, .read = read_f,...+.llseek = noop_llseek, /* read and write both use no f_pos */};@ depends on has_write &amp;&amp; !has_read &amp;&amp; !fops1 &amp;&amp; !fops2 &amp;&amp; !has_llseek &amp;&amp; !nonseekable1 &amp;&amp; !nonseekable2 &amp;&amp; !seq @identifier fops0.fops;identifier write_no_fpos.write_f;@@struct file_operations fops = {... .write = write_f, ...+.llseek = noop_llseek, /* write uses no f_pos */};@ depends on has_read &amp;&amp; !has_write &amp;&amp; !fops1 &amp;&amp; !fops2 &amp;&amp; !has_llseek &amp;&amp; !nonseekable1 &amp;&amp; !nonseekable2 &amp;&amp; !seq @identifier fops0.fops;identifier read_no_fpos.read_f;@@struct file_operations fops = {... .read = read_f, ...+.llseek = noop_llseek, /* read uses no f_pos */};@ depends on !has_read &amp;&amp; !has_write &amp;&amp; !fops1 &amp;&amp; !fops2 &amp;&amp; !has_llseek &amp;&amp; !nonseekable1 &amp;&amp; !nonseekable2 &amp;&amp; !seq @identifier fops0.fops;@@struct file_operations fops = {...+.llseek = noop_llseek, /* no read or write fn */};===== End semantic patch =====Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;Cc: Julia Lawall &lt;julia@diku.dk&gt;Cc: Christoph Hellwig &lt;hch@infradead.org&gt;

            List of files:
            /linux-6.15/kernel/gcov/fs.c</description>
        <pubDate>Sun, 15 Aug 2010 16:52:59 +0000</pubDate>
        <dc:creator>Arnd Bergmann &lt;arnd@arndb.de&gt;</dc:creator>
    </item>
<item>
        <title>85a0fdfd - gcov: fix null-pointer dereference for certain module types</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/kernel/gcov/fs.c#85a0fdfd</link>
        <description>gcov: fix null-pointer dereference for certain module typesThe gcov-kernel infrastructure expects that each object file is loadedonly once.  This may not be true, e.g.  when loading multiple kernelmodules which are linked to the same object file.  As a result, loadingsuch kernel modules will result in incorrect gcov results while unloadingwill cause a null-pointer dereference.This patch fixes these problems by changing the gcov-kernel infrastructureso that multiple profiling data sets can be associated with one debugfsentry.  It applies to 2.6.36-rc1.Signed-off-by: Peter Oberparleiter &lt;oberpar@linux.vnet.ibm.com&gt;Reported-by: Werner Spies &lt;werner.spies@thalesgroup.com&gt;Cc: &lt;stable@kernel.org&gt;Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;

            List of files:
            /linux-6.15/kernel/gcov/fs.c</description>
        <pubDate>Thu, 09 Sep 2010 23:37:35 +0000</pubDate>
        <dc:creator>Peter Oberparleiter &lt;oberpar@linux.vnet.ibm.com&gt;</dc:creator>
    </item>
<item>
        <title>2521f2c2 - gcov: add gcov profiling infrastructure</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/kernel/gcov/fs.c#2521f2c2</link>
        <description>gcov: add gcov profiling infrastructureEnable the use of GCC&apos;s coverage testing tool gcov [1] with the Linuxkernel.  gcov may be useful for: * debugging (has this code been reached at all?) * test improvement (how do I change my test to cover these lines?) * minimizing kernel configurations (do I need this option if the   associated code is never run?)The profiling patch incorporates the following changes: * change kbuild to include profiling flags * provide functions needed by profiling code * present profiling data as files in debugfsNote that on some architectures, enabling gcc&apos;s profiling option&quot;-fprofile-arcs&quot; for the entire kernel may trigger compile/link/run-time problems, some of which are caused by toolchain bugs andothers which require adjustment of architecture code.For this reason profiling the entire kernel is initially restrictedto those architectures for which it is known to work without changes.This restriction can be lifted once an architecture has been testedand found compatible with gcc&apos;s profiling. Profiling of single filesor directories is still available on all platforms (see config helptext).[1] http://gcc.gnu.org/onlinedocs/gcc/Gcov.htmlSigned-off-by: Peter Oberparleiter &lt;oberpar@linux.vnet.ibm.com&gt;Cc: Andi Kleen &lt;andi@firstfloor.org&gt;Cc: Huang Ying &lt;ying.huang@intel.com&gt;Cc: Li Wei &lt;W.Li@Sun.COM&gt;Cc: Michael Ellerman &lt;michaele@au1.ibm.com&gt;Cc: Ingo Molnar &lt;mingo@elte.hu&gt;Cc: Heiko Carstens &lt;heicars2@linux.vnet.ibm.com&gt;Cc: Martin Schwidefsky &lt;mschwid2@linux.vnet.ibm.com&gt;Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;Cc: WANG Cong &lt;xiyou.wangcong@gmail.com&gt;Cc: Sam Ravnborg &lt;sam@ravnborg.org&gt;Cc: Jeff Dike &lt;jdike@addtoit.com&gt;Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;

            List of files:
            /linux-6.15/kernel/gcov/fs.c</description>
        <pubDate>Wed, 17 Jun 2009 23:28:08 +0000</pubDate>
        <dc:creator>Peter Oberparleiter &lt;oberpar@linux.vnet.ibm.com&gt;</dc:creator>
    </item>
</channel>
</rss>
