Re: svn commit: r362806 - head/sys/compat/linprocfs

2020-07-03 Thread Edward Tomasz Napierala
On 0630T1828, Mateusz Piotrowski wrote:
> Hi,
> 
> On 6/30/20 6:24 PM, Edward Tomasz Napierala wrote:
> > Author: trasz
> > Date: Tue Jun 30 16:24:28 2020
> > New Revision: 362806
> > URL: https://svnweb.freebsd.org/changeset/base/362806
> >
> > Log:
> >   Make linprocfs(5) create the /proc//task/ directores.
> >   This is to silence down some Chromium assertions.
> >   
> >   PR:   kern/240991
> >   Analyzed by:  Alex S 
> >   MFC after:2 weeks
> >   Sponsored by: The FreeBSD Foundation
> >   Differential Revision:https://reviews.freebsd.org/D25256
> 
> Hmm, could something similar be done to the following warning which is being 
> printed
> when service fahclient is started (from the biology/linux-foldingathome port):
> 
> 16:25:39:WARNING:Exception: Failed to open '/proc/bus/pci/devices': Failed to 
> open
> '/proc/bus/pci/devices': No such file or directory: No such file or directory

Sure: https://reviews.freebsd.org/D25557

___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r362806 - head/sys/compat/linprocfs

2020-06-30 Thread Mateusz Piotrowski
Hi,

On 6/30/20 6:24 PM, Edward Tomasz Napierala wrote:
> Author: trasz
> Date: Tue Jun 30 16:24:28 2020
> New Revision: 362806
> URL: https://svnweb.freebsd.org/changeset/base/362806
>
> Log:
>   Make linprocfs(5) create the /proc//task/ directores.
>   This is to silence down some Chromium assertions.
>   
>   PR: kern/240991
>   Analyzed by:Alex S 
>   MFC after:  2 weeks
>   Sponsored by:   The FreeBSD Foundation
>   Differential Revision:  https://reviews.freebsd.org/D25256

Hmm, could something similar be done to the following warning which is being 
printed
when service fahclient is started (from the biology/linux-foldingathome port):

16:25:39:WARNING:Exception: Failed to open '/proc/bus/pci/devices': Failed to 
open
'/proc/bus/pci/devices': No such file or directory: No such file or directory

Cheers!

Mateusz

___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r362806 - head/sys/compat/linprocfs

2020-06-30 Thread Edward Tomasz Napierala
Author: trasz
Date: Tue Jun 30 16:24:28 2020
New Revision: 362806
URL: https://svnweb.freebsd.org/changeset/base/362806

Log:
  Make linprocfs(5) create the /proc//task/ directores.
  This is to silence down some Chromium assertions.
  
  PR:   kern/240991
  Analyzed by:  Alex S 
  MFC after:2 weeks
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D25256

Modified:
  head/sys/compat/linprocfs/linprocfs.c

Modified: head/sys/compat/linprocfs/linprocfs.c
==
--- head/sys/compat/linprocfs/linprocfs.c   Tue Jun 30 16:23:51 2020
(r362805)
+++ head/sys/compat/linprocfs/linprocfs.c   Tue Jun 30 16:24:28 2020
(r362806)
@@ -1620,6 +1620,28 @@ out:
 }
 
 /*
+ * The point of the following two functions is to work around
+ * an assertion in Chromium; see kern/240991 for details.
+ */
+static int
+linprocfs_dotaskattr(PFS_ATTR_ARGS)
+{
+
+   vap->va_nlink = 3;
+   return (0);
+}
+
+/*
+ * Filler function for proc//task/.dummy
+ */
+static int
+linprocfs_dotaskdummy(PFS_FILL_ARGS)
+{
+
+   return (0);
+}
+
+/*
  * Filler function for proc/sys/kernel/random/uuid
  */
 static int
@@ -1758,6 +1780,11 @@ linprocfs_init(PFS_INIT_ARGS)
pfs_create_file(dir, "auxv", _doauxv,
NULL, _candebug, NULL, PFS_RD|PFS_RAWRD);
pfs_create_file(dir, "limits", _doproclimits,
+   NULL, NULL, NULL, PFS_RD);
+
+   /* /proc//task/... */
+   dir = pfs_create_dir(dir, "task", linprocfs_dotaskattr, NULL, NULL, 0);
+   pfs_create_file(dir, ".dummy", _dotaskdummy,
NULL, NULL, NULL, PFS_RD);
 
/* /proc/scsi/... */
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"