Changes to usb/serial: how to distinguish between old and new interfaces in 8-STABLE and 9-CURRENT branches?
Hello, Freebsd-usb. I'm author of `comms/umcs7840' port, which is module for usbcom, like `uftdi' and `uplcom' in base system. Last changes, committed to 8-STABLE (and, earlier to HEAD), breaks some API/ABI for such modules. I have tow questions: (1) How could I detect which version have user at compile time? I don't use any autoconf/automake framework, my build framework is baed on FreeBSD-native bsd.*.mk framework, so I need some define or something like this to distinguish these versions. I could not find anything suitable in revision 221612 commit. (2) WHY, OR WHY old module was loaded without problems?! ABI is broken (ucom_detach()? size of struct ucom_softc) and old module should complain on load, IMHO! Users will be very surprised when computer will reboot after system update! -- // Black Lion AKA Lev Serebryakov ___ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"
usb/157474: svn revisions 221612 (for stable/8) and 214831/214761 (for head) breaks API/ABI without any notice.
>Number: 157474 >Category: usb >Synopsis: svn revisions 221612 (for stable/8) and 214831/214761 (for >head) breaks API/ABI without any notice. >Confidential: no >Severity: critical >Priority: high >Responsible:freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue May 31 20:40:09 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Lev A. Serebryakov >Release:FreeBSD 8.2-STABLE amd64 >Organization: >Environment: System: FreeBSD blob.home.serebryakov.spb.ru 8.2-STABLE FreeBSD 8.2-STABLE #17: Tue May 31 22:07:48 MSD 2011 l...@blob.home.serebryakov.spb.ru:/usr/obj/usr/src/sys/BLOB amd64 >Description: Revisions 214831 and 214761 (in HEAD), MFCed as 221612 into stable/8, change number of function arguments and size of sttructures, used by 3rd party USB2COM modules, without bumping OSVERSION. As result, old 3rd party modules (like umcs7840) could be (and will be) loaded which leads to almost immedate kernel panic. Other porblem is, that there is no way for modules authors to distingusih old and new API in sources. >How-To-Repeat: Upgrade system without recompiling `comms/umcs7840' module, reboot. >Fix: I don't know. Bump OSVERSION, maybe? >Release-Note: >Audit-Trail: >Unformatted: ___ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"
Re: Changes to usb/serial: how to distinguish between old and new interfaces in 8-STABLE and 9-CURRENT branches?
Lev Serebryakov wrote: > Last changes, committed to 8-STABLE ... breaks some API/ABI ... AFAIK, changes that break API/ABI are not supposed to be MFCd. Perhaps that one needs to be backed out of 8-STABLE? ___ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"
Re: Changes to usb/serial: how to distinguish between old and new interfaces in 8-STABLE and 9-CURRENT branches?
Hello, Perryh. You wrote 1 июня 2011 г., 2:19:19: >> Last changes, committed to 8-STABLE ... breaks some API/ABI ... > AFAIK, changes that break API/ABI are not supposed to be MFCd. > Perhaps that one needs to be backed out of 8-STABLE? I'm not sure, is this applicable to ABI for kernel modules, which are recommended to be in sync with kernel in any case. And even if they will be backed out from 8-STABLE, there will be problem to distinguish between tow versions of ABI on HEAD in any case. Many ABI changes leads to bumping OSVERSION, but not this one (I've checked appropriate HEAD commits). Other problem is, that old modules still can be loaded in new kernel, and AFAIK, here is some mechanism to prevent it, like OSVERSION too. -- // Black Lion AKA Lev Serebryakov ___ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"
Re: usb/157474: svn revisions 221612 (for stable/8) and 214831/214761 (for head) breaks API/ABI without any notice.
Synopsis: svn revisions 221612 (for stable/8) and 214831/214761 (for head) breaks API/ABI without any notice. Responsible-Changed-From-To: freebsd-usb->n_hibma Responsible-Changed-By: linimon Responsible-Changed-When: Wed Jun 1 01:26:20 UTC 2011 Responsible-Changed-Why: Over to committer of MFC in question. http://www.freebsd.org/cgi/query-pr.cgi?pr=157474 ___ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"
Re: Changes to usb/serial: how to distinguish between old and new interfaces in 8-STABLE and 9-CURRENT branches?
Lev, ABI's change. You need to use __FreeBSD_version. See /usr/include/osreldate.h. But could we include the driver in the kernel? That way it would be updated when needed. Nick Hibma n...@van-laarhoven.org Want to feel like going on a holiday tomorrow? Try GTD. On 31 May 2011, at 22:12, Lev Serebryakov wrote: > Hello, Freebsd-usb. > > I'm author of `comms/umcs7840' port, which is module for usbcom, > like `uftdi' and `uplcom' in base system. > > Last changes, committed to 8-STABLE (and, earlier to HEAD), breaks > some API/ABI for such modules. > > I have tow questions: > > (1) How could I detect which version have user at compile time? I > don't use any autoconf/automake framework, my build framework is baed > on FreeBSD-native bsd.*.mk framework, so I need some define or > something like this to distinguish these versions. I could not find > anything suitable in revision 221612 commit. > > (2) WHY, OR WHY old module was loaded without problems?! ABI is > broken (ucom_detach()? size of struct ucom_softc) and old module > should complain on load, IMHO! Users will be very surprised when > computer will reboot after system update! > > -- > // Black Lion AKA Lev Serebryakov > ___ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"