mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
4.9.156-12
95 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
6b2d479409 |
ODROID-COMMON:Merge AMLogic BSP 181208
ODROID-COMMON:Merge AMLogic BSP 181208 audioinfo: fix kasan compile problem [1/1] PD#173553 Problem: check stack out of bounds Solution: change variable's definition Verify: verifyed by r311 Change-Id: Id6efc3ac56b297b6812e2af786732e65867a07da Signed-off-by: jiejing.wang <jiejing.wang@amlogic.com> buildroot: Enable fb memory allocation in g12b_skt dts [1/1] PD#SWPL-802 Problem: Kernel crash when run GPU slt program Solution: Enable meson fb memory allocation in g12b_skt dts Verify: w400 Change-Id: I3074c2053cda06cf4ae237d24bad2c89d789f90d Signed-off-by: Blance Tang <guofeng.tang@amlogic.com> amvecm: hdr: add hdr10 plus support [1/2] PD#SWPL-869 Problem: new feature, add hdr10 plus support Solution: 1. add hdr10 plus metadat parser 2. add hdr10 plus code support 3. add hdr10 plus bypass mode Verify: verify on U200 Change-Id: I957954ce148021882e17f2913dd2552e64f1298c Signed-off-by: MingLiang Dong <mingliang.dong@amlogic.com> irqchip: add a new gpio IRQ driver to support double-edge detection [1/1] PD#SWPL-922 Problem: the existing gpio IRQ driver(porting from the upstream) does not double-edge detection Solution: add a new gpio IRQ driver to support the double-edge detection, the new driver is with different software structure but compatible with functions of the existing driver Verify: test pass on s400 Change-Id: Id69dd0b4459eef20a6755947c7d95a24d7b17fa9 Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com> pinctrl: fix some mistakes [1/1] PD#172438 Problem: 1. return a negative when parsing the dts property "output-high/output-low" 2. the prefix "bt565" don't meet corepinmux document Solution: 1. add break statement in case PIN_CONFIG_OUTPUT to avoid returning a negative value. 2. rename the "bt565" to "bt656" according to corepinmux document Verify: test pass on U200 Change-Id: Ieeb98367e2269007a6774592abac86ef05ee8f64 Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com> amvecm: fix flicker when change between Launcher and Signal Source [1/1] PD#SWPL-848 Problem: ioctrl set the same gamma value again Solution: if the gamma value is same as the ioctrl userspace value, do not set again Verify: txlx Change-Id: I6f17f5ff234513c5a886004aedea81b9945c5b98 Signed-off-by: Bencheng Jing <bencheng.jing@amlogic.com> vpu: add support for tl1 [1/1] PD#172587 Problem: Bringup vpu for TL1. Solution: Add vpu support for TL1. Verify: Verified on PTM/PXP. Change-Id: Ic2fb7682ddc1b21840e1be1d8462d4c0902e739d Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com> lcd: add tl1 support [1/1] PD#172587 Problem: not support tl1 Solution: add tl1 support Verify: test pass on PTM Change-Id: I5a9073fc08a98ae95d4961297a7427864d92279b Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com> backlight: add support for tl1 [1/1] PD#172587 Problem: do not suppoert for tl1 Solution: add backlight support for fl1 Verify: verified on PTM Change-Id: I052a7ef93ec9cb21a544e4823a4c9a339d38b5f9 Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com> arm: dts: tl1: add decoder device tree [3/3] PD#174543 PD#172587 Problem: new added function for tl1 Solution: add vdin afbce support for tl1 Verify: verified on PTM Change-Id: I42054b8228161713ac10446491ebdb50a71975ad Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com> media: add codec support for tl1 [1/1] PD#172587 Problem: Bringup codec for TL1. Solution: Add codec iomap device tree node for TL1. Add canvas device tree node for TL1. Verify: Verified on PXP/PTM. Change-Id: I8b9a6645f1f9fd7d4aa9cae6166895e61ddc3e36 Signed-off-by: pengcheng chen <pengcheng.chen@amlogic.com> rdma: add rdma support for tl1 [1/1] PD#172587 Problem: Bringup rdma for TL1. Solution: Add rdma support for TL1. Verify: Verified on PXP/PTM. Change-Id: I425edc1e47db2ea834fcc5acb0e3d0ee1f30a9f7 Signed-off-by: pengcheng chen <pengcheng.chen@amlogic.com> osd: tl1: add osd support for tl1 [1/1] PD#172587 Problem: Bringup osd for TL1. Solution: Add osd support for TL1. Add ge2d device tree node for TL1. Verify: Verified on PXP/PTM. Change-Id: I3d20934f015108f545c3c72b979d1bd8187b282e Signed-off-by: pengcheng chen <pengcheng.chen@amlogic.com> amvideo: add amvideo support for tl1 [1/1] PD#172587 Problem: TL1 needs support amvideo driver. Solution: 1. Add amvideo node into dts file, default enable. 2. Change the vd mif and sr reg offset. 3. Force bypass dolby vision function. 4. Change the register following hardware design. 5. Make amvideo afbc work for tl1. Verify: On PTM. Change-Id: I0d857f8a707328383328daa23e6ba8e156c2e6e0 Signed-off-by: Brian Zhu <brian.zhu@amlogic.com> audio: auge: add sound card support for tl1 [1/1] PD#172587 Problem: Bringup tl1 sound card. Solution: Add tl1 sound card. Add external interface for audio input/output. Verify: Tested by PTM Sound card is setup. TDM and SPDIF internel loopback is ok Change-Id: I60830ca44a62ee2a8e16343e91e7311152cab161 Signed-off-by: Xing Wang <xing.wang@amlogic.com> vdac: vdac: add vdac support for tl1 [1/1] PD#172587 Problem: do not suppoert for tl1 Solution: add vdac support for fl1 Verify: test pass on local Change-Id: I7b3da34289dfe0638a24b812658db7e462ebdd4c Signed-off-by: Nian Jing <nian.jing@amlogic.com> avin: add avin detect support for tl1 [1/1] PD#172587 Problem: do not suppoert for tl1 Solution: add avin detect support for fl1 Verify: just coding for tl1 will test later Change-Id: I809f7068c9d0a45c89bd7dc4e6615db99b11f015 Signed-off-by: Nian Jing <nian.jing@amlogic.com> tvin: add vdin and viu support for tl1 [1/1] PD#172587 Problem: do not suppoert for tl1 Solution: add vdin and viu support for fl1 Verify: verified on PTM Change-Id: If4e267356fa666541853cfc7b49008795f9ec301 Signed-off-by: xuhua zhang <xuhua.zhang@amlogic.com> vdin: add afbce function for tl1 [1/1] PD#172587 Problem: new added function for tl1 Solution: add vdin afbce support for tl1 Verify: verified on PTM Change-Id: I5e3e2487b6cdbed2d2ca794a6a21ed885e4bf469 Signed-off-by: xuhua zhang <xuhua.zhang@amlogic.com> hdmirx: hdmirx driver for tl1 [1/1] PD#172587 Problem: hdmirx bringup for tl1 Solution: 1.modify write top api, add addr offset -qy 2.modify write edid api -qy 3.replace top hw reset api 4.add aocec access register idle -qy 5.for tl1 bypass sw eq -qy 6.replace pddq api -qy 7.modify arc control for tl1 -qy 8.add n/cts auto mode 9.add hdcp balance path 10.add sscp mode 11.optimize reg map(rm unused reg addr) 12.add recent commits from 4.9 trunk 13.modify top clk cntl bit definition 14.modify top offset addr handle(x4) 15.add audio pll setting -qy 16.update phy setting - qy 17.modify audio pll ctrl api for tl1 -qy -add clk monitor function -add clk stable api for tl1 18.add emp data to pfifo -qy 19.modify edid write and other function -qy 20.add emp data to ddr -qy 21.add tmds data to ddr -qy 22.add cec for tl1 -qy -fix ctc 7-1 -add status register for cec a/b 23.add cec and hdmirx dts -qy 24.clean tl1 rx related clk measure 25.hdmirx and cec dts Verify: 1.run PTM 2.need verify on chip Change-Id: Ia7cc5a2d84925587bdfae825936ba763713926af Signed-off-by: Yong Qin <yong.qin@amlogic.com> audio: codec: add tl1_acodec support for tl1 [1/1] PD#172587 Problem: Add aml_tl1_acodec driver support for tl1 Solution: 1.add files sound/soc/codecs/amlogic/aml_codec_tl1.acodec.c(.h) 2.update files sound/soc/codecs/amlogic/Kconfig(Makefile) Verify: kernel build passed, need verified after chipback Change-Id: I19717a442f22f5b6844627475992ef7c8cc20a71 Signed-off-by: shuyu.li <shuyu.li@amlogic.com> hdmirx: add hdmirx repeater function [1/6] PD#SWPL-323: Problem: add hdmi repeater function Solution: 1.add the edid receive and mix. 2.add the flow of repeater. Verify: R321 Change-Id: I9942c5f345e2fdfff110f01d4d0c2b4b23120c07 Signed-off-by: hongmin hua <hongmin.hua@amlogic.com> ddr: fix bandwidth read result 0 on 32bit OS [1/1] PD#SWPL-960 Problem: Reading bandwidth of DDR from sysfs get all 0 result on 32 bit kernel Solution: Fix overflow when calculating bandwidth. Verify: P212 Change-Id: I35837db653bdc2d97ced98689546a9ffc0db21c7 Signed-off-by: tao zeng <tao.zeng@amlogic.com> mm: reduce watermark if free cma is too large [1/1] PD#SWPL-807 Problem: Sometimes driver can't allocation memory under atomic environment. And free pages is enough but they are nearly ALL CMA pages. Solution: Reduce watermark with harf of free cma pages even allocation support CMA. Verify: P212 Change-Id: I8e49768d4384ed064775537754a2b7f09a5bbb7c Signed-off-by: tao zeng <tao.zeng@amlogic.com> avb: avb enable need to translate more types [1/1] PD#SWPL-1095 Problem: avb need more command line size. Solution: change max size to 2048 Verify: verify by ampere Change-Id: I9c1089a3ea0888e8ccd82f16d2b1111b6d88922a Signed-off-by: Luan Yuan <luan.yuan@amlogic.com> mm: avoid pages migrated to different zone [1/1] PD#SWPL-881 Problem: Amlogic modified code when compatcion from normal case. And side effect is that pages in normal zone maybe migrated to highmem zone. Which caused page_address get a NULL value and kernel panic occurred. Solution: Avoid pages migarte to different zone by adding forbid_to_cma flags. Verify: P212 Change-Id: I1d9c6653dc1069562db3c1be3f53a3510a51f0d1 Signed-off-by: tao zeng <tao.zeng@amlogic.com> usb: adb reboot and then adb disconnect [1/1] PD#174155 Problem: complete_ep 0xffffffc05bed2858, ep->queue empty! 1. After adb process be killed, data buffer is freed and this memory is allocated for the other. But the address is hold by the controller. 2. Adbd in PC is running. So, the controller receive the data and write to this memory. 3.The value of this memory is modified by the controller. This could cause the memory problem. Solution: whenever io_data->aio equals 1, the data buffer is from a fixed array. Verify: Test: adb devices, adb shell, exit, adb push in android8(p212) and android9(w400) verified by he he Change-Id: Idac755d3646639e2944a82f42abf9adb9aeaea8c Signed-off-by: he.he <he.he@amlogic.com> dts: support 32bit for gxm_q201 [1/1] PD#SWPL-1140 Problem: add support 32bit for gxm_q201. Solution: add 32bit dts for gxm_q201. Verify: gxm_q201 Change-Id: I3c9a6ae72fad6575bd814818967d9ff80e62f5d4 Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com> amvecm: pq: add amvecm support for tl1 [1/1] PD#172587 Problem: new feature, add amvecm support for tl1 Solution: 1. add cm hist for tl1 2. add 3dlut for tl1 3. add hdr support for tl1 4. add wb for tl1 5. add local contrast Verify: verify on tl1 ptm Change-Id: I1c7ebb83a1fb72a4529415fb9bf4acfd134e6b11 Signed-off-by: MingLiang Dong <mingliang.dong@amlogic.com> dts: add ir cut control GPIO [1/1] PD#SWPL-900 Problem: add ir cut control Solution: add ir cut control GPIO Verify: g12b-skt Change-Id: I16c7d03ed4cc1dd3842cab80a987dde1a83e5cbc Signed-off-by: yu.zhang <yu.zhang@amlogic.com> hdmitx: add init code for repeater [2/6] PD#SWPL-323 Problem: For TXLX/T962E, it has both HDMI Rx and TX, and lacks of HDMI repeater functions, including HDCP repeater function. Solution: Add the init code for hdmi repeater Verify: TXLX/T962E/R321 Change-Id: Iaf17ae62c590ff4f8478dd5556f3ed24b9ff3bb1 Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com> atv_demod: switch channel with the script, the ATV shows no signal [1/1] PD#SWPL-791 Problem: Switch channel with the script lasts 14 hours, the ATV shows no signal. Solution: To avoid conflict, don't need to check the CLK and PLL states in atv demod write and read function. Verify: verified by p321 Change-Id: I033c54f14541ed540dfce1b9c4e21d2b5a8b9487 Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com> media: keep last normal frame before reset [2/2] PD#OTT-71 Problem: google cast display green lump when seek. reset after seek opration. Solution: keep last normal frame before reset and buf free. Verify: U211, Atom Change-Id: I02304998c9434f1055de1138700510f4c19f466f Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com> unifykey: add the hdmirx repeater key block [3/6] PD#SWPL-323: Problem: add the hdmirx repeater key block Solution: add the hdmirx repeater key block. Verify: R321 Change-Id: I61920b706b5dd08c6be9647add287f85b35fb0ee Signed-off-by: hongmin hua <hongmin.hua@amlogic.com> mm: make sure the gtp flag is low default [1/1] PD#SWPL-807 Problem: The app's window cound be black screen when launched if the ion system does not retry to allocate memory with the gtp high flag. Solution: make sure the gtp flag is low default Verify: P212 Change-Id: I562125573f8175cd180196ca73eb04d7dd36add0 Signed-off-by: an.xi <an.xi@amlogic.com> dts: emmc: uboot enable emmc config [2/3] PD#SWPL-736 Problem: The s400 emmc platform uboot cannot be loaded into kernel normally Solution: enable enable emmc node in dtb by fdt command. and modify malloc max size to 18M. Verify: s400 Change-Id: Iaef58f1b05a952793d414eb82ac476d88d910fe1 Signed-off-by: yuegui.he <yuegui.he@amlogic.com> dts: GVSDK: modify loopback and led device name [1/1] PD#173996 Problem: 1. to support hw loopback channel 2,3 for GVSDK. 2. led is31fl32xx device name register fail. Solution: 1. change boolback to channel 2,3 2. register led is31fl32xx name success. Verify: S400_GVSDK/S420_GVSDK Change-Id: Ie1bbc01c4624fd1e2e2662c4d9c876e56c301a99 Signed-off-by: Renjun Xu <renjun.xu@amlogic.com> mm: exclude free cma pages when calculate watermark [1/1] PD#SWPL-1210 Problem: Some drivers(eth/wifi) occasionally can't allocate memory under atomic context. From mem status print, there are enough free pages but most of them are CMA. Solution: Exclude free cma pages when calculate water mark. This can push kswapd/compaction work more aggressive. Verify: P212 Change-Id: Ia723f21c0316eff1a38e759ff9f044bb59aa8efa Signed-off-by: tao zeng <tao.zeng@amlogic.com> dv: set stb core run_mode_delay as 0 [1/1] PD#SWPL-781 Problem: when starting to play video, the manu bar shakes Solution: stb core don't need run mode delay. Verify: t962e (txlx) Change-Id: I22ba5d778eedd72f87b4c687b38acf1b8c6d6fc9 Signed-off-by: Yi Zhou <yi.zhou@amlogic.com> dv: fix the green screen when changing dv mode [1/1] PD#SWPL-1029 Problem: when changing dv mode from standard to ll mode. wn tp vks should be enabled Solution: enable wn tp vks when setting ll mode Verify: t962e (txlx) Change-Id: I3b399132cf1a3c7b1799f36f9bc3a0696883029f Signed-off-by: Yi Zhou <yi.zhou@amlogic.com> lcd: lcd_extern: fix get invalid extern_driver null pointer mistake [1/1] PD#SWPL-1152 Problem: There is a null pointer mistake in lcd_extern_get_driver for invalid driver Solution: add null pointer protection Verify: txlx r311 Change-Id: I171d10ab26e6c298b8eb4065dfa054a237bfd53b Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com> crypto: Enable ARMCE and set aes dma to slow mode [1/1] PD#SWPL-574 Problem: xfrm test failed randomly in VtsKernelNetTest due to random failed in gcm(aes) Solution: Use ARMCE for small sized crypto processing and use copy mode when HW dma is used Verify: verified on ampere Change-Id: I31cd75cfcd85da9fc9e9640135c7ce76623ef715 Signed-off-by: Matthew Shyu <matthew.shyu@amlogic.com> USB: host: tuning disconnect threshold on g12a/g12b [2/2] PD#174736 Problem: Some usb device may disconnect when handshake Solution: tuning disconnect threshold when usb host initial now default is 0x24, only three value can tuning, 0x2c,0x34,0x3c we set 0x34 now Verify: Google estelle boards which return from factory no side effect on refernce u200 board Change-Id: I71d974a6bac43452b20bd7f2a6827d3a46fa39fb Signed-off-by: qi duan <qi.duan@amlogic.com> audio: solve av out output level low issue [2/2] PD#SWPL-766 Problem: av output level only 100mv Solution: change the channel map for av out, use orignal pcm for output w/o volume control and postprocess. Verify: verified by r311 Change-Id: Ibeaf0ecfda03f81ff6061dc9c4975049452ba659 Signed-off-by: Lianlian Zhu <lianlian.zhu@amlogic.com> Signed-off-by: Jian Xu <jian.xu@amlogic.com> chipid: meson: add ops id for S805Y [1/2] PD#SWPL-940 Problem: Need ops id api for S805Y Solution: Add ops id api Verify: s805y_p215 Change-Id: I179f87acbc3f57456e0359bd0d502c58cc3a9b9c Signed-off-by: Qiufang Dai <qiufang.dai@amlogic.com> hdmitx: add feature limited [3/3] PD#174490 Problem: Lack feature limited for certain types Solution: Add feature limited for certain types Verify: TBD Change-Id: Ifbe104fe98fe1e3875f2f1af7793348856275b92 Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com> dts: support 32bit for g12b_w400 [1/1] PD#SWPL-1010 Problem: add support 32bit for g12b_w400 Solution: add 32bit dts of g12b_w400. Verify: g12b_a311d_w400 Change-Id: I30ac9cb80721b04a13532ceb5c14f76bdf1cc575 Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com> display: dts modify [1/1] PD#TV-405 Problem: Should create a 720p ui display mode on p321. Solution: Created a folder named t962_p321_720p under device/amlogic and modified some variate. The diffs that compare with txl_t962_p321.dts amlogic-dt-id = "txl_p321_v1_720p"; size = <0x400000>; alloc-ranges = <0x3fc00000 0x400000>; mem_size = <0x00400000 0x00b00000 0x00100000>; /* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x0b51000*/ display_mode_default = "720p60hz"; /*1280*720*4*3 = 0xA8C000*/ display_size_default = <1280 720 1280 2160 32>; logo_addr = "0x3fc00000"; Verify: p321 Change-Id: Ia397cd6cbcf4fdd9fb139259099805bdad90b92f Signed-off-by: Guotai Shen <guotai.shen@amlogic.com> dts: support 32bit for gxl_p230 [1/1] PD#SWPL-1116 Problem: add support 32bit for gxl_p230. Solution: add 32bit dts for gxl_p230. Verify: gxl_p230 Change-Id: Icc62c45e7bd36e8248ad0bb11a67a0151cf7ea34 Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com> dts: sync difference between arch32 and arch64 [1/1] PD#SWPL-959 Problem: sync arch32 and arch64 dts. Solution: sync arch32 and arch64 dts. Verify: r311 Change-Id: I493c83f38899628ac65c637e81f053a7c22bd24f Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com> cec: for support multi-logical address [1/2] PD#SWPL-418 Problem: cec: for support mult-logical address Solution: 1.add interface: remove logical address 2.for support multi-logical address Verify: r311 r321 Change-Id: I9ea8b1004f43fb84855d41dd684c117fa5cbd7ae Signed-off-by: Yong Qin <yong.qin@amlogic.com> cec: for support multi-logical address [2/2] PD#SWPL-418 Problem: cec: support multi-logical address Solution: 1.enable cec_a, cec_b 2.enable two interrupt 3.enable two pinmux oa_7, ao_8 4.cec_a only send all msg 5.cec_b only receive all msg 6.discard ceca broadcast msg Verify: r311 r321 Change-Id: I8f983ed6ad329ca5ec0144587a7ad1f03ad68031 Signed-off-by: Yong Qin <yong.qin@amlogic.com> emmc: ffu: add emmc ffu update support [1/1] PD#174683 Problem: kernel emmc ffu is not supported. Solution: add emmc ffu update support with mmc untils. Verify: p212 Change-Id: Ice9ffb174c061e3f114b0b68af290492808b0a5e Signed-off-by: Nan Li <nan.li@amlogic.com> codec_mm: add reserved & cma support for 4.9. [1/1] PD#172483 Problem: Add reserved & cma support for 4.9. Solution: 1. add tvp padding, for test. 2. add no-cma-tvp,to force not used cma for tvp. 3. add nomap for reserved memroy detective. 4. add res & cma two mem region on same board. 5. add clear-map property for codec_mm_cma. Verify: Test this function with Android_O-MR1(GTVS) & ExoPlayer. Change-Id: Ib20e0e9bc4725afb271de97543ce5ebf3bfcfb29 Signed-off-by: Zhi Zhou <zhi.zhou@amlogic.com> mm: clear MMU mapping for secure os memory [1/1] PD#SWPL-1631 Problem: If Cortex A73 accessed memory near secure memory range, an SError may occur due to prefetch of A73 core. Solution: Remove mmu maping of secure memory range. Note: must add clear-map and set clear range property in DTS Verify: W400 Change-Id: I718919c1b4873584eb87e00332622a1626672808 Signed-off-by: tao zeng <tao.zeng@amlogic.com> cec: revert changesy [1/1] PD#SWPL-418 Problem: TXL can't bootup Solution: revert it Verify: p321 Revert "cec: for support multi-logical address [2/2]" This reverts commit |
||
|
|
06ee7820ac |
Merge tag 'v4.9.121' into odroidn2-4.9.y
This is the 4.9.121 stable release |
||
|
|
3430b61ca0 |
ODROID: arch/arm64: fix to run 'dtbs_install'
Change-Id: I3e2249c444aa407712a133837dc3b1d84cdc5682 Signed-off-by: Dongjin Kim <tobetter@gmail.com> |
||
|
|
7e04e8580d |
dtc: enable generation of symbols
PD#173147: update dtc to v1.4.4 add -@ to dtc option to enable generation of symbols Change-Id: Ica497de494a3f228f4111773d9cba674b2a2e061 Signed-off-by: Jianxin Pan <jianxin.pan@amlogic.com> |
||
|
|
6ff92ca0e1 |
dtc: update warning settings for new bus and node/property name checks
PD#173147: update dtc to v1.4.4 dtc gained new warnings checking PCI and simple buses, unit address formatting, and stricter node and property name checking. Disable the new dtc warnings by default as there are 1000s. As before, warnings are enabled with W=1 or W=2. The strict node and property name checks are a bit subjective, so they are only enabled for W=2. Change-Id: Ic9253cdb1f27f59c73f7c337b96c3e8c5f876b20 Signed-off-by: Rob Herring <robh@kernel.org> |
||
|
|
76b6f30f94 |
kasan: don't emit builtin calls when sanitization is off
commit |
||
|
|
bb52bba67e |
Merge 4.9.88 into android-4.9
Changes in 4.9.88 RDMA/ucma: Limit possible option size RDMA/ucma: Check that user doesn't overflow QP state RDMA/mlx5: Fix integer overflow while resizing CQ drm/i915: Try EDID bitbanging on HDMI after failed read scsi: qla2xxx: Fix NULL pointer crash due to active timer for ABTS drm/i915: Always call to intel_display_set_init_power() in resume_early. workqueue: Allow retrieval of current task's work struct drm: Allow determining if current task is output poll worker drm/nouveau: Fix deadlock on runtime suspend drm/radeon: Fix deadlock on runtime suspend drm/amdgpu: Fix deadlock on runtime suspend drm/amdgpu: Notify sbios device ready before send request drm/radeon: fix KV harvesting drm/amdgpu: fix KV harvesting drm/amdgpu:Correct max uvd handles drm/amdgpu:Always save uvd vcpu_bo in VM Mode MIPS: BMIPS: Do not mask IPIs during suspend MIPS: ath25: Check for kzalloc allocation failure MIPS: OCTEON: irq: Check for null return on kzalloc allocation Input: matrix_keypad - fix race when disabling interrupts loop: Fix lost writes caused by missing flag virtio_ring: fix num_free handling in error case KVM: s390: fix memory overwrites when not using SCA entries kbuild: Handle builtin dtb file names containing hyphens IB/mlx5: Fix incorrect size of klms in the memory region bcache: fix crashes in duplicate cache device register bcache: don't attach backing with duplicate UUID x86/MCE: Serialize sysfs changes perf tools: Fix trigger class trigger_on() x86/spectre_v2: Don't check microcode versions when running under hypervisors ALSA: hda/realtek: Limit mic boost on T480 ALSA: hda/realtek - Fix dock line-out volume on Dell Precision 7520 ALSA: hda/realtek - Make dock sound work on ThinkPad L570 ALSA: seq: Don't allow resizing pool in use ALSA: seq: More protection for concurrent write and ioctl races ALSA: hda: add dock and led support for HP EliteBook 820 G3 ALSA: hda: add dock and led support for HP ProBook 640 G2 nospec: Kill array_index_nospec_mask_check() nospec: Include <asm/barrier.h> dependency Revert "x86/retpoline: Simplify vmexit_fill_RSB()" x86/speculation: Use IBRS if available before calling into firmware x86/retpoline: Support retpoline builds with Clang x86/speculation, objtool: Annotate indirect calls/jumps for objtool x86/boot, objtool: Annotate indirect jump in secondary_startup_64() x86/speculation: Move firmware_restrict_branch_speculation_*() from C to CPP x86/paravirt, objtool: Annotate indirect calls watchdog: hpwdt: SMBIOS check watchdog: hpwdt: Check source of NMI watchdog: hpwdt: fix unused variable warning watchdog: hpwdt: Remove legacy NMI sourcing. ARM: omap2: hide omap3_save_secure_ram on non-OMAP3 builds Input: tca8418_keypad - remove double read of key event register tc358743: fix register i2c_rd/wr function fix netfilter: add back stackpointer size checks netfilter: x_tables: fix missing timer initialization in xt_LED netfilter: nat: cope with negative port range netfilter: IDLETIMER: be syzkaller friendly netfilter: ebtables: CONFIG_COMPAT: don't trust userland offsets netfilter: bridge: ebt_among: add missing match size checks netfilter: ipv6: fix use-after-free Write in nf_nat_ipv6_manip_pkt netfilter: x_tables: pass xt_counters struct instead of packet counter netfilter: x_tables: pass xt_counters struct to counter allocator netfilter: x_tables: pack percpu counter allocations ext4: inplace xattr block update fails to deduplicate blocks ubi: Fix race condition between ubi volume creation and udev scsi: qla2xxx: Replace fcport alloc with qla2x00_alloc_fcport NFS: Fix an incorrect type in struct nfs_direct_req NFS: Fix unstable write completion x86/module: Detect and skip invalid relocations x86: Treat R_X86_64_PLT32 as R_X86_64_PC32 ASoC: sgtl5000: Fix suspend/resume ASoC: rt5651: Fix regcache sync errors on resume serial: sh-sci: prevent lockup on full TTY buffers tty/serial: atmel: add new version check for usart uas: fix comparison for error code staging: comedi: fix comedi_nsamples_left. staging: android: ashmem: Fix lockdep issue during llseek USB: storage: Add JMicron bridge 152d:2567 to unusual_devs.h usbip: vudc: fix null pointer dereference on udc->lock usb: quirks: add control message delay for 1b1c:1b20 usb: usbmon: Read text within supplied buffer size usb: gadget: f_fs: Fix use-after-free in ffs_fs_kill_sb() serial: 8250_pci: Add Brainboxes UC-260 4 port serial device serial: core: mark port as initialized in autoconfig earlycon: add reg-offset to physical address before mapping PCI: dwc: Fix enumeration end when reaching root subordinate Linux 4.9.88 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> |
||
|
|
333cdd174c |
kbuild: Handle builtin dtb file names containing hyphens
commit |
||
|
|
ba790f583c |
UPSTREAM: kbuild: fix asm-offset generation to work with clang
KBuild abuses the asm statement to write to a file and
clang chokes about these invalid asm statements. Hack it
even more by fooling this is actual valid asm code.
[masahiro:
Import Jeroen's work for U-Boot:
http://patchwork.ozlabs.org/patch/375026/
Tweak sed script a little to avoid garbage '#' for GCC case, like
#define NR_PAGEFLAGS 23 /* __NR_PAGEFLAGS # */ ]
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Tested-by: Matthias Kaehlcke <mka@chromium.org>
(cherry picked from commit
|
||
|
|
9ba72a2322 |
UPSTREAM: kbuild: consolidate redundant sed script ASM offset generation
This part ended up in redundant code after touched by multiple people. [1] Commit |
||
|
|
67259a687d |
UPSTREAM: kbuild: Consolidate header generation from ASM offset information
Largely redundant code is used in different places to generate C headers
from offset information extracted from assembly language output.
Consolidate the code in Makefile.lib and use this instead.
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
(cherry picked from commit
|
||
|
|
ccd6cd38fb |
ANDROID: ARM: convert build of appended dtb zImage to list of dtbs
Allow CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE_NAMES to specify a space separated list of dtbs to append to the zImage, and name the resulting file zImage-dtb Change-Id: Ied5d0bafbd1d01fc1f109c15c4283de7029903c9 Signed-off-by: Colin Cross <ccross@android.com> |
||
|
|
d52bd54db8 |
Merge branch 'akpm' (patches from Andrew)
Merge yet more updates from Andrew Morton: - the rest of ocfs2 - various hotfixes, mainly MM - quite a bit of misc stuff - drivers, fork, exec, signals, etc. - printk updates - firmware - checkpatch - nilfs2 - more kexec stuff than usual - rapidio updates - w1 things * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (111 commits) ipc: delete "nr_ipc_ns" kcov: allow more fine-grained coverage instrumentation init/Kconfig: add clarification for out-of-tree modules config: add android config fragments init/Kconfig: ban CONFIG_LOCALVERSION_AUTO with allmodconfig relay: add global mode support for buffer-only channels init: allow blacklisting of module_init functions w1:omap_hdq: fix regression w1: add helper macro module_w1_family w1: remove need for ida and use PLATFORM_DEVID_AUTO rapidio/switches: add driver for IDT gen3 switches powerpc/fsl_rio: apply changes for RIO spec rev 3 rapidio: modify for rev.3 specification changes rapidio: change inbound window size type to u64 rapidio/idt_gen2: fix locking warning rapidio: fix error handling in mbox request/release functions rapidio/tsi721_dma: advance queue processing from transfer submit call rapidio/tsi721: add messaging mbox selector parameter rapidio/tsi721: add PCIe MRRS override parameter rapidio/tsi721_dma: add channel mask and queue size parameters ... |
||
|
|
a4691deabf |
kcov: allow more fine-grained coverage instrumentation
For more targeted fuzzing, it's better to disable kernel-wide
instrumentation and instead enable it on a per-subsystem basis. This
follows the pattern of UBSAN and allows you to compile in the kcov
driver without instrumenting the whole kernel.
To instrument a part of the kernel, you can use either
# for a single file in the current directory
KCOV_INSTRUMENT_filename.o := y
or
# for all the files in the current directory (excluding subdirectories)
KCOV_INSTRUMENT := y
or
# (same as above)
ccflags-y += $(CFLAGS_KCOV)
or
# for all the files in the current directory (including subdirectories)
subdir-ccflags-y += $(CFLAGS_KCOV)
Link: http://lkml.kernel.org/r/1464008380-11405-1-git-send-email-vegard.nossum@oracle.com
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Quentin Casasnovas <quentin.casasnovas@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
||
|
|
db547ef190 |
Kbuild: don't add obj tree in additional includes
When building with separate object directories and driver specific Makefiles that add additional header include paths, Kbuild adjusts the gcc flags so that we include both the directory in the source tree and in the object tree. However, due to another bug I fixed earlier, this did not actually include the correct directory in the object tree, so we know that we only really need the source tree here. Also, including the object tree sometimes causes warnings about nonexisting directories when the include path only exists in the source. This changes the logic to only emit the -I argument for the srctree, not for objects. We still need both $(srctree)/$(src) and $(obj) though, so I'm adding them manually. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Michal Marek <mmarek@suse.com> |
||
|
|
5b26fc8824 |
Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull kbuild updates from Michal Marek: - new option CONFIG_TRIM_UNUSED_KSYMS which does a two-pass build and unexports symbols which are not used in the current config [Nicolas Pitre] - several kbuild rule cleanups [Masahiro Yamada] - warning option adjustments for gcov etc [Arnd Bergmann] - a few more small fixes * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: (31 commits) kbuild: move -Wunused-const-variable to W=1 warning level kbuild: fix if_change and friends to consider argument order kbuild: fix adjust_autoksyms.sh for modules that need only one symbol kbuild: fix ksym_dep_filter when multiple EXPORT_SYMBOL() on the same line gcov: disable -Wmaybe-uninitialized warning gcov: disable tree-loop-im to reduce stack usage gcov: disable for COMPILE_TEST Kbuild: disable 'maybe-uninitialized' warning for CONFIG_PROFILE_ALL_BRANCHES Kbuild: change CC_OPTIMIZE_FOR_SIZE definition kbuild: forbid kernel directory to contain spaces and colons kbuild: adjust ksym_dep_filter for some cmd_* renames kbuild: Fix dependencies for final vmlinux link kbuild: better abstract vmlinux sequential prerequisites kbuild: fix call to adjust_autoksyms.sh when output directory specified kbuild: Get rid of KBUILD_STR kbuild: rename cmd_as_s_S to cmd_cpp_s_S kbuild: rename cmd_cc_i_c to cmd_cpp_i_c kbuild: drop redundant "PHONY += FORCE" kbuild: delete unnecessary "@:" kbuild: mark help target as PHONY ... |
||
|
|
b42841b7bb |
kbuild: Get rid of KBUILD_STR
The compiler can accept -DKBUILD_MODNAME="foo", it's just a matter of quoting. That way, we reduce the gcc command line a bit. Signed-off-by: Michal Marek <mmarek@suse.com> |
||
|
|
bc553986a2 |
dtc: turn off dtc unit address warnings by default
The newly added dtc warning to check DT unit-address without reg property and vice-versa generates lots of warnings. Turn off the check unless building with W=1 or W=2. Signed-off-by: Rob Herring <robh@kernel.org> Cc: Michal Marek <mmarek@suse.com> Cc: linux-kbuild@vger.kernel.org |
||
|
|
5c9a8750a6 |
kernel: add kcov code coverage
kcov provides code coverage collection for coverage-guided fuzzing (randomized testing). Coverage-guided fuzzing is a testing technique that uses coverage feedback to determine new interesting inputs to a system. A notable user-space example is AFL (http://lcamtuf.coredump.cx/afl/). However, this technique is not widely used for kernel testing due to missing compiler and kernel support. kcov does not aim to collect as much coverage as possible. It aims to collect more or less stable coverage that is function of syscall inputs. To achieve this goal it does not collect coverage in soft/hard interrupts and instrumentation of some inherently non-deterministic or non-interesting parts of kernel is disbled (e.g. scheduler, locking). Currently there is a single coverage collection mode (tracing), but the API anticipates additional collection modes. Initially I also implemented a second mode which exposes coverage in a fixed-size hash table of counters (what Quentin used in his original patch). I've dropped the second mode for simplicity. This patch adds the necessary support on kernel side. The complimentary compiler support was added in gcc revision 231296. We've used this support to build syzkaller system call fuzzer, which has found 90 kernel bugs in just 2 months: https://github.com/google/syzkaller/wiki/Found-Bugs We've also found 30+ bugs in our internal systems with syzkaller. Another (yet unexplored) direction where kcov coverage would greatly help is more traditional "blob mutation". For example, mounting a random blob as a filesystem, or receiving a random blob over wire. Why not gcov. Typical fuzzing loop looks as follows: (1) reset coverage, (2) execute a bit of code, (3) collect coverage, repeat. A typical coverage can be just a dozen of basic blocks (e.g. an invalid input). In such context gcov becomes prohibitively expensive as reset/collect coverage steps depend on total number of basic blocks/edges in program (in case of kernel it is about 2M). Cost of kcov depends only on number of executed basic blocks/edges. On top of that, kernel requires per-thread coverage because there are always background threads and unrelated processes that also produce coverage. With inlined gcov instrumentation per-thread coverage is not possible. kcov exposes kernel PCs and control flow to user-space which is insecure. But debugfs should not be mapped as user accessible. Based on a patch by Quentin Casasnovas. [akpm@linux-foundation.org: make task_struct.kcov_mode have type `enum kcov_mode'] [akpm@linux-foundation.org: unbreak allmodconfig] [akpm@linux-foundation.org: follow x86 Makefile layout standards] Signed-off-by: Dmitry Vyukov <dvyukov@google.com> Reviewed-by: Kees Cook <keescook@chromium.org> Cc: syzkaller <syzkaller@googlegroups.com> Cc: Vegard Nossum <vegard.nossum@oracle.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Tavis Ormandy <taviso@google.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Quentin Casasnovas <quentin.casasnovas@oracle.com> Cc: Kostya Serebryany <kcc@google.com> Cc: Eric Dumazet <edumazet@google.com> Cc: Alexander Potapenko <glider@google.com> Cc: Kees Cook <keescook@google.com> Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: Sasha Levin <sasha.levin@oracle.com> Cc: David Drysdale <drysdale@google.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com> Cc: Kirill A. Shutemov <kirill@shutemov.name> Cc: Jiri Slaby <jslaby@suse.cz> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> |
||
|
|
6b22b3d161 |
kbuild: Allow using host dtc instead of kernel's copy
Development of dtc happens in its own upstream repository, but testing dtc changes against the kernel tree is useful. Change dtc to a variable that users can override. Signed-off-by: Rob Herring <robh@kernel.org> Cc: Michal Marek <mmarek@suse.com> Cc: linux-kbuild@vger.kernel.org |
||
|
|
c6d308534a |
UBSAN: run-time undefined behavior sanity checker
UBSAN uses compile-time instrumentation to catch undefined behavior (UB). Compiler inserts code that perform certain kinds of checks before operations that could cause UB. If check fails (i.e. UB detected) __ubsan_handle_* function called to print error message. So the most of the work is done by compiler. This patch just implements ubsan handlers printing errors. GCC has this capability since 4.9.x [1] (see -fsanitize=undefined option and its suboptions). However GCC 5.x has more checkers implemented [2]. Article [3] has a bit more details about UBSAN in the GCC. [1] - https://gcc.gnu.org/onlinedocs/gcc-4.9.0/gcc/Debugging-Options.html [2] - https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html [3] - http://developerblog.redhat.com/2014/10/16/gcc-undefined-behavior-sanitizer-ubsan/ Issues which UBSAN has found thus far are: Found bugs: * out-of-bounds access - |
||
|
|
d9569f003c |
Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull kbuild updates from Michal Marek: - Make <modname>-m in makefiles work like <modname>-y and fix the fallout - Minor genksyms fix - Fix race with make -j install modules_install - Move -Wsign-compare from make W=1 to W=2 - Other minor fixes * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: kbuild: Demote 'sign-compare' warning to W=2 Makefile: revert "Makefile: Document ability to make file.lst and file.S" partially kbuild: Do not run modules_install and install in paralel genksyms: Handle string literals with spaces in reference files fixdep: constify strrcmp arguments ath10k: Fix build with CONFIG_THERMAL=m Revert "drm: Hack around CONFIG_AGP=m build failures" kbuild: Allow to specify composite modules with modname-m staging/ad7606: Actually build the interface modules |
||
|
|
a7e137eb94 |
kbuild: add AFLAGS_REMOVE_(basename).o option
It is already possible to remove CFLAGS with the CFLAGS_REMOVE option
that was introduced with commit
|
||
|
|
cf4f21938e |
kbuild: Allow to specify composite modules with modname-m
This allows to write drm-$(CONFIG_AGP) += drm_agpsupport.o without having to handle CONFIG_AGP=y vs. CONFIG_AGP=m. Only support this syntax for modules, since built-in code depending on something modular cannot work and init/Makefile actually relies on the current semantics. There are a few drivers which adapted to the current semantics out of necessity; these are fixed to also work when the respective subsystem is modular. Acked-by: Peter Chen <peter.chen@freescale.com> [chipidea] Signed-off-by: Michal Marek <mmarek@suse.com> |
||
|
|
77479b38e2 |
kbuild: Create directory for target DTB
When building specific DTBs out of the kernel tree the vendor subdirs (boot/dts/<vendor>) are not created, ensure that they are before building the DTB. Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Olof Johansson <olof@lixom.net> |
||
|
|
0b24becc81 |
kasan: add kernel address sanitizer infrastructure
Kernel Address sanitizer (KASan) is a dynamic memory error detector. It
provides fast and comprehensive solution for finding use-after-free and
out-of-bounds bugs.
KASAN uses compile-time instrumentation for checking every memory access,
therefore GCC > v4.9.2 required. v4.9.2 almost works, but has issues with
putting symbol aliases into the wrong section, which breaks kasan
instrumentation of globals.
This patch only adds infrastructure for kernel address sanitizer. It's
not available for use yet. The idea and some code was borrowed from [1].
Basic idea:
The main idea of KASAN is to use shadow memory to record whether each byte
of memory is safe to access or not, and use compiler's instrumentation to
check the shadow memory on each memory access.
Address sanitizer uses 1/8 of the memory addressable in kernel for shadow
memory and uses direct mapping with a scale and offset to translate a
memory address to its corresponding shadow address.
Here is function to translate address to corresponding shadow address:
unsigned long kasan_mem_to_shadow(unsigned long addr)
{
return (addr >> KASAN_SHADOW_SCALE_SHIFT) + KASAN_SHADOW_OFFSET;
}
where KASAN_SHADOW_SCALE_SHIFT = 3.
So for every 8 bytes there is one corresponding byte of shadow memory.
The following encoding used for each shadow byte: 0 means that all 8 bytes
of the corresponding memory region are valid for access; k (1 <= k <= 7)
means that the first k bytes are valid for access, and other (8 - k) bytes
are not; Any negative value indicates that the entire 8-bytes are
inaccessible. Different negative values used to distinguish between
different kinds of inaccessible memory (redzones, freed memory) (see
mm/kasan/kasan.h).
To be able to detect accesses to bad memory we need a special compiler.
Such compiler inserts a specific function calls (__asan_load*(addr),
__asan_store*(addr)) before each memory access of size 1, 2, 4, 8 or 16.
These functions check whether memory region is valid to access or not by
checking corresponding shadow memory. If access is not valid an error
printed.
Historical background of the address sanitizer from Dmitry Vyukov:
"We've developed the set of tools, AddressSanitizer (Asan),
ThreadSanitizer and MemorySanitizer, for user space. We actively use
them for testing inside of Google (continuous testing, fuzzing,
running prod services). To date the tools have found more than 10'000
scary bugs in Chromium, Google internal codebase and various
open-source projects (Firefox, OpenSSL, gcc, clang, ffmpeg, MySQL and
lots of others): [2] [3] [4].
The tools are part of both gcc and clang compilers.
We have not yet done massive testing under the Kernel AddressSanitizer
(it's kind of chicken and egg problem, you need it to be upstream to
start applying it extensively). To date it has found about 50 bugs.
Bugs that we've found in upstream kernel are listed in [5].
We've also found ~20 bugs in out internal version of the kernel. Also
people from Samsung and Oracle have found some.
[...]
As others noted, the main feature of AddressSanitizer is its
performance due to inline compiler instrumentation and simple linear
shadow memory. User-space Asan has ~2x slowdown on computational
programs and ~2x memory consumption increase. Taking into account that
kernel usually consumes only small fraction of CPU and memory when
running real user-space programs, I would expect that kernel Asan will
have ~10-30% slowdown and similar memory consumption increase (when we
finish all tuning).
I agree that Asan can well replace kmemcheck. We have plans to start
working on Kernel MemorySanitizer that finds uses of unitialized
memory. Asan+Msan will provide feature-parity with kmemcheck. As
others noted, Asan will unlikely replace debug slab and pagealloc that
can be enabled at runtime. Asan uses compiler instrumentation, so even
if it is disabled, it still incurs visible overheads.
Asan technology is easily portable to other architectures. Compiler
instrumentation is fully portable. Runtime has some arch-dependent
parts like shadow mapping and atomic operation interception. They are
relatively easy to port."
Comparison with other debugging features:
========================================
KMEMCHECK:
- KASan can do almost everything that kmemcheck can. KASan uses
compile-time instrumentation, which makes it significantly faster than
kmemcheck. The only advantage of kmemcheck over KASan is detection of
uninitialized memory reads.
Some brief performance testing showed that kasan could be
x500-x600 times faster than kmemcheck:
$ netperf -l 30
MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to localhost (127.0.0.1) port 0 AF_INET
Recv Send Send
Socket Socket Message Elapsed
Size Size Size Time Throughput
bytes bytes bytes secs. 10^6bits/sec
no debug: 87380 16384 16384 30.00 41624.72
kasan inline: 87380 16384 16384 30.00 12870.54
kasan outline: 87380 16384 16384 30.00 10586.39
kmemcheck: 87380 16384 16384 30.03 20.23
- Also kmemcheck couldn't work on several CPUs. It always sets
number of CPUs to 1. KASan doesn't have such limitation.
DEBUG_PAGEALLOC:
- KASan is slower than DEBUG_PAGEALLOC, but KASan works on sub-page
granularity level, so it able to find more bugs.
SLUB_DEBUG (poisoning, redzones):
- SLUB_DEBUG has lower overhead than KASan.
- SLUB_DEBUG in most cases are not able to detect bad reads,
KASan able to detect both reads and writes.
- In some cases (e.g. redzone overwritten) SLUB_DEBUG detect
bugs only on allocation/freeing of object. KASan catch
bugs right before it will happen, so we always know exact
place of first bad read/write.
[1] https://code.google.com/p/address-sanitizer/wiki/AddressSanitizerForKernel
[2] https://code.google.com/p/address-sanitizer/wiki/FoundBugs
[3] https://code.google.com/p/thread-sanitizer/wiki/FoundBugs
[4] https://code.google.com/p/memory-sanitizer/wiki/FoundBugs
[5] https://code.google.com/p/address-sanitizer/wiki/AddressSanitizerForKernel#Trophies
Based on work by Andrey Konovalov.
Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com>
Acked-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrey Konovalov <adech.fo@gmail.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Konstantin Serebryany <kcc@google.com>
Cc: Dmitry Chernenkov <dmitryc@google.com>
Cc: Yuri Gribov <tetra2005@gmail.com>
Cc: Konstantin Khlebnikov <koct9i@gmail.com>
Cc: Sasha Levin <sasha.levin@oracle.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
||
|
|
9fb5e53722 |
dts, kbuild: Factor out dtbs install rules to Makefile.dtbinst
Move dtbs install rules to Makefile.dtbinst. This change is needed to implement support for dts vendor subdirs. The change makes Makefiles easier and smaller as no longer the dtbs_install rule needs to be defined. Another advantage is that install goals are not encoded in targets anymore (%.dtb_dtbinst_). Signed-off-by: Robert Richter <rrichter@cavium.com> |
||
|
|
c8589d1e9e |
kbuild: handle multi-objs dependency appropriately
The comment in scripts/Makefile.build says as follows:
We would rather have a list of rules like
foo.o: $(foo-objs)
but that's not so easy, so we rather make all composite objects depend
on the set of all their parts
This commit makes it possible!
For example, assume a Makefile like this
obj-m = foo.o bar.o
foo-objs := foo1.o foo2.o
bar-objs := bar1.o bar2.o
Without this patch, foo.o depends on all of
foo1.o foo2.o bar1.o bar2.o.
It looks funny that foo.o is regenerated when bar1.c is updated.
Now we can handle the dependency of foo.o and bar.o separately.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
|
||
|
|
38385f8f01 |
kbuild: trivial - remove trailing spaces
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Michal Marek <mmarek@suse.cz> |
||
|
|
b003d7706a |
Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull kbuild changes from Michal Marek: - cleanups in the main Makefiles and Documentation/DocBook/Makefile - make O=... directory is automatically created if needed - mrproper/distclean removes the old include/linux/version.h to make life easier when bisecting across the commit that moved the version.h file * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: kbuild: docbook: fix the include error when executing "make help" kbuild: create a build directory automatically for out-of-tree build kbuild: remove redundant '.*.cmd' pattern from make distclean kbuild: move "quote" to Kbuild.include to be consistent kbuild: docbook: use $(obj) and $(src) rather than specific path kbuild: unconditionally clobber include/linux/version.h on distclean kbuild: docbook: specify KERNELDOC dependency correctly kbuild: docbook: include cmd files more simply kbuild: specify build_docproc as a phony target |
||
|
|
13338935f1 |
kbuild: move "quote" to Kbuild.include to be consistent
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Michal Marek <mmarek@suse.cz> |
||
|
|
dab2310d9d |
Merge tag 'v3.14-rc5' into HEAD
Linux 3.14-rc5 |
||
|
|
f4d4ffc03e |
kbuild: dtbs_install: new make target
Unlike other build products in the Linux kernel, there is no 'make
*install' mechanism to put devicetree blobs in a standard place.
This commit adds a new 'dtbs_install' make target which copies all of
the dtbs into the INSTALL_DTBS_PATH directory. INSTALL_DTBS_PATH can be
set before calling make to change the default install directory. If not
set then it defaults to:
$INSTALL_PATH/dtbs/$KERNELRELEASE.
This is done to keep dtbs from different kernel versions separate until
things have settled down. Once the dtbs are stable, and not so strongly
linked to the kernel version, the devicetree files will most likely move
to their own repo. Users will need to upgrade install scripts at that
time.
v7: (reworked by Grant Likely)
- Moved rules from arch/arm/Makefile to arch/arm/boot/dts/Makefile so
that each dtb install could have a separate target and be reported as
part of the make output.
- Fixed dependency problem to ensure $KERNELRELEASE is calculated before
attempting to install
- Removed option to call external script. Copying the files should be
sufficient and a build system can post-process the install directory.
Despite the fact an external script is used for installing the kernel,
I don't think that is a pattern that should be encouraged. I would
rather see buildroot type tools post process the install directory to
rename or move dtb files after installing to a staging directory.
- Plus it is easy to add a hook after the fact without blocking the
rest of this feature.
- Move the helper targets into scripts/Makefile.lib with the rest of the
common dtb rules
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Cc: Michal Marek <mmarek@suse.cz>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Rob Herring <robh+dt@kernel.org>
|
||
|
|
b5190516b2 |
of: Move testcase FDT data into drivers/of
The testcase data is usable by any platform. This patch moves it into the drivers/of directory so it can be included by any architecture. Using the test cases requires manually adding #include <testcases.dtsi> to the end of the boards .dtsi file and enabling CONFIG_OF_SELFTEST. Not pretty though. A useful project would be to make the testcase code easier to execute. Signed-off-by: Grant Likely <grant.likely@linaro.org> |
||
|
|
cb63fc2662 |
Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull kbuild updates from Michal Marek: - fix for make headers_install argv explosion with too long path - scripts/setlocalversion does not call git update-index needlessly - fix for the src.rpm produced by make rpm-pkg. The new make image_name can be useful also for other packaging tools. - scripts/mod/devicetable-offsets.o is not rebuilt during each make run - make modules_install dependency fix - scripts/sortextable portability fix - fix for kbuild to generate the output directory for all object files in subdirs. - a couple of minor fixes * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: kbuild: create directory for dir/file.o tools/include: use stdint types for user-space byteshift headers Makefile: Fix install error with make -j option Fix a build warning in scripts/mod/file2alias.c improve modalias building scripts/mod: Spelling s/DEVICEVTABLE/DEVICETABLE/ kbuild: fix error when building from src rpm scripts/setlocalversion on write-protected source tree Makefile.lib: align DTB quiet_cmd kbuild: fix make headers_install when path is too long |
||
|
|
e76e1fdfa8 |
lib: add support for LZ4-compressed kernel
Add support for extracting LZ4-compressed kernel images, as well as LZ4-compressed ramdisk images in the kernel boot process. Signed-off-by: Kyungsik Lee <kyungsik.lee@lge.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Borislav Petkov <bp@alien8.de> Cc: Florian Fainelli <florian@openwrt.org> Cc: Yann Collet <yann.collet.73@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> |
||
|
|
4d47dde47f |
kbuild: create directory for dir/file.o
When add a obj with dir to obj-y, like this
obj-y += dir/file.o
The $(obj)/dir not created, this patch fix this.
When try to add a file(which in a subdir) to my board's obj-y, the build
progress crashed.
For example, I use at91rm9200ek board, and in kernel dir run:
mkdir objtree
make O=objtree at91rm9200_defconfig
mkdir arch/arm/mach-at91/dir
touch arch/arm/mach-at91/dir/file.c
and edit arch/arm/mach-at91/dir/file.c to add some code.
then edit arch/arm/mach-at91/Makefile, change the following line:
obj-$(CONFIG_MACH_AT91RM9200EK) += board-rm9200ek.o
to:
obj-$(CONFIG_MACH_AT91RM9200EK) += board-rm9200ek.o dir/file.o
Now build it:
make O=objtree
Then the error appears:
...
CC arch/arm/mach-at91/board-rm9200dk.o
CC arch/arm/mach-at91/board-rm9200ek.o
CC arch/arm/mach-at91/dir/file.o
linux-2.6/arch/arm/mach-at91/dir/file.c:5:
fatal error: opening dependency file
arch/arm/mach-at91/dir/.file.o.d: No such file or directory
Check the objtree:
LANG=en ls objtree/arch/arm/mach-at91/dir
ls: cannot access objtree/arch/arm/mach-at91/dir: No such file or directory
It's apparently that the target dir not created for file.o
Check kbuild source code. It seems that kbuild create dirs for that in
$(obj-dirs). But if the dir need not to create a built-in.o, It should
never in $(obj-dirs).
So I make this patch to make sure It in $(obj-dirs)
this bug caused by commit
|
||
|
|
b0a4d8b3cf |
kbuild: make sure we clean up DTB temporary files
Various temporary files used when building DTB files were not suffixed with .tmp and therefore were not cleaned up by "make clean". Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> Tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Grant Likely <grant.likely@linaro.org> |
||
|
|
1c00a47e48 |
Makefile.lib: align DTB quiet_cmd
The unaligned dtb.S filename in make output started to irritate me: DTC arch/metag/boot/dts/skeleton.dtb DTB arch/metag/boot/dts/skeleton.dtb.S AS arch/metag/boot/dts/skeleton.dtb.o LD arch/metag/boot/dts/built-in.o Add an extra space to quiet_cmd_dt_S_dtb so the dtb.S filename aligns with all the others. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Dirk Brandewie <dirk.brandewie@gmail.com> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: trivial@kernel.org Signed-off-by: Michal Marek <mmarek@suse.cz> |
||
|
|
ad06156876 |
kbuild: Don't assume dts files live in arch/*/boot/dts
In commit
|
||
|
|
f8ce1faf55 |
Merge tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux
Pull mudule updates from Rusty Russell: "We get rid of the general module prefix confusion with a binary config option, fix a remove/insert race which Never Happens, and (my favorite) handle the case when we have too many modules for a single commandline. Seriously, the kernel is full, please go away!" * tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: modpost: fix unwanted VMLINUX_SYMBOL_STR expansion X.509: Support parse long form of length octets in Authority Key Identifier module: don't unlink the module until we've removed all exposure. kernel: kallsyms: memory override issue, need check destination buffer length MODSIGN: do not send garbage to stderr when enabling modules signature modpost: handle huge numbers of modules. modpost: add -T option to read module names from file/stdin. modpost: minor cleanup. genksyms: pass symbol-prefix instead of arch module: fix symbol versioning with symbol prefixes CONFIG_SYMBOL_PREFIX: cleanup. |
||
|
|
b40b25fff8 |
kbuild: always run gcc -E on *.dts, remove cmd_dtc_cpp
Replace cmd_dtc with cmd_dtc_cpp, and delete the latter. Previously, a special file extension (.dtsp) was required to trigger the C pre-processor to run on device tree files. This was ugly. Now that previous changes have enhanced cmd_dtc_cpp to collect dependency information from both gcc -E and dtc, we can transparently run the pre- processor on all device tree files, irrespective of whether they use /include/ or #include syntax to include *.dtsi. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Rob Herring <rob.herring@calxeda.com> |
||
|
|
85f02be8e5 |
kbuild: cmd_dtc_cpp: extract deps from both gcc -E and dtc
Prior to this change, when compiling *.dts to *.dtb, the dependency output from dtc would be used, and when compiling *.dtsp to *.dtb, the dependency output from gcc -E alone would be used, despite dtc also being invoked (on a temporary file that was guaranteed to have no dependencies). With this change, when compiling *.dtsp to *.dtb, the dependency files from both gcc -E and dtc are used. This will allow cmd_dtc_cpp to replace cmd_dtc in a future change. In turn, that will allow the C pre- processor to be run transparently on *.dts, without the need to a separate rule or file extension to trigger it. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Rob Herring <rob.herring@calxeda.com> |
||
|
|
c58299aa87 |
kbuild: create an "include chroot" for DT bindings
The recent dtc+cpp support allows header files and C pre-processor defines/macros to be used when compiling device tree files. These headers will typically define various constants that are part of the device tree bindings. The original patch which set up the dtc+cpp include path only considered using those headers from device tree files. However, most are also useful for kernel code which needs to interpret the device tree. In both the DT files and the kernel, I'd like to include the DT-related headers in the same way, for example, <dt-bindings/gpio/tegra-gpio.h>. That will simplify any text which discusses the DT header locations. Creating a <dt-bindings/> for kernel source to use is as simple as placing files into include/dt-bindings/. However, when compiling DT files, the include path should be restricted so that only the dt-bindings path is available; arbitrary kernel headers shouldn't be exposed. For this reason, create a specific include directory for use by dtc+cpp, and symlink dt-bindings from there to the actual location of include/dt-bindings/. For want of a better location, place this "include chroot" into the existing dts/ directory. arch/*/boot/dts/include/dt-bindings -> ../../../../../include/dt-bindings Some headers used by device tree files may not be useful to the kernel; they may be used simply to aid in constructing the DT file (e.g. macros to create a node), but not define any information that the kernel needs to share. These may be placed directly into arch/*/boot/dts/ along with the DT files themselves. Acked-by: Michal Marek <mmarek@suse.cz> Acked-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Rob Herring <rob.herring@calxeda.com> Signed-off-by: Stephen Warren <swarren@nvidia.com> |
||
|
|
b92021b09d |
CONFIG_SYMBOL_PREFIX: cleanup.
We have CONFIG_SYMBOL_PREFIX, which three archs define to the string "_". But Al Viro broke this in "consolidate cond_syscall and SYSCALL_ALIAS declarations" (in linux-next), and he's not the first to do so. Using CONFIG_SYMBOL_PREFIX is awkward, since we usually just want to prefix it so something. So various places define helpers which are defined to nothing if CONFIG_SYMBOL_PREFIX isn't set: 1) include/asm-generic/unistd.h defines __SYMBOL_PREFIX. 2) include/asm-generic/vmlinux.lds.h defines VMLINUX_SYMBOL(sym) 3) include/linux/export.h defines MODULE_SYMBOL_PREFIX. 4) include/linux/kernel.h defines SYMBOL_PREFIX (which differs from #7) 5) kernel/modsign_certificate.S defines ASM_SYMBOL(sym) 6) scripts/modpost.c defines MODULE_SYMBOL_PREFIX 7) scripts/Makefile.lib defines SYMBOL_PREFIX on the commandline if CONFIG_SYMBOL_PREFIX is set, so that we have a non-string version for pasting. (arch/h8300/include/asm/linkage.h defines SYMBOL_NAME(), too). Let's solve this properly: 1) No more generic prefix, just CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX. 2) Make linux/export.h usable from asm. 3) Define VMLINUX_SYMBOL() and VMLINUX_SYMBOL_STR(). 4) Make everyone use them. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: James Hogan <james.hogan@imgtec.com> Tested-by: James Hogan <james.hogan@imgtec.com> (metag) |
||
|
|
e570d7c15a |
kbuild: limit dtc+cpp include path
Device tree source files may now include header files. The intent is that those header files define/name constants used as part of the DT bindings. Currently this feature is open to abuse, since any kernel header file at all can be included, This could allow device tree files to become dependant on kernel headers files, and thus make them no longer OS-independent. This would also prevent separating the device tree source files from the kernel repository. Solve this by limiting the cpp include path for device tree files to separate directories. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca> |
||
|
|
22435f3833 |
kbuild: create a rule to run the pre-processor on *.dts files
Create cmd_dtc_cpp to run the C pre-processor on *.dts file before passing them to dtc for final compilation. This allows the use of #define and #include within the .dts file. Acked-by: Simon Glass <sjg@chromium.org> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Acked-by: Michal Marek <mmarek@suse.cz> Acked-by: Srinivas Kandagatla <srinivas.kandagatla@st.com> Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca> |
||
|
|
90b335fbbc |
kbuild: centralize .dts->.dtb rule
All architectures that use cmd_dtc do so in almost the same way. Create a central build rule to avoid duplication. The one difference is that most current uses of dtc build $(obj)/%.dtb from $(src)/dts/%.dts rather than building the .dtb in the same directory as the .dts file. This difference will be eliminated arch-by-arch in future patches. MIPS is the exception here; it already uses the exact same rule as the new common rule, so the duplicate is removed in this patch to avoid any conflict. arch/mips changes courtesy of Ralf Baechle. Update Documentation/kbuild to remove the explicit call to cmd_dtc from the example, now that the rule exists in a centralized location. Cc: Arnd Bergmann <arnd@arndb.de> Cc: linux-arm-kernel@lists.infradead.org Cc: Olof Johansson <olof@lixom.net> Cc: Russell King <linux@arm.linux.org.uk> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Cc: Jonas Bonn <jonas@southpole.se> Cc: linux@lists.openrisc.net Cc: Aurelien Jacquiot <a-jacquiot@ti.com> Cc: linux-c6x-dev@linux-c6x.org Cc: Mark Salter <msalter@redhat.com> Cc: Michal Simek <monstr@monstr.eu> Cc: microblaze-uclinux@itee.uq.edu.au Cc: Chris Zankel <chris@zankel.net> Cc: linux-xtensa@linux-xtensa.org Cc: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Rob Herring <rob.herring@calxeda.com> |
||
|
|
e339364514 |
Kbuild: centralize MKIMAGE and cmd_uimage definitions
All ARCHs have the same definition of MKIMAGE. Move it to Makefile.lib to avoid duplication. All ARCHs have similar definitions of cmd_uimage. Place a sufficiently parameterized version in Makefile.lib to avoid duplication. Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Acked-by: Nicolas Pitre <nico@linaro.org> Tested-by: Mike Frysinger <vapier@gentoo.org> [Blackfin] Tested-by: Michal Simek <monstr@monstr.eu> [Microblaze] Tested-by: Guan Xuetao <gxt@mprc.pku.edu.cn> [unicore32] Signed-off-by: Michal Marek <mmarek@suse.cz> |
||
|
|
7c43185138 |
Kbuild: Use dtc's -d (dependency) option
This hooks dtc into Kbuild's dependency system. Thus, for example, "make dtbs" will rebuild tegra-harmony.dtb if only tegra20.dtsi has changed yet tegra-harmony.dts has not. The previous lack of this feature recently caused me to have very confusing "git bisect" results. For ARM, it's obvious what to add to $(targets). I'm not familiar enough with other architectures to know what to add there. Powerpc appears to already add various .dtb files into $(targets), but the other archs may need something added to $(targets) to work. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Shawn Guo <shawn.guo@linaro.org> [mmarek: Dropped arch/c6x part to avoid merging commits from the middle of the merge window] Signed-off-by: Michal Marek <mmarek@suse.cz> |