Page MenuHomeFreeBSD
Feed Advanced Search

May 4 2017

pfg committed rS317794: MFC r317583:.
MFC r317583:
May 4 2017, 2:50 PM
pfg committed rS317793: MFC r317583:.
MFC r317583:
May 4 2017, 2:49 PM

May 3 2017

pfg committed rS317779: ext2fs: add read-write support for Extended Attributes..
ext2fs: add read-write support for Extended Attributes.
May 3 2017, 10:35 PM
pfg closed D10460: ext2fs: RW support for Extended Attributes by committing rS317779: ext2fs: add read-write support for Extended Attributes..
May 3 2017, 10:35 PM
pfg accepted D10460: ext2fs: RW support for Extended Attributes.

LGTM

May 3 2017, 9:49 PM
pfg added a comment to D10460: ext2fs: RW support for Extended Attributes.

I approve going back to the simpler approach, and seeing from there how the ACLs go.

May 3 2017, 6:45 PM

May 2 2017

pfg added a comment to D10544: ndbm.h: Unsign dsize by changing it to unsigned int.
In D10544#219149, @ngie wrote:
In D10544#219148, @ngie wrote:

For the record, I'm ok with the change if sufficient compatibility shims are built in, like delphij@ requested.

The affected calls in libc are:

  • dbm_delete
  • dbm_fetch
  • dbm_store
  • xdr_datum

There aren't any consumers in kernel space.

There are some consumers in contrib/, but the number is relatively small:

  • amd
  • gcc
  • sendmail

Writing compat libcalls for the above items doesn't seem that difficult to do, and I think that your proposed change is a net-win.

To be clear: I'm endorsing the "let's move from int to size_t" change.

May 2 2017, 5:55 PM

May 1 2017

pfg added a comment to D10460: ext2fs: RW support for Extended Attributes.
In D10460#218871, @thisisadrgreenthumb_gmail.com wrote:

I can confirm that, I ready to try add ext2fs ACL's, but we should managed with EAs before this.
So, I am waiting for final decision about EA's implementation approach.

May 1 2017, 6:23 PM
pfg added a comment to D10460: ext2fs: RW support for Extended Attributes.

FYI, there is another important semantic difference between BSD and Linux extended attributes. In FreeBSD, ACLs are exposed (and manipulated) via separate vnode operations in VFS, and similarly ACL system calls, since our VFS is ACL-aware, whereas in Linux, they use the extended attribute system calls and inode operations to carry a variety of metadata including ACLs. As such, if extfs is implementing ACLs, we'll want a wrapper that maps them to/from FreeBSD ACL vnode operations on the way through. There is arguably a desire to do something similar in the linuxulator to ensure that ACL operations enter our VFS as ACL operations rather than EA operations.

May 1 2017, 5:58 PM
pfg added a comment to D10460: ext2fs: RW support for Extended Attributes.
In D10460#218854, @thisisadrgreenthumb_gmail.com wrote:

FFS uses:
#define UFS_BALLOC ... VFSTOUFS((aa)->v_mount)->um_balloc(aa, bb, cc, dd, ee, ff).
But, as I understand, I can not use:
ext2_balloc(struct inode *ip, e2fs_lbn_t lbn, int size, struct ucred *cred,

struct buf **bpp, int flags)

in case of EA, because EA block is not part of file blocks.
So, as I could be seen for me:
I can use alloccg() and remove static declaration (as now), or implement the wrapper function, like ext2_allocfacl(), which will call alloccg().

May 1 2017, 5:50 PM
pfg abandoned D10544: ndbm.h: Unsign dsize by changing it to unsigned int.

Not much support for this change.

May 1 2017, 4:45 PM
pfg retitled D10544: ndbm.h: Unsign dsize by changing it to unsigned int from ndbm.h: Unsign dsize by changing it do unsigned int to ndbm.h: Unsign dsize by changing it to unsigned int.
May 1 2017, 4:44 PM
pfg added a comment to D10460: ext2fs: RW support for Extended Attributes.
In D10460#218836, @thisisadrgreenthumb_gmail.com wrote:

:) Ok, but could you please suggest something about ext2_alloccg()?

May 1 2017, 4:41 PM
pfg added a comment to D10460: ext2fs: RW support for Extended Attributes.
In D10460#218829, @thisisadrgreenthumb_gmail.com wrote:

Ok, could you plase suggest me the way,
how I should allocate EA blocks in the ext2_vnops.c
instead of ext2_alloccg() function.
Am I right, that I should add something like ext2_allocfacl() to ext2_alloc.c,
and declare it sys/fs/ext2fs/ext2_extern.h?

Also, about the dinode, if I have no facl value under ea vnops,
how I can get it without dinode reading from disk?
Or I should add to something like:
void ext2_ei_getfacl() and void ext2_ei_putfacl() to ext2_inode_cnv.c?

May 1 2017, 4:28 PM
pfg added a comment to D10460: ext2fs: RW support for Extended Attributes.

I am not unhappy with this version but I should note there is somewhat of an inefficiency:

May 1 2017, 3:59 PM
pfg added a comment to D10460: ext2fs: RW support for Extended Attributes.

Thanks!

May 1 2017, 3:44 PM
pfg retitled D10544: ndbm.h: Unsign dsize by changing it to unsigned int from ndbm.h: Unsign dsize by declaring it uint32_t. to ndbm.h: Unsign dsize by changing it do unsigned int.
May 1 2017, 3:31 PM
pfg updated the diff for D10544: ndbm.h: Unsign dsize by changing it to unsigned int.

OK, it may be worth breaking the ABI but, for now, given that we will
have to carry the old datum for compatibility anyways, how about being
one bit more efficient?

May 1 2017, 3:27 PM
pfg added a comment to D10544: ndbm.h: Unsign dsize by changing it to unsigned int.
In D10544#218736, @pfg wrote:
In D10544#218590, @pfg wrote:

Take 2: Comply with POSIX.

This can't be MFC'd.

No, libc ABI must NOT be broken regardless if it's MFC'ed, you should implement versioned compatibility shims.

That's just not feasible: the datum struct touches everything in dbm(3).

I might be missing something, but can't you just create wrappers around the new dbm(3) APIs to implement old binary interfaces, and __sym_compat these FBSD_1.0 symbols?

May 1 2017, 4:40 AM
pfg accepted D10541: Correct an out-of-bounds read in regcomp when the RE is bad..

I am unsure if it's better to return or just break .... apparently the return just works so .. I'll accept it.

May 1 2017, 4:11 AM
pfg added a comment to D10544: ndbm.h: Unsign dsize by changing it to unsigned int.
In D10544#218590, @pfg wrote:

Take 2: Comply with POSIX.

This can't be MFC'd.

No, libc ABI must NOT be broken regardless if it's MFC'ed, you should implement versioned compatibility shims.

May 1 2017, 4:06 AM
pfg committed rS317613: MFC r317372:.
MFC r317372:
May 1 2017, 12:42 AM

Apr 30 2017

pfg added a comment to D10460: ext2fs: RW support for Extended Attributes.
In D10460#218676, @thisisadrgreenthumb_gmail.com wrote:

The removing i_facl from BSD node will cost additional block (with on-disk inode, to get i_facl value) reading under ext2_extread()/ext2_extwrite(). I can try to implement it, if additional bread() is not so critical.

Apr 30 2017, 8:54 PM
pfg added a comment to D10460: ext2fs: RW support for Extended Attributes.

Hmm .. to clarify further:

Apr 30 2017, 8:33 PM
pfg requested changes to D10460: ext2fs: RW support for Extended Attributes.

I just started looking at it, but perhaps you missed getting rid of i_facl? It's no something we carry in the BSD inode.

Apr 30 2017, 8:23 PM
pfg updated the diff for D10544: ndbm.h: Unsign dsize by changing it to unsigned int.

Take 2: Comply with POSIX.

Apr 30 2017, 5:07 PM
pfg planned changes to D10544: ndbm.h: Unsign dsize by changing it to unsigned int.

Manual pages should be updated too.

Ah yes, dbm(3).

Apr 30 2017, 4:51 PM
pfg created D10544: ndbm.h: Unsign dsize by changing it to unsigned int.
Apr 30 2017, 5:23 AM

Apr 29 2017

pfg committed rS317596: mixer(8): Prevent possible sscanf() overflow..
mixer(8): Prevent possible sscanf() overflow.
Apr 29 2017, 7:13 PM
pfg committed rS317595: <stdio.h>: ftello() and fseeko() were in SUSv2, so extend visibility..
<stdio.h>: ftello() and fseeko() were in SUSv2, so extend visibility.
Apr 29 2017, 6:48 PM
pfg committed rS317583: Fix some cases where an index was used before its limits check..
Fix some cases where an index was used before its limits check.
Apr 29 2017, 6:42 AM
pfg added a reviewer for D10541: Correct an out-of-bounds read in regcomp when the RE is bad.: ache.

LGTM, but let me add ache as he knows this code better.

Apr 29 2017, 2:09 AM

Apr 27 2017

pfg committed rS317532: Revert r314937 as anonymous unions in GCC don't seem to work..
Revert r314937 as anonymous unions in GCC don't seem to work.
Apr 27 2017, 11:14 PM

Apr 26 2017

pfg added a comment to D10510: regex(3): Interpret escaped ordinary characters as EESCAPE.
In D10510#217785, @kevans91_ksu.edu wrote:
In D10510#217784, @pfg wrote:

As I wrote, it's not an objection, just that I don't believe in transitional changes :).

Indeed, I just don't like causing even this kind of discomfort. =) Would it be helpful if I go ahead and submit some reviews for libregex bits so that this becomes less of a transitional change and more of a blocker for other things under review? (I consider it 'blocking' since it's a really unfortunate interpretation of undefined behavior that could be really really confusing if you don't immediately observe whether extensions are available or not)

Apr 26 2017, 8:36 PM
pfg added a comment to D10510: regex(3): Interpret escaped ordinary characters as EESCAPE.
In D10510#217778, @kevans91_ksu.edu wrote:
In D10510#217775, @pfg wrote:

This is not really an objection but my preference for undefined behavior is to leave it unchanged for as long as we can.
Even if it's undefined behavior, a lot fo things can break,and until the GNU compatible behavior is implemented such "transitional" change brings no benefit.

My next couple of patches that I've already prepared will be introducing libregex with the GNU compatible behavior- this transitional change is to fix the much less obvious fallout that comes from \b suddenly being interpreted as word-bound rather than 'b', especially in cases where 'b' is *also* a word-bound and it works by coincidence rather than correctness.

Apr 26 2017, 4:36 PM
pfg added a comment to D10510: regex(3): Interpret escaped ordinary characters as EESCAPE.

This is not really an objection but my preference for undefined behavior is to leave it unchanged for as long as we can.
Even if it's undefined behavior, a lot fo things can break,and until the GNU compatible behavior is implemented such "transitional" change brings no benefit.

Apr 26 2017, 4:07 PM

Apr 24 2017

pfg committed rS317372: scandir(3): promote arraysz to size_t to match numitems..
scandir(3): promote arraysz to size_t to match numitems.
Apr 24 2017, 2:56 PM

Apr 23 2017

pfg committed rS317349: msun: Remove trailing space in Sunsoft copyright statement..
msun: Remove trailing space in Sunsoft copyright statement.
Apr 23 2017, 10:31 PM
pfg committed rS317346: regex: unsign and constify some variables..
regex: unsign and constify some variables.
Apr 23 2017, 9:51 PM

Apr 22 2017

pfg retitled D9915: Use of reallocarray(3) in userland. from Extensive use of reallocarray(3) in userland. to Use of reallocarray(3) in userland..
Apr 22 2017, 5:01 PM
pfg added a comment to D10460: ext2fs: RW support for Extended Attributes.
In D10460#216936, @thisisadrgreenthumb_gmail.com wrote:

Yep, the question about attr namespace mapping still open, because there is no "empty" attribute name in linux.
So, in case of empty namespace passed to setattr(), seems like some error should be returned, I will try to verify ufs behaviour in this case, when I will fix these switches.

Ok, Robert, could you please share your opinion about keeping EA's data in memory in case of ext2fs, based on our discussion above?

:) In all cases I should agree with Pedro in the end because he is code base owner.

Apr 22 2017, 4:27 PM
pfg updated the diff for D9915: Use of reallocarray(3) in userland..

Since fsck_ffs and pmcstat are done, the remaining cases are trivial.

Apr 22 2017, 4:04 PM
pfg committed rS317284: pmcstat(8); unsign some allocation variables and use reallocarray(3)..
pmcstat(8); unsign some allocation variables and use reallocarray(3).
Apr 22 2017, 4:03 PM
pfg added a reviewer for D10460: ext2fs: RW support for Extended Attributes: rwatson.

rwatson implemented the UFS EAs, perhaps he could give us some feedback on this approach for ext2fs.

Apr 22 2017, 3:34 PM
pfg added a comment to D10460: ext2fs: RW support for Extended Attributes.
In D10460#216926, @thisisadrgreenthumb_gmail.com wrote:

I am not sure, that keep EA's in memory is good idea. It is right, that, the number of bread()/bwrite() will be decreased. But:

  • The EA area is not consistent, iblock/ibody.
  • The EA blocks could be shared (which is not implemented in my patch), the additional syncronization will be required.
  • The EA's max size could be decreased in next revisions of extfs by adding EA blocks redirection for example.

So, it is completely possible to implement, but the future EA's functionality integration will be difficult, from my point of view.

Apr 22 2017, 3:32 PM
pfg added a comment to D10460: ext2fs: RW support for Extended Attributes.
In D10460#216920, @thisisadrgreenthumb_gmail.com wrote:
In D10460#216919, @pfg wrote:

Hmm.. have you given a thought on making the in memory inode more similar to UFS? I mean using something like this:

	/*
	 * Data for extended attribute modification.
 	 */
	u_char	  *i_ea_area;	/* Pointer to malloced copy of EA area */
	unsigned  i_ea_len;	/* Length of i_ea_area */
	int	  i_ea_error;	/* First errno in transaction */
	int	  i_ea_refs;	/* Number of users of EA area */

I admit it looks pretty straightforward as you did it but I was hoping to keep more similarities with UFS.

Am I right, that your idea is to allocate the memory area for EA's in case of inode reading,
then work with it, the write this memory to disk and free it, in case of inode inactivation?

Apr 22 2017, 2:59 PM
pfg committed rS317283: fsck_ffs: Unsign some variables and make use of reallocarray(3)..
fsck_ffs: Unsign some variables and make use of reallocarray(3).
Apr 22 2017, 2:50 PM
pfg added a comment to D10460: ext2fs: RW support for Extended Attributes.

Hmm.. have you given a thought on making the in memory inode more similar to UFS? I mean using something like this:

Apr 22 2017, 2:30 PM

Apr 21 2017

pfg committed rS317268: MFC r302664:.
MFC r302664:
Apr 21 2017, 8:03 PM
pfg updated the diff for D9915: Use of reallocarray(3) in userland..

Oops .. drop the change in route6d, it's not likely to overflow.

Apr 21 2017, 7:49 PM
pfg updated the diff for D9915: Use of reallocarray(3) in userland..

Resurrect this Differential Revision with a much reduced scope.

Apr 21 2017, 7:44 PM
pfg closed D9980: lib: make use of reallocarray(3). by committing rS317265: lib: initial use of reallocarray(3)..
Apr 21 2017, 7:27 PM
pfg committed rS317265: lib: initial use of reallocarray(3)..
lib: initial use of reallocarray(3).
Apr 21 2017, 7:27 PM

Apr 20 2017

pfg committed rS317216: libthread_db: unbreak build due to sign/unsigned comparison..
libthread_db: unbreak build due to sign/unsigned comparison.
Apr 20 2017, 9:02 PM
pfg updated the diff for D9980: lib: make use of reallocarray(3)..

Updated version: drop some cases where overflows are very unlikely.

Apr 20 2017, 6:31 PM
pfg committed rS317203: libpthread_db: undo the memset size change..
libpthread_db: undo the memset size change.
Apr 20 2017, 5:58 PM
pfg committed rS317202: Revert r317201 to fix the log..
Revert r317201 to fix the log.
Apr 20 2017, 5:55 PM
pfg committed rS317201: libpthread_db: leave the memset size from unchanged..
libpthread_db: leave the memset size from unchanged.
Apr 20 2017, 5:49 PM
pfg committed rS317200: libthread_db: unsign map_len and use reallocarray(3)..
libthread_db: unsign map_len and use reallocarray(3).
Apr 20 2017, 5:43 PM

Apr 18 2017

pfg planned changes to D9980: lib: make use of reallocarray(3)..

TBH, I am wondering the usefulness fo these replacements.
It is not clear if overflows are possible at all. OTOH I am pretty sure the changes won't hurt.

Apr 18 2017, 1:43 AM

Apr 16 2017

pfg committed rS317036: libjail: make allocation in jailparam_all() somewhat more robust..
libjail: make allocation in jailparam_all() somewhat more robust.
Apr 16 2017, 7:23 PM

Apr 13 2017

pfg committed rS316779: Temporarily revert r315602..
Temporarily revert r315602.
Apr 13 2017, 6:28 PM
pfg committed rS316763: MFC r316695, MFV r316693:.
MFC r316695, MFV r316693:
Apr 13 2017, 3:41 PM
pfg committed rS316762: MFC r316695, MFV r316693:.
MFC r316695, MFV r316693:
Apr 13 2017, 3:39 PM

Apr 12 2017

pfg added a comment to D10315: regex(3): Consistently handle invalid {} constructs between BREs and EREs.

For the record...

Apr 12 2017, 10:17 PM

Apr 10 2017

pfg committed rS316695: MFV r316693:.
MFV r316693:
Apr 10 2017, 10:56 PM
pfg committed rS316693: 8046 Let calloc() do the multiplication in libzfs_fru_refresh.
8046 Let calloc() do the multiplication in libzfs_fru_refresh
Apr 10 2017, 10:46 PM

Apr 8 2017

pfg added a comment to D10315: regex(3): Consistently handle invalid {} constructs between BREs and EREs.
In D10315#213705, @kevans91_ksu.edu wrote:

By request of @pfg

root@ghost:/usr/src/usr.bin/sed/tests# make check
sed2_test:inplace_hardlink_src  ->  passed  [0.071s]
sed2_test:inplace_symlink_src  ->  passed  [0.043s]
sed_test:c2048  ->  passed  [0.045s]
sed_test:emptybackref  ->  passed  [0.054s]
sed_test:longlines  ->  passed  [0.061s]
sed_test:preserve_leading_ws_ia  ->  passed  [0.040s]
sed_test:rangeselection  ->  passed  [0.204s]
legacy_test:main  ->  passed  [0.657s]
multi_test:main  ->  passed  [1.402s]
inplace_race_test:main  ->  passed  [3.772s]

Results file id is usr_tests_usr.bin_sed.20170408-150131-450096
Results saved to /root/.kyua/store/results.usr_tests_usr.bin_sed.20170

10/10 passed (0 failed)

Actually... I meant the GNU sed port tests: we can't import them but our sed in base passes the GNU tests.

Apr 8 2017, 3:43 PM
pfg added a reviewer for D10315: regex(3): Consistently handle invalid {} constructs between BREs and EREs: pfg.

The change looks good to me but given the history I've had with regex and sed, I do feel an exp-run is needed.

Apr 8 2017, 2:57 PM

Apr 7 2017

pfg committed rS316613: MFC r315162:.
MFC r315162:
Apr 7 2017, 4:08 PM

Apr 1 2017

pfg committed rS316341: ext2fs: Initial support for Extended Attributes..
ext2fs: Initial support for Extended Attributes.
Apr 1 2017, 1:00 AM
pfg closed D10151: ext2fs: add read-only support for extended attributes by committing rS316341: ext2fs: Initial support for Extended Attributes..
Apr 1 2017, 1:00 AM

Mar 31 2017

pfg accepted D10151: ext2fs: add read-only support for extended attributes.
Mar 31 2017, 2:37 PM
pfg accepted D10151: ext2fs: add read-only support for extended attributes.

I can't really test that it works as intented but it looks good to me. Approved.
Can it be MFC'd all the way to 10-stable? Kevin can you do the honors?
I am still setting up stuff here.

Mar 31 2017, 2:15 PM

Mar 30 2017

pfg added a comment to D10151: ext2fs: add read-only support for extended attributes.

OK.. another iteration of knits :)

Mar 30 2017, 9:27 PM
pfg added a reviewer for D10151: ext2fs: add read-only support for extended attributes: trasz.

Add trasz as reviewer: with the addition of EAs, at least read-only for now, implementing ACLS becomes possible.

Mar 30 2017, 6:49 PM
pfg added inline comments to D10151: ext2fs: add read-only support for extended attributes.
Mar 30 2017, 6:31 PM
pfg added a comment to D10151: ext2fs: add read-only support for extended attributes.

Sorry to be so picky, the code is looking good. After the minor fixes I will approve and if kevin confirms it works we can commit it.

Mar 30 2017, 3:30 PM
pfg added inline comments to D10151: ext2fs: add read-only support for extended attributes.
Mar 30 2017, 12:40 AM

Mar 29 2017

pfg added inline comments to D10151: ext2fs: add read-only support for extended attributes.
Mar 29 2017, 11:56 PM

Mar 22 2017

pfg committed rS315725: MFC r315720 (from cem@).
MFC r315720 (from cem@)
Mar 22 2017, 6:13 PM

Mar 21 2017

pfg committed rS315659: MFC r314877:.
MFC r314877:
Mar 21 2017, 3:42 AM

Mar 20 2017

pfg committed rS315602: MFC r312942:.
MFC r312942:
Mar 20 2017, 1:53 AM
pfg committed rS315600: MFC r315212, r315213, r315214, r315215:.
MFC r315212, r315213, r315214, r315215:
Mar 20 2017, 12:55 AM
pfg committed rS315599: MFC r315212, r315213, r315214, r315215:.
MFC r315212, r315213, r315214, r315215:
Mar 20 2017, 12:55 AM

Mar 19 2017

pfg added inline comments to D10035: Use of nullability attributes in string functions..
Mar 19 2017, 8:17 PM
pfg committed rS315582: MFC r315426, MFV r315425:.
MFC r315426, MFV r315425:
Mar 19 2017, 8:05 PM
pfg committed rS315581: MFC r315426, MFV r315425:.
MFC r315426, MFV r315425:
Mar 19 2017, 8:04 PM

Mar 16 2017

pfg committed rS315426: MFV r315425:.
MFV r315425:
Mar 16 2017, 9:32 PM
pfg committed rS315425: one-true-awk: have calloc(3) do the multiplication..
one-true-awk: have calloc(3) do the multiplication.
Mar 16 2017, 9:26 PM
pfg created D10035: Use of nullability attributes in string functions..
Mar 16 2017, 6:46 PM
pfg committed rS315415: MFC r315187:.
MFC r315187:
Mar 16 2017, 3:10 PM
pfg committed rS315414: Record mergeinfo for r310171..
Record mergeinfo for r310171.
Mar 16 2017, 3:04 PM

Mar 15 2017

pfg committed rS315308: MFC r315095, r315096, r315097, r315187:.
MFC r315095, r315096, r315097, r315187:
Mar 15 2017, 3:33 PM
pfg added a reviewer for D10009: Fix a memory leak in bhyve: grehan.

The change looks good to me but it isn't my area. Add Peter.

Mar 15 2017, 12:45 AM

Mar 14 2017

pfg committed rS315282: MFC r312934:.
MFC r312934:
Mar 14 2017, 8:15 PM
pfg committed rS315224: MFC r314974, r315006:.
MFC r314974, r315006:
Mar 14 2017, 2:14 AM
pfg committed rS315221: MFC r313982, r314068:.
MFC r313982, r314068:
Mar 14 2017, 2:06 AM

Mar 13 2017

pfg committed rS315215: ypbind(8): let calloc(3) do the multiplying..
ypbind(8): let calloc(3) do the multiplying.
Mar 13 2017, 8:51 PM
pfg committed rS315214: mpsutil(8): let calloc(3) do the multiplying..
mpsutil(8): let calloc(3) do the multiplying.
Mar 13 2017, 8:49 PM