Page MenuHomeFreeBSD
Feed Advanced Search

Dec 13 2020

ache committed R9:9900d10799cf: Move one part of <note> out of <orderlist>, where it belongs (authored by ache).
Move one part of <note> out of <orderlist>, where it belongs
Dec 13 2020, 6:21 PM
ache committed R9:b0626c1ec81b: Move yet one sentence out of orderlist (authored by ache).
Move yet one sentence out of orderlist
Dec 13 2020, 6:20 PM
ache committed R9:38f0130cd027: www-it -> www-jp for Japanese Web Pages (authored by ache).
www-it -> www-jp for Japanese Web Pages
Dec 13 2020, 6:16 PM
ache committed R9:1989674b94d0: www-jp -> www-ja (authored by ache).
www-jp -> www-ja
Dec 13 2020, 6:16 PM
ache committed R9:45f6ef47e2ff: Change my key (authored by ache).
Change my key
Dec 13 2020, 6:06 PM
ache committed R9:3786d6226dcf: Document version bump related to ...env(3) functions (authored by ache).
Document version bump related to ...env(3) functions
Dec 13 2020, 6:02 PM
ache committed R9:e3016f611eca: Back out all POSIXified *env() changes. (authored by ache).
Back out all POSIXified *env() changes.
Dec 13 2020, 6:02 PM
ache committed R9:25fff62100be: Add note about wide and single byte ctype separation to 800000 entry. (authored by ache).
Add note about wide and single byte ctype separation to 800000 entry.
Dec 13 2020, 5:58 PM
ache committed R9:276634ee1aa5: Document FreeBSD_version 800013 (authored by ache).
Document FreeBSD_version 800013
Dec 13 2020, 5:56 PM
ache committed R9:ad86d7c60a43: Document __FreeBSD_version bump after addition of arc4random_buf(3) (authored by ache).
Document __FreeBSD_version bump after addition of arc4random_buf(3)
Dec 13 2020, 5:47 PM
ache committed R9:482dd6a71981: refresh (authored by ache).
refresh
Dec 13 2020, 5:25 PM
ache committed R9:4f96835efce6: Update my key (authored by ache).
Update my key
Dec 13 2020, 5:25 PM

May 1 2017

ache added a comment to D10551: libc glob: Avoid pathological exponential behavior.
+		if (nameNext != nameStart
+		    && (nameEnd == NULL || nameNext <= nameEnd)) {
+			pat = patNext;
+			name = nameNext;
+			continue;
+		}
May 1 2017, 9:21 PM
ache added a comment to D10551: libc glob: Avoid pathological exponential behavior.

I prefer to copy NetBSD implementing the same thing, it appears they have additional safeguard against "name" goes too far:
http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/gen/glob.c.diff?r1=1.36&r2=1.37&f=h&f=u

May 1 2017, 9:09 PM

Feb 25 2017

ache added a comment to D9778: Fix a memory leak in grep.

Ah, it is gnu one. Sorry I don't check first. Thats OK.

Feb 25 2017, 9:00 AM

Feb 24 2017

ache added a comment to D9778: Fix a memory leak in grep.

See BSDism reallocf(3) instead, it does free() automatically.

Feb 24 2017, 6:27 AM

Jan 19 2017

ache committed rP431913: Upgrade to 2.03pre29.
Upgrade to 2.03pre29
Jan 19 2017, 8:34 PM

Dec 19 2016

ache committed rP428951: Upgrade to 2.03pre28.
Upgrade to 2.03pre28
Dec 19 2016, 4:34 PM
ache committed rP428949: Upgrade to 2.03pre28.
Upgrade to 2.03pre28
Dec 19 2016, 4:34 PM

Nov 7 2016

ache added a comment to D8130: Split arc4random mutexes to improve performance on IPSec traffic.

By the second thought, no problem:) Since you mention that per-CPU locking is not your goal, in worst case the same harmless multiple stiring can happens since numruns belongs to the same arc4 data set to which stiring applied.

Nov 7 2016, 11:41 AM · Core Team
ache added a comment to D8130: Split arc4random mutexes to improve performance on IPSec traffic.

Unfortunately this is a problem that is already present in the current version.

In current version it is not a problem (see my previous comment about multiple stiring above), but in case each arc4 instance can run on different arc4 data set, it can be a problem.

Nov 7 2016, 11:19 AM · Core Team

Nov 4 2016

ache added a comment to D8130: Split arc4random mutexes to improve performance on IPSec traffic.

unlocked read of arc4->numruns

Will lead to several arc4 stiring in worst case (which IMHO is non-practical case). Any number of stiring does not harm arc4, at least one stiring should be enough. But all this for one CPU case, I don't know about per-CPU locking in details so can't answer the next note.

Nov 4 2016, 10:05 PM · Core Team

Oct 24 2016

ache committed rP424542: All 3 types of fonts are obsoleted in the port. Use official site to.
All 3 types of fonts are obsoleted in the port. Use official site to
Oct 24 2016, 6:05 AM

Oct 7 2016

ache added a comment to D8130: Split arc4random mutexes to improve performance on IPSec traffic.

Yes.

Oct 7 2016, 4:16 PM · Core Team
ache added a comment to D8130: Split arc4random mutexes to improve performance on IPSec traffic.

This is nearly what I proposed before, but why would you reseed all the instances in case the user calls arc4rand with reseed = 1?

Because from current API point of view there is no separate CPU argument, so the call with reseed == 1 can come from any random CPU.
In general any random CPU may be not equal to unknown CPU for which this operation was made.

Oct 7 2016, 7:32 AM · Core Team
ache committed rP423447: Update to 2.03pre27.
Update to 2.03pre27
Oct 7 2016, 4:19 AM

Oct 6 2016

ache added a comment to D8130: Split arc4random mutexes to improve performance on IPSec traffic.

Not sure this is a big security concern or not?

Maybe I am wrong, but I don't see big deal here - the moment of good randomness available is unpredictable in the time intervals we consider, and if some threads got it a bit later (on the next call), I don't see the problem.

Oct 6 2016, 4:49 PM · Core Team
ache added a comment to D8130: Split arc4random mutexes to improve performance on IPSec traffic.

There can be small window when arc4rand_iniseed_state is already set to SEED, but arc4_randomstir() is not called yet. And right in this time another thread calls the code. Well, we miss only single reinitialization per-CPU (more are time-consuming and can't fit between the check and immediate function call), on the next call they will be already reinitialized. Dou mean another scenario?
We can move both check and function call under lock, but it will slow things down, i.e. the thing you fight against.

Oct 6 2016, 3:19 PM · Core Team
ache added a comment to D8130: Split arc4random mutexes to improve performance on IPSec traffic.

The problem is that another thread may call the arc4rand() function and get some unsafe random bytes before the stir actually occurs and after the state was set to SEED.

Please show how it can happen in steps by steps. In old code if the state was SEED, it surely reinitialized, and reinitialization itself keeps a lock, so RNG can't move further and wait for reinitialization (from any thread).

Here is what I propose:

In your code 'reseed' variable should be move to the same 'if' as 'arc4rand_iniseed_state' placed, we never know what we cpu we reseed otherwise.
The next thing I don't like much is possible double initialization, if this condition additionaly meet in the same time 'if ((arc4->numruns > ARC4_RESEED_BYTES) || (tv.tv_sec > arc4->t_reseed))
All you need is simple local 'reseedall' variable and set it where ARC4_FOREACH(arc4) is.

Oct 6 2016, 2:59 PM · Core Team
ache added a comment to D8130: Split arc4random mutexes to improve performance on IPSec traffic.

I meant the arc4rand_iniseed_state variable.

I too. Without locking or atomic either yet one additional seeding can happens or no seeding can happens at all (CPU writing to another half of word, which is already checked).

I do agree with that, but on the very first call of arc4rand(), we can make sure readomstir() is called,

Not all stiring are equal) Non random stiring is done to just not block arc4 on early boot phase.
When good randomnes becomes available (which arc4rand_iniseed_state indicates) it must be reinitialized immediately on the next call.

Oct 6 2016, 11:04 AM · Core Team
ache added a comment to D8130: Split arc4random mutexes to improve performance on IPSec traffic.

But I am not sure to see the actual benefit of this atomic?

It allows to not play with locking.

I guess the read_random() call is blocking until the underlying entropy processor becomes secure?

Yes. Then it allows arc4 reseed. There is no point to reseed it before it happens with non random data.

Oct 6 2016, 10:38 AM · Core Team
ache added a comment to D8130: Split arc4random mutexes to improve performance on IPSec traffic.

reseed arg without specifying particular CPU means nothing but stir all CPUs too. And specifying that CPU is impossible on API level - nobody know from which CPU this code will be called.

Oct 6 2016, 9:32 AM · Core Team
ache added a comment to D8130: Split arc4random mutexes to improve performance on IPSec traffic.

The problem is that arc4rand_iniseed_state which is reset on the first use with atomic currently asssume that all RNGs are stired, but really only first one.

Oct 6 2016, 9:25 AM · Core Team

Oct 4 2016

ache added a comment to D8130: Split arc4random mutexes to improve performance on IPSec traffic.
In D8130#168678, @ache wrote:

Sorry, my prev. comment was sent non-edited. Please forget it if you got it through the mail and re-read here instead.

No problem!
Since the call is very unlikely to fail, what about a KASSERT on failure then? That seems to be an acceptable compromise.

Oct 4 2016, 9:39 AM · Core Team
ache added a comment to D8130: Split arc4random mutexes to improve performance on IPSec traffic.

Sorry, my prev. comment was sent non-edited. Please forget it if you got it through the mail and re-read here instead.

Oct 4 2016, 8:29 AM · Core Team
ache added a comment to D8130: Split arc4random mutexes to improve performance on IPSec traffic.
In D8130#168667, @ache wrote:

It will be better to use non-failing malloc flag. arc4_init() can't fail.

You mean a M_WAITOK flag? I was wondering: are you sure it is really safe to sleep in this context?

Oct 4 2016, 8:14 AM · Core Team
ache added a comment to D8130: Split arc4random mutexes to improve performance on IPSec traffic.

It will be better to use non-failing malloc flag. arc4_init() can't fail.

Oct 4 2016, 6:56 AM · Core Team

Sep 28 2016

ache committed rS306416: MFC r306075,r306109.
MFC r306075,r306109
Sep 28 2016, 8:55 PM
ache committed rS306415: MFC r306075,r306109.
MFC r306075,r306109
Sep 28 2016, 8:53 PM
ache committed rS306414: MFC r306075,r306109.
MFC r306075,r306109
Sep 28 2016, 8:49 PM

Sep 25 2016

ache committed rS306326: MFC r272562,r272678,r272679.
MFC r272562,r272678,r272679
Sep 25 2016, 11:06 PM

Sep 22 2016

ache committed rS306201: MFC r305841.
MFC r305841
Sep 22 2016, 4:50 PM
ache committed rS306200: MFC r305841.
MFC r305841
Sep 22 2016, 4:47 PM

Sep 21 2016

ache committed rS306109: 1) For already non-standard %z extension implement GNU compatible formats:.
1) For already non-standard %z extension implement GNU compatible formats:
Sep 21 2016, 3:47 PM
ache committed rS306075: 1) Microoptimize %p case..
1) Microoptimize %p case.
Sep 21 2016, 6:44 AM

Sep 15 2016

ache committed rS305841: Implement multibyte encoding support for -v with fallback.
Implement multibyte encoding support for -v with fallback
Sep 15 2016, 5:24 PM

Sep 8 2016

ache committed rS305584: MFC r305413.
MFC r305413
Sep 8 2016, 7:16 AM
ache committed rS305583: MFC r305413.
MFC r305413
Sep 8 2016, 7:15 AM
ache committed rS305582: MFC r305406,r305409,r305412.
MFC r305406,r305409,r305412
Sep 8 2016, 6:53 AM
ache committed rS305577: MFC r305406,r305409,r305412.
MFC r305406,r305409,r305412
Sep 8 2016, 5:14 AM

Sep 6 2016

ache committed rS305450: MFC r305365.
MFC r305365
Sep 6 2016, 12:53 AM
ache committed rS305448: MFC r305365.
MFC r305365
Sep 6 2016, 12:34 AM
ache committed rS305447: MFC r305365.
MFC r305365
Sep 6 2016, 12:32 AM

Sep 5 2016

ache committed rS305413: Fix error handling..
Fix error handling.
Sep 5 2016, 6:46 AM
ache committed rS305412: Fix n == 1 case. Here should be no physical read (fill buffer) attempt.
Fix n == 1 case. Here should be no physical read (fill buffer) attempt
Sep 5 2016, 6:11 AM
ache committed rS305409: 1) Prevent out of bounds access to ws[-1] (passed buffer) which happens.
1) Prevent out of bounds access to ws[-1] (passed buffer) which happens
Sep 5 2016, 4:50 AM
ache committed rS305406: Fix errors handling..
Fix errors handling.
Sep 5 2016, 3:37 AM
ache committed rS305404: MFC r305241.
MFC r305241
Sep 5 2016, 2:00 AM
ache committed rS305403: MFC r305241.
MFC r305241
Sep 5 2016, 1:57 AM
ache committed rS305402: MFC r305144.
MFC r305144
Sep 5 2016, 12:41 AM
ache committed rS305401: MFC r305144.
MFC r305144
Sep 5 2016, 12:37 AM

Sep 4 2016

ache committed rS305370: MFC r305219.
MFC r305219
Sep 4 2016, 12:36 AM
ache committed rS305369: MFC r305219.
MFC r305219
Sep 4 2016, 12:34 AM

Sep 3 2016

ache committed rS305365: The bug:.
The bug:
Sep 3 2016, 11:05 PM
ache committed rS305317: MFC r305133.
MFC r305133
Sep 3 2016, 1:09 AM
ache committed rS305316: MFC r305133.
MFC r305133
Sep 3 2016, 1:09 AM

Sep 1 2016

ache committed rS305241: fgetwc(3) may set both __SEOF and __SERR at once (in case of incomplete.
fgetwc(3) may set both __SEOF and __SERR at once (in case of incomplete
Sep 1 2016, 8:45 PM
ache committed rS305219: If error happens, don't overwrite original errno comes from __mbrtowc().
If error happens, don't overwrite original errno comes from __mbrtowc()
Sep 1 2016, 6:13 PM

Aug 31 2016

ache committed rS305144: 'addrlen' does not matter when we need to find the first non-zero bit in.
'addrlen' does not matter when we need to find the first non-zero bit in
Aug 31 2016, 6:50 PM
ache committed rS305133: Apply the same qsort() usage fix as in r304911 getaddrinfo.c.
Apply the same qsort() usage fix as in r304911 getaddrinfo.c
Aug 31 2016, 3:48 PM

Aug 30 2016

ache committed rS305038: MFC r304911.
MFC r304911
Aug 30 2016, 1:01 AM
ache committed rS305037: MFC r304911.
MFC r304911
Aug 30 2016, 12:58 AM

Aug 27 2016

ache committed rS304911: The formal behavior of qsort is unstable with regard to objects that.
The formal behavior of qsort is unstable with regard to objects that
Aug 27 2016, 2:43 PM
ache committed rS304896: MFC r304607,r304641,r304819,r304811.
MFC r304607,r304641,r304819,r304811
Aug 27 2016, 11:08 AM
ache committed rS304893: MFC r304607,r304641,r304819,r304811.
MFC r304607,r304641,r304819,r304811
Aug 27 2016, 10:34 AM
ache committed rS304890: MFC r304810.
MFC r304810
Aug 27 2016, 10:00 AM
ache committed rS304888: MFC r304810.
MFC r304810
Aug 27 2016, 9:58 AM

Aug 26 2016

ache committed rS304865: Bump __FreeBSD_version after LC_*_MASK fix.
Bump __FreeBSD_version after LC_*_MASK fix
Aug 26 2016, 9:28 PM
ache committed rS304864: Bump __FreeBSD_version after LC_*_MASK fix.
Bump __FreeBSD_version after LC_*_MASK fix
Aug 26 2016, 9:26 PM
ache committed rS304863: MFC r304703, r304755.
MFC r304703, r304755
Aug 26 2016, 9:23 PM
ache committed rS304862: MFC r304703, r304755.
MFC r304703, r304755
Aug 26 2016, 9:19 PM

Aug 25 2016

ache committed rS304819: Original fgetln() from 44lite return sucess for line tail errors,.
Original fgetln() from 44lite return sucess for line tail errors,
Aug 25 2016, 9:14 PM
ache committed rS304816: MFC r295632.
MFC r295632
Aug 25 2016, 7:55 PM
ache committed rS304811: Remove "Fast path", it bypass __wcrtomb() and all its error checking..
Remove "Fast path", it bypass __wcrtomb() and all its error checking.
Aug 25 2016, 5:30 PM
ache committed rS304810: Don't check for __SERR which may stick from one of any previous stdio.
Don't check for __SERR which may stick from one of any previous stdio
Aug 25 2016, 5:13 PM

Aug 24 2016

ache committed rS304755: Use current locale (f.e. set by thread). It was global locale always.
Use current locale (f.e. set by thread). It was global locale always
Aug 24 2016, 4:44 PM
ache committed rD49333: 1) Remove again 1200001. This change was backed out, but was restored.
1) Remove again 1200001. This change was backed out, but was restored
Aug 24 2016, 3:49 PM
ache committed rS304752: Bump __FreeBSD_version for LC_*_MASK fix for newlocale(3) and querylocale(3).
Bump __FreeBSD_version for LC_*_MASK fix for newlocale(3) and querylocale(3)
Aug 24 2016, 3:37 PM

Aug 23 2016

ache committed rS304703: LC_*_MASK bit shifting order was partially broken from the initial commit.
LC_*_MASK bit shifting order was partially broken from the initial commit
Aug 23 2016, 8:34 PM
ache committed rS304648: Direct commit, equal to MFC part of r295632 which is not planned for.
Direct commit, equal to MFC part of r295632 which is not planned for
Aug 23 2016, 12:00 AM

Aug 22 2016

ache committed rS304641: 1) Back out r304607 case 2). fgetwln() as its pair fgetln() supposed to.
1) Back out r304607 case 2). fgetwln() as its pair fgetln() supposed to
Aug 22 2016, 10:29 PM
ache committed rS304607: Fix error processing..
Fix error processing.
Aug 22 2016, 3:45 PM

Aug 18 2016

ache committed rS304379: MFC r304374.
MFC r304374
Aug 18 2016, 10:37 AM
ache committed rS304374: Fix TAB replaced with spaces in prev. commit..
Fix TAB replaced with spaces in prev. commit.
Aug 18 2016, 10:18 AM
ache committed rS304343: MFC r303581.
MFC r303581
Aug 18 2016, 8:53 AM
ache committed rS304341: MFC r303568.
MFC r303568
Aug 18 2016, 8:47 AM
ache committed rS304340: MFC r303569.
MFC r303569
Aug 18 2016, 8:36 AM
ache committed rS304339: MFC r302937.
MFC r302937
Aug 18 2016, 7:43 AM

Aug 17 2016

ache committed rS304284: MFC r302943,r302944,r303004,r303010,r303011,r303013,r303014,r303074,.
MFC r302943,r302944,r303004,r303010,r303011,r303013,r303014,r303074,
Aug 17 2016, 9:35 AM
ache committed rS304278: MFC r302827.
MFC r302827
Aug 17 2016, 9:12 AM