]> git.lizzy.rs Git - plan9front.git/log
plan9front.git
5 years agodevip: zero fragment offset after reassembly, remove tos magic, cleanup
cinap_lenrek [Mon, 4 Mar 2019 02:08:27 +0000 (03:08 +0100)]
devip: zero fragment offset after reassembly, remove tos magic, cleanup

5 years agodevip: fix fragment forwarding
cinap_lenrek [Mon, 4 Mar 2019 02:05:30 +0000 (03:05 +0100)]
devip: fix fragment forwarding

unfraglen() had the side effect that it would always copy the
nexthdr field from the fragment header to the previous nexthdr
field. this is fine when we reassemble packets but breaks
fragments that we want to just forward unchanged.

5 years agodevip: simplify ip reassembly functions, getting rid of Ipfrag.hlen
cinap_lenrek [Sun, 3 Mar 2019 17:56:18 +0000 (18:56 +0100)]
devip: simplify ip reassembly functions, getting rid of Ipfrag.hlen

given that we now keep the block size consistent with the
ip packet size, the variable header part of the ip packet
is just: BLEN(bp) - fp->flen == fp->hlen.

fix bug in ip6reassemble() in the non-fragmented case:
reload ih after ip header was moved before writing ih->ploadlen.

use concatbloc() instead of pullupblock().

5 years agodevip: fix block list handling for icmp/icmp6, use proper MinAdvise for icmp6
cinap_lenrek [Sun, 3 Mar 2019 08:01:23 +0000 (09:01 +0100)]
devip: fix block list handling for icmp/icmp6, use proper MinAdvise for icmp6

5 years agoqio: handle common case in trimblock()
cinap_lenrek [Sun, 3 Mar 2019 04:26:09 +0000 (05:26 +0100)]
qio: handle common case in trimblock()

5 years agodevip: fix ip fragmentation handling issues with header options
cinap_lenrek [Sun, 3 Mar 2019 04:25:00 +0000 (05:25 +0100)]
devip: fix ip fragmentation handling issues with header options

some protocols assume that Ip4hdr.length[] and Ip6hdr.ploadlen[]
are valid and not out of range within the block but this has
not been verified. also, the ipv4 and ipv6 headers can have variable
length options, which was not considered in the fragmentation and
reassembly code.

to make this sane, ipiput4() and ipiput6() now verify that everything
is in range and trims to block to the expected size before it does
any further processing. now blocklen() and Ip4hdr.length[] are conistent.

ipoput4() and ipoput6() are simpler now, as they can rely on
blocklen() only, not having a special routing case.

ip fragmentation reassembly has to consider that fragments could
arrive with different ip header options, so we store the header+option
size in new Ipfrag.hlen field.

unfraglen() has to make sure not to run past the buffer, and hadle
the case when it encounters multiple fragment headers.

5 years agolib9p: fix zero msize abort() due to unknown version (thanks kivik)
cinap_lenrek [Fri, 1 Mar 2019 00:43:55 +0000 (01:43 +0100)]
lib9p: fix zero msize abort() due to unknown version (thanks kivik)

kivik wrote:

I've found a nasty bug in lib9p handling of Tversion
messages, where an invalid version string in the request
leads to servers abort()ing the spaceship.

To reproduce:
; ramfs -S ram
; aux/9pcon /srv/ram
Tversion ~0 DIE

The issue lies in sversion() where in case an invalid
version string is received we respond right away with
ofcall.version="unknown"; however, we fail to set the
ofcall.msize, which at this point is cleared to 0.  This
causes the convS2M call in respond() to fail and abort being
called.

5 years agolibip: move optimized 386 assembly version of ptclbsum() from kernel to libip
cinap_lenrek [Wed, 27 Feb 2019 17:29:08 +0000 (18:29 +0100)]
libip: move optimized 386 assembly version of ptclbsum() from kernel to libip

5 years agokernel: remove ptclbsum dependencies from configs
cinap_lenrek [Wed, 27 Feb 2019 07:47:17 +0000 (08:47 +0100)]
kernel: remove ptclbsum dependencies from configs

5 years agopi, pi2: remove ptclbsum dependency from config
cinap_lenrek [Wed, 27 Feb 2019 07:38:19 +0000 (08:38 +0100)]
pi, pi2: remove ptclbsum dependency from config

5 years agocwfs: fix %.*s format in cmd_printconf()
cinap_lenrek [Mon, 25 Feb 2019 03:36:37 +0000 (04:36 +0100)]
cwfs: fix %.*s format in cmd_printconf()

5 years agopc, pc64: fix %.*s format in multibootargs
cinap_lenrek [Mon, 25 Feb 2019 03:25:36 +0000 (04:25 +0100)]
pc, pc64: fix %.*s format in multibootargs

5 years agowifi: fix %.*s format in wifictl
cinap_lenrek [Mon, 25 Feb 2019 03:22:03 +0000 (04:22 +0100)]
wifi: fix %.*s format in wifictl

5 years agoabaco: fix %.*s format in findctype()
cinap_lenrek [Mon, 25 Feb 2019 03:20:43 +0000 (04:20 +0100)]
abaco: fix %.*s format in findctype()

5 years agoatazz: fix %.*s format in special command processing
cinap_lenrek [Mon, 25 Feb 2019 03:20:00 +0000 (04:20 +0100)]
atazz: fix %.*s format in special command processing

5 years agoaux/depend: fix %.*s format in path concatenation
cinap_lenrek [Mon, 25 Feb 2019 03:18:30 +0000 (04:18 +0100)]
aux/depend: fix %.*s format in path concatenation

5 years agoaux/statusmsg: fix %.*s format
cinap_lenrek [Mon, 25 Feb 2019 03:17:19 +0000 (04:17 +0100)]
aux/statusmsg: fix %.*s format

5 years agoaux/wpa: fix %.*s format in debug prints
cinap_lenrek [Mon, 25 Feb 2019 03:16:48 +0000 (04:16 +0100)]
aux/wpa: fix %.*s format in debug prints

5 years agocc: fix %.*s format usage in lexer "token too long" error
cinap_lenrek [Mon, 25 Feb 2019 03:15:43 +0000 (04:15 +0100)]
cc: fix %.*s format usage in lexer "token too long" error

5 years agohgfs: fix %.*s usage in walk
cinap_lenrek [Mon, 25 Feb 2019 03:08:13 +0000 (04:08 +0100)]
hgfs: fix %.*s usage in walk

5 years agoip/cifsd: fix %.*s format xdirflush() path
cinap_lenrek [Mon, 25 Feb 2019 02:53:09 +0000 (03:53 +0100)]
ip/cifsd: fix %.*s format xdirflush() path

5 years agoip/ppp: fix %.*s format in debug print
cinap_lenrek [Mon, 25 Feb 2019 02:52:05 +0000 (03:52 +0100)]
ip/ppp: fix %.*s format in debug print

5 years agoip/pppoe: fix %.*s format in debug prints
cinap_lenrek [Mon, 25 Feb 2019 02:51:19 +0000 (03:51 +0100)]
ip/pppoe: fix %.*s format in debug prints

5 years agoip/socksd: fix %.*s format in dialstring
cinap_lenrek [Mon, 25 Feb 2019 02:50:14 +0000 (03:50 +0100)]
ip/socksd: fix %.*s format in dialstring

5 years agoip/tftpd: fix %.*s format for homedir path
cinap_lenrek [Mon, 25 Feb 2019 02:49:17 +0000 (03:49 +0100)]
ip/tftpd: fix %.*s format for homedir path

5 years agoip/torrent: fix %.*s format in dialstring
cinap_lenrek [Mon, 25 Feb 2019 02:48:12 +0000 (03:48 +0100)]
ip/torrent: fix %.*s format in dialstring

5 years agolibpanel: fix %.*s format in pl_snarfentry()
cinap_lenrek [Mon, 25 Feb 2019 02:45:49 +0000 (03:45 +0100)]
libpanel: fix %.*s format in pl_snarfentry()

5 years agonusb/audio: fix %.*s format usage
cinap_lenrek [Mon, 25 Feb 2019 02:41:10 +0000 (03:41 +0100)]
nusb/audio: fix %.*s format usage

5 years agoupas/fs: fix %.*s format usage
cinap_lenrek [Mon, 25 Feb 2019 02:39:31 +0000 (03:39 +0100)]
upas/fs: fix %.*s format usage

5 years agoupas/ned: fix %.*s format in parsesearch(), improve mkfile
cinap_lenrek [Mon, 25 Feb 2019 02:34:25 +0000 (03:34 +0100)]
upas/ned: fix %.*s format in parsesearch(), improve mkfile

5 years agoupas/scanmail: fix %.*s format in xprint(), improve mkfile
cinap_lenrek [Mon, 25 Feb 2019 02:31:50 +0000 (03:31 +0100)]
upas/scanmail: fix %.*s format in xprint(), improve mkfile

5 years agoupas/smtp: fix %.*s format for challenge in smtpcram()
cinap_lenrek [Mon, 25 Feb 2019 02:29:19 +0000 (03:29 +0100)]
upas/smtp: fix %.*s format for challenge in smtpcram()

the challenge should already be in ASCII format,
but better safe than sorry.

5 years agovt: fix %.*s in sendncars()
cinap_lenrek [Mon, 25 Feb 2019 02:25:36 +0000 (03:25 +0100)]
vt: fix %.*s in sendncars()

5 years agowebfs: properly handle %.*s in url path and debug prints
cinap_lenrek [Mon, 25 Feb 2019 02:21:09 +0000 (03:21 +0100)]
webfs: properly handle %.*s in url path and debug prints

5 years agossh: don't assume error messages are ASCII. format number of complete runes, not...
cinap_lenrek [Mon, 25 Feb 2019 00:19:44 +0000 (01:19 +0100)]
ssh: don't assume error messages are ASCII. format number of complete runes, not bytes.

5 years agoip/tinc: fix mistake from previous commit
cinap_lenrek [Fri, 15 Feb 2019 01:16:31 +0000 (02:16 +0100)]
ip/tinc: fix mistake from previous commit

5 years agolibip: prefer v4 over v6 for myipaddr()
cinap_lenrek [Wed, 13 Feb 2019 17:56:21 +0000 (18:56 +0100)]
libip: prefer v4 over v6 for myipaddr()

myipaddr() is used in legacy applications that assume a
single ip address per host. so prefer to retun a v4
address over a v6 one.

5 years agodevip: remove unused eipconvtet.c and ptclbsum.c files
cinap_lenrek [Wed, 13 Feb 2019 16:42:20 +0000 (17:42 +0100)]
devip: remove unused eipconvtet.c and ptclbsum.c files

5 years agodevip: ipv6 loopback ::1 has link-local scope
cinap_lenrek [Wed, 13 Feb 2019 07:46:49 +0000 (08:46 +0100)]
devip: ipv6 loopback ::1 has link-local scope

5 years agomerge
cinap_lenrek [Wed, 13 Feb 2019 03:47:29 +0000 (04:47 +0100)]
merge

5 years agoip/ipconfig: format ipmask with %M instead of %I
cinap_lenrek [Wed, 13 Feb 2019 03:45:41 +0000 (04:45 +0100)]
ip/ipconfig: format ipmask with %M instead of %I

5 years agopostscript: use PI
BurnZeZ [Wed, 13 Feb 2019 03:24:31 +0000 (03:24 +0000)]
postscript: use PI

5 years agolibip: don't reject ipmask in v6 form for v4 address
cinap_lenrek [Wed, 13 Feb 2019 03:04:33 +0000 (04:04 +0100)]
libip: don't reject ipmask in v6 form for v4 address

5 years agoip/ipconfig, ndb/dns, libndb: handle parseipmask() errors
cinap_lenrek [Tue, 12 Feb 2019 20:44:57 +0000 (21:44 +0100)]
ip/ipconfig, ndb/dns, libndb: handle parseipmask() errors

5 years agolibip: return -1 in parseipmask() and parseipandmask() when mask is not ipv4 and...
cinap_lenrek [Tue, 12 Feb 2019 20:43:22 +0000 (21:43 +0100)]
libip: return -1 in parseipmask() and parseipandmask() when mask is not ipv4 and v4 argument was set

5 years agodevip: use parseipandmask() for ipifc and route control message parsing
cinap_lenrek [Mon, 11 Feb 2019 22:43:14 +0000 (23:43 +0100)]
devip: use parseipandmask() for ipifc and route control message parsing

5 years agondb/dns: provide v4 argument to parseipmask(), use snprint() instead of sprint()
cinap_lenrek [Mon, 11 Feb 2019 22:42:15 +0000 (23:42 +0100)]
ndb/dns: provide v4 argument to parseipmask(), use snprint() instead of sprint()

5 years agoupas/smtpd: implement ipv6 support for ip blacklist, replace v4parsecidr() with parse...
cinap_lenrek [Mon, 11 Feb 2019 22:40:34 +0000 (23:40 +0100)]
upas/smtpd: implement ipv6 support for ip blacklist, replace v4parsecidr() with parseipandmask()

5 years agoratfs: implement ipv6 support, replace v4parsecidr() with parseipandmask()
cinap_lenrek [Mon, 11 Feb 2019 22:38:58 +0000 (23:38 +0100)]
ratfs: implement ipv6 support, replace v4parsecidr() with parseipandmask()

5 years agoip/rip: use new parseipandmask() function
cinap_lenrek [Mon, 11 Feb 2019 22:36:29 +0000 (23:36 +0100)]
ip/rip: use new parseipandmask() function

5 years agoip/ayiya: use parseipandmask(), use ipvmp() instead of equivip6()
cinap_lenrek [Mon, 11 Feb 2019 22:34:26 +0000 (23:34 +0100)]
ip/ayiya: use parseipandmask(), use ipvmp() instead of equivip6()

5 years agoip/6in4: use parseipandmask(), use ipvmp() instead of equivip6()
cinap_lenrek [Mon, 11 Feb 2019 22:33:44 +0000 (23:33 +0100)]
ip/6in4: use parseipandmask(), use ipvmp() instead of equivip6()

5 years agoip/tinc: use new parseipandmask() to parse subnets, use ipcmp()/ipmove(), remove...
cinap_lenrek [Mon, 11 Feb 2019 22:32:40 +0000 (23:32 +0100)]
ip/tinc: use new parseipandmask() to parse subnets, use ipcmp()/ipmove(), remove prefixlen

5 years agoip/dhcpd: provide v4 argument for parseipmask()
cinap_lenrek [Mon, 11 Feb 2019 22:30:52 +0000 (23:30 +0100)]
ip/dhcpd: provide v4 argument for parseipmask()

5 years agoip/ipconfig: use new parseipandmask() function
cinap_lenrek [Mon, 11 Feb 2019 22:29:53 +0000 (23:29 +0100)]
ip/ipconfig: use new parseipandmask() function

5 years agolibndb: provide parseipmask() v4 argument in subnet(), use snprint() instead of sprint()
cinap_lenrek [Mon, 11 Feb 2019 22:28:43 +0000 (23:28 +0100)]
libndb: provide parseipmask() v4 argument in subnet(), use snprint() instead of sprint()

5 years agolibip: replace v4parsecidr() with new parseipandmask()
cinap_lenrek [Mon, 11 Feb 2019 22:26:57 +0000 (23:26 +0100)]
libip: replace v4parsecidr() with new parseipandmask()

we want to accept V4 subnets in CIDR notation consistently which
means we need to interpret the mask in context of the IP address.
so parseipmask() now has an additional v4 flag argument which
offsets the prefixlength by 96 so a /24 will be interpreted
as a /120.

parseipandmask() is the new function which handles this automatically
depending on the ip address type.

v4parsecidr() is now obsolete.

5 years agosegment(3): use bind -c in examples (thanks henesy)
cinap_lenrek [Fri, 8 Feb 2019 21:28:20 +0000 (22:28 +0100)]
segment(3): use bind -c in examples (thanks henesy)

5 years agocifs: merge with steve simons latest version. thank you very much!
cinap_lenrek [Tue, 5 Feb 2019 22:10:03 +0000 (23:10 +0100)]
cifs: merge with steve simons latest version. thank you very much!

5 years agocifs: fix pruning of . and .. directory entries (thanks steve simon)
cinap_lenrek [Tue, 5 Feb 2019 19:53:40 +0000 (20:53 +0100)]
cifs: fix pruning of . and .. directory entries (thanks steve simon)

steve wrote:

> I cam across a bug in cifs.
>
> An empty directory under windows 7 pro contains a single entry "." but it
> doesn't appear to contain "..". As a result "." is not removed on dirscan
> and plan9 gets when trying to traverse the hierarchy.

5 years agobcm: include sdmmc in pi kernel configuration
cinap_lenrek [Fri, 1 Feb 2019 22:31:44 +0000 (23:31 +0100)]
bcm: include sdmmc in pi kernel configuration

5 years agodevdraw: get rid of softscreen==0xa110c hack and make attachscreen() return Memdata*
cinap_lenrek [Wed, 30 Jan 2019 17:22:52 +0000 (18:22 +0100)]
devdraw: get rid of softscreen==0xa110c hack and make attachscreen() return Memdata*

all screen implementations use a Memimage* internally
for the framebuffer, so we can return a shared reference
to its Memdata structure in attachscreen() instead of
a framebuffer data pointer.

this eleminates the softscreen == 0xa110c hack as we
always use shared Memdata* now.

5 years agobcm: list devswap only once in devtab array
cinap_lenrek [Wed, 30 Jan 2019 17:05:04 +0000 (18:05 +0100)]
bcm: list devswap only once in devtab array

5 years agodevdraw: simplify drawgen()
cinap_lenrek [Mon, 28 Jan 2019 22:29:22 +0000 (23:29 +0100)]
devdraw: simplify drawgen()

5 years agodevip: tcp: Don't respond to FIN-less ACKs during TIME-WAIT (thanks Barret Rhoden)
cinap_lenrek [Sun, 27 Jan 2019 21:12:50 +0000 (22:12 +0100)]
devip: tcp: Don't respond to FIN-less ACKs during TIME-WAIT (thanks Barret Rhoden)

Under the normal close sequence, when we receive a FIN|ACK, we enter
TIME-WAIT and respond to that LAST-ACK with an ACK.  Our TCP stack would
send an ACK in response to *any* ACK, which included FIN|ACK but also
included regular ACKs.  (Or PSH|ACKs, which is what we were actually
getting/sending).

That was more ACKs than is necessary and results in an endless ACK storm
if we were under the simultaneous close sequence.  In that scenario,
both sides of a connection are in TIME-WAIT.  Both sides receive
FIN|ACK, and both respond with an ACK.  Then both sides receive *those*
ACKs, and respond again.  This continues until the TIME-WAIT wait period
elapses and each side's TCP timers (in the Plan 9 / Akaros case) shut
down.

The fix for this is to only respond to a FIN|ACK when we are in TIME-WAIT.

5 years agodhcpd(8), ndb(6): group related ndb attributes together
cinap_lenrek [Thu, 24 Jan 2019 19:30:14 +0000 (20:30 +0100)]
dhcpd(8), ndb(6): group related ndb attributes together

5 years agoip/dhcpd: remove undocumented dhcpgroup mechanism, group related ndb attributes together
cinap_lenrek [Thu, 24 Jan 2019 19:29:39 +0000 (20:29 +0100)]
ip/dhcpd: remove undocumented dhcpgroup mechanism, group related ndb attributes together

5 years agotroff: fix -ms mug (thanks aksr)
cinap_lenrek [Wed, 23 Jan 2019 20:28:22 +0000 (21:28 +0100)]
troff: fix -ms mug (thanks aksr)

Executing .KS after .1C exhibits a bug.
Instead on the next page, the text between .KS and .KE is shown at
the bottom of the page (where footnote would be).
To reproduce the bug: http://sprunge.us/xyCUX7

The bug can be fixed by changing two lines in tmac.s:

    if \\n(NX<1 .bp\}

to

    if \\n(NX<=1 .bp\}

and

    if \\n(NX<1 'bp\}
to

  if \\n(NX<=1 'bp\}

5 years agodhcpd(8), ndb(6): update documentation (thanks k0ga)
cinap_lenrek [Wed, 23 Jan 2019 19:58:52 +0000 (20:58 +0100)]
dhcpd(8), ndb(6): update documentation (thanks k0ga)

5 years agoip/dhcpd: send vendor ndb attribute if available (thanks k0ga)
cinap_lenrek [Wed, 23 Jan 2019 19:57:20 +0000 (20:57 +0100)]
ip/dhcpd: send vendor ndb attribute if available (thanks k0ga)

At this moment plan9 is using vendorinfo to communicate
some specific plan9 parameters, but there are some boards
that use this attribute to set specific values. This
patch allows netbooting of these boards using ndb attributes
instead of hard coded solutions in dhcpd(1). Vendor attribute
is used for that purpose because it is also used for the
same purpose in bootp.

5 years agoip/dhcpd: add rootserverip read in lookupip() (thanks k0ga)
cinap_lenrek [Wed, 23 Jan 2019 19:49:50 +0000 (20:49 +0100)]
ip/dhcpd: add rootserverip read in lookupip() (thanks k0ga)

Lookupip() was already reading rootpath, but it didn't read the
address of the rootserver.  As they are very related it makes sense to
read them at the same time.

This patch also fixes a typo, where vendorclass was used instead of
vendor, resulting that vendor ndb attribute was never used.

5 years agoip/dhcpd: change swap to rootserver (thanks k0ga)
cinap_lenrek [Wed, 23 Jan 2019 19:47:48 +0000 (20:47 +0100)]
ip/dhcpd: change swap to rootserver (thanks k0ga)

5 years agodevtls: remove static "already" flag in tlsinit(). this function is only run once.
cinap_lenrek [Tue, 22 Jan 2019 21:08:07 +0000 (22:08 +0100)]
devtls: remove static "already" flag in tlsinit(). this function is only run once.

5 years agodevswap: simplify, don't panic when writing swapfile fails
cinap_lenrek [Tue, 22 Jan 2019 21:06:42 +0000 (22:06 +0100)]
devswap: simplify, don't panic when writing swapfile fails

always start the pager kproc in swapinit(), simplifying kickpager().

allow zero conf.nswap and conf.nswppo. avoid allocating the reference
map and iolist arrays in that case.

use ulong for ioptr and iolist indices.

don't panic when writing pages out to the swapfile fails. just
requeue the page in the io transaction list so we will try
again next time executeio() is run or just free the page when
the swap reference was dropped.

remove unused pagersummary() function.

5 years agopc64: properly handle faulterror in faultamd64()
cinap_lenrek [Tue, 22 Jan 2019 20:55:20 +0000 (21:55 +0100)]
pc64: properly handle faulterror in faultamd64()

replicate what faulterror() would have done with up->nerrlab == 0,
that is, terminate the process.

5 years agoupas/fs: remove unused function pop3log
Alex Musolino [Tue, 22 Jan 2019 04:41:53 +0000 (15:11 +1030)]
upas/fs: remove unused function pop3log

5 years agomerge
aiju [Sun, 20 Jan 2019 11:55:31 +0000 (12:55 +0100)]
merge

5 years agorc: clear out redirections on "rfork F" (RFCFDG)
cinap_lenrek [Sun, 20 Jan 2019 11:02:03 +0000 (12:02 +0100)]
rc: clear out redirections on "rfork F" (RFCFDG)

rfork F closes all file descriptors, so we have to
invalidate the redirections as they are now refering
to closed files. not doing so causes the wrong file
descriptors being closed later on as the fd numbers
get reused.

5 years agodtracy: fix &&
aiju [Sun, 20 Jan 2019 03:07:10 +0000 (03:07 +0000)]
dtracy: fix &&

5 years agoether82563: fix bugus FCA write and link detection for i217
cinap_lenrek [Sun, 13 Jan 2019 16:17:11 +0000 (17:17 +0100)]
ether82563: fix bugus FCA write and link detection for i217

the FCA registers 0x28, 0x2C have been reassigned to
to FEXTNVM on i217, i218 and i219 so add Fnofca flag
and avoid writing the registers.

make link detection more robust on i217 by delaying the
phy status read after link status change by 150ms. we'd
otherwise get a "phy wedged" (power saving state?) and
not update the link status until the next link change.

5 years agoether82563: work arround spurious jumbo packets on i217 (thanks k0ga)
cinap_lenrek [Sat, 12 Jan 2019 20:07:12 +0000 (21:07 +0100)]
ether82563: work arround spurious jumbo packets on i217 (thanks k0ga)

i217 appears to receive spurious jumbo frame and then
stops receiving completely. reducing the mtu to 2k as
a work arround for now.

5 years ago/sys/lib/plumb/basic: make plumbing page bookmarks work with relative paths (thanks...
cinap_lenrek [Sat, 12 Jan 2019 19:07:23 +0000 (20:07 +0100)]
/sys/lib/plumb/basic: make plumbing page bookmarks work with relative paths (thanks Tobias Heinicke)

5 years agoether82563: use 9018 byte mtu from datasheet for i217, i218, i219
cinap_lenrek [Sat, 12 Jan 2019 18:37:37 +0000 (19:37 +0100)]
ether82563: use 9018 byte mtu from datasheet for i217, i218, i219

5 years agomerge
cinap_lenrek [Sat, 12 Jan 2019 14:35:50 +0000 (15:35 +0100)]
merge

5 years agoether82563, ether82598, etherx550: round rbsz to multiple of 1K
cinap_lenrek [Sat, 12 Jan 2019 14:34:23 +0000 (15:34 +0100)]
ether82563, ether82598, etherx550: round rbsz to multiple of 1K

the max packet size is configured in 1K increments on these chips,
which can result in the card receiving a 10K packet but the
driver having only allocated 9.5K of buffer. this actually caued
pool corruption with i210, i217, i218, i219, i350.

for 82598 and x550, we explicitely round rbsz to avoid similar bugs
in the future, even tho the Rbsz constant was already a multiple of
1K and is not affected by the bug.

5 years agotorrent: avoid trying to fetch blocks past file
qwx [Tue, 8 Jan 2019 12:22:09 +0000 (13:22 +0100)]
torrent: avoid trying to fetch blocks past file

5 years agopc, pc64: properly track dependencies for mem.h on autogenerated apbootstrap.h and...
cinap_lenrek [Fri, 4 Jan 2019 01:51:29 +0000 (02:51 +0100)]
pc, pc64: properly track dependencies for mem.h on autogenerated apbootstrap.h and reboot.h targets

5 years agoupas/fs: don't put messages on the lru that cannot be uncached
cinap_lenrek [Wed, 2 Jan 2019 09:26:38 +0000 (10:26 +0100)]
upas/fs: don't put messages on the lru that cannot be uncached

the lru is there to track least recently used messages so
we can evict them from the cache and refetch them again on
demand. for pop3 mailbox, which doesnt provide fetch routine,
the messages should never be put on the freelist.

5 years agoupas/fs: include mkupas in mkfile last to get default target
cinap_lenrek [Wed, 2 Jan 2019 09:22:27 +0000 (10:22 +0100)]
upas/fs: include mkupas in mkfile last to get default target

5 years agoupas/fs: fix infinite loop in putcache (again)
Alex Musolino [Sun, 30 Dec 2018 13:30:09 +0000 (00:00 +1030)]
upas/fs: fix infinite loop in putcache (again)

The previous attempt to fix this problem (see changesets b32199e0f90a
and 00ae79a6ba50) caused all calls to cachefree to free the cached
message contents in addition to updating the LRU list.  This causes
problems for the POP3 driver since it provides no fetch function; once
a message is evicted from the LRU cache, its contents is lost.

This time we fix cachefree to always update the LRU list but only free
the cached message contents if the driver provides a fetch function or
the force flag is set.

5 years agorsa(8): add example for tinc(8) (thanks k0ga, qwx)
cinap_lenrek [Fri, 28 Dec 2018 10:46:15 +0000 (11:46 +0100)]
rsa(8): add example for tinc(8) (thanks k0ga, qwx)

5 years agodtracy: fix conditional branch generation
aiju [Fri, 28 Dec 2018 10:26:25 +0000 (10:26 +0000)]
dtracy: fix conditional branch generation

5 years agoremove function prototype that leaked into last commit
BurnZeZ [Wed, 26 Dec 2018 04:51:35 +0000 (04:51 +0000)]
remove function prototype that leaked into last commit

5 years agotcs: clean up old port code, and avoid writing 0 to stdout
BurnZeZ [Wed, 26 Dec 2018 04:47:22 +0000 (04:47 +0000)]
tcs: clean up old port code, and avoid writing 0 to stdout

5 years agomk: fix closing random fd from uninitialized stack variable (thanks BurnZeZ, mycroftiv)
cinap_lenrek [Wed, 26 Dec 2018 04:04:56 +0000 (05:04 +0100)]
mk: fix closing random fd from uninitialized stack variable (thanks BurnZeZ, mycroftiv)

mycroftiv → this is practically "500 mile email" territory - the "6 letter mk bug"

5 years agonusb/disk: revert previous attempts and just not issue capacity command when theres...
cinap_lenrek [Mon, 24 Dec 2018 18:06:01 +0000 (19:06 +0100)]
nusb/disk: revert previous attempts and just not issue capacity command when theres no media present

5 years agoMake the check work.
Ori Bernstein [Mon, 24 Dec 2018 07:10:42 +0000 (23:10 -0800)]
Make the check work.

Embarrassing.

5 years agonusb/disk: implement 64 bit lba read/write commands (16 byte commands)
cinap_lenrek [Mon, 24 Dec 2018 04:10:43 +0000 (05:10 +0100)]
nusb/disk: implement 64 bit lba read/write commands (16 byte commands)

untested.

5 years agonusb/disk: fix typo "("
cinap_lenrek [Mon, 24 Dec 2018 04:05:41 +0000 (05:05 +0100)]
nusb/disk: fix typo "("

5 years agoDon't unnecessarily unstall devices.
Ori Bernstein [Mon, 24 Dec 2018 03:44:58 +0000 (19:44 -0800)]
Don't unnecessarily unstall devices.

Some SD card readers are slow to unstall. We try to unstall them
in a loop if there's no SD card in there, but they're not stalled.
They're happily reporting that there's no SD card in them by giving
back the appropriate error code.

Skipping the unstall speeds up the retry loop, cutting the time spent
attaching the USB device at boot from multiple minutes to nearly instant.