Skip to content
Snippets Groups Projects
  1. May 24, 2022
  2. May 23, 2022
    • Hongguang's avatar
      Add private modules list. · 1e87e409
      Hongguang authored
      Bug: 220644706
      Test: make and find the private modules in dist.
      Change-Id: Ic563fe6d2bc85a0255c6bc1ab363ce83cdc51793
      1e87e409
  3. May 13, 2022
  4. May 11, 2022
    • Max Zhang's avatar
      ADT3: kernel build config file · b8d8824a
      Max Zhang authored
      Provide the kernel build config file for build server.
      
      Bug: 220644706
      Change-Id: Ib52f329fc7082de053fd37e20596d69c4dc7bfc0
      b8d8824a
  5. May 10, 2022
    • Max Zhang's avatar
      ADT-3: Enable bandwidth limiting options · bc1a6172
      Max Zhang authored
      Enable the following options to support go/bandwidth-limiting:
      - CONFIG_NET_SCH_TBF
      - CONFIG_NET_CLS_MATCHALL
      - CONFIG_NET_ACT_POLICE
      - CONFIG_NET_ACT_BPF
      
      bug: 157552970
           181855645
      Change-Id: I6c7609ca642858d1282c7ddd0e9b1583ff4f4165
      bc1a6172
  6. May 03, 2022
  7. May 01, 2022
  8. Apr 26, 2022
  9. Apr 01, 2022
  10. Mar 23, 2022
    • pengzhao.liu's avatar
      ANDROID: selinux: modify RTM_GETNEIGH [1/1] · f584308c
      pengzhao.liu authored
      PD#SWPL-71742
      Bug: 171572148
      
      Problem:
      Map the permission gating RTM_GETNEIGH/RTM_GETNEIGHTBL messages to a
      new permission so that it can be distinguished from the other netlink
      route permissions in selinux policy. The new permission is triggered by
      a flag set in system images T and up.
      
      Solution:
      This change is intended to be backported to all kernels that a T system
      image can run on top of.
      
      Verify:
      on adt3-t kernel
      
      Test: ateddst NetworkInterfaceTest
      Test: atest CtsSelinuxTargetSdkCurrentTestCases
      Test: atest bionic-unit-tests-static
      Test: On Cuttlefish, run combinations of:
          - Policy bit set or omitted (see https://r.android.com/1701847
      
      )
          - This patch applied or omitted
          - App having nlmsg_readneigh permission or not
        Verify that only the combination of this patch + the policy bit being
        set + the app not having the nlmsg_readneigh permission prevents the
        app from sending RTM_GETNEIGH messages.
      
      Change-Id: I4bcfce4decb34ea9388eeedfc4be67403de8a980
      Signed-off-by: default avatarBram Bonné <brambonne@google.com>
      
      Signed-off-by: default avatarpengzhao.liu <pengzhao.liu@amlogic.com>
      Change-Id: Ic9d51cebab8c195537d54a28a23a7e93f09ba0b3
      f584308c
    • weifang.liu's avatar
      vts: netd_integration_test fail [1/1] · 536408ec
      weifang.liu authored
      
      PD#SWPL-75333
      BUG=225139017
      
      Problem:
      KernelTest#TestRateLimitingSupport fail
      
      Solution:
      add related kernel config
      
      Verify:
      local
      
      Change-Id: Id1ec210fbe5d927061a70675652523079934b522
      Signed-off-by: default avatarweifang.liu <weifang.liu@amlogic.com>
      536408ec
  11. Jan 04, 2022
  12. Nov 04, 2021
  13. Nov 03, 2021
  14. Nov 02, 2021
  15. Oct 25, 2021
    • Liang Ji's avatar
      adt3: Release 52 MB of unused memory allocated in "ion-dev" [1/1] · e6fe4c2e
      Liang Ji authored
      
      PD#SWPL-61729
      BUG=203412562
      
      Problem:
      Release 52 MB of unused memory allocated in "ion-dev"
      
      Solution:
      Release 52 MB of unused memory allocated in "ion-dev"
      
      Verify:
      adt3-S
      
      Signed-off-by: default avatarLiang Ji <liang.ji@amlogic.com>
      Change-Id: I87a24212cbf5b6ffac39fff94d52c498b226bb65
      e6fe4c2e
    • yao zhang1's avatar
      BACKPORT: gup: document and work around "COW can break either way" issue · ec3024c3
      yao zhang1 authored
      
      PD#SWPL-61507
      BUG=202208062
      
      commit 17839856fd588f4ab6b789f482ed3ffd7c403e1f upstream.
      
      Doing a "get_user_pages()" on a copy-on-write page for reading can be
      ambiguous: the page can be COW'ed at any time afterwards, and the
      direction of a COW event isn't defined.
      
      Yes, whoever writes to it will generally do the COW, but if the thread
      that did the get_user_pages() unmapped the page before the write (and
      that could happen due to memory pressure in addition to any outright
      action), the writer could also just take over the old page instead.
      
      End result: the get_user_pages() call might result in a page pointer
      that is no longer associated with the original VM, and is associated
      with - and controlled by - another VM having taken it over instead.
      
      So when doing a get_user_pages() on a COW mapping, the only really safe
      thing to do would be to break the COW when getting the page, even when
      only getting it for reading.
      
      At the same time, some users simply don't even care.
      
      For example, the perf code wants to look up the page not because it
      cares about the page, but because the code simply wants to look up the
      physical address of the access for informational purposes, and doesn't
      really care about races when a page might be unmapped and remapped
      elsewhere.
      
      This adds logic to force a COW event by setting FOLL_WRITE on any
      copy-on-write mapping when FOLL_GET (or FOLL_PIN) is used to get a page
      pointer as a result.
      
      The current semantics end up being:
      
       - __get_user_pages_fast(): no change. If you don't ask for a write,
         you won't break COW. You'd better know what you're doing.
      
       - get_user_pages_fast(): the fast-case "look it up in the page tables
         without anything getting mmap_sem" now refuses to follow a read-only
         page, since it might need COW breaking.  Which happens in the slow
         path - the fast path doesn't know if the memory might be COW or not.
      
       - get_user_pages() (including the slow-path fallback for gup_fast()):
         for a COW mapping, turn on FOLL_WRITE for FOLL_GET/FOLL_PIN, with
         very similar semantics to FOLL_FORCE.
      
      If it turns out that we want finer granularity (ie "only break COW when
      it might actually matter" - things like the zero page are special and
      don't need to be broken) we might need to push these semantics deeper
      into the lookup fault path.  So if people care enough, it's possible
      that we might end up adding a new internal FOLL_BREAK_COW flag to go
      with the internal FOLL_COW flag we already have for tracking "I had a
      COW".
      
      Alternatively, if it turns out that different callers might want to
      explicitly control the forced COW break behavior, we might even want to
      make such a flag visible to the users of get_user_pages() instead of
      using the above default semantics.
      
      But for now, this is mostly commentary on the issue (this commit message
      being a lot bigger than the patch, and that patch in turn is almost all
      comments), with that minimal "enable COW breaking early" logic using the
      existing FOLL_WRITE behavior.
      
      [ It might be worth noting that we've always had this ambiguity, and it
        could arguably be seen as a user-space issue.
      
        You only get private COW mappings that could break either way in
        situations where user space is doing cooperative things (ie fork()
        before an execve() etc), but it _is_ surprising and very subtle, and
        fork() is supposed to give you independent address spaces.
      
        So let's treat this as a kernel issue and make the semantics of
        get_user_pages() easier to understand. Note that obviously a true
        shared mapping will still get a page that can change under us, so this
        does _not_ mean that get_user_pages() somehow returns any "stable"
        page ]
      
      [surenb: backport notes
      	Replaced (gup_flags | FOLL_WRITE) with write=1 in gup_pgd_range.
      	Removed FOLL_PIN usage in should_force_cow_break since it's missing in
      	the earlier kernels.
              Since gup_pgd_range does not exist, made appropriate changes on
              the the gup_huge_pgd, gup_huge_pd and gup_pud_range calls]
      
      Reported-by: default avatarJann Horn <jannh@google.com>
      Tested-by: default avatarChristoph Hellwig <hch@lst.de>
      Acked-by: default avatarOleg Nesterov <oleg@redhat.com>
      Acked-by: default avatarKirill Shutemov <kirill@shutemov.name>
      Acked-by: default avatarJan Kara <jack@suse.cz>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      [surenb: backport to 4.9 kernel]
      Signed-off-by: default avatarSuren Baghdasaryan <surenb@google.com>
      
      Signed-off-by: default avataryao zhang1 <yao.zhang1@amlogic.com>
      Change-Id: I877999f7b789aee6078ccade2ae54b827d88368f
      ec3024c3
  16. Oct 05, 2021
  17. Sep 27, 2021
  18. Sep 24, 2021
  19. Sep 14, 2021
  20. Sep 13, 2021
Loading