<?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 Kconfig</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>915cd30c - netfs, fscache: Combine fscache with netfs</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/cachefiles/Kconfig#915cd30c</link>
        <description>netfs, fscache: Combine fscache with netfsNow that the fscache code is moved to be colocated with the netfslib codeso that they combined into one module, do the combining.Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;cc: Christian Brauner &lt;christian@brauner.io&gt;cc: linux-fsdevel@vger.kernel.orgcc: linux-cachefs@redhat.comcc: linux-nfs@vger.kernel.org,cc: linux-erofs@lists.ozlabs.org

            List of files:
            /linux-6.15/fs/cachefiles/Kconfig</description>
        <pubDate>Mon, 20 Nov 2023 15:55:18 +0000</pubDate>
        <dc:creator>David Howells &lt;dhowells@redhat.com&gt;</dc:creator>
    </item>
<item>
        <title>c8383054 - cachefiles: notify the user daemon when looking up cookie</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/cachefiles/Kconfig#c8383054</link>
        <description>cachefiles: notify the user daemon when looking up cookieFscache/CacheFiles used to serve as a local cache for a remotenetworking fs. A new on-demand read mode will be introduced forCacheFiles, which can boost the scenario where on-demand read semanticsare needed, e.g. container image distribution.The essential difference between these two modes is seen when a cachemiss occurs: In the original mode, the netfs will fetch the data fromthe remote server and then write it to the cache file; in on-demandread mode, fetching the data and writing it into the cache is delegatedto a user daemon.As the first step, notify the user daemon when looking up cookie. Inthis case, an anonymous fd is sent to the user daemon, through which theuser daemon can write the fetched data to the cache file. Since the userdaemon may move the anonymous fd around, e.g. through dup(), an objectID uniquely identifying the cache file is also attached.Also add one advisory flag (FSCACHE_ADV_WANT_CACHE_SIZE) suggesting thatthe cache file size shall be retrieved at runtime. This helps thescenario where one cache file contains multiple netfs files, e.g. forthe purpose of deduplication. In this case, netfs itself has no idea thesize of the cache file, whilst the user daemon should give the hint onit.Signed-off-by: Jeffle Xu &lt;jefflexu@linux.alibaba.com&gt;Link: https://lore.kernel.org/r/20220509074028.74954-3-jefflexu@linux.alibaba.comAcked-by: David Howells &lt;dhowells@redhat.com&gt;Signed-off-by: Gao Xiang &lt;hsiangkao@linux.alibaba.com&gt;

            List of files:
            /linux-6.15/fs/cachefiles/Kconfig</description>
        <pubDate>Mon, 25 Apr 2022 12:21:24 +0000</pubDate>
        <dc:creator>Jeffle Xu &lt;jefflexu@linux.alibaba.com&gt;</dc:creator>
    </item>
<item>
        <title>a70f6526 - cachefiles: Add some error injection support</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/cachefiles/Kconfig#a70f6526</link>
        <description>cachefiles: Add some error injection supportAdd support for injecting ENOSPC or EIO errors.  This needs to be enabledby CONFIG_CACHEFILES_ERROR_INJECTION=y.  Once enabled, ENOSPC on thingslike write and mkdir can be triggered by:        echo 1 &gt;/proc/sys/cachefiles/error_injectionand EIO can be triggered on most operations by:        echo 2 &gt;/proc/sys/cachefiles/error_injectionSigned-off-by: David Howells &lt;dhowells@redhat.com&gt;Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;cc: linux-cachefs@redhat.comLink: https://lore.kernel.org/r/163819624706.215744.6911916249119962943.stgit@warthog.procyon.org.uk/ # v1Link: https://lore.kernel.org/r/163906925343.143852.5465695512984025812.stgit@warthog.procyon.org.uk/ # v2Link: https://lore.kernel.org/r/163967134412.1823006.7354285948280296595.stgit@warthog.procyon.org.uk/ # v3Link: https://lore.kernel.org/r/164021532340.640689.18209494225772443698.stgit@warthog.procyon.org.uk/ # v4

            List of files:
            /linux-6.15/fs/cachefiles/Kconfig</description>
        <pubDate>Thu, 21 Oct 2021 07:15:26 +0000</pubDate>
        <dc:creator>David Howells &lt;dhowells@redhat.com&gt;</dc:creator>
    </item>
<item>
        <title>77443f61 - cachefiles: Introduce rewritten driver</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/cachefiles/Kconfig#77443f61</link>
        <description>cachefiles: Introduce rewritten driverIntroduce basic skeleton of the rewritten cachefiles driver includingconfig options so that it can be enabled for compilation.Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;cc: linux-cachefs@redhat.comLink: https://lore.kernel.org/r/163819622766.215744.9108359326983195047.stgit@warthog.procyon.org.uk/ # v1Link: https://lore.kernel.org/r/163906923341.143852.3856498104256721447.stgit@warthog.procyon.org.uk/ # v2Link: https://lore.kernel.org/r/163967130320.1823006.15791456613198441566.stgit@warthog.procyon.org.uk/ # v3Link: https://lore.kernel.org/r/164021528993.640689.9069695476048171884.stgit@warthog.procyon.org.uk/ # v4

            List of files:
            /linux-6.15/fs/cachefiles/Kconfig</description>
        <pubDate>Fri, 26 Nov 2021 14:32:29 +0000</pubDate>
        <dc:creator>David Howells &lt;dhowells@redhat.com&gt;</dc:creator>
    </item>
<item>
        <title>6ae9bd8b - fscache, cachefiles: Remove the histogram stuff</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/cachefiles/Kconfig#6ae9bd8b</link>
        <description>fscache, cachefiles: Remove the histogram stuffRemove the histogram stuff as it&apos;s mostly going to be outdated.Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;Reviewed-by: Jeff Layton &lt;jlayton@redhat.com&gt;cc: linux-cachefs@redhat.comLink: https://lore.kernel.org/r/162431195953.2908479.16770977195634296638.stgit@warthog.procyon.org.uk/

            List of files:
            /linux-6.15/fs/cachefiles/Kconfig</description>
        <pubDate>Wed, 12 May 2021 08:40:19 +0000</pubDate>
        <dc:creator>David Howells &lt;dhowells@redhat.com&gt;</dc:creator>
    </item>
<item>
        <title>d74802ad - docs: filesystems: caching/cachefiles.txt: convert to ReST</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/cachefiles/Kconfig#d74802ad</link>
        <description>docs: filesystems: caching/cachefiles.txt: convert to ReST- Add a SPDX header;- Adjust document title;- Mark literal blocks as such;- Add table markups;- Comment out text ToC for html/pdf output;- Add lists markups;- Add it to filesystems/caching/index.rst.Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;Link: https://lore.kernel.org/r/eec0cfc268e8dca348f760224685100c9c2caba6.1588021877.git.mchehab+huawei@kernel.orgSigned-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;

            List of files:
            /linux-6.15/fs/cachefiles/Kconfig</description>
        <pubDate>Mon, 27 Apr 2020 21:16:57 +0000</pubDate>
        <dc:creator>Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>ec8f24b7 - treewide: Add SPDX license identifier - Makefile/Kconfig</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/cachefiles/Kconfig#ec8f24b7</link>
        <description>treewide: Add SPDX license identifier - Makefile/KconfigAdd SPDX license identifiers to all Make/Kconfig files which: - Have no license information of any formThese files fall under the project license, GPL v2 only. The resulting SPDXlicense identifier is:  GPL-2.0-onlySigned-off-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/fs/cachefiles/Kconfig</description>
        <pubDate>Sun, 19 May 2019 12:07:45 +0000</pubDate>
        <dc:creator>Thomas Gleixner &lt;tglx@linutronix.de&gt;</dc:creator>
    </item>
<item>
        <title>9ae326a6 - CacheFiles: A cache that backs onto a mounted filesystem</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/fs/cachefiles/Kconfig#9ae326a6</link>
        <description>CacheFiles: A cache that backs onto a mounted filesystemAdd an FS-Cache cache-backend that permits a mounted filesystem to be used as abacking store for the cache.CacheFiles uses a userspace daemon to do some of the cache management - such asreaping stale nodes and culling.  This is called cachefilesd and lives in/sbin.  The source for the daemon can be downloaded from:	http://people.redhat.com/~dhowells/cachefs/cachefilesd.cAnd an example configuration from:	http://people.redhat.com/~dhowells/cachefs/cachefilesd.confThe filesystem and data integrity of the cache are only as good as those of thefilesystem providing the backing services.  Note that CacheFiles does notattempt to journal anything since the journalling interfaces of the variousfilesystems are very specific in nature.CacheFiles creates a misc character device - &quot;/dev/cachefiles&quot; - that is usedto communication with the daemon.  Only one thing may have this open at once,and whilst it is open, a cache is at least partially in existence.  The daemonopens this and sends commands down it to control the cache.CacheFiles is currently limited to a single cache.CacheFiles attempts to maintain at least a certain percentage of free space onthe filesystem, shrinking the cache by culling the objects it contains to makespace if necessary - see the &quot;Cache Culling&quot; section.  This means it can beplaced on the same medium as a live set of data, and will expand to make use ofspare space and automatically contract when the set of data requires morespace.============REQUIREMENTS============The use of CacheFiles and its daemon requires the following features to beavailable in the system and in the cache filesystem:	- dnotify.	- extended attributes (xattrs).	- openat() and friends.	- bmap() support on files in the filesystem (FIBMAP ioctl).	- The use of bmap() to detect a partial page at the end of the file.It is strongly recommended that the &quot;dir_index&quot; option is enabled on Ext3filesystems being used as a cache.=============CONFIGURATION=============The cache is configured by a script in /etc/cachefilesd.conf.  These commandsset up cache ready for use.  The following script commands are available: (*) brun &lt;N&gt;% (*) bcull &lt;N&gt;% (*) bstop &lt;N&gt;% (*) frun &lt;N&gt;% (*) fcull &lt;N&gt;% (*) fstop &lt;N&gt;%	Configure the culling limits.  Optional.  See the section on culling	The defaults are 7% (run), 5% (cull) and 1% (stop) respectively.	The commands beginning with a &apos;b&apos; are file space (block) limits, those	beginning with an &apos;f&apos; are file count limits. (*) dir &lt;path&gt;	Specify the directory containing the root of the cache.  Mandatory. (*) tag &lt;name&gt;	Specify a tag to FS-Cache to use in distinguishing multiple caches.	Optional.  The default is &quot;CacheFiles&quot;. (*) debug &lt;mask&gt;	Specify a numeric bitmask to control debugging in the kernel module.	Optional.  The default is zero (all off).  The following values can be	OR&apos;d into the mask to collect various information:		1	Turn on trace of function entry (_enter() macros)		2	Turn on trace of function exit (_leave() macros)		4	Turn on trace of internal debug points (_debug())	This mask can also be set through sysfs, eg:		echo 5 &gt;/sys/modules/cachefiles/parameters/debug==================STARTING THE CACHE==================The cache is started by running the daemon.  The daemon opens the cache device,configures the cache and tells it to begin caching.  At that point the cachebinds to fscache and the cache becomes live.The daemon is run as follows:	/sbin/cachefilesd [-d]* [-s] [-n] [-f &lt;configfile&gt;]The flags are: (*) -d	Increase the debugging level.  This can be specified multiple times and	is cumulative with itself. (*) -s	Send messages to stderr instead of syslog. (*) -n	Don&apos;t daemonise and go into background. (*) -f &lt;configfile&gt;	Use an alternative configuration file rather than the default one.===============THINGS TO AVOID===============Do not mount other things within the cache as this will cause problems.  Thekernel module contains its own very cut-down path walking facility that ignoresmountpoints, but the daemon can&apos;t avoid them.Do not create, rename or unlink files and directories in the cache whilst thecache is active, as this may cause the state to become uncertain.Renaming files in the cache might make objects appear to be other objects (thefilename is part of the lookup key).Do not change or remove the extended attributes attached to cache files by thecache as this will cause the cache state management to get confused.Do not create files or directories in the cache, lest the cache get confused orserve incorrect data.Do not chmod files in the cache.  The module creates things with minimalpermissions to prevent random users being able to access them directly.=============CACHE CULLING=============The cache may need culling occasionally to make space.  This involvesdiscarding objects from the cache that have been used less recently thananything else.  Culling is based on the access time of data objects.  Emptydirectories are culled if not in use.Cache culling is done on the basis of the percentage of blocks and thepercentage of files available in the underlying filesystem.  There are six&quot;limits&quot;: (*) brun (*) frun     If the amount of free space and the number of available files in the cache     rises above both these limits, then culling is turned off. (*) bcull (*) fcull     If the amount of available space or the number of available files in the     cache falls below either of these limits, then culling is started. (*) bstop (*) fstop     If the amount of available space or the number of available files in the     cache falls below either of these limits, then no further allocation of     disk space or files is permitted until culling has raised things above     these limits again.These must be configured thusly:	0 &lt;= bstop &lt; bcull &lt; brun &lt; 100	0 &lt;= fstop &lt; fcull &lt; frun &lt; 100Note that these are percentages of available space and available files, and do_not_ appear as 100 minus the percentage displayed by the &quot;df&quot; program.The userspace daemon scans the cache to build up a table of cullable objects.These are then culled in least recently used order.  A new scan of the cache isstarted as soon as space is made in the table.  Objects will be skipped iftheir atimes have changed or if the kernel module says it is still using them.===============CACHE STRUCTURE===============The CacheFiles module will create two directories in the directory it wasgiven: (*) cache/ (*) graveyard/The active cache objects all reside in the first directory.  The CacheFileskernel module moves any retired or culled objects that it can&apos;t simply unlinkto the graveyard from which the daemon will actually delete them.The daemon uses dnotify to monitor the graveyard directory, and will deleteanything that appears therein.The module represents index objects as directories with the filename &quot;I...&quot; or&quot;J...&quot;.  Note that the &quot;cache/&quot; directory is itself a special index.Data objects are represented as files if they have no children, or directoriesif they do.  Their filenames all begin &quot;D...&quot; or &quot;E...&quot;.  If represented as adirectory, data objects will have a file in the directory called &quot;data&quot; thatactually holds the data.Special objects are similar to data objects, except their filenames begin&quot;S...&quot; or &quot;T...&quot;.If an object has children, then it will be represented as a directory.Immediately in the representative directory are a collection of directoriesnamed for hash values of the child object keys with an &apos;@&apos; prepended.  Intothis directory, if possible, will be placed the representations of the childobjects:	INDEX     INDEX      INDEX                             DATA FILES	========= ========== ================================= ================	cache/@4a/I03nfs/@30/Ji000000000000000--fHg8hi8400	cache/@4a/I03nfs/@30/Ji000000000000000--fHg8hi8400/@75/Es0g000w...DB1ry	cache/@4a/I03nfs/@30/Ji000000000000000--fHg8hi8400/@75/Es0g000w...N22ry	cache/@4a/I03nfs/@30/Ji000000000000000--fHg8hi8400/@75/Es0g000w...FP1ryIf the key is so long that it exceeds NAME_MAX with the decorations added on toit, then it will be cut into pieces, the first few of which will be used tomake a nest of directories, and the last one of which will be the objectsinside the last directory.  The names of the intermediate directories will have&apos;+&apos; prepended:	J1223/@23/+xy...z/+kl...m/EpqrNote that keys are raw data, and not only may they exceed NAME_MAX in size,they may also contain things like &apos;/&apos; and NUL characters, and so they may notbe suitable for turning directly into a filename.To handle this, CacheFiles will use a suitably printable filename directly and&quot;base-64&quot; encode ones that aren&apos;t directly suitable.  The two versions ofobject filenames indicate the encoding:	OBJECT TYPE	PRINTABLE	ENCODED	===============	===============	===============	Index		&quot;I...&quot;		&quot;J...&quot;	Data		&quot;D...&quot;		&quot;E...&quot;	Special		&quot;S...&quot;		&quot;T...&quot;Intermediate directories are always &quot;@&quot; or &quot;+&quot; as appropriate.Each object in the cache has an extended attribute label that holds the objecttype ID (required to distinguish special objects) and the auxiliary data fromthe netfs.  The latter is used to detect stale objects in the cache and updateor retire them.Note that CacheFiles will erase from the cache any file it doesn&apos;t recognise orany file of an incorrect type (such as a FIFO file or a device file).==========================SECURITY MODEL AND SELINUX==========================CacheFiles is implemented to deal properly with the LSM security features ofthe Linux kernel and the SELinux facility.One of the problems that CacheFiles faces is that it is generally acting onbehalf of a process, and running in that process&apos;s context, and that includes asecurity context that is not appropriate for accessing the cache - eitherbecause the files in the cache are inaccessible to that process, or because ifthe process creates a file in the cache, that file may be inaccessible to otherprocesses.The way CacheFiles works is to temporarily change the security context (fsuid,fsgid and actor security label) that the process acts as - without changing thesecurity context of the process when it the target of an operation performed bysome other process (so signalling and suchlike still work correctly).When the CacheFiles module is asked to bind to its cache, it: (1) Finds the security label attached to the root cache directory and uses     that as the security label with which it will create files.  By default,     this is:	cachefiles_var_t (2) Finds the security label of the process which issued the bind request     (presumed to be the cachefilesd daemon), which by default will be:	cachefilesd_t     and asks LSM to supply a security ID as which it should act given the     daemon&apos;s label.  By default, this will be:	cachefiles_kernel_t     SELinux transitions the daemon&apos;s security ID to the module&apos;s security ID     based on a rule of this form in the policy.	type_transition &lt;daemon&apos;s-ID&gt; kernel_t : process &lt;module&apos;s-ID&gt;;     For instance:	type_transition cachefilesd_t kernel_t : process cachefiles_kernel_t;The module&apos;s security ID gives it permission to create, move and remove filesand directories in the cache, to find and access directories and files in thecache, to set and access extended attributes on cache objects, and to read andwrite files in the cache.The daemon&apos;s security ID gives it only a very restricted set of permissions: itmay scan directories, stat files and erase files and directories.  It maynot read or write files in the cache, and so it is precluded from accessing thedata cached therein; nor is it permitted to create new files in the cache.There are policy source files available in:	http://people.redhat.com/~dhowells/fscache/cachefilesd-0.8.tar.bz2and later versions.  In that tarball, see the files:	cachefilesd.te	cachefilesd.fc	cachefilesd.ifThey are built and installed directly by the RPM.If a non-RPM based system is being used, then copy the above files to their owndirectory and run:	make -f /usr/share/selinux/devel/Makefile	semodule -i cachefilesd.ppYou will need checkpolicy and selinux-policy-devel installed prior to thebuild.By default, the cache is located in /var/fscache, but if it is desirable thatit should be elsewhere, than either the above policy files must be altered, oran auxiliary policy must be installed to label the alternate location of thecache.For instructions on how to add an auxiliary policy to enable the cache to belocated elsewhere when SELinux is in enforcing mode, please see:	/usr/share/doc/cachefilesd-*/move-cache.txtWhen the cachefilesd rpm is installed; alternatively, the document can be foundin the sources.==================A NOTE ON SECURITY==================CacheFiles makes use of the split security in the task_struct.  It allocatesits own task_security structure, and redirects current-&gt;act_as to point to itwhen it acts on behalf of another process, in that process&apos;s context.The reason it does this is that it calls vfs_mkdir() and suchlike rather thanbypassing security and calling inode ops directly.  Therefore the VFS and LSMmay deny the CacheFiles access to the cache data because under somecircumstances the caching code is running in the security context of whateverprocess issued the original syscall on the netfs.Furthermore, should CacheFiles create a file or directory, the securityparameters with that object is created (UID, GID, security label) would bederived from that process that issued the system call, thus potentiallypreventing other processes from accessing the cache - including CacheFiles&apos;scache management daemon (cachefilesd).What is required is to temporarily override the security of the process thatissued the system call.  We can&apos;t, however, just do an in-place change of thesecurity data as that affects the process as an object, not just as a subject.This means it may lose signals or ptrace events for example, and affects whatthe process looks like in /proc.So CacheFiles makes use of a logical split in the security between theobjective security (task-&gt;sec) and the subjective security (task-&gt;act_as).  Theobjective security holds the intrinsic security properties of a process and isnever overridden.  This is what appears in /proc, and is what is used when aprocess is the target of an operation by some other process (SIGKILL forexample).The subjective security holds the active security properties of a process, andmay be overridden.  This is not seen externally, and is used whan a processacts upon another object, for example SIGKILLing another process or opening afile.LSM hooks exist that allow SELinux (or Smack or whatever) to reject a requestfor CacheFiles to run in a context of a specific security label, or to createfiles and directories with another security label.This documentation is added by the patch to:	Documentation/filesystems/caching/cachefiles.txtSigned-Off-By: David Howells &lt;dhowells@redhat.com&gt;Acked-by: Steve Dickson &lt;steved@redhat.com&gt;Acked-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;Acked-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;Tested-by: Daire Byrne &lt;Daire.Byrne@framestore.com&gt;

            List of files:
            /linux-6.15/fs/cachefiles/Kconfig</description>
        <pubDate>Fri, 03 Apr 2009 15:42:41 +0000</pubDate>
        <dc:creator>David Howells &lt;dhowells@redhat.com&gt;</dc:creator>
    </item>
</channel>
</rss>
