No description
  • C 98.2%
  • Assembly 1%
  • Makefile 0.3%
  • Shell 0.2%
  • Python 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Alistair Delva 5bf1faa2e0 ANDROID: virtio-net: Skip set_features on non-cvq devices
On devices without control virtqueue support, such as the virtio_net
implementation in crosvm[1], attempting to configure LRO will panic the
kernel:

kernel BUG at drivers/net/virtio_net.c:1591!
invalid opcode: 0000 [#1] PREEMPT SMP PTI
CPU: 1 PID: 483 Comm: Binder:330_1 Not tainted 5.4.5-01326-g19463e9acaac #1
Hardware name: ChromiumOS crosvm, BIOS 0
RIP: 0010:virtnet_send_command+0x15d/0x170 [virtio_net]
Code: d8 00 00 00 80 78 02 00 0f 94 c0 65 48 8b 0c 25 28 00 00 00 48 3b 4c 24 70 75 11 48 8d 65 d8 5b 41 5c 41 5d 41 5e 41 5f 5d c3 <0f> 0b e8 ec a4 12 c8 66 90 66 2e 0f 1f 84 00 00 00 00 00 55 48 89
RSP: 0018:ffffb97940e7bb50 EFLAGS: 00010246
RAX: ffffffffc0596020 RBX: ffffa0e1fc8ea840 RCX: 0000000000000017
RDX: ffffffffc0596110 RSI: 0000000000000011 RDI: 000000000000000d
RBP: ffffb97940e7bbf8 R08: ffffa0e1fc8ea0b0 R09: ffffa0e1fc8ea0b0
R10: ffffffffffffffff R11: ffffffffc0590940 R12: 0000000000000005
R13: ffffa0e1ffad2c00 R14: ffffb97940e7bc08 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffffa0e1fd100000(006b) knlGS:00000000e5ef7494
CS:  0010 DS: 002b ES: 002b CR0: 0000000080050033
CR2: 00000000e5eeb82c CR3: 0000000079b06001 CR4: 0000000000360ee0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 ? preempt_count_add+0x58/0xb0
 ? _raw_spin_lock_irqsave+0x36/0x70
 ? _raw_spin_unlock_irqrestore+0x1a/0x40
 ? __wake_up+0x70/0x190
 virtnet_set_features+0x90/0xf0 [virtio_net]
 __netdev_update_features+0x271/0x980
 ? nlmsg_notify+0x5b/0xa0
 dev_disable_lro+0x2b/0x190
 ? inet_netconf_notify_devconf+0xe2/0x120
 devinet_sysctl_forward+0x176/0x1e0
 proc_sys_call_handler+0x1f0/0x250
 proc_sys_write+0xf/0x20
 __vfs_write+0x3e/0x190
 ? __sb_start_write+0x6d/0xd0
 vfs_write+0xd3/0x190
 ksys_write+0x68/0xd0
 __ia32_sys_write+0x14/0x20
 do_fast_syscall_32+0x86/0xe0
 entry_SYSENTER_compat+0x7c/0x8e

This happens because virtio_set_features() does not check the presence
of the control virtqueue feature, which is sanity checked by a BUG_ON
in virtnet_send_command().

Fix this by skipping any feature processing if the control virtqueue is
missing. This should be OK for any future feature that is added, as
presumably all of them would require control virtqueue support to notify
the endpoint that offload etc. should begin.

[1] https://chromium.googlesource.com/chromiumos/platform/crosvm/

Fixes: a02e8964ea ("virtio-net: ethtool configurable LRO")
Signed-off-by: Alistair Delva <adelva@google.com>
Bug: 146571786
Test: netd_integration_test32
Change-Id: Ie5f1d372479ffce63c8bfc62cb4d8ef88e7540b4
Link: https://lore.kernel.org/lkml/20191220212207.76726-1-adelva@google.com/
Signed-off-by: Alistair Delva <adelva@google.com>
2020-01-22 20:24:13 +00:00
arch ANDROID: x86: gki_defconfig: enable LTO and CFI 2020-01-21 09:21:41 -08:00
block ANDROID: block: add KSM op to derive software secret from wrapped key 2020-01-22 04:31:52 +00:00
certs PKCS#7: Refactor verify_pkcs7_signature() 2019-08-05 18:40:18 -04:00
crypto crypto: algif_skcipher - Use chunksize instead of blocksize 2020-01-17 19:48:46 +01:00
Documentation This is the 5.4.13 stable release 2020-01-17 23:38:39 +01:00
drivers ANDROID: virtio-net: Skip set_features on non-cvq devices 2020-01-22 20:24:13 +00:00
fs ANDROID: fscrypt: add support for hardware-wrapped keys 2020-01-22 04:32:01 +00:00
include ANDROID: fscrypt: add support for hardware-wrapped keys 2020-01-22 04:32:01 +00:00
init ANDROID: Kconfig.gki: Add QCOM_SCM to QCOM Hidden configs 2020-01-11 00:39:12 +00:00
ipc Merge 5.4-rc1-prelrease into android-mainline 2019-10-02 17:58:47 +02:00
kernel This is the 5.4.13 stable release 2020-01-17 23:38:39 +01:00
lib FROMLIST: lib/list_sort: fix function type mismatches 2020-01-15 20:49:27 +00:00
LICENSES
mm This is the 5.4.13 stable release 2020-01-17 23:38:39 +01:00
net This is the 5.4.13 stable release 2020-01-17 23:38:39 +01:00
samples samples: bpf: fix syscall_tp due to unused syscall 2020-01-12 12:21:26 +01:00
scripts This is the 5.4.13 stable release 2020-01-17 23:38:39 +01:00
security This is the 5.4.13 stable release 2020-01-17 23:38:39 +01:00
sound This is the 5.4.13 stable release 2020-01-17 23:38:39 +01:00
tools rseq/selftests: Turn off timeout setting 2020-01-17 19:49:04 +01:00
usr gen_initramfs_list.sh: fix 'bad variable name' error 2020-01-09 10:20:00 +01:00
virt KVM: arm/arm64: Properly handle faulting of device mappings 2019-12-31 16:46:24 +01:00
.clang-format clang-format: Update with the latest for_each macro list 2019-08-31 10:00:51 +02:00
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore Revert "ANDROID: Revert "Merge tag 'modules-for-v5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux"" 2019-11-13 10:14:45 +00:00
.mailmap ARM: SoC fixes 2019-11-10 13:41:59 -08:00
abi_gki_aarch64.xml ANDROID: block: provide key size as input to inline crypto APIs 2020-01-22 04:31:41 +00:00
abi_gki_aarch64_whitelist ANDROID: update ABI whitelist 2020-01-16 13:06:58 -08:00
build.config.aarch64 ANDROID: refactor build.config files to remove duplication 2019-08-30 14:55:29 +01:00
build.config.allmodconfig ANDROID: Don't base allmodconfig on gki_defconfig 2019-12-05 13:18:31 +00:00
build.config.allmodconfig.aarch64 ANDROID: create build.configs for allmodconfig 2019-09-04 15:49:40 +00:00
build.config.allmodconfig.x86_64 ANDROID: create build.configs for allmodconfig 2019-09-04 15:49:40 +00:00
build.config.common ANDROID: clang: update to 10.0.1 2019-11-27 12:49:08 -08:00
build.config.cuttlefish.aarch64 ANDROID: build config for cuttlefish ramdisk 2020-01-22 00:09:05 +00:00
build.config.cuttlefish.x86_64 ANDROID: build config for cuttlefish ramdisk 2020-01-22 00:09:05 +00:00
build.config.db845c ANDROID: db845c: Add build config 2020-01-15 21:13:30 +00:00
build.config.gki ANDROID: refactor build.config files to remove duplication 2019-08-30 14:55:29 +01:00
build.config.gki.aarch64 ANDROID: add initial ABI whitelist for android-5.4 2019-12-18 10:56:40 +00:00
build.config.gki.x86_64 ANDROID: refactor build.config files to remove duplication 2019-08-30 14:55:29 +01:00
build.config.x86_64 ANDROID: refactor build.config files to remove duplication 2019-08-30 14:55:29 +01:00
COPYING
CREDITS MAINTAINERS: Remove Simon as Renesas SoC Co-Maintainer 2019-10-10 08:12:51 -07:00
cuttlefish.fragment ANDROID: build config for cuttlefish ramdisk 2020-01-22 00:09:05 +00:00
Kbuild kbuild: do not descend to ./Kbuild when cleaning 2019-08-21 21:03:58 +09:00
Kconfig docs: kbuild: convert docs to ReST and rename to *.rst 2019-06-14 14:21:21 -06:00
MAINTAINERS MAINTAINERS: Append missed file to the database 2020-01-17 19:48:28 +01:00
Makefile This is the 5.4.13 stable release 2020-01-17 23:38:39 +01:00
README
README.md ANDROID: Fix typo for FROMLIST: section 2019-10-29 20:31:07 +00:00

How do I submit patches to Android Common Kernels

  1. BEST: Make all of your changes to upstream Linux. If appropriate, backport to the stable releases. These patches will be merged automatically in the corresponding common kernels. If the patch is already in upstream Linux, post a backport of the patch that conforms to the patch requirements below.

  2. LESS GOOD: Develop your patches out-of-tree (from an upstream Linux point-of-view). Unless these are fixing an Android-specific bug, these are very unlikely to be accepted unless they have been coordinated with kernel-team@android.com. If you want to proceed, post a patch that conforms to the patch requirements below.

Common Kernel patch requirements

  • All patches must conform to the Linux kernel coding standards and pass script/checkpatch.pl
  • Patches shall not break gki_defconfig or allmodconfig builds for arm, arm64, x86, x86_64 architectures (see https://source.android.com/setup/build/building-kernels)
  • If the patch is not merged from an upstream branch, the subject must be tagged with the type of patch: UPSTREAM:, BACKPORT:, FROMGIT:, FROMLIST:, or ANDROID:.
  • All patches must have a Change-Id: tag (see https://gerrit-review.googlesource.com/Documentation/user-changeid.html)
  • If an Android bug has been assigned, there must be a Bug: tag.
  • All patches must have a Signed-off-by: tag by the author and the submitter

Additional requirements are listed below based on patch type

Requirements for backports from mainline Linux: UPSTREAM:, BACKPORT:

  • If the patch is a cherry-pick from Linux mainline with no changes at all
    • tag the patch subject with UPSTREAM:.
    • add upstream commit information with a (cherry-picked from ...) line
    • Example:
      • if the upstream commit message is
        important patch from upstream

        This is the detailed description of the important patch

        Signed-off-by: Fred Jones <fred.jones@foo.org>
    - then Joe Smith would upload the patch for the common kernel as
        UPSTREAM: important patch from upstream

        This is the detailed description of the important patch

        Signed-off-by: Fred Jones <fred.jones@foo.org>

        Bug: 135791357
        Change-Id: I4caaaa566ea080fa148c5e768bb1a0b6f7201c01
        (cherry-picked from c31e73121f4c1ec41143423ac6ce3ce6dafdcec1)
        Signed-off-by: Joe Smith <joe.smith@foo.org>
  • If the patch requires any changes from the upstream version, tag the patch with BACKPORT: instead of UPSTREAM:.
    • use the same tags as UPSTREAM:
    • add comments about the changes under the (cherry-picked from ...) line
    • Example:
        BACKPORT: important patch from upstream

        This is the detailed description of the important patch

        Signed-off-by: Fred Jones <fred.jones@foo.org>

        Bug: 135791357
        Change-Id: I4caaaa566ea080fa148c5e768bb1a0b6f7201c01
        (cherry-picked from c31e73121f4c1ec41143423ac6ce3ce6dafdcec1)
        [ Resolved minor conflict in drivers/foo/bar.c ]
        Signed-off-by: Joe Smith <joe.smith@foo.org>

Requirements for other backports: FROMGIT:, FROMLIST:,

  • If the patch has been merged into an upstream maintainer tree, but has not yet been merged into Linux mainline
    • tag the patch subject with FROMGIT:
    • add info on where the patch came from as (cherry picked from commit <sha1> <repo> <branch>). This must be a stable maintainer branch (not rebased, so don't use linux-next for example).
    • if changes were required, use BACKPORT: FROMGIT:
    • Example:
      • if the commit message in the maintainer tree is
        important patch from upstream

        This is the detailed description of the important patch

        Signed-off-by: Fred Jones <fred.jones@foo.org>
    - then Joe Smith would upload the patch for the common kernel as
        FROMGIT: important patch from upstream

        This is the detailed description of the important patch

        Signed-off-by: Fred Jones <fred.jones@foo.org>

        Bug: 135791357
        (cherry picked from commit 878a2fd9de10b03d11d2f622250285c7e63deace
         https://git.kernel.org/pub/scm/linux/kernel/git/foo/bar.git test-branch)
        Change-Id: I4caaaa566ea080fa148c5e768bb1a0b6f7201c01
        Signed-off-by: Joe Smith <joe.smith@foo.org>
  • If the patch has been submitted to LKML, but not accepted into any maintainer tree
    • tag the patch subject with FROMLIST:
    • add a Link: tag with a link to the submittal on lore.kernel.org
    • if changes were required, use BACKPORT: FROMLIST:
    • Example:
        FROMLIST: important patch from upstream

        This is the detailed description of the important patch

        Signed-off-by: Fred Jones <fred.jones@foo.org>

        Bug: 135791357
        Link: https://lore.kernel.org/lkml/20190619171517.GA17557@someone.com/
        Change-Id: I4caaaa566ea080fa148c5e768bb1a0b6f7201c01
        Signed-off-by: Joe Smith <joe.smith@foo.org>

Requirements for Android-specific patches: ANDROID:

  • If the patch is fixing a bug to Android-specific code
    • tag the patch subject with ANDROID:
    • add a Fixes: tag that cites the patch with the bug
    • Example:
        ANDROID: fix android-specific bug in foobar.c

        This is the detailed description of the important fix

        Fixes: 1234abcd2468 ("foobar: add cool feature")
        Change-Id: I4caaaa566ea080fa148c5e768bb1a0b6f7201c01
        Signed-off-by: Joe Smith <joe.smith@foo.org>
  • If the patch is a new feature
    • tag the patch subject with ANDROID:
    • add a Bug: tag with the Android bug (required for android-specific features)