Forgot your password?
typodupeerror
Operating Systems Upgrades Linux

Linux 3.13 Released 141

Posted by timothy
from the lucky-numbers dept.
diegocg writes "Linux kernel 3.13 has been released. This release includes nftables (the successor of iptables); a revamp of the block layer designed for high-performance SSDs; a framework to cap power consumption in Intel RAPL devices; improved squashfs performance; AMD Radeon power management enabled by default and automatic AMD Radeon GPU switching; improved NUMA and hugepage performance; TCP Fast Open enabled by default; support for NFC payments; support for the High-Availability Seamless Redundancy protocol; new drivers; and many other small improvements. Here's the full list of changes."
This discussion has been archived. No new comments can be posted.

Linux 3.13 Released

Comments Filter:
  • nftables (Score:2, Interesting)

    by Anonymous Coward

    There's a compatibility wrapper, right? Right? Because nftables is an awful terrible complicated pile of needless complexity. It should be possible to set up a simple deny-inbound firewall ruleset in just a few lines, or..........I'm just not going to upgrade! Yeah. That's the idea.

    • Re:nftables (Score:5, Informative)

      by Anonymous Coward on Monday January 20, 2014 @07:13AM (#46012095)

      Yes, there is. [netfilter.org]

      The nftables project provides a backward compatibility layer that allows you run iptables/ip6tables (using the same syntax) over the nftables infrastructure:

      • ...
      • iptables-nftables: the user-space utility that provides the xtables command line utility to add rule using {ip,ip6}tables syntax.
  • by StripedCow (776465) on Monday January 20, 2014 @06:54AM (#46012021)

    This release includes nftables (the successor of iptables)

    Why does every network management tool include their own ugly, broken little programming language for configuring it?

    Why not just use an existing language?

    Like, when I get a packet from the network, I can just use Python:

    if packet.origin == "127.0.0.1":
        packet.drop()
    elif packet.port == 80:
        packet.forward(port = 1024)

    etcetera.

    • by jones_supa (887896) on Monday January 20, 2014 @07:00AM (#46012041)
      Probably because of the extremely high performance requirements. There's a lot of packets going through a 10Gbit interface and if you run some Python code for each of them you're gonna choke the machine.
      • by cupantae (1304123) <maroneill@nOspaM.gmail.com> on Monday January 20, 2014 @07:09AM (#46012083)

        I think the real question (and possibly what StripedCow was asking) is why not use the syntax of existing languages, to make it easier to learn and read?

        • If you support all the syntax of the language (so python in this case) people are going to expect to be able to interpret/run arbitrary python statements:

          if packet.port in [80,443,8080]:
          packet.forward(port = 1024)

          Without the same semantics looking the same isn't going to be enough. It is also true that the language syntax can let you arrange for certain conditions to always hold which allows simpler backend rules to be generated (e.g. in the original example the first comparison was against an IP ad

        • by drinkypoo (153816)

          I think the real question (and possibly what StripedCow was asking) is why not use the syntax of existing languages, to make it easier to learn and read?

          Because it would do neither. It would turn one-liners into many-liners, which would add complexity that would only ultimately be confusing.

          • by Nerdfest (867930)

            More lines does not neccessarily mean more complexity.

            • by drinkypoo (153816)

              More lines does not neccessarily mean more complexity.

              And breaking the output up into more lines and adding a bunch of characters and bullshit around it doesn't make it more understandable. If you're having problems understanding the rules, use a tool that makes the job simpler, like fwbuilder.

              • by Nerdfest (867930)

                It most definitely can make it more readable in many cases. Have you ever tried to debug Perl written by an 'expert'. The rules are all there, but the meaning is quite obsfuscated. Breaking it up and adding characters helps a lot. I'm not saying it would definitely herlp here as I don't know the new syntax, but it's quite conceivable.

                • by drinkypoo (153816)

                  It most definitely can make it more readable in many cases. Have you ever tried to debug Perl written by an 'expert'. The rules are all there, but the meaning is quite obsfuscated.

                  That's not the case in firewall rules, where the rules are strict. The problem with perl is that the rules are loose, which is good for bashing out some code but bad for readability. We don't have that problem here. With firewall rules, the only problem is in understanding them. With perl, you also have the problem of distinguishing code from random keyboard-smashing or typos.

        • by epyT-R (613989)

          You would need to port the python interpreter to whatever VM instruction set is used. Good luck with that.

      • Probably because of the extremely high performance requirements. There's a lot of packets going through a 10Gbit interface and if you run some Python code for each of them you're gonna choke the machine.

        That would be true if it were impossible to compile Python code to something efficient.

        And the style of code used above (and typical network configuration scripts) would compile to something very efficient. In fact, a compiler can compile that code to the current configuration language whenever possible.

        • by Nerdfest (867930) on Monday January 20, 2014 @07:18AM (#46012115)

          Which means that you could proibably come up with something to do this yourself. I'm sure quite a few people would be interested in it.

        • by RabidReindeer (2625839) on Monday January 20, 2014 @08:05AM (#46012333)

          Probably because of the extremely high performance requirements. There's a lot of packets going through a 10Gbit interface and if you run some Python code for each of them you're gonna choke the machine.

          That would be true if it were impossible to compile Python code to something efficient.

          And the style of code used above (and typical network configuration scripts) would compile to something very efficient. In fact, a compiler can compile that code to the current configuration language whenever possible.

          Systems like IPTABLES are based on declarative syntax. When you "program" by declaration, you are working with a limited syntax to perform limited functions. That also limits your flexibility, but the tradeoff is that the functions that you can do are so well-defined that you can be assured that anything you compile will operate in a way that minimizes surprises. It also means that you can optimize things more precisely because you don't have to support many possibilities, only a few. The #1 feature of declarative programming is that you don't have lots of loops and decisions to debug. Or optimize.

          The "tables" part of IPTABLES also contributes to that functionality. There are a limited set of table types pre-defined with specific uses. By compiling the rules into tables, very efficient processing can be done. After all, optimized table handling is one of the oldest and most intensively-studied disciplines of Computer Science.

          Even IPTABLES wasn't totally restricted to table-driven functions, though. As an extendable architecture, if you really wanted to, you could define your own abilities to the system, including modules incorporating user-written code. It's just that they had pre-defined and fine-tuned the most commonly-used features.

          • by Mohan S (991050)
            For iptables, there is a preprocessor called Shorewall writen by Tom Eastap. Wonderful thing that is maintained pretty well. Such preprocessors makes life easy. This discussion for easier syntax via intepreters is like the classic debate between high level GUI and commandline. Learning commandline lets one appreciate the innards enough to us the utility well enough while GUI would present most common options.
        • "That would be true if it were impossible to compile Python code to something efficient."

          You can't compile without a compiler. Your now amended proposal is to create or fork a non-standards compliant Python compiler (You don't realize that that is your proposal, because you think "Gosh ... they already gots 'em", but read the last couple of lines at the end to see how to determine why you once again don't understand).

          I'm going to go out on a limb and say that you have little or no experience designing rea

      • by gbjbaanb (229885)

        phew. thank goodness we only have a VM interpreter instead!

        "nftables kernel engine adds a simple virtual machine into the Linux kernel, which is able to execute bytecode to inspect a network packet "

        I assume its using Java bytecode?

        • by Anonymous Coward

          No, it's a different bytecode. Very simple with a register based VM. http://www.tcpdump.org/papers/bpf-usenix93.pdf

      • by smash (1351)
        Because doing JIT compilation of the configuration file when loaded would be too fucking difficult? Config file format and internal memory structure doesn't/shouldn't have anything to do with each other.
      • Probably because of the extremely high performance requirements. There's a lot of packets going through a 10Gbit interface and if you run some Python code for each of them you're gonna choke the machine.

        This does not seem to be an argument. Any language (maybe with some restriction) could be compiled to the appropriate byte code/assembly.

        • Not necessarily. As another comment above pointed, if you want to interpret Python-like code, you will end up with a Python-like interpreter, with similar performance challenges like the original Python interpreter, just due to the semantics of the language. Of course, for sole networking purposes we could probably simplify things so that we can end up with fast machine language code. Another question is whether network administrators really want to compile their rules every time they change them.
          • On the same note, let me add that I would love to see a real Python compiler for ordinary applications too. People have been saying that it's impossible to make a real compiler for the language due to some specific dynamic constructs it has. So you can make an .EXE of your app but you end up wrapping the interpreter there inside. A version of the language without these dynamic constructs, let's call it NativePython, with real compiler, would be quite interesting.
          • by crutchy (1949900)

            whether network administrators really want to compile their rules every time they change them

            not really necessary since usually you have to perform some kind of action to implement changes (such as executing a bash script) it would make sense to recompile the rule script when performing a flush command (such as equivalent of iptables -F) or restarting the firewall (akin to apache2ctl restart)

            compiling would seem like a sensible idea even for the existing simplified syntax, since interpreting any script is much slower than executing compiled machine code

            • compiling would seem like a sensible idea even for the existing simplified syntax, since interpreting any script is much slower than executing compiled machine code

              I'm quite sure the rules in the current system are stored in binary values in the kernel rather than in the script format which loads them.

    • Performance. On a firewall/filter for a major network there could be millions of packets per second. On a smaller scale routers running linux often use very low-power and thus low-performance hardware while still handling gigabit interfaces. No cycles to spare for running an interpreter or even parsing complex rules with variable-length fields.

      • by Anonymous Coward

        No cycles to spare for running an interpreter

        " nftables kernel engine adds a simple virtual machine into the Linux kernel, which is able to execute bytecode to inspect a network packet "

        Wait, what, you didn't want an interpreter in your kernel?! TOO LATE.

        • by arielCo (995647) on Monday January 20, 2014 @07:33AM (#46012181)

          It's faster than the scanned rule lists in iptables, and the remaining alternative is compiling to native code into a module every time you change a rule.

          I know that seeing "bloat" everywhere and griping is an honored /. tradition, but someone has to add a dash of reality.

          • by Megol (3135005)
            Compiling to native code needn't be expensive nor complex. I guess an interpreter better fits the Unix model though, analogous with the preference of semi-readable text to binary formats+editor for configuration files.

            But to continue the basic argument: having support for native code generation could speed up many other operating system tasks that either use other interpreters (there are more of that than one could think) or cases where specialized code could be faster. Doing an infrastructure for somethi

        • No cycles to spare for running an interpreter

          " nftables kernel engine adds a simple virtual machine into the Linux kernel, which is able to execute bytecode to inspect a network packet "

          Wait, what, you didn't want an interpreter in your kernel?! TOO LATE.

          There's likely more than one already.

          Some interpreters can be extremely efficient. The threaded-code interpreter used by the original FORTH language, for example.

          • by Shimbo (100005)

            There's likely more than one already.

            bpf has used one for twenty years or so; not sure when that got merged in the Linux kernel.

    • by upuv (1201447) on Monday January 20, 2014 @07:06AM (#46012067) Journal

      The problem is overheads and security.

      Embedding a language at such a low level is very tricky. It has to be blinding fast and user very very little resources. python, perl, ruby are all great languages. but ill suited for the task of network management tasks. The RAM overheads are huge. This is why we are seeing a relatively constant evolution, change of embedded languages at these low levels. This is a game of resource management on the host system.

      Just imagine if this host was a web server. With thousands of socket requests per second. How would Python manage to keep up with that. Without crushing the system under load even before the traffic was passed off to a process like Ngynx to handle. Python would be a performance nightmare at this level.

      Another way to look at this is. What if you hammered the system with a DOS style attack. If each request had to go through a python execution stack you are basically making the system far more vulnerable to DOS than it ever was before.

      Now lets look at topics around these highly extensible languages. Here you have a system that in part is supposed to improve security. But by adding in a language like python you are adding in a very extensible lnaguage at a very low level. A kernel level to be precise. So higher than root. The security implications are enormous. You are basically exposing the kernel to a far higher risk. This would be a hackers dream come true.

      So there are reason for these language syntax choices. They must be managed very carefully.

      • Embedding a language at such a low level is very tricky.

        Nobody said kernel development would be easy :)

        Now lets look at topics around these highly extensible languages. Here you have a system that in part is supposed to improve security. But by adding in a language like python you are adding in a very extensible lnaguage at a very low level.

        You could run it all inside a sandbox, I suppose.

        • by upuv (1201447)

          A firewall in a sandbox?

          Do you see the issue here?

          Sandboxes are good for consuming applications. The firewall is not a consumer. It's a part of the command and control chain. It's a the heart of the system. Sandboxing the kernel is self defeating. As it's the kernel and everything spawns from it. So you can't really protect your child processes if your kernel is compromised.

          • My idea was that the firewall merely invokes the sandbox. It is not running inside the sandbox...

      • by snizzitch (976516)
        You should use Javascript.
    • Why does every network management tool include their own ugly, broken little programming language for configuring it?

      Why not just use an existing language?
      Like, when I get a packet from the network, I can just use Python:

      You could use Python:
      You need to write your own interpreter which takes scripts written in your special subset of python, and compile them into the special bytecode that the NFTable kernel interface uses.

      The thing is, the internal representation of NFTables needs to be highly efficient (as explained by other posts here) and very likely the official NFTable bytecode isn't really feature complete or maybe not even turing-complete.
      The current special language will map nicely to it. But you will probably need a

    • Why does every network management tool include their own ugly, broken little programming language for configuring it?

      Why not just use an existing language?

      The better solution is to fix the DSL, rather than introducing a general-purpose language.

      Domain Specific Languages are really good at making code simpler, more concise and less redundant, but their most important feature is reducing bugs. A DSL can use primitives which have the possible error-modes built in; a general-purpose language would have to build that in a separate library layer, but the problems with that are 1) the general-purpose stuff is still available, which won't catch your errors 2) a decen

    • by Ash Vince (602485) *

      This release includes nftables (the successor of iptables)

      Why does every network management tool include their own ugly, broken little programming language for configuring it?

      Why not just use an existing language?

      Like, when I get a packet from the network, I can just use Python:

      if packet.origin == "127.0.0.1":

      packet.drop()
      elif packet.port == 80:

      packet.forward(port = 1024)

      etcetera.

      The only way this could work and maintain the performance needed would be if you could write a parser that took your python code (that needed some sort of python parser to run) and converted it into a set of native nftables rules or bytecode that was efficient enough to be run at the kernel level as everyone else has described. This might actually be worth someone doing though.

      I haven't played around with nftables yet but I am very familiar with ip tables (and chains) so I will just take a set of iptables r

      • by Chemisor (97276)

        Because python is twice the size of the entire kernel and all its modules. In the kernel efficiency matters.

    • Because a general purpose language is a bit like using a sledgehammer to open a walnut. You can do it, but there's better options.

      Python / Javascript / LUA and other script languages don't have the performance needed and are needlessly more complicated than requirements.

      The developers can create their own mini language which is fit for purpose and can be expressed in 10s - 100s of lines of EBNF. That can be fed into standard tools and a bunch of c++ code pops out the other end which can be used to compile o

    • Because compiler compilers exist and you could roll your own compiler that turns Pythonesque commands into proper nftables rules if you really wished to.

    • by unixisc (2429386)

      How does Python recognize the differences in example b/w IPv4 and IPv6? Like in your example, will

      if packet.origin == "[::1]"

      be automatically recognized as IPv6, or will it choke seeing it?

    • Your problem is that you think you are using 4 lines of code when in fact you are using thousands. In order to run Python you need a Python Interpreter. That means adding a HUGE amount of code which is not even fine tuned for the task. In other words, you wouldn't do that because you don't want a Python interpreter in kernel space for about 20 different excellent reasons including ridiculously high overhead and storage requirments.
  • Automatic GPU switching

    Linux 3.12 added infrastructure support for automatic GPU switching in laptops with dual GPUs. This release adds support for this feature in AMD Radeon hardware.

    (It already "works" but plug/unplug needs a lot of manual fucking around.

    Or does it need more work in X?

  • I am a bit astounded. Why would you want to compile that into an OS kernel ?? Please enlighten me.
    • misnomer perhaps? (Score:3, Informative)

      by rewindustry (3401253)

      nfc is a comms protocol, like bluetooth or ethernet, very timing sensitive, therefore best implemented on the kernel level. nfc is often used for payment systems, hen ce the conflation. am assuming - have no specific details.

    • by Anonymous Coward on Monday January 20, 2014 @07:56AM (#46012291)

      Well, if you care to stop throwing peanuts from the gallery long enough to read about it, the patch adds driver support for interacting with a "secure element" embedded environment on the NFC hardware, from userspace, via a Netlink API. It's bascially passthrough from user space to the hardware.

    • by Anonymous Coward

      From the newbies article:

      https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=5ce3f32b5264b337bfd13a780452a17705307725

      NFC: netlink: SE API implementation
      Implementation of the NFC_CMD_SE_IO command for sending ISO7816 APDUs to NFC embedded secure elements. The reply is forwarded to user space through NFC_CMD_SE_IO as well.

      Userland needs an API to talk to crypto chips

    • by ketomax (2859503)
      Hah, still behind windows! For years, I have been using NFC to deploy my frontpage based website through FTP.
    • by Zocalo (252965)
      I'm guessing NFC is not too dissimilar to a network interface, so why wouldn't it be in the kernel? I would assume that it compiles to a module by default, but could also be compiled directly into a stripped down kernel for a dedicated use installation, so it's not likely to be using resources unless needed.
    • Re: (Score:1, Funny)

      by Anonymous Coward

      the kernel is adopting a pay-by-nfc development model in which linus will sell the kernel kernel from a street corner stand somewhere using NFC as payment. these funds will be used to further the development of linux.

      in addition to receiving the linux kernel on a floppy disk (in order to remain competitive with bsd), you also get obscenities hurled at you when you question the form of payment or why you receive a floppy disk.

      luckily the obscenities come at no extra charge.

      • Why are good trolls like this one kept modded -1 ?

    • by FalcDot (1224920) on Monday January 20, 2014 @09:15AM (#46012863)

      From TFA:

      "This release implements support for the Secure Element. A netlink API is available to enable, disable and discover NFC attached (embedded or UICC ones) secure elements. With some userspace help, this allows to support NFC payments, used to implement financial transactions. Only the pn544 driver currently supports this API."

      In other words, the kernel now contains the necessary API so the PC can correctly talk to a NFC Secure Element which is needed to be able to make payments over NFC, in tandem with userspace tools.

      So yeah, the label is a bit misleading...

  • Just my luck... (Score:2, Interesting)

    by Anonymous Coward

    I FINNALY managed to wrap my head around how iptables work... Oh well, hopefully the new one will be easier.

    • Re: (Score:2, Troll)

      by smash (1351)

      #justusepfinstead

      Seriously.

    • by upuv (1201447)

      I'm with you on that one. I have to re-teach myself iptables each time I have to setup a configuration.

      • by diegocg (1680514)

        Fortunately the syntax for the new nft utility seems to be easier to understand http://kernelnewbies.org/nftables_examples [kernelnewbies.org]

        • Fortunately the syntax for the new nft utility seems to be easier to understand...

          Compared to what? Learning Japanese using Russian textbooks?

          You want easy-to-understand, look at IPFW or PF. Those read like actual English sentences, not gibberish like iptables/nftables.

          About the only good thing nftables does is enforce the ordering of rules elements so that everyone's rules will be written the same; and finally get rid --of --that --annoying --CLI --syntax --that --iptables --uses.

          Here's hoping the devs a

  • I have one computer where it will not boot into graphics mode ever since the 3.10 kernel. When it switches over you just get a black screen; however, the machine still boots because I can ssh into it. A couple of other machines I upgraded don't have this problem. While looking for an answer, I've found this seems to be an issue across many distributions (Ubuntu variants, Fedora variants). Some people said they solved it by adding some kernel boot parameters, some say it is related to the Intel graphics
  • Where security is concerned I don't want New And Shiny, I want Old And Tested. I'll stick with iptables.

Chairman of the Bored.

Working...